@antv/g2 5.0.0-alpha.0 → 5.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en-US.md +47 -75
- package/README.md +47 -83
- package/dist/g2.min.js +3 -3
- package/esm/animation/fadeIn.js +4 -6
- package/esm/animation/fadeIn.js.map +1 -1
- package/esm/animation/fadeOut.js +4 -4
- package/esm/animation/fadeOut.js.map +1 -1
- package/esm/animation/morphing.js +4 -5
- package/esm/animation/morphing.js.map +1 -1
- package/esm/animation/scaleInX.js +4 -5
- package/esm/animation/scaleInX.js.map +1 -1
- package/esm/animation/scaleInY.js +4 -5
- package/esm/animation/scaleInY.js.map +1 -1
- package/esm/animation/scaleOutX.js +4 -5
- package/esm/animation/scaleOutX.js.map +1 -1
- package/esm/animation/scaleOutY.js +4 -5
- package/esm/animation/scaleOutY.js.map +1 -1
- package/esm/api/chart.d.ts +4 -1
- package/esm/api/chart.js +12 -4
- package/esm/api/chart.js.map +1 -1
- package/esm/api/composition/circle.js.map +1 -1
- package/esm/api/composition/flex.js.map +1 -1
- package/esm/api/composition/keyframe.js.map +1 -1
- package/esm/api/composition/layer.js.map +1 -1
- package/esm/api/composition/matrix.js.map +1 -1
- package/esm/api/composition/rect.js.map +1 -1
- package/esm/api/composition/view.js.map +1 -1
- package/esm/api/index.d.ts +1 -0
- package/esm/api/index.js +1 -0
- package/esm/api/index.js.map +1 -1
- package/esm/api/library.d.ts +3 -0
- package/esm/api/library.js +7 -0
- package/esm/api/library.js.map +1 -0
- package/esm/api/mark/mark.js.map +1 -1
- package/esm/composition/circle.js +1 -1
- package/esm/composition/circle.js.map +1 -1
- package/esm/composition/flex.js +4 -2
- package/esm/composition/flex.js.map +1 -1
- package/esm/composition/layer.js +3 -3
- package/esm/composition/layer.js.map +1 -1
- package/esm/composition/mark.js +2 -1
- package/esm/composition/mark.js.map +1 -1
- package/esm/composition/rect.js +29 -30
- package/esm/composition/rect.js.map +1 -1
- package/esm/composition/utils.d.ts +6 -0
- package/esm/composition/utils.js +19 -0
- package/esm/composition/utils.js.map +1 -1
- package/esm/composition/view.js +3 -2
- package/esm/composition/view.js.map +1 -1
- package/esm/coordinate/fisheye.d.ts +1 -1
- package/esm/coordinate/fisheye.js +1 -1
- package/esm/coordinate/fisheye.js.map +1 -1
- package/esm/coordinate/fisheyeX.d.ts +7 -0
- package/esm/coordinate/fisheyeX.js +6 -0
- package/esm/coordinate/fisheyeX.js.map +1 -0
- package/esm/coordinate/fisheyeY.d.ts +7 -0
- package/esm/coordinate/fisheyeY.js +6 -0
- package/esm/coordinate/fisheyeY.js.map +1 -0
- package/esm/coordinate/helix.d.ts +7 -0
- package/esm/coordinate/helix.js +11 -0
- package/esm/coordinate/helix.js.map +1 -0
- package/esm/coordinate/index.d.ts +7 -0
- package/esm/coordinate/index.js +7 -0
- package/esm/coordinate/index.js.map +1 -1
- package/esm/coordinate/reflect.d.ts +7 -0
- package/esm/coordinate/reflect.js +10 -0
- package/esm/coordinate/reflect.js.map +1 -0
- package/esm/coordinate/reflectX.d.ts +7 -0
- package/esm/coordinate/reflectX.js +10 -0
- package/esm/coordinate/reflectX.js.map +1 -0
- package/esm/coordinate/reflectY.d.ts +7 -0
- package/esm/coordinate/reflectY.js +10 -0
- package/esm/coordinate/reflectY.js.map +1 -0
- package/esm/coordinate/theta.d.ts +7 -0
- package/esm/coordinate/theta.js +11 -0
- package/esm/coordinate/theta.js.map +1 -0
- package/esm/data/arc.d.ts +0 -0
- package/esm/data/arc.js +19 -0
- package/esm/data/arc.js.map +1 -0
- package/esm/data/cluster.d.ts +0 -0
- package/esm/data/cluster.js +47 -0
- package/esm/data/cluster.js.map +1 -0
- package/esm/data/connector.d.ts +7 -0
- package/esm/data/connector.js +9 -0
- package/esm/data/connector.js.map +1 -0
- package/esm/data/fetch.d.ts +4 -0
- package/esm/{transform/preprocessor → data}/fetch.js +10 -19
- package/esm/data/fetch.js.map +1 -0
- package/esm/{transform/preprocessor → data}/filterBy.d.ts +3 -3
- package/esm/{transform/preprocessor → data}/filterBy.js +2 -7
- package/esm/data/filterBy.js.map +1 -0
- package/esm/data/fold.d.ts +10 -0
- package/esm/data/fold.js +24 -0
- package/esm/data/fold.js.map +1 -0
- package/esm/data/index.d.ts +9 -0
- package/esm/data/index.js +10 -0
- package/esm/data/index.js.map +1 -0
- package/esm/data/inline.d.ts +4 -0
- package/esm/data/inline.js +6 -0
- package/esm/data/inline.js.map +1 -0
- package/esm/data/pick.d.ts +7 -0
- package/esm/{transform/preprocessor → data}/pick.js +1 -3
- package/esm/data/pick.js.map +1 -0
- package/esm/{transform/preprocessor → data}/rename.d.ts +3 -3
- package/esm/{transform/preprocessor → data}/rename.js +4 -7
- package/esm/data/rename.js.map +1 -0
- package/esm/data/sankey.d.ts +0 -0
- package/esm/data/sankey.js +96 -0
- package/esm/data/sankey.js.map +1 -0
- package/esm/data/sortBy.d.ts +7 -0
- package/esm/{transform/preprocessor → data}/sortBy.js +4 -9
- package/esm/data/sortBy.js.map +1 -0
- package/esm/data/subset.d.ts +7 -0
- package/esm/{transform/preprocessor → data}/subset.js +5 -10
- package/esm/data/subset.js.map +1 -0
- package/esm/data/tree.d.ts +0 -0
- package/esm/data/tree.js +10 -0
- package/esm/data/tree.js.map +1 -0
- package/esm/{transform → data}/utils/arc/arc.d.ts +0 -0
- package/esm/{transform → data}/utils/arc/arc.js +0 -0
- package/esm/data/utils/arc/arc.js.map +1 -0
- package/esm/{transform → data}/utils/arc/index.d.ts +0 -0
- package/esm/{transform → data}/utils/arc/index.js +0 -0
- package/esm/data/utils/arc/index.js.map +1 -0
- package/esm/{transform → data}/utils/arc/sort.d.ts +0 -0
- package/esm/{transform → data}/utils/arc/sort.js +0 -0
- package/esm/data/utils/arc/sort.js.map +1 -0
- package/esm/{transform → data}/utils/arc/types.d.ts +0 -0
- package/esm/{transform → data}/utils/arc/types.js +0 -0
- package/esm/data/utils/arc/types.js.map +1 -0
- package/esm/{transform → data}/utils/d3-cloud/index.d.ts +0 -0
- package/esm/{transform → data}/utils/d3-cloud/index.js +0 -0
- package/esm/data/utils/d3-cloud/index.js.map +1 -0
- package/esm/{transform → data}/utils/d3-sankey/align.d.ts +0 -0
- package/esm/{transform → data}/utils/d3-sankey/align.js +0 -0
- package/esm/data/utils/d3-sankey/align.js.map +1 -0
- package/esm/{transform → data}/utils/d3-sankey/constant.d.ts +0 -0
- package/esm/{transform → data}/utils/d3-sankey/constant.js +0 -0
- package/esm/data/utils/d3-sankey/constant.js.map +1 -0
- package/esm/{transform → data}/utils/d3-sankey/index.d.ts +0 -0
- package/esm/{transform → data}/utils/d3-sankey/index.js +0 -0
- package/esm/data/utils/d3-sankey/index.js.map +1 -0
- package/esm/{transform → data}/utils/d3-sankey/sankey.d.ts +0 -0
- package/esm/{transform → data}/utils/d3-sankey/sankey.js +0 -0
- package/esm/data/utils/d3-sankey/sankey.js.map +1 -0
- package/esm/{transform → data}/utils/flow.d.ts +0 -0
- package/esm/{transform → data}/utils/flow.js +0 -0
- package/esm/data/utils/flow.js.map +1 -0
- package/esm/{transform → data}/utils/memo.d.ts +0 -0
- package/esm/{transform → data}/utils/memo.js +0 -0
- package/esm/data/utils/memo.js.map +1 -0
- package/esm/data/voronoi.d.ts +0 -0
- package/esm/data/voronoi.js +27 -0
- package/esm/data/voronoi.js.map +1 -0
- package/esm/data/wordCloud.d.ts +0 -0
- package/esm/data/wordCloud.js +100 -0
- package/esm/data/wordCloud.js.map +1 -0
- package/esm/index.d.ts +1 -1
- package/esm/index.js +1 -1
- package/esm/index.js.map +1 -1
- package/esm/interaction/action/service/fisheyeFocus.js +7 -3
- package/esm/interaction/action/service/fisheyeFocus.js.map +1 -1
- package/esm/interaction/action/transformer/filter.js +9 -3
- package/esm/interaction/action/transformer/filter.js.map +1 -1
- package/esm/interaction/builtin/fisheye.d.ts +2 -0
- package/esm/labelLayout/hideOverlap.d.ts +2 -0
- package/esm/labelLayout/hideOverlap.js +38 -0
- package/esm/labelLayout/hideOverlap.js.map +1 -0
- package/esm/labelLayout/index.d.ts +1 -0
- package/esm/labelLayout/index.js +2 -0
- package/esm/labelLayout/index.js.map +1 -0
- package/esm/mark/utils.d.ts +1 -3
- package/esm/mark/utils.js +1 -1
- package/esm/mark/utils.js.map +1 -1
- package/esm/runtime/component.js +11 -3
- package/esm/runtime/component.js.map +1 -1
- package/esm/runtime/coordinate.d.ts +4 -0
- package/esm/runtime/coordinate.js +16 -0
- package/esm/runtime/coordinate.js.map +1 -1
- package/esm/runtime/index.d.ts +1 -0
- package/esm/runtime/index.js +1 -0
- package/esm/runtime/index.js.map +1 -1
- package/esm/runtime/layout.js.map +1 -1
- package/esm/runtime/mark.d.ts +3 -3
- package/esm/runtime/mark.js +34 -90
- package/esm/runtime/mark.js.map +1 -1
- package/esm/runtime/plot.js +19 -13
- package/esm/runtime/plot.js.map +1 -1
- package/esm/runtime/render.js +4 -15
- package/esm/runtime/render.js.map +1 -1
- package/esm/runtime/scale.js +14 -5
- package/esm/runtime/scale.js.map +1 -1
- package/esm/runtime/transform.d.ts +9 -0
- package/esm/runtime/transform.js +144 -0
- package/esm/runtime/transform.js.map +1 -0
- package/esm/runtime/types/common.d.ts +5 -3
- package/esm/runtime/types/component.d.ts +5 -2
- package/esm/runtime/types/data.d.ts +7 -0
- package/esm/runtime/types/data.js +2 -0
- package/esm/runtime/types/data.js.map +1 -0
- package/esm/runtime/types/encode.d.ts +4 -2
- package/esm/runtime/types/options.d.ts +6 -3
- package/esm/runtime/types/transform.d.ts +6 -12
- package/esm/shape/interval/colorRect.js +4 -22
- package/esm/shape/interval/colorRect.js.map +1 -1
- package/esm/shape/label/label.js +81 -10
- package/esm/shape/label/label.js.map +1 -1
- package/esm/shape/utils.d.ts +7 -0
- package/esm/shape/utils.js +23 -0
- package/esm/shape/utils.js.map +1 -1
- package/esm/spec/composition.d.ts +8 -5
- package/esm/spec/coordinate.d.ts +46 -2
- package/esm/spec/data.d.ts +54 -0
- package/esm/spec/data.js +2 -0
- package/esm/spec/data.js.map +1 -0
- package/esm/spec/geometry.d.ts +2 -1
- package/esm/spec/index.d.ts +2 -1
- package/esm/spec/index.js +2 -1
- package/esm/spec/index.js.map +1 -1
- package/esm/spec/labelLayout.d.ts +4 -0
- package/esm/spec/labelLayout.js +2 -0
- package/esm/spec/labelLayout.js.map +1 -0
- package/esm/spec/transform.d.ts +58 -166
- package/esm/spec/transform.js +133 -0
- package/esm/spec/transform.js.map +1 -1
- package/esm/stdlib/index.js +28 -17
- package/esm/stdlib/index.js.map +1 -1
- package/esm/theme/light.js +1 -0
- package/esm/theme/light.js.map +1 -1
- package/esm/transform/{statistic/Select.d.ts → Select.d.ts} +2 -2
- package/esm/transform/{statistic/Select.js → Select.js} +9 -14
- package/esm/transform/Select.js.map +1 -0
- package/esm/transform/{statistic/SelectX.d.ts → SelectX.d.ts} +2 -2
- package/esm/transform/{statistic/SelectX.js → SelectX.js} +1 -3
- package/esm/transform/SelectX.js.map +1 -0
- package/esm/transform/{statistic/SelectY.d.ts → SelectY.d.ts} +2 -2
- package/esm/transform/{statistic/SelectY.js → SelectY.js} +1 -3
- package/esm/transform/SelectY.js.map +1 -0
- package/esm/transform/{statistic/dodgeX.d.ts → dodgeX.d.ts} +2 -2
- package/esm/transform/{statistic/dodgeX.js → dodgeX.js} +19 -19
- package/esm/transform/dodgeX.js.map +1 -0
- package/{lib/transform/statistic → esm/transform}/groupX.d.ts +3 -2
- package/esm/transform/{statistic/groupX.js → groupX.js} +23 -19
- package/esm/transform/groupX.js.map +1 -0
- package/esm/transform/index.d.ts +21 -36
- package/esm/transform/index.js +21 -39
- package/esm/transform/index.js.map +1 -1
- package/esm/transform/{statistic/jitter.d.ts → jitter.d.ts} +3 -3
- package/esm/transform/{statistic/jitter.js → jitter.js} +14 -18
- package/esm/transform/jitter.js.map +1 -0
- package/{lib/transform/statistic → esm/transform}/jitterY.d.ts +2 -2
- package/esm/transform/jitterY.js +21 -0
- package/esm/transform/jitterY.js.map +1 -0
- package/esm/transform/maybeKey.d.ts +6 -0
- package/esm/transform/{inference/maybeKey.js → maybeKey.js} +11 -12
- package/esm/transform/maybeKey.js.map +1 -0
- package/esm/transform/maybeSeries.d.ts +6 -0
- package/esm/transform/maybeSeries.js +17 -0
- package/esm/transform/maybeSeries.js.map +1 -0
- package/esm/transform/maybeSize.d.ts +7 -0
- package/esm/transform/maybeSize.js +20 -0
- package/esm/transform/maybeSize.js.map +1 -0
- package/{lib/transform/inference → esm/transform}/maybeStackY.d.ts +1 -1
- package/esm/transform/{inference/maybeStackY.js → maybeStackY.js} +11 -13
- package/esm/transform/maybeStackY.js.map +1 -0
- package/esm/transform/maybeTitleX.d.ts +6 -0
- package/esm/transform/maybeTitleX.js +17 -0
- package/esm/transform/maybeTitleX.js.map +1 -0
- package/esm/transform/maybeTooltip.d.ts +8 -0
- package/esm/transform/maybeTooltip.js +29 -0
- package/esm/transform/maybeTooltip.js.map +1 -0
- package/esm/transform/{inference/maybeTooltipPosition.d.ts → maybeTooltipPosition.d.ts} +3 -3
- package/esm/transform/maybeTooltipPosition.js +10 -0
- package/esm/transform/maybeTooltipPosition.js.map +1 -0
- package/esm/transform/maybeTooltipY.d.ts +6 -0
- package/esm/transform/maybeTooltipY.js +9 -0
- package/esm/transform/maybeTooltipY.js.map +1 -0
- package/{lib/transform/inference → esm/transform}/maybeZeroX.d.ts +1 -1
- package/esm/transform/maybeZeroX.js +22 -0
- package/esm/transform/maybeZeroX.js.map +1 -0
- package/esm/transform/maybeZeroY.d.ts +6 -0
- package/esm/transform/maybeZeroY.js +21 -0
- package/esm/transform/maybeZeroY.js.map +1 -0
- package/esm/transform/maybeZeroY1.d.ts +6 -0
- package/esm/transform/maybeZeroY1.js +21 -0
- package/esm/transform/maybeZeroY1.js.map +1 -0
- package/esm/transform/{statistic/normalizeY.d.ts → normalizeY.d.ts} +2 -2
- package/esm/transform/{statistic/normalizeY.js → normalizeY.js} +16 -17
- package/esm/transform/normalizeY.js.map +1 -0
- package/esm/transform/{statistic/stackEnter.d.ts → stackEnter.d.ts} +2 -2
- package/esm/transform/{statistic/stackEnter.js → stackEnter.js} +22 -19
- package/esm/transform/stackEnter.js.map +1 -0
- package/esm/transform/{statistic/stackY.d.ts → stackY.d.ts} +2 -2
- package/esm/transform/{statistic/stackY.js → stackY.js} +20 -19
- package/esm/transform/stackY.js.map +1 -0
- package/esm/transform/{statistic/symmetryY.d.ts → symmetryY.d.ts} +2 -2
- package/esm/transform/{statistic/symmetryY.js → symmetryY.js} +16 -17
- package/esm/transform/symmetryY.js.map +1 -0
- package/esm/transform/utils/helper.d.ts +11 -10
- package/esm/transform/utils/helper.js +27 -33
- package/esm/transform/utils/helper.js.map +1 -1
- package/esm/transform/{statistic/utils.d.ts → utils/order.d.ts} +4 -4
- package/esm/transform/{statistic/utils.js → utils/order.js} +7 -5
- package/esm/transform/utils/order.js.map +1 -0
- package/esm/utils/coordinate.d.ts +1 -0
- package/esm/utils/coordinate.js +4 -0
- package/esm/utils/coordinate.js.map +1 -1
- package/lib/animation/fadeIn.js +4 -6
- package/lib/animation/fadeIn.js.map +1 -1
- package/lib/animation/fadeOut.js +4 -4
- package/lib/animation/fadeOut.js.map +1 -1
- package/lib/animation/morphing.js +4 -5
- package/lib/animation/morphing.js.map +1 -1
- package/lib/animation/scaleInX.js +4 -5
- package/lib/animation/scaleInX.js.map +1 -1
- package/lib/animation/scaleInY.js +4 -5
- package/lib/animation/scaleInY.js.map +1 -1
- package/lib/animation/scaleOutX.js +4 -5
- package/lib/animation/scaleOutX.js.map +1 -1
- package/lib/animation/scaleOutY.js +4 -5
- package/lib/animation/scaleOutY.js.map +1 -1
- package/lib/api/chart.d.ts +4 -1
- package/lib/api/chart.js +12 -4
- package/lib/api/chart.js.map +1 -1
- package/lib/api/composition/circle.js.map +1 -1
- package/lib/api/composition/flex.js.map +1 -1
- package/lib/api/composition/keyframe.js.map +1 -1
- package/lib/api/composition/layer.js.map +1 -1
- package/lib/api/composition/matrix.js.map +1 -1
- package/lib/api/composition/rect.js.map +1 -1
- package/lib/api/composition/view.js.map +1 -1
- package/lib/api/index.d.ts +1 -0
- package/lib/api/index.js +3 -1
- package/lib/api/index.js.map +1 -1
- package/lib/api/library.d.ts +3 -0
- package/lib/api/library.js +11 -0
- package/lib/api/library.js.map +1 -0
- package/lib/api/mark/mark.js.map +1 -1
- package/lib/composition/circle.js +1 -1
- package/lib/composition/circle.js.map +1 -1
- package/lib/composition/flex.js +4 -2
- package/lib/composition/flex.js.map +1 -1
- package/lib/composition/layer.js +3 -3
- package/lib/composition/layer.js.map +1 -1
- package/lib/composition/mark.js +2 -1
- package/lib/composition/mark.js.map +1 -1
- package/lib/composition/rect.js +29 -30
- package/lib/composition/rect.js.map +1 -1
- package/lib/composition/utils.d.ts +6 -0
- package/lib/composition/utils.js +21 -1
- package/lib/composition/utils.js.map +1 -1
- package/lib/composition/view.js +3 -2
- package/lib/composition/view.js.map +1 -1
- package/lib/coordinate/fisheye.d.ts +1 -1
- package/lib/coordinate/fisheye.js +1 -1
- package/lib/coordinate/fisheye.js.map +1 -1
- package/lib/coordinate/fisheyeX.d.ts +7 -0
- package/lib/coordinate/fisheyeX.js +10 -0
- package/lib/coordinate/fisheyeX.js.map +1 -0
- package/lib/coordinate/fisheyeY.d.ts +7 -0
- package/lib/coordinate/fisheyeY.js +10 -0
- package/lib/coordinate/fisheyeY.js.map +1 -0
- package/lib/coordinate/helix.d.ts +7 -0
- package/lib/coordinate/helix.js +15 -0
- package/lib/coordinate/helix.js.map +1 -0
- package/lib/coordinate/index.d.ts +7 -0
- package/lib/coordinate/index.js +15 -1
- package/lib/coordinate/index.js.map +1 -1
- package/lib/coordinate/reflect.d.ts +7 -0
- package/lib/coordinate/reflect.js +14 -0
- package/lib/coordinate/reflect.js.map +1 -0
- package/lib/coordinate/reflectX.d.ts +7 -0
- package/lib/coordinate/reflectX.js +14 -0
- package/lib/coordinate/reflectX.js.map +1 -0
- package/lib/coordinate/reflectY.d.ts +7 -0
- package/lib/coordinate/reflectY.js +14 -0
- package/lib/coordinate/reflectY.js.map +1 -0
- package/lib/coordinate/theta.d.ts +7 -0
- package/lib/coordinate/theta.js +15 -0
- package/lib/coordinate/theta.js.map +1 -0
- package/lib/data/arc.d.ts +0 -0
- package/lib/data/arc.js +19 -0
- package/lib/data/arc.js.map +1 -0
- package/lib/data/cluster.d.ts +0 -0
- package/lib/data/cluster.js +47 -0
- package/lib/data/cluster.js.map +1 -0
- package/lib/data/connector.d.ts +7 -0
- package/lib/data/connector.js +13 -0
- package/lib/data/connector.js.map +1 -0
- package/lib/data/fetch.d.ts +4 -0
- package/lib/{transform/preprocessor → data}/fetch.js +10 -19
- package/lib/data/fetch.js.map +1 -0
- package/lib/{transform/preprocessor → data}/filterBy.d.ts +3 -3
- package/lib/{transform/preprocessor → data}/filterBy.js +2 -7
- package/lib/data/filterBy.js.map +1 -0
- package/lib/data/fold.d.ts +10 -0
- package/lib/data/fold.js +29 -0
- package/lib/data/fold.js.map +1 -0
- package/lib/data/index.d.ts +9 -0
- package/lib/data/index.js +22 -0
- package/lib/data/index.js.map +1 -0
- package/lib/data/inline.d.ts +4 -0
- package/lib/data/inline.js +10 -0
- package/lib/data/inline.js.map +1 -0
- package/lib/data/pick.d.ts +7 -0
- package/lib/{transform/preprocessor → data}/pick.js +1 -3
- package/lib/data/pick.js.map +1 -0
- package/lib/{transform/preprocessor → data}/rename.d.ts +3 -3
- package/lib/{transform/preprocessor → data}/rename.js +4 -7
- package/lib/data/rename.js.map +1 -0
- package/lib/data/sankey.d.ts +0 -0
- package/lib/data/sankey.js +96 -0
- package/lib/data/sankey.js.map +1 -0
- package/lib/data/sortBy.d.ts +7 -0
- package/lib/{transform/preprocessor → data}/sortBy.js +4 -9
- package/lib/data/sortBy.js.map +1 -0
- package/lib/data/subset.d.ts +7 -0
- package/lib/{transform/preprocessor → data}/subset.js +5 -10
- package/lib/data/subset.js.map +1 -0
- package/lib/data/tree.d.ts +0 -0
- package/lib/data/tree.js +10 -0
- package/lib/data/tree.js.map +1 -0
- package/lib/{transform → data}/utils/arc/arc.d.ts +0 -0
- package/lib/{transform → data}/utils/arc/arc.js +0 -0
- package/lib/data/utils/arc/arc.js.map +1 -0
- package/lib/{transform → data}/utils/arc/index.d.ts +0 -0
- package/lib/{transform → data}/utils/arc/index.js +0 -0
- package/lib/data/utils/arc/index.js.map +1 -0
- package/lib/{transform → data}/utils/arc/sort.d.ts +0 -0
- package/lib/{transform → data}/utils/arc/sort.js +0 -0
- package/lib/data/utils/arc/sort.js.map +1 -0
- package/lib/{transform → data}/utils/arc/types.d.ts +0 -0
- package/lib/{transform → data}/utils/arc/types.js +0 -0
- package/lib/data/utils/arc/types.js.map +1 -0
- package/lib/{transform → data}/utils/d3-cloud/index.d.ts +0 -0
- package/lib/{transform → data}/utils/d3-cloud/index.js +0 -0
- package/lib/data/utils/d3-cloud/index.js.map +1 -0
- package/lib/{transform → data}/utils/d3-sankey/align.d.ts +0 -0
- package/lib/{transform → data}/utils/d3-sankey/align.js +0 -0
- package/lib/data/utils/d3-sankey/align.js.map +1 -0
- package/lib/{transform → data}/utils/d3-sankey/constant.d.ts +0 -0
- package/lib/{transform → data}/utils/d3-sankey/constant.js +0 -0
- package/lib/data/utils/d3-sankey/constant.js.map +1 -0
- package/lib/{transform → data}/utils/d3-sankey/index.d.ts +0 -0
- package/lib/{transform → data}/utils/d3-sankey/index.js +0 -0
- package/lib/data/utils/d3-sankey/index.js.map +1 -0
- package/lib/{transform → data}/utils/d3-sankey/sankey.d.ts +0 -0
- package/lib/{transform → data}/utils/d3-sankey/sankey.js +0 -0
- package/lib/data/utils/d3-sankey/sankey.js.map +1 -0
- package/lib/{transform → data}/utils/flow.d.ts +0 -0
- package/lib/{transform → data}/utils/flow.js +0 -0
- package/lib/data/utils/flow.js.map +1 -0
- package/lib/{transform → data}/utils/memo.d.ts +0 -0
- package/lib/{transform → data}/utils/memo.js +0 -0
- package/lib/data/utils/memo.js.map +1 -0
- package/lib/data/voronoi.d.ts +0 -0
- package/lib/data/voronoi.js +27 -0
- package/lib/data/voronoi.js.map +1 -0
- package/lib/data/wordCloud.d.ts +0 -0
- package/lib/data/wordCloud.js +100 -0
- package/lib/data/wordCloud.js.map +1 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib/interaction/action/service/fisheyeFocus.js +7 -3
- package/lib/interaction/action/service/fisheyeFocus.js.map +1 -1
- package/lib/interaction/action/transformer/filter.js +9 -3
- package/lib/interaction/action/transformer/filter.js.map +1 -1
- package/lib/interaction/builtin/fisheye.d.ts +2 -0
- package/lib/labelLayout/hideOverlap.d.ts +2 -0
- package/lib/labelLayout/hideOverlap.js +42 -0
- package/lib/labelLayout/hideOverlap.js.map +1 -0
- package/lib/labelLayout/index.d.ts +1 -0
- package/lib/labelLayout/index.js +6 -0
- package/lib/labelLayout/index.js.map +1 -0
- package/lib/mark/utils.d.ts +1 -3
- package/lib/mark/utils.js +1 -1
- package/lib/mark/utils.js.map +1 -1
- package/lib/runtime/component.js +10 -2
- package/lib/runtime/component.js.map +1 -1
- package/lib/runtime/coordinate.d.ts +4 -0
- package/lib/runtime/coordinate.js +21 -1
- package/lib/runtime/coordinate.js.map +1 -1
- package/lib/runtime/index.d.ts +1 -0
- package/lib/runtime/index.js +1 -0
- package/lib/runtime/index.js.map +1 -1
- package/lib/runtime/layout.js.map +1 -1
- package/lib/runtime/mark.d.ts +3 -3
- package/lib/runtime/mark.js +34 -90
- package/lib/runtime/mark.js.map +1 -1
- package/lib/runtime/plot.js +17 -11
- package/lib/runtime/plot.js.map +1 -1
- package/lib/runtime/render.js +4 -15
- package/lib/runtime/render.js.map +1 -1
- package/lib/runtime/scale.js +13 -4
- package/lib/runtime/scale.js.map +1 -1
- package/lib/runtime/transform.d.ts +9 -0
- package/lib/runtime/transform.js +154 -0
- package/lib/runtime/transform.js.map +1 -0
- package/lib/runtime/types/common.d.ts +5 -3
- package/lib/runtime/types/component.d.ts +5 -2
- package/lib/runtime/types/data.d.ts +7 -0
- package/lib/{spec/statistic.js → runtime/types/data.js} +1 -1
- package/lib/runtime/types/data.js.map +1 -0
- package/lib/runtime/types/encode.d.ts +4 -2
- package/lib/runtime/types/options.d.ts +6 -3
- package/lib/runtime/types/transform.d.ts +6 -12
- package/lib/shape/interval/colorRect.js +2 -20
- package/lib/shape/interval/colorRect.js.map +1 -1
- package/lib/shape/label/label.js +80 -9
- package/lib/shape/label/label.js.map +1 -1
- package/lib/shape/utils.d.ts +7 -0
- package/lib/shape/utils.js +25 -1
- package/lib/shape/utils.js.map +1 -1
- package/lib/spec/composition.d.ts +8 -5
- package/lib/spec/coordinate.d.ts +46 -2
- package/lib/spec/data.d.ts +54 -0
- package/lib/spec/data.js +3 -0
- package/lib/spec/data.js.map +1 -0
- package/lib/spec/geometry.d.ts +2 -1
- package/lib/spec/index.d.ts +2 -1
- package/lib/spec/index.js +2 -1
- package/lib/spec/index.js.map +1 -1
- package/lib/spec/labelLayout.d.ts +4 -0
- package/lib/spec/labelLayout.js +3 -0
- package/lib/spec/labelLayout.js.map +1 -0
- package/lib/spec/transform.d.ts +58 -166
- package/lib/spec/transform.js +133 -0
- package/lib/spec/transform.js.map +1 -1
- package/lib/stdlib/index.js +26 -15
- package/lib/stdlib/index.js.map +1 -1
- package/lib/theme/light.js +1 -0
- package/lib/theme/light.js.map +1 -1
- package/lib/transform/{statistic/Select.d.ts → Select.d.ts} +2 -2
- package/lib/transform/{statistic/Select.js → Select.js} +9 -14
- package/lib/transform/Select.js.map +1 -0
- package/lib/transform/{statistic/SelectX.d.ts → SelectX.d.ts} +2 -2
- package/lib/transform/{statistic/SelectX.js → SelectX.js} +1 -3
- package/lib/transform/SelectX.js.map +1 -0
- package/lib/transform/{statistic/SelectY.d.ts → SelectY.d.ts} +2 -2
- package/lib/transform/{statistic/SelectY.js → SelectY.js} +1 -3
- package/lib/transform/SelectY.js.map +1 -0
- package/lib/transform/{statistic/dodgeX.d.ts → dodgeX.d.ts} +2 -2
- package/lib/transform/{statistic/dodgeX.js → dodgeX.js} +22 -22
- package/lib/transform/dodgeX.js.map +1 -0
- package/{esm/transform/statistic → lib/transform}/groupX.d.ts +3 -2
- package/lib/transform/{statistic/groupX.js → groupX.js} +23 -19
- package/lib/transform/groupX.js.map +1 -0
- package/lib/transform/index.d.ts +21 -36
- package/lib/transform/index.js +22 -55
- package/lib/transform/index.js.map +1 -1
- package/lib/transform/{statistic/jitter.d.ts → jitter.d.ts} +3 -3
- package/lib/transform/{statistic/jitter.js → jitter.js} +16 -20
- package/lib/transform/jitter.js.map +1 -0
- package/{esm/transform/statistic → lib/transform}/jitterY.d.ts +2 -2
- package/lib/transform/{statistic/jitterY.js → jitterY.js} +9 -15
- package/lib/transform/jitterY.js.map +1 -0
- package/lib/transform/maybeKey.d.ts +6 -0
- package/lib/transform/{inference/maybeKey.js → maybeKey.js} +11 -12
- package/lib/transform/maybeKey.js.map +1 -0
- package/lib/transform/maybeSeries.d.ts +6 -0
- package/lib/transform/maybeSeries.js +21 -0
- package/lib/transform/maybeSeries.js.map +1 -0
- package/lib/transform/maybeSize.d.ts +7 -0
- package/lib/transform/maybeSize.js +24 -0
- package/lib/transform/maybeSize.js.map +1 -0
- package/{esm/transform/inference → lib/transform}/maybeStackY.d.ts +1 -1
- package/lib/transform/{inference/maybeStackY.js → maybeStackY.js} +11 -13
- package/lib/transform/maybeStackY.js.map +1 -0
- package/lib/transform/maybeTitleX.d.ts +6 -0
- package/lib/transform/maybeTitleX.js +21 -0
- package/lib/transform/maybeTitleX.js.map +1 -0
- package/lib/transform/maybeTooltip.d.ts +8 -0
- package/lib/transform/{inference/maybeTooltip.js → maybeTooltip.js} +13 -14
- package/lib/transform/maybeTooltip.js.map +1 -0
- package/lib/transform/{inference/maybeTooltipPosition.d.ts → maybeTooltipPosition.d.ts} +3 -3
- package/lib/transform/{inference/maybeTooltipPosition.js → maybeTooltipPosition.js} +3 -5
- package/lib/transform/maybeTooltipPosition.js.map +1 -0
- package/lib/transform/maybeTooltipY.d.ts +6 -0
- package/lib/transform/{inference/maybeTooltipY.js → maybeTooltipY.js} +2 -5
- package/lib/transform/maybeTooltipY.js.map +1 -0
- package/{esm/transform/inference → lib/transform}/maybeZeroX.d.ts +1 -1
- package/lib/transform/maybeZeroX.js +26 -0
- package/lib/transform/maybeZeroX.js.map +1 -0
- package/lib/transform/maybeZeroY.d.ts +6 -0
- package/lib/transform/maybeZeroY.js +25 -0
- package/lib/transform/maybeZeroY.js.map +1 -0
- package/lib/transform/maybeZeroY1.d.ts +6 -0
- package/lib/transform/maybeZeroY1.js +25 -0
- package/lib/transform/maybeZeroY1.js.map +1 -0
- package/lib/transform/{statistic/normalizeY.d.ts → normalizeY.d.ts} +2 -2
- package/lib/transform/{statistic/normalizeY.js → normalizeY.js} +16 -17
- package/lib/transform/normalizeY.js.map +1 -0
- package/lib/transform/{statistic/stackEnter.d.ts → stackEnter.d.ts} +2 -2
- package/lib/transform/{statistic/stackEnter.js → stackEnter.js} +22 -19
- package/lib/transform/stackEnter.js.map +1 -0
- package/lib/transform/{statistic/stackY.d.ts → stackY.d.ts} +2 -2
- package/lib/transform/{statistic/stackY.js → stackY.js} +22 -21
- package/lib/transform/stackY.js.map +1 -0
- package/lib/transform/{statistic/symmetryY.d.ts → symmetryY.d.ts} +2 -2
- package/lib/transform/{statistic/symmetryY.js → symmetryY.js} +16 -17
- package/lib/transform/symmetryY.js.map +1 -0
- package/lib/transform/utils/helper.d.ts +11 -10
- package/lib/transform/utils/helper.js +32 -38
- package/lib/transform/utils/helper.js.map +1 -1
- package/lib/transform/{statistic/utils.d.ts → utils/order.d.ts} +4 -4
- package/lib/transform/{statistic/utils.js → utils/order.js} +7 -5
- package/lib/transform/utils/order.js.map +1 -0
- package/lib/utils/coordinate.d.ts +1 -0
- package/lib/utils/coordinate.js +6 -1
- package/lib/utils/coordinate.js.map +1 -1
- package/package.json +6 -5
- package/src/animation/fadeIn.ts +4 -6
- package/src/animation/fadeOut.ts +4 -4
- package/src/animation/morphing.ts +4 -5
- package/src/animation/scaleInX.ts +9 -5
- package/src/animation/scaleInY.ts +9 -5
- package/src/animation/scaleOutX.ts +9 -5
- package/src/animation/scaleOutY.ts +9 -5
- package/src/api/chart.ts +19 -8
- package/src/api/index.ts +1 -0
- package/src/api/library.ts +12 -0
- package/src/composition/circle.ts +1 -1
- package/src/composition/flex.ts +4 -2
- package/src/composition/layer.ts +3 -2
- package/src/composition/mark.ts +3 -0
- package/src/composition/rect.ts +27 -28
- package/src/composition/utils.ts +10 -0
- package/src/composition/view.ts +3 -2
- package/src/coordinate/fisheye.ts +3 -2
- package/src/coordinate/fisheyeX.ts +15 -0
- package/src/coordinate/fisheyeY.ts +15 -0
- package/src/coordinate/helix.ts +21 -0
- package/src/coordinate/index.ts +7 -0
- package/src/coordinate/reflect.ts +15 -0
- package/src/coordinate/reflectX.ts +15 -0
- package/src/coordinate/reflectY.ts +15 -0
- package/src/coordinate/theta.ts +21 -0
- package/src/data/arc.ts +21 -0
- package/src/data/cluster.ts +56 -0
- package/src/data/connector.ts +14 -0
- package/src/data/fetch.ts +23 -0
- package/src/data/filterBy.ts +19 -0
- package/src/data/fold.ts +29 -0
- package/src/data/index.ts +9 -0
- package/src/data/inline.ts +11 -0
- package/src/{transform/preprocessor → data}/pick.ts +4 -6
- package/src/{transform/preprocessor → data}/rename.ts +7 -10
- package/src/data/sankey.ts +105 -0
- package/src/{transform/preprocessor → data}/sortBy.ts +7 -12
- package/src/{transform/preprocessor → data}/subset.ts +8 -13
- package/src/data/tree.ts +12 -0
- package/src/{transform → data}/utils/arc/arc.ts +0 -0
- package/src/{transform → data}/utils/arc/index.ts +0 -0
- package/src/{transform → data}/utils/arc/sort.ts +0 -0
- package/src/{transform → data}/utils/arc/types.ts +0 -0
- package/src/{transform → data}/utils/d3-cloud/index.ts +0 -0
- package/src/{transform → data}/utils/d3-sankey/align.ts +0 -0
- package/src/{transform → data}/utils/d3-sankey/constant.ts +0 -0
- package/src/{transform → data}/utils/d3-sankey/index.ts +0 -0
- package/src/{transform → data}/utils/d3-sankey/sankey.ts +0 -0
- package/src/{transform → data}/utils/flow.ts +0 -0
- package/src/{transform → data}/utils/memo.ts +1 -0
- package/src/data/voronoi.ts +30 -0
- package/src/data/wordCloud.ts +115 -0
- package/src/index.ts +1 -1
- package/src/interaction/action/service/fisheyeFocus.ts +16 -3
- package/src/interaction/action/transformer/filter.ts +8 -4
- package/src/labelLayout/hideOverlap.ts +47 -0
- package/src/labelLayout/index.ts +1 -0
- package/src/mark/utils.ts +1 -1
- package/src/runtime/component.ts +23 -3
- package/src/runtime/coordinate.ts +20 -0
- package/src/runtime/index.ts +1 -0
- package/src/runtime/layout.ts +1 -1
- package/src/runtime/mark.ts +56 -135
- package/src/runtime/plot.ts +29 -22
- package/src/runtime/render.ts +4 -5
- package/src/runtime/scale.ts +15 -5
- package/src/runtime/transform.ts +159 -0
- package/src/runtime/types/common.ts +5 -2
- package/src/runtime/types/component.ts +13 -3
- package/src/runtime/types/data.ts +10 -0
- package/src/runtime/types/encode.ts +6 -2
- package/src/runtime/types/options.ts +7 -2
- package/src/runtime/types/transform.ts +8 -13
- package/src/shape/interval/colorRect.ts +4 -23
- package/src/shape/label/label.ts +94 -11
- package/src/shape/utils.ts +31 -0
- package/src/spec/composition.ts +8 -5
- package/src/spec/coordinate.ts +67 -3
- package/src/spec/data.ts +81 -0
- package/src/spec/geometry.ts +2 -1
- package/src/spec/index.ts +2 -1
- package/src/spec/labelLayout.ts +5 -0
- package/src/spec/transform.ts +245 -194
- package/src/stdlib/index.ts +50 -31
- package/src/theme/light.ts +1 -0
- package/src/transform/{statistic/dodgeX.ts → dodgeX.ts} +24 -21
- package/src/transform/{statistic/groupX.ts → groupX.ts} +25 -24
- package/src/transform/index.ts +21 -44
- package/src/transform/{statistic/jitter.ts → jitter.ts} +17 -21
- package/src/transform/{statistic/jitterY.ts → jitterY.ts} +11 -17
- package/src/transform/maybeKey.ts +26 -0
- package/src/transform/maybeSeries.ts +20 -0
- package/src/transform/maybeSize.ts +23 -0
- package/src/transform/{inference/maybeStackY.ts → maybeStackY.ts} +12 -13
- package/src/transform/maybeTitleX.ts +20 -0
- package/src/transform/maybeTooltip.ts +34 -0
- package/src/transform/{inference/maybeTooltipPosition.ts → maybeTooltipPosition.ts} +4 -6
- package/src/transform/{inference/maybeTooltipY.ts → maybeTooltipY.ts} +3 -6
- package/src/transform/maybeZeroX.ts +25 -0
- package/src/transform/maybeZeroY.ts +24 -0
- package/src/transform/maybeZeroY1.ts +24 -0
- package/src/transform/{statistic/normalizeY.ts → normalizeY.ts} +20 -19
- package/src/transform/{statistic/select.ts → select.ts} +11 -16
- package/src/transform/{statistic/selectX.ts → selectX.ts} +3 -5
- package/src/transform/{statistic/selectY.ts → selectY.ts} +3 -5
- package/src/transform/{statistic/stackEnter.ts → stackEnter.ts} +29 -21
- package/src/transform/{statistic/stackY.ts → stackY.ts} +22 -21
- package/src/transform/{statistic/symmetryY.ts → symmetryY.ts} +20 -19
- package/src/transform/utils/helper.ts +27 -44
- package/src/transform/{statistic/utils.ts → utils/order.ts} +20 -17
- package/src/utils/coordinate.ts +5 -0
- package/esm/spec/statistic.d.ts +0 -69
- package/esm/spec/statistic.js +0 -2
- package/esm/spec/statistic.js.map +0 -1
- package/esm/transform/inference/maybeArrayField.d.ts +0 -8
- package/esm/transform/inference/maybeArrayField.js +0 -47
- package/esm/transform/inference/maybeArrayField.js.map +0 -1
- package/esm/transform/inference/maybeKey.d.ts +0 -9
- package/esm/transform/inference/maybeKey.js.map +0 -1
- package/esm/transform/inference/maybeSeries.d.ts +0 -7
- package/esm/transform/inference/maybeSeries.js +0 -23
- package/esm/transform/inference/maybeSeries.js.map +0 -1
- package/esm/transform/inference/maybeSize.d.ts +0 -7
- package/esm/transform/inference/maybeSize.js +0 -14
- package/esm/transform/inference/maybeSize.js.map +0 -1
- package/esm/transform/inference/maybeStackY.js.map +0 -1
- package/esm/transform/inference/maybeTitleX.d.ts +0 -7
- package/esm/transform/inference/maybeTitleX.js +0 -23
- package/esm/transform/inference/maybeTitleX.js.map +0 -1
- package/esm/transform/inference/maybeTooltip.d.ts +0 -9
- package/esm/transform/inference/maybeTooltip.js +0 -30
- package/esm/transform/inference/maybeTooltip.js.map +0 -1
- package/esm/transform/inference/maybeTooltipPosition.js +0 -12
- package/esm/transform/inference/maybeTooltipPosition.js.map +0 -1
- package/esm/transform/inference/maybeTooltipY.d.ts +0 -7
- package/esm/transform/inference/maybeTooltipY.js +0 -12
- package/esm/transform/inference/maybeTooltipY.js.map +0 -1
- package/esm/transform/inference/maybeZeroX.js +0 -14
- package/esm/transform/inference/maybeZeroX.js.map +0 -1
- package/esm/transform/inference/maybeZeroY.d.ts +0 -7
- package/esm/transform/inference/maybeZeroY.js +0 -14
- package/esm/transform/inference/maybeZeroY.js.map +0 -1
- package/esm/transform/inference/maybeZeroY1.d.ts +0 -7
- package/esm/transform/inference/maybeZeroY1.js +0 -14
- package/esm/transform/inference/maybeZeroY1.js.map +0 -1
- package/esm/transform/preprocessor/arc.d.ts +0 -7
- package/esm/transform/preprocessor/arc.js +0 -16
- package/esm/transform/preprocessor/arc.js.map +0 -1
- package/esm/transform/preprocessor/cluster.d.ts +0 -5
- package/esm/transform/preprocessor/cluster.js +0 -40
- package/esm/transform/preprocessor/cluster.js.map +0 -1
- package/esm/transform/preprocessor/connector.d.ts +0 -7
- package/esm/transform/preprocessor/connector.js +0 -16
- package/esm/transform/preprocessor/connector.js.map +0 -1
- package/esm/transform/preprocessor/fetch.d.ts +0 -8
- package/esm/transform/preprocessor/fetch.js.map +0 -1
- package/esm/transform/preprocessor/filterBy.js.map +0 -1
- package/esm/transform/preprocessor/fold.d.ts +0 -8
- package/esm/transform/preprocessor/fold.js +0 -27
- package/esm/transform/preprocessor/fold.js.map +0 -1
- package/esm/transform/preprocessor/pick.d.ts +0 -7
- package/esm/transform/preprocessor/pick.js.map +0 -1
- package/esm/transform/preprocessor/rename.js.map +0 -1
- package/esm/transform/preprocessor/sankey.d.ts +0 -8
- package/esm/transform/preprocessor/sankey.js +0 -80
- package/esm/transform/preprocessor/sankey.js.map +0 -1
- package/esm/transform/preprocessor/sortBy.d.ts +0 -7
- package/esm/transform/preprocessor/sortBy.js.map +0 -1
- package/esm/transform/preprocessor/subset.d.ts +0 -7
- package/esm/transform/preprocessor/subset.js.map +0 -1
- package/esm/transform/preprocessor/tree.d.ts +0 -4
- package/esm/transform/preprocessor/tree.js +0 -7
- package/esm/transform/preprocessor/tree.js.map +0 -1
- package/esm/transform/preprocessor/voronoi.d.ts +0 -4
- package/esm/transform/preprocessor/voronoi.js +0 -20
- package/esm/transform/preprocessor/voronoi.js.map +0 -1
- package/esm/transform/preprocessor/wordCloud.d.ts +0 -6
- package/esm/transform/preprocessor/wordCloud.js +0 -106
- package/esm/transform/preprocessor/wordCloud.js.map +0 -1
- package/esm/transform/statistic/Select.js.map +0 -1
- package/esm/transform/statistic/SelectX.js.map +0 -1
- package/esm/transform/statistic/SelectY.js.map +0 -1
- package/esm/transform/statistic/dodgeX.js.map +0 -1
- package/esm/transform/statistic/groupX.js.map +0 -1
- package/esm/transform/statistic/jitter.js.map +0 -1
- package/esm/transform/statistic/jitterY.js +0 -27
- package/esm/transform/statistic/jitterY.js.map +0 -1
- package/esm/transform/statistic/normalizeY.js.map +0 -1
- package/esm/transform/statistic/stackEnter.js.map +0 -1
- package/esm/transform/statistic/stackY.js.map +0 -1
- package/esm/transform/statistic/symmetryY.js.map +0 -1
- package/esm/transform/statistic/utils.js.map +0 -1
- package/esm/transform/utils/arc/arc.js.map +0 -1
- package/esm/transform/utils/arc/index.js.map +0 -1
- package/esm/transform/utils/arc/sort.js.map +0 -1
- package/esm/transform/utils/arc/types.js.map +0 -1
- package/esm/transform/utils/d3-cloud/index.js.map +0 -1
- package/esm/transform/utils/d3-sankey/align.js.map +0 -1
- package/esm/transform/utils/d3-sankey/constant.js.map +0 -1
- package/esm/transform/utils/d3-sankey/index.js.map +0 -1
- package/esm/transform/utils/d3-sankey/sankey.js.map +0 -1
- package/esm/transform/utils/flow.js.map +0 -1
- package/esm/transform/utils/memo.js.map +0 -1
- package/lib/spec/statistic.d.ts +0 -69
- package/lib/spec/statistic.js.map +0 -1
- package/lib/transform/inference/maybeArrayField.d.ts +0 -8
- package/lib/transform/inference/maybeArrayField.js +0 -51
- package/lib/transform/inference/maybeArrayField.js.map +0 -1
- package/lib/transform/inference/maybeKey.d.ts +0 -9
- package/lib/transform/inference/maybeKey.js.map +0 -1
- package/lib/transform/inference/maybeSeries.d.ts +0 -7
- package/lib/transform/inference/maybeSeries.js +0 -27
- package/lib/transform/inference/maybeSeries.js.map +0 -1
- package/lib/transform/inference/maybeSize.d.ts +0 -7
- package/lib/transform/inference/maybeSize.js +0 -18
- package/lib/transform/inference/maybeSize.js.map +0 -1
- package/lib/transform/inference/maybeStackY.js.map +0 -1
- package/lib/transform/inference/maybeTitleX.d.ts +0 -7
- package/lib/transform/inference/maybeTitleX.js +0 -27
- package/lib/transform/inference/maybeTitleX.js.map +0 -1
- package/lib/transform/inference/maybeTooltip.d.ts +0 -9
- package/lib/transform/inference/maybeTooltip.js.map +0 -1
- package/lib/transform/inference/maybeTooltipPosition.js.map +0 -1
- package/lib/transform/inference/maybeTooltipY.d.ts +0 -7
- package/lib/transform/inference/maybeTooltipY.js.map +0 -1
- package/lib/transform/inference/maybeZeroX.js +0 -18
- package/lib/transform/inference/maybeZeroX.js.map +0 -1
- package/lib/transform/inference/maybeZeroY.d.ts +0 -7
- package/lib/transform/inference/maybeZeroY.js +0 -18
- package/lib/transform/inference/maybeZeroY.js.map +0 -1
- package/lib/transform/inference/maybeZeroY1.d.ts +0 -7
- package/lib/transform/inference/maybeZeroY1.js +0 -18
- package/lib/transform/inference/maybeZeroY1.js.map +0 -1
- package/lib/transform/preprocessor/arc.d.ts +0 -7
- package/lib/transform/preprocessor/arc.js +0 -20
- package/lib/transform/preprocessor/arc.js.map +0 -1
- package/lib/transform/preprocessor/cluster.d.ts +0 -5
- package/lib/transform/preprocessor/cluster.js +0 -44
- package/lib/transform/preprocessor/cluster.js.map +0 -1
- package/lib/transform/preprocessor/connector.d.ts +0 -7
- package/lib/transform/preprocessor/connector.js +0 -20
- package/lib/transform/preprocessor/connector.js.map +0 -1
- package/lib/transform/preprocessor/fetch.d.ts +0 -8
- package/lib/transform/preprocessor/fetch.js.map +0 -1
- package/lib/transform/preprocessor/filterBy.js.map +0 -1
- package/lib/transform/preprocessor/fold.d.ts +0 -8
- package/lib/transform/preprocessor/fold.js +0 -32
- package/lib/transform/preprocessor/fold.js.map +0 -1
- package/lib/transform/preprocessor/pick.d.ts +0 -7
- package/lib/transform/preprocessor/pick.js.map +0 -1
- package/lib/transform/preprocessor/rename.js.map +0 -1
- package/lib/transform/preprocessor/sankey.d.ts +0 -8
- package/lib/transform/preprocessor/sankey.js +0 -84
- package/lib/transform/preprocessor/sankey.js.map +0 -1
- package/lib/transform/preprocessor/sortBy.d.ts +0 -7
- package/lib/transform/preprocessor/sortBy.js.map +0 -1
- package/lib/transform/preprocessor/subset.d.ts +0 -7
- package/lib/transform/preprocessor/subset.js.map +0 -1
- package/lib/transform/preprocessor/tree.d.ts +0 -4
- package/lib/transform/preprocessor/tree.js +0 -10
- package/lib/transform/preprocessor/tree.js.map +0 -1
- package/lib/transform/preprocessor/voronoi.d.ts +0 -4
- package/lib/transform/preprocessor/voronoi.js +0 -24
- package/lib/transform/preprocessor/voronoi.js.map +0 -1
- package/lib/transform/preprocessor/wordCloud.d.ts +0 -6
- package/lib/transform/preprocessor/wordCloud.js +0 -112
- package/lib/transform/preprocessor/wordCloud.js.map +0 -1
- package/lib/transform/statistic/Select.js.map +0 -1
- package/lib/transform/statistic/SelectX.js.map +0 -1
- package/lib/transform/statistic/SelectY.js.map +0 -1
- package/lib/transform/statistic/dodgeX.js.map +0 -1
- package/lib/transform/statistic/groupX.js.map +0 -1
- package/lib/transform/statistic/jitter.js.map +0 -1
- package/lib/transform/statistic/jitterY.js.map +0 -1
- package/lib/transform/statistic/normalizeY.js.map +0 -1
- package/lib/transform/statistic/stackEnter.js.map +0 -1
- package/lib/transform/statistic/stackY.js.map +0 -1
- package/lib/transform/statistic/symmetryY.js.map +0 -1
- package/lib/transform/statistic/utils.js.map +0 -1
- package/lib/transform/utils/arc/arc.js.map +0 -1
- package/lib/transform/utils/arc/index.js.map +0 -1
- package/lib/transform/utils/arc/sort.js.map +0 -1
- package/lib/transform/utils/arc/types.js.map +0 -1
- package/lib/transform/utils/d3-cloud/index.js.map +0 -1
- package/lib/transform/utils/d3-sankey/align.js.map +0 -1
- package/lib/transform/utils/d3-sankey/constant.js.map +0 -1
- package/lib/transform/utils/d3-sankey/index.js.map +0 -1
- package/lib/transform/utils/d3-sankey/sankey.js.map +0 -1
- package/lib/transform/utils/flow.js.map +0 -1
- package/lib/transform/utils/memo.js.map +0 -1
- package/src/spec/statistic.ts +0 -135
- package/src/transform/inference/maybeArrayField.ts +0 -55
- package/src/transform/inference/maybeKey.ts +0 -29
- package/src/transform/inference/maybeSeries.ts +0 -26
- package/src/transform/inference/maybeSize.ts +0 -18
- package/src/transform/inference/maybeTitleX.ts +0 -26
- package/src/transform/inference/maybeTooltip.ts +0 -35
- package/src/transform/inference/maybeZeroX.ts +0 -18
- package/src/transform/inference/maybeZeroY.ts +0 -18
- package/src/transform/inference/maybeZeroY1.ts +0 -18
- package/src/transform/preprocessor/arc.ts +0 -21
- package/src/transform/preprocessor/cluster.ts +0 -56
- package/src/transform/preprocessor/connector.ts +0 -22
- package/src/transform/preprocessor/fetch.ts +0 -32
- package/src/transform/preprocessor/filterBy.ts +0 -24
- package/src/transform/preprocessor/fold.ts +0 -32
- package/src/transform/preprocessor/sankey.ts +0 -105
- package/src/transform/preprocessor/tree.ts +0 -12
- package/src/transform/preprocessor/voronoi.ts +0 -30
- package/src/transform/preprocessor/wordCloud.ts +0 -115
package/dist/g2.min.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).G2={})}(this,function(w){"use strict";var R=function(t,e){return(R=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 i(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}R(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var S=function(){return(S=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 I(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,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(a=(o<3?i(a):3<o?i(e,n,a):i(e,n))||a);return 3<o&&a&&Object.defineProperty(e,n,a),a}function D(n,r){return function(t,e){r(t,e,n)}}function e(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function F(t,a,s,l){return new(s=s||Promise)(function(n,e){function r(t){try{o(l.next(t))}catch(t){e(t)}}function i(t){try{o(l.throw(t))}catch(t){e(t)}}function o(t){var e;t.done?n(t.value):((e=t.value)instanceof s?e:new s(function(t){t(e)})).then(r,i)}o((l=l.apply(t,a||[])).next())})}function j(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||0<e--)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function z(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;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))}var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},V={},r={},o=(o=r,Object.defineProperty(o,"__esModule",{value:!0}),o.NON_CUSTOM_TAG_KEYS=o.POST_CONSTRUCT=o.DESIGN_PARAM_TYPES=o.PARAM_TYPES=o.TAGGED_PROP=o.TAGGED=o.MULTI_INJECT_TAG=o.INJECT_TAG=o.OPTIONAL_TAG=o.UNMANAGED_TAG=o.NAME_TAG=o.NAMED_TAG=void 0,o.NAMED_TAG="named",o.NAME_TAG="name",o.UNMANAGED_TAG="unmanaged",o.OPTIONAL_TAG="optional",o.INJECT_TAG="inject",o.MULTI_INJECT_TAG="multi_inject",o.TAGGED="inversify:tagged",o.TAGGED_PROP="inversify:tagged_props",o.PARAM_TYPES="inversify:paramtypes",o.DESIGN_PARAM_TYPES="design:paramtypes",o.POST_CONSTRUCT="post_construct",o.NON_CUSTOM_TAG_KEYS=[o.INJECT_TAG,o.MULTI_INJECT_TAG,o.NAME_TAG,o.UNMANAGED_TAG,o.NAMED_TAG,o.OPTIONAL_TAG],{}),G={},H={},W=(Object.defineProperty(H,"__esModule",{value:!0}),H.TargetTypeEnum=H.BindingTypeEnum=H.BindingScopeEnum=void 0,H.BindingScopeEnum={Request:"Request",Singleton:"Singleton",Transient:"Transient"},H.BindingTypeEnum={ConstantValue:"ConstantValue",Constructor:"Constructor",DynamicValue:"DynamicValue",Factory:"Factory",Function:"Function",Instance:"Instance",Invalid:"Invalid",Provider:"Provider"},H.TargetTypeEnum={ClassProperty:"ClassProperty",ConstructorArgument:"ConstructorArgument",Variable:"Variable"},{}),U=(Object.defineProperty(W,"__esModule",{value:!0}),W.id=void 0,0);W.id=function(){return U++},Object.defineProperty(G,"__esModule",{value:!0}),G.Binding=void 0;var Y=H,q=W;function X(t,e){this.id=q.id(),this.activated=!1,this.serviceIdentifier=t,this.scope=e,this.type=Y.BindingTypeEnum.Invalid,this.constraint=function(t){return!0},this.implementationType=null,this.cache=null,this.factory=null,this.provider=null,this.onActivation=null,this.dynamicValue=null}X.prototype.clone=function(){var t=new X(this.serviceIdentifier,this.scope);return t.activated=t.scope===Y.BindingScopeEnum.Singleton&&this.activated,t.implementationType=this.implementationType,t.dynamicValue=this.dynamicValue,t.scope=this.scope,t.type=this.type,t.factory=this.factory,t.provider=this.provider,t.constraint=this.constraint,t.onActivation=this.onActivation,t.cache=this.cache,t},G.Binding=X;var a={},Z=(Object.defineProperty(a,"__esModule",{value:!0}),a.STACK_OVERFLOW=a.CIRCULAR_DEPENDENCY_IN_FACTORY=a.POST_CONSTRUCT_ERROR=a.MULTIPLE_POST_CONSTRUCT_METHODS=a.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK=a.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE=a.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE=a.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT=a.ARGUMENTS_LENGTH_MISMATCH=a.INVALID_DECORATOR_OPERATION=a.INVALID_TO_SELF_VALUE=a.INVALID_FUNCTION_BINDING=a.INVALID_MIDDLEWARE_RETURN=a.NO_MORE_SNAPSHOTS_AVAILABLE=a.INVALID_BINDING_TYPE=a.NOT_IMPLEMENTED=a.CIRCULAR_DEPENDENCY=a.UNDEFINED_INJECT_ANNOTATION=a.MISSING_INJECT_ANNOTATION=a.MISSING_INJECTABLE_ANNOTATION=a.NOT_REGISTERED=a.CANNOT_UNBIND=a.AMBIGUOUS_MATCH=a.KEY_NOT_FOUND=a.NULL_ARGUMENT=a.DUPLICATED_METADATA=a.DUPLICATED_INJECTABLE_DECORATOR=void 0,a.DUPLICATED_INJECTABLE_DECORATOR="Cannot apply @injectable decorator multiple times.",a.DUPLICATED_METADATA="Metadata key was used more than once in a parameter:",a.NULL_ARGUMENT="NULL argument",a.KEY_NOT_FOUND="Key Not Found",a.AMBIGUOUS_MATCH="Ambiguous match found for serviceIdentifier:",a.CANNOT_UNBIND="Could not unbind serviceIdentifier:",a.NOT_REGISTERED="No matching bindings found for serviceIdentifier:",a.MISSING_INJECTABLE_ANNOTATION="Missing required @injectable annotation in:",a.MISSING_INJECT_ANNOTATION="Missing required @inject or @multiInject annotation in:",a.UNDEFINED_INJECT_ANNOTATION=function(t){return"@inject called with undefined this could mean that the class "+t+" has a circular dependency problem. You can use a LazyServiceIdentifer to overcome this limitation."},a.CIRCULAR_DEPENDENCY="Circular dependency found:",a.NOT_IMPLEMENTED="Sorry, this feature is not fully implemented yet.",a.INVALID_BINDING_TYPE="Invalid binding type:",a.NO_MORE_SNAPSHOTS_AVAILABLE="No snapshot available to restore.",a.INVALID_MIDDLEWARE_RETURN="Invalid return type in middleware. Middleware must return!",a.INVALID_FUNCTION_BINDING="Value provided to function binding must be a function!",a.INVALID_TO_SELF_VALUE="The toSelf function can only be applied when a constructor is used as service identifier",a.INVALID_DECORATOR_OPERATION="The @inject @multiInject @tagged and @named decorators must be applied to the parameters of a class constructor or a class property.",a.ARGUMENTS_LENGTH_MISMATCH=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return"The number of constructor arguments in the derived class "+t[0]+" must be >= than the number of constructor arguments of its base class."},a.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT="Invalid Container constructor argument. Container options must be an object.",a.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE="Invalid Container option. Default scope must be a string ('singleton' or 'transient').",a.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE="Invalid Container option. Auto bind injectable must be a boolean",a.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK="Invalid Container option. Skip base check must be a boolean",a.MULTIPLE_POST_CONSTRUCT_METHODS="Cannot apply @postConstruct decorator multiple times in the same class",a.POST_CONSTRUCT_ERROR=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return"@postConstruct error in class "+t[0]+": "+t[1]},a.CIRCULAR_DEPENDENCY_IN_FACTORY=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return"It looks like there is a circular dependency in one of the '"+t[0]+"' bindings. Please investigate bindings withservice identifier '"+t[1]+"'."},a.STACK_OVERFLOW="Maximum call stack size exceeded",{}),K=(Object.defineProperty(Z,"__esModule",{value:!0}),Z.MetadataReader=void 0,r);function $(){}$.prototype.getConstructorMetadata=function(t){return{compilerGeneratedMetadata:Reflect.getMetadata(K.PARAM_TYPES,t),userGeneratedMetadata:Reflect.getMetadata(K.TAGGED,t)||{}}},$.prototype.getPropertiesMetadata=function(t){return Reflect.getMetadata(K.TAGGED_PROP,t)||[]},Z.MetadataReader=$;var J={},Q={},tt=(Object.defineProperty(Q,"__esModule",{value:!0}),Q.BindingCount=void 0,Q.BindingCount={MultipleBindingsAvailable:2,NoBindingsAvailable:0,OnlyOneBindingAvailable:1},{}),et=(Object.defineProperty(tt,"__esModule",{value:!0}),tt.isStackOverflowExeption=void 0,a);tt.isStackOverflowExeption=function(t){return t instanceof RangeError||t.message===et.STACK_OVERFLOW};var s={},nt=(Object.defineProperty(s,"__esModule",{value:!0}),s.circularDependencyToException=s.listMetadataForTarget=s.listRegisteredBindingsForServiceIdentifier=s.getServiceIdentifierAsString=s.getFunctionName=void 0,a);function rt(t){return"function"==typeof t?t.name:"symbol"==typeof t?t.toString():t}function it(t){return function t(e,n){void 0===n&&(n=[]);var r=rt(e.serviceIdentifier);return n.push(r),null!==e.parentRequest?t(e.parentRequest,n):n}(t).reverse().join(" --\x3e ")}function ot(t){var e;return t.name||((e=(t=t.toString()).match(/^function\s*([^\s(]+)/))?e[1]:"Anonymous function: "+t)}s.getServiceIdentifierAsString=rt,s.listRegisteredBindingsForServiceIdentifier=function(t,e,n){var r="";return 0!==(n=n(t,e)).length&&(r="\nRegistered bindings:",n.forEach(function(t){var e="Object";null!==t.implementationType&&(e=ot(t.implementationType)),r=r+"\n "+e,t.constraint.metaData&&(r=r+" - "+t.constraint.metaData)})),r},s.circularDependencyToException=function n(t){t.childRequests.forEach(function(t){var e;if(function t(e,n){return null!==e.parentRequest&&(e.parentRequest.serviceIdentifier===n||t(e.parentRequest,n))}(t,t.serviceIdentifier))throw e=it(t),new Error(nt.CIRCULAR_DEPENDENCY+" "+e);n(t)})},s.listMetadataForTarget=function(t,e){var n,r;return e.isTagged()||e.isNamed()?(n="",r=e.getNamedTag(),e=e.getCustomTags(),null!==r&&(n+=r.toString()+"\n"),null!==e&&e.forEach(function(t){n+=t.toString()+"\n"})," "+t+"\n "+t+" - "+n):" "+t},s.getFunctionName=ot;var at={},st=(Object.defineProperty(at,"__esModule",{value:!0}),at.Context=void 0,W);function lt(t){this.id=st.id(),this.container=t}lt.prototype.addPlan=function(t){this.plan=t},lt.prototype.setCurrentRequest=function(t){this.currentRequest=t},at.Context=lt;var l={},ut=(Object.defineProperty(l,"__esModule",{value:!0}),l.Metadata=void 0,r);function ct(t,e){this.key=t,this.value=e}ct.prototype.toString=function(){return this.key===ut.NAMED_TAG?"named: "+this.value.toString()+" ":"tagged: { key:"+this.key.toString()+", value: "+this.value+" }"},l.Metadata=ct;function ht(t,e){this.parentContext=t,this.rootRequest=e}var u={},dt=(Object.defineProperty(u,"__esModule",{value:!0}),u.Plan=void 0,u.Plan=ht,{}),ft={},pt={},yt=(Object.defineProperty(pt,"__esModule",{value:!0}),pt.tagProperty=pt.tagParameter=pt.decorate=void 0,a),gt=r;function vt(t,e,n,r,i){var o={},a="number"==typeof i,i=void 0!==i&&a?i.toString():n;if(a&&void 0!==n)throw new Error(yt.INVALID_DECORATOR_OPERATION);a=(o=Reflect.hasOwnMetadata(t,e)?Reflect.getMetadata(t,e):o)[i];if(Array.isArray(a))for(var s=0,l=a;s<l.length;s++){var u=l[s];if(u.key===r.key)throw new Error(yt.DUPLICATED_METADATA+" "+u.key.toString())}else a=[];a.push(r),o[i]=a,Reflect.defineMetadata(t,o,e)}function mt(t,e){Reflect.decorate(t,e)}pt.tagParameter=function(t,e,n,r){vt(gt.TAGGED,t,e,r,n)},pt.tagProperty=function(t,e,n){vt(gt.TAGGED_PROP,t.constructor,e,n)},pt.decorate=function(t,e,n){var r,i;"number"==typeof n?mt([(r=n,i=t,function(t,e){i(t,e,r)})],e):"string"==typeof n?Reflect.decorate([t],e,n):mt([t],e)},Object.defineProperty(ft,"__esModule",{value:!0}),ft.inject=ft.LazyServiceIdentifer=void 0;var bt=a,xt=r,wt=l,kt=pt;function Et(t){this._cb=t}Et.prototype.unwrap=function(){return this._cb()},ft.LazyServiceIdentifer=Et,ft.inject=function(i){return function(t,e,n){if(void 0===i)throw new Error(bt.UNDEFINED_INJECT_ANNOTATION(t.name));var r=new wt.Metadata(xt.INJECT_TAG,i);"number"==typeof n?kt.tagParameter(t,e,n,r):kt.tagProperty(t,e,r)}};var c={},_t={},h=(Object.defineProperty(_t,"__esModule",{value:!0}),_t.QueryableString=void 0,St.prototype.startsWith=function(t){return 0===this.str.indexOf(t)},St.prototype.endsWith=function(t){var t=t.split("").reverse().join(""),e=this.str.split("").reverse().join("");return this.startsWith.call({str:e},t)},St.prototype.contains=function(t){return-1!==this.str.indexOf(t)},St.prototype.equals=function(t){return this.str===t},St.prototype.value=function(){return this.str},St);function St(t){this.str=t}_t.QueryableString=h,Object.defineProperty(c,"__esModule",{value:!0}),c.Target=void 0;var Mt,Tt,Ot,Pt,At,Ct,Nt,Lt=r,It=W,Rt=l,Dt=_t;function jt(t,e,n,r){this.id=It.id(),this.type=t,this.serviceIdentifier=n,this.name=new Dt.QueryableString(e||""),this.metadata=new Array;t=null;"string"==typeof r?t=new Rt.Metadata(Lt.NAMED_TAG,r):r instanceof Rt.Metadata&&(t=r),null!==t&&this.metadata.push(t)}function Bt(t,e,n,r){var i=t.getConstructorMetadata(n),o=i.compilerGeneratedMetadata;if(void 0===o)throw a=Ot.MISSING_INJECTABLE_ANNOTATION+" "+e+".",new Error(a);var a=i.userGeneratedMetadata,i=Object.keys(a),s=0===n.length&&0<i.length,l=i.length>n.length,r=function(t,e,n,r,i){for(var o=[],a=0;a<i;a++){var s=function(t,e,n,r,i){var i=i[t.toString()]||[],o=Ft(i),a=!0!==o.unmanaged,r=r[t],s=o.inject||o.multiInject;(r=s||r)instanceof Tt.LazyServiceIdentifer&&(r=r.unwrap());if(a){var s=r===Object,a=r===Function,l=void 0===r,s=s||a||l;if(!e&&s)throw a=Ot.MISSING_INJECT_ANNOTATION+" argument "+t+" in class "+n+".",new Error(a);l=new Nt.Target(Pt.TargetTypeEnum.ConstructorArgument,o.targetName,r);return l.metadata=i,l}return null}(a,t,e,n,r);null!==s&&o.push(s)}return o}(r,e,o,a,(s||l?i:n).length),e=function t(e,n){var r=e.getPropertiesMetadata(n);var i=[];var o=Object.keys(r);for(var a=0,s=o;a<s.length;a++){var l=s[a],u=r[l],c=Ft(r[l]),l=c.targetName||l,c=c.inject||c.multiInject,l=new Nt.Target(Pt.TargetTypeEnum.ClassProperty,l,c);l.metadata=u,i.push(l)}o=Object.getPrototypeOf(n.prototype).constructor;o!==Object&&(n=t(e,o),i=Mt(Mt([],i),n));return i}(t,n);return Mt(Mt([],r),e)}function Ft(t){var e={};return t.forEach(function(t){e[t.key.toString()]=t.value}),{inject:e[At.INJECT_TAG],multiInject:e[At.MULTI_INJECT_TAG],targetName:e[At.NAME_TAG],unmanaged:e[At.UNMANAGED_TAG]}}jt.prototype.hasTag=function(t){for(var e=0,n=this.metadata;e<n.length;e++)if(n[e].key===t)return!0;return!1},jt.prototype.isArray=function(){return this.hasTag(Lt.MULTI_INJECT_TAG)},jt.prototype.matchesArray=function(t){return this.matchesTag(Lt.MULTI_INJECT_TAG)(t)},jt.prototype.isNamed=function(){return this.hasTag(Lt.NAMED_TAG)},jt.prototype.isTagged=function(){return this.metadata.some(function(e){return Lt.NON_CUSTOM_TAG_KEYS.every(function(t){return e.key!==t})})},jt.prototype.isOptional=function(){return this.matchesTag(Lt.OPTIONAL_TAG)(!0)},jt.prototype.getNamedTag=function(){return this.isNamed()?this.metadata.filter(function(t){return t.key===Lt.NAMED_TAG})[0]:null},jt.prototype.getCustomTags=function(){return this.isTagged()?this.metadata.filter(function(e){return Lt.NON_CUSTOM_TAG_KEYS.every(function(t){return e.key!==t})}):null},jt.prototype.matchesNamedTag=function(t){return this.matchesTag(Lt.NAMED_TAG)(t)},jt.prototype.matchesTag=function(i){var o=this;return function(t){for(var e=0,n=o.metadata;e<n.length;e++){var r=n[e];if(r.key===i&&r.value===t)return!0}return!1}},c.Target=jt,h=dt,Mt=n&&n.__spreadArray||function(t,e){for(var n=0,r=e.length,i=t.length;n<r;n++,i++)t[i]=e[n];return t},Object.defineProperty(h,"__esModule",{value:!0}),h.getFunctionName=h.getBaseClassDependencyCount=h.getDependencies=void 0,Tt=ft,Ot=a,Pt=H,At=r,Ct=s,Object.defineProperty(h,"getFunctionName",{enumerable:!0,get:function(){return Ct.getFunctionName}}),Nt=c,h.getDependencies=function(t,e){return Bt(t,Ct.getFunctionName(e),e,!1)},h.getBaseClassDependencyCount=function t(e,n){var r,i,n=Object.getPrototypeOf(n.prototype).constructor;return n!==Object?(r=(i=Bt(e,Ct.getFunctionName(n),n,!0)).map(function(t){return t.metadata.filter(function(t){return t.key===At.UNMANAGED_TAG})}),r=[].concat.apply([],r).length,0<(i=i.length-r)?i:t(e,n)):0};var _t={},zt=(Object.defineProperty(_t,"__esModule",{value:!0}),_t.Request=void 0,W);function Vt(t,e,n,r,i){this.id=zt.id(),this.serviceIdentifier=t,this.parentContext=e,this.parentRequest=n,this.target=i,this.childRequests=[],this.bindings=Array.isArray(r)?r:[r],this.requestScope=null===n?new Map:null}Vt.prototype.addChildRequest=function(t,e,n){t=new Vt(t,this.parentContext,this,e,n);return this.childRequests.push(t),t},_t.Request=Vt,Object.defineProperty(J,"__esModule",{value:!0}),J.getBindingDictionary=J.createMockRequest=J.plan=void 0;var Gt=Q,Ht=a,Wt=H,Ut=r,Yt=tt,qt=s,Xt=at,Zt=l,Kt=u,$t=dt,Jt=_t,Qt=c;function te(t){return t._bindingDictionary}function ee(t,e,n,r,i){var o=ne(n.container,i.serviceIdentifier),a=[];return o.length===Gt.BindingCount.NoBindingsAvailable&&n.container.options.autoBindInjectable&&"function"==typeof i.serviceIdentifier&&t.getConstructorMetadata(i.serviceIdentifier).compilerGeneratedMetadata&&(n.container.bind(i.serviceIdentifier).toSelf(),o=ne(n.container,i.serviceIdentifier)),a=e?o:o.filter(function(t){var e=new Jt.Request(t.serviceIdentifier,n,r,t,i);return t.constraint(e)}),function(t,e,n,r){switch(e.length){case Gt.BindingCount.NoBindingsAvailable:if(n.isOptional())return;throw i=qt.getServiceIdentifierAsString(t),o=Ht.NOT_REGISTERED,o=(o+=qt.listMetadataForTarget(i,n))+qt.listRegisteredBindingsForServiceIdentifier(r,i,ne),new Error(o);case Gt.BindingCount.OnlyOneBindingAvailable:if(!n.isArray())return;case Gt.BindingCount.MultipleBindingsAvailable:default:var i,o;if(n.isArray())return;throw i=qt.getServiceIdentifierAsString(t),o=Ht.AMBIGUOUS_MATCH+" "+i,o+=qt.listRegisteredBindingsForServiceIdentifier(r,i,ne),new Error(o)}}(i.serviceIdentifier,a,i,n.container),a}function ne(t,e){var n=[],r=te(t);return r.hasKey(e)?n=r.get(e):null!==t.parent&&(n=ne(t.parent,e)),n}J.getBindingDictionary=te,J.plan=function(t,e,n,r,i,o,a,s){void 0===s&&(s=!1);var l,e=new Xt.Context(e),u=(r=r,u=i,l="",o=o,a=a,n=(n=n)?Ut.MULTI_INJECT_TAG:Ut.INJECT_TAG,n=new Zt.Metadata(n,u),r=new Qt.Target(r,l,u,n),void 0!==o&&(l=new Zt.Metadata(o,a),r.metadata.push(l)),r);try{return function i(o,t,e,a,n,s){var r,l;null===n?(r=ee(o,t,a,null,s),l=new Jt.Request(e,a,null,r,s),e=new Kt.Plan(a,l),a.addPlan(e)):(r=ee(o,t,a,n,s),l=n.addChildRequest(s.serviceIdentifier,r,s)),r.forEach(function(t){var e=null;if(s.isArray())e=l.addChildRequest(t.serviceIdentifier,t,s);else{if(t.cache)return;e=l}if(t.type===Wt.BindingTypeEnum.Instance&&null!==t.implementationType){var n=$t.getDependencies(o,t.implementationType);if(!a.container.options.skipBaseClassChecks){var r=$t.getBaseClassDependencyCount(o,t.implementationType);if(n.length<r)throw r=Ht.ARGUMENTS_LENGTH_MISMATCH($t.getFunctionName(t.implementationType)),new Error(r)}n.forEach(function(t){i(o,!1,t.serviceIdentifier,a,e,t)})}})}(t,s,i,e,null,u),e}catch(t){throw Yt.isStackOverflowExeption(t)&&e.plan&&qt.circularDependencyToException(e.plan.rootRequest),t}},J.createMockRequest=function(t,e,n,r){return n=new Qt.Target(Wt.TargetTypeEnum.Variable,"",e,new Zt.Metadata(n,r)),r=new Xt.Context(t),new Jt.Request(e,r,null,[],n)};var h={},Q={},re=n&&n.__spreadArray||function(t,e){for(var n=0,r=e.length,i=t.length;n<r;n++,i++)t[i]=e[n];return t},ie=(Object.defineProperty(Q,"__esModule",{value:!0}),Q.resolveInstance=void 0,a),oe=H,ae=r;Q.resolveInstance=function(t,e,n){var r,i,o=null,e=(o=0<e.length?(a=e.filter(function(t){return null!==t.target&&t.target.type===oe.TargetTypeEnum.ConstructorArgument}).map(n),o=new(t.bind.apply(t,re([void 0],a))),r=o,a=n,i=(n=(n=e).filter(function(t){return null!==t.target&&t.target.type===oe.TargetTypeEnum.ClassProperty})).map(a),n.forEach(function(t,e){t=t.target.name.value(),e=i[e];r[t]=e}),r):new t,t),a=o;if(Reflect.hasMetadata(ae.POST_CONSTRUCT,e)){n=Reflect.getMetadata(ae.POST_CONSTRUCT,e);try{a[n.value]()}catch(t){throw new Error(ie.POST_CONSTRUCT_ERROR(e.name,t.message))}}return o},Object.defineProperty(h,"__esModule",{value:!0}),h.resolve=void 0;var se=a,le=H,ue=tt,ce=s,he=Q,de=function(e,n,t){try{return t()}catch(t){throw ue.isStackOverflowExeption(t)?new Error(se.CIRCULAR_DEPENDENCY_IN_FACTORY(e,n.toString())):t}},fe=function(s){return function(t){t.parentContext.setCurrentRequest(t);var e=t.bindings,n=t.childRequests,r=t.target&&t.target.isArray(),i=!(t.parentRequest&&t.parentRequest.target&&t.target&&t.parentRequest.target.matchesArray(t.target.serviceIdentifier));if(r&&i)return n.map(function(t){return fe(s)(t)});r=null;if(!t.target.isOptional()||0!==e.length){var o,a=e[0],i=a.scope===le.BindingScopeEnum.Singleton,e=a.scope===le.BindingScopeEnum.Request;if(i&&a.activated)return a.cache;if(e&&null!==s&&s.has(a.id))return s.get(a.id);if(a.type===le.BindingTypeEnum.ConstantValue)r=a.cache,a.activated=!0;else if(a.type===le.BindingTypeEnum.Function)r=a.cache,a.activated=!0;else if(a.type===le.BindingTypeEnum.Constructor)r=a.implementationType;else if(a.type===le.BindingTypeEnum.DynamicValue&&null!==a.dynamicValue)r=de("toDynamicValue",a.serviceIdentifier,function(){return a.dynamicValue(t.parentContext)});else if(a.type===le.BindingTypeEnum.Factory&&null!==a.factory)r=de("toFactory",a.serviceIdentifier,function(){return a.factory(t.parentContext)});else if(a.type===le.BindingTypeEnum.Provider&&null!==a.provider)r=de("toProvider",a.serviceIdentifier,function(){return a.provider(t.parentContext)});else{if(a.type!==le.BindingTypeEnum.Instance||null===a.implementationType)throw o=ce.getServiceIdentifierAsString(t.serviceIdentifier),new Error(se.INVALID_BINDING_TYPE+" "+o);r=he.resolveInstance(a.implementationType,n,fe(s))}return"function"==typeof a.onActivation&&(r=a.onActivation(t.parentContext,r)),i&&(a.cache=r,a.activated=!0),e&&null!==s&&!s.has(a.id)&&s.set(a.id,r),r}}};h.resolve=function(t){return fe(t.plan.rootRequest.requestScope)(t.plan.rootRequest)};function pe(t,e){return null!==(t=t.parentRequest)&&(!!e(t)||pe(t,e))}function ye(n){return function(e){function t(t){return null!==t&&null!==t.target&&t.target.matchesTag(n)(e)}return t.metaData=new ve.Metadata(n,e),t}}var at={},u={},dt={},_t={},c={},tt={},Q={},ge=(Object.defineProperty(Q,"__esModule",{value:!0}),Q.typeConstraint=Q.namedConstraint=Q.taggedConstraint=Q.traverseAncerstors=void 0,r),ve=l,ge=(Q.traverseAncerstors=pe,(Q.taggedConstraint=ye)(ge.NAMED_TAG)),me=(Q.namedConstraint=ge,Q.typeConstraint=function(n){return function(t){var e=null;return null!==t&&(e=t.bindings[0],"string"==typeof n?e.serviceIdentifier===n:(e=t.bindings[0].implementationType,n===e))}},Object.defineProperty(tt,"__esModule",{value:!0}),tt.BindingWhenSyntax=void 0,c),be=Q;function xe(t){this._binding=t}xe.prototype.when=function(t){return this._binding.constraint=t,new me.BindingOnSyntax(this._binding)},xe.prototype.whenTargetNamed=function(t){return this._binding.constraint=be.namedConstraint(t),new me.BindingOnSyntax(this._binding)},xe.prototype.whenTargetIsDefault=function(){return this._binding.constraint=function(t){return null!==t.target&&!t.target.isNamed()&&!t.target.isTagged()},new me.BindingOnSyntax(this._binding)},xe.prototype.whenTargetTagged=function(t,e){return this._binding.constraint=be.taggedConstraint(t)(e),new me.BindingOnSyntax(this._binding)},xe.prototype.whenInjectedInto=function(e){return this._binding.constraint=function(t){return be.typeConstraint(e)(t.parentRequest)},new me.BindingOnSyntax(this._binding)},xe.prototype.whenParentNamed=function(e){return this._binding.constraint=function(t){return be.namedConstraint(e)(t.parentRequest)},new me.BindingOnSyntax(this._binding)},xe.prototype.whenParentTagged=function(e,n){return this._binding.constraint=function(t){return be.taggedConstraint(e)(n)(t.parentRequest)},new me.BindingOnSyntax(this._binding)},xe.prototype.whenAnyAncestorIs=function(e){return this._binding.constraint=function(t){return be.traverseAncerstors(t,be.typeConstraint(e))},new me.BindingOnSyntax(this._binding)},xe.prototype.whenNoAncestorIs=function(e){return this._binding.constraint=function(t){return!be.traverseAncerstors(t,be.typeConstraint(e))},new me.BindingOnSyntax(this._binding)},xe.prototype.whenAnyAncestorNamed=function(e){return this._binding.constraint=function(t){return be.traverseAncerstors(t,be.namedConstraint(e))},new me.BindingOnSyntax(this._binding)},xe.prototype.whenNoAncestorNamed=function(e){return this._binding.constraint=function(t){return!be.traverseAncerstors(t,be.namedConstraint(e))},new me.BindingOnSyntax(this._binding)},xe.prototype.whenAnyAncestorTagged=function(e,n){return this._binding.constraint=function(t){return be.traverseAncerstors(t,be.taggedConstraint(e)(n))},new me.BindingOnSyntax(this._binding)},xe.prototype.whenNoAncestorTagged=function(e,n){return this._binding.constraint=function(t){return!be.traverseAncerstors(t,be.taggedConstraint(e)(n))},new me.BindingOnSyntax(this._binding)},xe.prototype.whenAnyAncestorMatches=function(e){return this._binding.constraint=function(t){return be.traverseAncerstors(t,e)},new me.BindingOnSyntax(this._binding)},xe.prototype.whenNoAncestorMatches=function(e){return this._binding.constraint=function(t){return!be.traverseAncerstors(t,e)},new me.BindingOnSyntax(this._binding)},tt.BindingWhenSyntax=xe,Object.defineProperty(c,"__esModule",{value:!0}),c.BindingOnSyntax=void 0;var we=tt;function ke(t){this._binding=t}ke.prototype.onActivation=function(t){return this._binding.onActivation=t,new we.BindingWhenSyntax(this._binding)},c.BindingOnSyntax=ke,Object.defineProperty(_t,"__esModule",{value:!0}),_t.BindingWhenOnSyntax=void 0;var Ee=c,_e=tt;function Se(t){this._binding=t,this._bindingWhenSyntax=new _e.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new Ee.BindingOnSyntax(this._binding)}Se.prototype.when=function(t){return this._bindingWhenSyntax.when(t)},Se.prototype.whenTargetNamed=function(t){return this._bindingWhenSyntax.whenTargetNamed(t)},Se.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},Se.prototype.whenTargetTagged=function(t,e){return this._bindingWhenSyntax.whenTargetTagged(t,e)},Se.prototype.whenInjectedInto=function(t){return this._bindingWhenSyntax.whenInjectedInto(t)},Se.prototype.whenParentNamed=function(t){return this._bindingWhenSyntax.whenParentNamed(t)},Se.prototype.whenParentTagged=function(t,e){return this._bindingWhenSyntax.whenParentTagged(t,e)},Se.prototype.whenAnyAncestorIs=function(t){return this._bindingWhenSyntax.whenAnyAncestorIs(t)},Se.prototype.whenNoAncestorIs=function(t){return this._bindingWhenSyntax.whenNoAncestorIs(t)},Se.prototype.whenAnyAncestorNamed=function(t){return this._bindingWhenSyntax.whenAnyAncestorNamed(t)},Se.prototype.whenAnyAncestorTagged=function(t,e){return this._bindingWhenSyntax.whenAnyAncestorTagged(t,e)},Se.prototype.whenNoAncestorNamed=function(t){return this._bindingWhenSyntax.whenNoAncestorNamed(t)},Se.prototype.whenNoAncestorTagged=function(t,e){return this._bindingWhenSyntax.whenNoAncestorTagged(t,e)},Se.prototype.whenAnyAncestorMatches=function(t){return this._bindingWhenSyntax.whenAnyAncestorMatches(t)},Se.prototype.whenNoAncestorMatches=function(t){return this._bindingWhenSyntax.whenNoAncestorMatches(t)},Se.prototype.onActivation=function(t){return this._bindingOnSyntax.onActivation(t)},_t.BindingWhenOnSyntax=Se,Object.defineProperty(dt,"__esModule",{value:!0}),dt.BindingInSyntax=void 0;var Me=H,Te=_t;function Oe(t){this._binding=t}Oe.prototype.inRequestScope=function(){return this._binding.scope=Me.BindingScopeEnum.Request,new Te.BindingWhenOnSyntax(this._binding)},Oe.prototype.inSingletonScope=function(){return this._binding.scope=Me.BindingScopeEnum.Singleton,new Te.BindingWhenOnSyntax(this._binding)},Oe.prototype.inTransientScope=function(){return this._binding.scope=Me.BindingScopeEnum.Transient,new Te.BindingWhenOnSyntax(this._binding)},dt.BindingInSyntax=Oe,Object.defineProperty(u,"__esModule",{value:!0}),u.BindingInWhenOnSyntax=void 0;var Pe=dt,Ae=c,Ce=tt;function Ne(t){this._binding=t,this._bindingWhenSyntax=new Ce.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new Ae.BindingOnSyntax(this._binding),this._bindingInSyntax=new Pe.BindingInSyntax(t)}Ne.prototype.inRequestScope=function(){return this._bindingInSyntax.inRequestScope()},Ne.prototype.inSingletonScope=function(){return this._bindingInSyntax.inSingletonScope()},Ne.prototype.inTransientScope=function(){return this._bindingInSyntax.inTransientScope()},Ne.prototype.when=function(t){return this._bindingWhenSyntax.when(t)},Ne.prototype.whenTargetNamed=function(t){return this._bindingWhenSyntax.whenTargetNamed(t)},Ne.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},Ne.prototype.whenTargetTagged=function(t,e){return this._bindingWhenSyntax.whenTargetTagged(t,e)},Ne.prototype.whenInjectedInto=function(t){return this._bindingWhenSyntax.whenInjectedInto(t)},Ne.prototype.whenParentNamed=function(t){return this._bindingWhenSyntax.whenParentNamed(t)},Ne.prototype.whenParentTagged=function(t,e){return this._bindingWhenSyntax.whenParentTagged(t,e)},Ne.prototype.whenAnyAncestorIs=function(t){return this._bindingWhenSyntax.whenAnyAncestorIs(t)},Ne.prototype.whenNoAncestorIs=function(t){return this._bindingWhenSyntax.whenNoAncestorIs(t)},Ne.prototype.whenAnyAncestorNamed=function(t){return this._bindingWhenSyntax.whenAnyAncestorNamed(t)},Ne.prototype.whenAnyAncestorTagged=function(t,e){return this._bindingWhenSyntax.whenAnyAncestorTagged(t,e)},Ne.prototype.whenNoAncestorNamed=function(t){return this._bindingWhenSyntax.whenNoAncestorNamed(t)},Ne.prototype.whenNoAncestorTagged=function(t,e){return this._bindingWhenSyntax.whenNoAncestorTagged(t,e)},Ne.prototype.whenAnyAncestorMatches=function(t){return this._bindingWhenSyntax.whenAnyAncestorMatches(t)},Ne.prototype.whenNoAncestorMatches=function(t){return this._bindingWhenSyntax.whenNoAncestorMatches(t)},Ne.prototype.onActivation=function(t){return this._bindingOnSyntax.onActivation(t)},u.BindingInWhenOnSyntax=Ne,Object.defineProperty(at,"__esModule",{value:!0}),at.BindingToSyntax=void 0;var Le=a,Ie=H,Re=u,De=_t;function je(t){this._binding=t}je.prototype.to=function(t){return this._binding.type=Ie.BindingTypeEnum.Instance,this._binding.implementationType=t,new Re.BindingInWhenOnSyntax(this._binding)},je.prototype.toSelf=function(){if("function"!=typeof this._binding.serviceIdentifier)throw new Error(""+Le.INVALID_TO_SELF_VALUE);var t=this._binding.serviceIdentifier;return this.to(t)},je.prototype.toConstantValue=function(t){return this._binding.type=Ie.BindingTypeEnum.ConstantValue,this._binding.cache=t,this._binding.dynamicValue=null,this._binding.implementationType=null,this._binding.scope=Ie.BindingScopeEnum.Singleton,new De.BindingWhenOnSyntax(this._binding)},je.prototype.toDynamicValue=function(t){return this._binding.type=Ie.BindingTypeEnum.DynamicValue,this._binding.cache=null,this._binding.dynamicValue=t,this._binding.implementationType=null,new Re.BindingInWhenOnSyntax(this._binding)},je.prototype.toConstructor=function(t){return this._binding.type=Ie.BindingTypeEnum.Constructor,this._binding.implementationType=t,this._binding.scope=Ie.BindingScopeEnum.Singleton,new De.BindingWhenOnSyntax(this._binding)},je.prototype.toFactory=function(t){return this._binding.type=Ie.BindingTypeEnum.Factory,this._binding.factory=t,this._binding.scope=Ie.BindingScopeEnum.Singleton,new De.BindingWhenOnSyntax(this._binding)},je.prototype.toFunction=function(t){if("function"!=typeof t)throw new Error(Le.INVALID_FUNCTION_BINDING);t=this.toConstantValue(t);return this._binding.type=Ie.BindingTypeEnum.Function,this._binding.scope=Ie.BindingScopeEnum.Singleton,t},je.prototype.toAutoFactory=function(e){return this._binding.type=Ie.BindingTypeEnum.Factory,this._binding.factory=function(t){return function(){return t.container.get(e)}},this._binding.scope=Ie.BindingScopeEnum.Singleton,new De.BindingWhenOnSyntax(this._binding)},je.prototype.toProvider=function(t){return this._binding.type=Ie.BindingTypeEnum.Provider,this._binding.provider=t,this._binding.scope=Ie.BindingScopeEnum.Singleton,new De.BindingWhenOnSyntax(this._binding)},je.prototype.toService=function(e){this.toDynamicValue(function(t){return t.container.get(e)})},at.BindingToSyntax=je;ge={},Object.defineProperty(ge,"__esModule",{value:!0}),ge.ContainerSnapshot=void 0,Be.of=function(t,e){var n=new Be;return n.bindings=t,n.middleware=e,n},dt=Be;function Be(){}ge.ContainerSnapshot=dt;var c={},Fe=(Object.defineProperty(c,"__esModule",{value:!0}),c.Lookup=void 0,a);function ze(){this._map=new Map}ze.prototype.getMap=function(){return this._map},ze.prototype.add=function(t,e){if(null==t)throw new Error(Fe.NULL_ARGUMENT);if(null==e)throw new Error(Fe.NULL_ARGUMENT);var n=this._map.get(t);void 0!==n?(n.push(e),this._map.set(t,n)):this._map.set(t,[e])},ze.prototype.get=function(t){if(null==t)throw new Error(Fe.NULL_ARGUMENT);t=this._map.get(t);if(void 0!==t)return t;throw new Error(Fe.KEY_NOT_FOUND)},ze.prototype.remove=function(t){if(null==t)throw new Error(Fe.NULL_ARGUMENT);if(!this._map.delete(t))throw new Error(Fe.KEY_NOT_FOUND)},ze.prototype.removeByCondition=function(n){var r=this;this._map.forEach(function(t,e){t=t.filter(function(t){return!n(t)});0<t.length?r._map.set(e,t):r._map.delete(e)})},ze.prototype.hasKey=function(t){if(null==t)throw new Error(Fe.NULL_ARGUMENT);return this._map.has(t)},ze.prototype.clone=function(){var n=new ze;return this._map.forEach(function(t,e){t.forEach(function(t){return n.add(e,t.clone())})}),n},ze.prototype.traverse=function(n){this._map.forEach(function(t,e){n(e,t)})},c.Lookup=ze;var Ve=n&&n.__awaiter||function(t,a,s,l){return new(s=s||Promise)(function(n,e){function r(t){try{o(l.next(t))}catch(t){e(t)}}function i(t){try{o(l.throw(t))}catch(t){e(t)}}function o(t){var e;t.done?n(t.value):((e=t.value)instanceof s?e:new s(function(t){t(e)})).then(r,i)}o((l=l.apply(t,a||[])).next())})},Ge=n&&n.__generator||function(r,i){var o,a,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},t={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(n){return function(t){var e=[n,t];if(o)throw new TypeError("Generator is already executing.");for(;l;)try{if(o=1,a&&(s=2&e[0]?a.return:e[0]?a.throw||((s=a.return)&&s.call(a),0):a.next)&&!(s=s.call(a,e[1])).done)return s;switch(a=0,(e=s?[2&e[0],s.value]:e)[0]){case 0:case 1:s=e;break;case 4:return l.label++,{value:e[1],done:!1};case 5:l.label++,a=e[1],e=[0];continue;case 7:e=l.ops.pop(),l.trys.pop();continue;default:if(!(s=0<(s=l.trys).length&&s[s.length-1])&&(6===e[0]||2===e[0])){l=0;continue}if(3===e[0]&&(!s||e[1]>s[0]&&e[1]<s[3])){l.label=e[1];break}if(6===e[0]&&l.label<s[1]){l.label=s[1],s=e;break}if(s&&l.label<s[2]){l.label=s[2],l.ops.push(e);break}s[2]&&l.ops.pop(),l.trys.pop();continue}e=i.call(r,l)}catch(t){e=[6,t],a=0}finally{o=s=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}}},He=n&&n.__spreadArray||function(t,e){for(var n=0,r=e.length,i=t.length;n<r;n++,i++)t[i]=e[n];return t},We=(Object.defineProperty(o,"__esModule",{value:!0}),o.Container=void 0,G),Ue=a,Ye=H,qe=r,Xe=Z,Ze=J,Ke=h,$e=at,Je=W,Qe=s,tn=ge,en=c;function nn(t){this._appliedMiddleware=[];t=t||{};if("object"!=typeof t)throw new Error(""+Ue.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT);if(void 0===t.defaultScope)t.defaultScope=Ye.BindingScopeEnum.Transient;else if(t.defaultScope!==Ye.BindingScopeEnum.Singleton&&t.defaultScope!==Ye.BindingScopeEnum.Transient&&t.defaultScope!==Ye.BindingScopeEnum.Request)throw new Error(""+Ue.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE);if(void 0===t.autoBindInjectable)t.autoBindInjectable=!1;else if("boolean"!=typeof t.autoBindInjectable)throw new Error(""+Ue.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE);if(void 0===t.skipBaseClassChecks)t.skipBaseClassChecks=!1;else if("boolean"!=typeof t.skipBaseClassChecks)throw new Error(""+Ue.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK);this.options={autoBindInjectable:t.autoBindInjectable,defaultScope:t.defaultScope,skipBaseClassChecks:t.skipBaseClassChecks},this.id=Je.id(),this._bindingDictionary=new en.Lookup,this._snapshots=[],this._middleware=null,this.parent=null,this._metadataReader=new Xe.MetadataReader}nn.merge=function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=new nn,t=He([t,e],n).map(function(t){return Ze.getBindingDictionary(t)}),o=Ze.getBindingDictionary(i);return t.forEach(function(t){var n;n=o,t.traverse(function(t,e){e.forEach(function(t){n.add(t.serviceIdentifier,t.clone())})})}),i},nn.prototype.load=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=this._getContainerModuleHelpersFactory(),r=0,i=t;r<i.length;r++){var o=i[r],a=n(o.id);o.registry(a.bindFunction,a.unbindFunction,a.isboundFunction,a.rebindFunction)}},nn.prototype.loadAsync=function(){for(var a=[],t=0;t<arguments.length;t++)a[t]=arguments[t];return Ve(this,void 0,void 0,function(){var e,n,r,i,o;return Ge(this,function(t){switch(t.label){case 0:e=this._getContainerModuleHelpersFactory(),n=0,r=a,t.label=1;case 1:return n<r.length?(i=r[n],o=e(i.id),[4,i.registry(o.bindFunction,o.unbindFunction,o.isboundFunction,o.rebindFunction)]):[3,4];case 2:t.sent(),t.label=3;case 3:return n++,[3,1];case 4:return[2]}})})},nn.prototype.unload=function(){for(var r=this,t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];t.forEach(function(t){function e(t){return t.moduleId===n}var n;n=t.id;r._bindingDictionary.removeByCondition(e)})},nn.prototype.bind=function(t){var e=this.options.defaultScope||Ye.BindingScopeEnum.Transient,e=new We.Binding(t,e);return this._bindingDictionary.add(t,e),new $e.BindingToSyntax(e)},nn.prototype.rebind=function(t){return this.unbind(t),this.bind(t)},nn.prototype.unbind=function(e){try{this._bindingDictionary.remove(e)}catch(t){throw new Error(Ue.CANNOT_UNBIND+" "+Qe.getServiceIdentifierAsString(e))}},nn.prototype.unbindAll=function(){this._bindingDictionary=new en.Lookup},nn.prototype.isBound=function(t){var e=this._bindingDictionary.hasKey(t);return e=!e&&this.parent?this.parent.isBound(t):e},nn.prototype.isBoundNamed=function(t,e){return this.isBoundTagged(t,qe.NAMED_TAG,e)},nn.prototype.isBoundTagged=function(t,e,n){var r,i,o=!1;return this._bindingDictionary.hasKey(t)&&(r=this._bindingDictionary.get(t),i=Ze.createMockRequest(this,t,e,n),o=r.some(function(t){return t.constraint(i)})),o=!o&&this.parent?this.parent.isBoundTagged(t,e,n):o},nn.prototype.snapshot=function(){this._snapshots.push(tn.ContainerSnapshot.of(this._bindingDictionary.clone(),this._middleware))},nn.prototype.restore=function(){var t=this._snapshots.pop();if(void 0===t)throw new Error(Ue.NO_MORE_SNAPSHOTS_AVAILABLE);this._bindingDictionary=t.bindings,this._middleware=t.middleware},nn.prototype.createChild=function(t){t=new nn(t||this.options);return t.parent=this,t},nn.prototype.applyMiddleware=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._appliedMiddleware=this._appliedMiddleware.concat(t);var n=this._middleware||this._planAndResolve();this._middleware=t.reduce(function(t,e){return e(t)},n)},nn.prototype.applyCustomMetadataReader=function(t){this._metadataReader=t},nn.prototype.get=function(t){return this._get(!1,!1,Ye.TargetTypeEnum.Variable,t)},nn.prototype.getTagged=function(t,e,n){return this._get(!1,!1,Ye.TargetTypeEnum.Variable,t,e,n)},nn.prototype.getNamed=function(t,e){return this.getTagged(t,qe.NAMED_TAG,e)},nn.prototype.getAll=function(t){return this._get(!0,!0,Ye.TargetTypeEnum.Variable,t)},nn.prototype.getAllTagged=function(t,e,n){return this._get(!1,!0,Ye.TargetTypeEnum.Variable,t,e,n)},nn.prototype.getAllNamed=function(t,e){return this.getAllTagged(t,qe.NAMED_TAG,e)},nn.prototype.resolve=function(t){var e=this.createChild();return e.bind(t).toSelf(),this._appliedMiddleware.forEach(function(t){e.applyMiddleware(t)}),e.get(t)},nn.prototype._getContainerModuleHelpersFactory=function(){function r(t,e){t._binding.moduleId=e}var i=this;return function(t){return{bindFunction:function(t){t=i.bind.bind(i)(t);return r(t,n),t},isboundFunction:function(t){return i.isBound.bind(i)(t)},rebindFunction:(e=n=t,function(t){t=i.rebind.bind(i)(t);return r(t,e),t}),unbindFunction:function(t){i.unbind.bind(i)(t)}};var e,n}},nn.prototype._get=function(t,e,n,r,i,o){var a=null,t={avoidConstraints:t,contextInterceptor:function(t){return t},isMultiInject:e,key:i,serviceIdentifier:r,targetType:n,value:o};if(this._middleware){if(null==(a=this._middleware(t)))throw new Error(Ue.INVALID_MIDDLEWARE_RETURN)}else a=this._planAndResolve()(t);return a},nn.prototype._planAndResolve=function(){var n=this;return function(t){var e=Ze.plan(n._metadataReader,n,t.isMultiInject,t.targetType,t.serviceIdentifier,t.key,t.value,t.avoidConstraints),e=t.contextInterceptor(e);return Ke.resolve(e)}},o.Container=nn;function rn(t){this.id=on.id(),this.registry=t}var tt={},on=(Object.defineProperty(tt,"__esModule",{value:!0}),tt.AsyncContainerModule=tt.ContainerModule=void 0,W),u=(tt.ContainerModule=function(t){this.id=on.id(),this.registry=t},tt.AsyncContainerModule=rn,{}),an=(Object.defineProperty(u,"__esModule",{value:!0}),u.injectable=void 0,a),sn=r;u.injectable=function(){return function(t){if(Reflect.hasOwnMetadata(sn.PARAM_TYPES,t))throw new Error(an.DUPLICATED_INJECTABLE_DECORATOR);var e=Reflect.getMetadata(sn.DESIGN_PARAM_TYPES,t)||[];return Reflect.defineMetadata(sn.PARAM_TYPES,e,t),t}};var _t={},ln=(Object.defineProperty(_t,"__esModule",{value:!0}),_t.tagged=void 0,l),un=pt;_t.tagged=function(i,o){return function(t,e,n){var r=new ln.Metadata(i,o);"number"==typeof n?un.tagParameter(t,e,n,r):un.tagProperty(t,e,r)}};var dt={},cn=(Object.defineProperty(dt,"__esModule",{value:!0}),dt.named=void 0,r),hn=l,dn=pt;dt.named=function(i){return function(t,e,n){var r=new hn.Metadata(cn.NAMED_TAG,i);"number"==typeof n?dn.tagParameter(t,e,n,r):dn.tagProperty(t,e,r)}};var n={},fn=(Object.defineProperty(n,"__esModule",{value:!0}),n.optional=void 0,r),pn=l,yn=pt;n.optional=function(){return function(t,e,n){var r=new pn.Metadata(fn.OPTIONAL_TAG,!0);"number"==typeof n?yn.tagParameter(t,e,n,r):yn.tagProperty(t,e,r)}};var G={},gn=(Object.defineProperty(G,"__esModule",{value:!0}),G.unmanaged=void 0,r),vn=l,mn=pt;G.unmanaged=function(){return function(t,e,n){var r=new vn.Metadata(gn.UNMANAGED_TAG,!0);mn.tagParameter(t,e,n,r)}};var J={},bn=(Object.defineProperty(J,"__esModule",{value:!0}),J.multiInject=void 0,r),xn=l,wn=pt;J.multiInject=function(i){return function(t,e,n){var r=new xn.Metadata(bn.MULTI_INJECT_TAG,i);"number"==typeof n?wn.tagParameter(t,e,n,r):wn.tagProperty(t,e,r)}};var h={},kn=(Object.defineProperty(h,"__esModule",{value:!0}),h.targetName=void 0,r),En=l,_n=pt;h.targetName=function(i){return function(t,e,n){var r=new En.Metadata(kn.NAME_TAG,i);_n.tagParameter(t,e,n,r)}};var at={},Sn=(Object.defineProperty(at,"__esModule",{value:!0}),at.postConstruct=void 0,a),Mn=r,Tn=l;at.postConstruct=function(){return function(t,e,n){e=new Tn.Metadata(Mn.POST_CONSTRUCT,e);if(Reflect.hasOwnMetadata(Mn.POST_CONSTRUCT,t.constructor))throw new Error(Sn.MULTIPLE_POST_CONSTRUCT_METHODS);Reflect.defineMetadata(Mn.POST_CONSTRUCT,e,t.constructor)}};var ge={},c=(Object.defineProperty(ge,"__esModule",{value:!0}),ge.multiBindToService=void 0,ge.multiBindToService=function(r){return function(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.forEach(function(t){return r.bind(t).toService(n)})}}},V),On=(Object.defineProperty(c,"__esModule",{value:!0}),c.multiBindToService=c.getServiceIdentifierAsString=c.typeConstraint=c.namedConstraint=c.taggedConstraint=c.traverseAncerstors=c.decorate=c.id=c.MetadataReader=c.postConstruct=c.targetName=c.multiInject=c.unmanaged=c.optional=c.LazyServiceIdentifer=c.inject=c.named=c.tagged=c.injectable=c.ContainerModule=c.AsyncContainerModule=c.TargetTypeEnum=c.BindingTypeEnum=c.BindingScopeEnum=c.Container=c.METADATA_KEY=void 0,c.METADATA_KEY=r,o),Pn=(Object.defineProperty(c,"Container",{enumerable:!0,get:function(){return On.Container}}),H),An=(Object.defineProperty(c,"BindingScopeEnum",{enumerable:!0,get:function(){return Pn.BindingScopeEnum}}),Object.defineProperty(c,"BindingTypeEnum",{enumerable:!0,get:function(){return Pn.BindingTypeEnum}}),Object.defineProperty(c,"TargetTypeEnum",{enumerable:!0,get:function(){return Pn.TargetTypeEnum}}),tt),Cn=(Object.defineProperty(c,"AsyncContainerModule",{enumerable:!0,get:function(){return An.AsyncContainerModule}}),Object.defineProperty(c,"ContainerModule",{enumerable:!0,get:function(){return An.ContainerModule}}),u),Nn=(Object.defineProperty(c,"injectable",{enumerable:!0,get:function(){return Cn.injectable}}),_t),Ln=(Object.defineProperty(c,"tagged",{enumerable:!0,get:function(){return Nn.tagged}}),dt),In=(Object.defineProperty(c,"named",{enumerable:!0,get:function(){return Ln.named}}),ft),Rn=(Object.defineProperty(c,"inject",{enumerable:!0,get:function(){return In.inject}}),Object.defineProperty(c,"LazyServiceIdentifer",{enumerable:!0,get:function(){return In.LazyServiceIdentifer}}),n),Dn=(Object.defineProperty(c,"optional",{enumerable:!0,get:function(){return Rn.optional}}),G),jn=(Object.defineProperty(c,"unmanaged",{enumerable:!0,get:function(){return Dn.unmanaged}}),J),Bn=(Object.defineProperty(c,"multiInject",{enumerable:!0,get:function(){return jn.multiInject}}),h),Fn=(Object.defineProperty(c,"targetName",{enumerable:!0,get:function(){return Bn.targetName}}),at),zn=(Object.defineProperty(c,"postConstruct",{enumerable:!0,get:function(){return Fn.postConstruct}}),Z),Vn=(Object.defineProperty(c,"MetadataReader",{enumerable:!0,get:function(){return zn.MetadataReader}}),W),Gn=(Object.defineProperty(c,"id",{enumerable:!0,get:function(){return Vn.id}}),pt),Hn=(Object.defineProperty(c,"decorate",{enumerable:!0,get:function(){return Gn.decorate}}),Q),Wn=(Object.defineProperty(c,"traverseAncerstors",{enumerable:!0,get:function(){return Hn.traverseAncerstors}}),Object.defineProperty(c,"taggedConstraint",{enumerable:!0,get:function(){return Hn.taggedConstraint}}),Object.defineProperty(c,"namedConstraint",{enumerable:!0,get:function(){return Hn.namedConstraint}}),Object.defineProperty(c,"typeConstraint",{enumerable:!0,get:function(){return Hn.typeConstraint}}),s),Un=(Object.defineProperty(c,"getServiceIdentifierAsString",{enumerable:!0,get:function(){return Wn.getServiceIdentifierAsString}}),ge),Yn=(Object.defineProperty(c,"multiBindToService",{enumerable:!0,get:function(){return Un.multiBindToService}}),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});function qn(){throw new Error("setTimeout has not been defined")}function Xn(){throw new Error("clearTimeout has not been defined")}var Zn=qn,Kn=Xn;function $n(e){if(Zn===setTimeout)return setTimeout(e,0);if((Zn===qn||!Zn)&&setTimeout)return(Zn=setTimeout)(e,0);try{return Zn(e,0)}catch(t){try{return Zn.call(null,e,0)}catch(t){return Zn.call(this,e,0)}}}"function"==typeof Yn.setTimeout&&(Zn=setTimeout),"function"==typeof Yn.clearTimeout&&(Kn=clearTimeout);var Jn,Qn=[],tr=!1,er=-1;function nr(){tr&&Jn&&(tr=!1,Jn.length?Qn=Jn.concat(Qn):er=-1,Qn.length&&rr())}function rr(){if(!tr){for(var t=$n(nr),e=(tr=!0,Qn.length);e;){for(Jn=Qn,Qn=[];++er<e;)Jn&&Jn[er].run();er=-1,e=Qn.length}Jn=null,tr=!1,!function(e){if(Kn===clearTimeout)return clearTimeout(e);if((Kn===Xn||!Kn)&&clearTimeout)return(Kn=clearTimeout)(e);try{Kn(e)}catch(t){try{return Kn.call(null,e)}catch(t){return Kn.call(this,e)}}}(t)}}function ir(t,e){this.fun=t,this.array=e}ir.prototype.run=function(){this.fun.apply(null,this.array)};function or(){}a=or,l=or,r=or,o=or,H=or,tt=or,u=or;var ar=Yn.performance||{},sr=ar.now||ar.mozNow||ar.msNow||ar.oNow||ar.webkitNow||function(){return(new Date).getTime()};var lr=new Date;var ur,d,cr,hr,dr,fr={nextTick:function(t){var e=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];Qn.push(new ir(t,e)),1!==Qn.length||tr||$n(rr)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:a,addListener:l,once:r,off:o,removeListener:H,removeAllListeners:tt,emit:u,binding:function(t){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(t){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(t){var e=.001*sr.call(ar),n=Math.floor(e),e=Math.floor(e%1*1e9);return t&&(n-=t[0],(e-=t[1])<0&&(n--,e+=1e9)),[n,e]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-lr)/1e3}};function pr(t){return(pr="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 yr(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,r.key,r)}}function gr(t,e,n){return e&&yr(t.prototype,e),n&&yr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function vr(t){return(vr="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 mr(t,e){return e.lifecycle===d.Lifecycle.singleton?t.inSingletonScope():t.inTransientScope()}function br(t,e){t.whenTargetNamed(kr(e))}function xr(t,e){return e.bind(Er(t))}function wr(t,e){if(e.isBound(Er(t)))try{return e.rebind(Er(t))}catch(t){}return e.bind(Er(t))}function kr(t){return hr.isDefinedToken(t)?t.symbol:t}function Er(t){return hr.isDefinedToken(t)?t.symbol:t}ur={},function(){var s,l,u,c,r,t,i,h,o,e="object"==typeof Yn?Yn:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),n=O(ur);function d(t,e,n){var r=o.get(t);if(v(r)){if(!n)return;r=new i,o.set(t,r)}t=r.get(e);if(v(t)){if(!n)return;t=new i,r.set(e,t)}return t}function a(t,e,n){e=d(e,n,!1);return!v(e)&&!!e.has(t)}function f(t,e,n){e=d(e,n,!1);if(!v(e))return e.get(t)}function p(t,e,n,r){d(n,r,!0).set(t,e)}function y(t,e){var n=[],t=d(t,e,!1);if(v(t))return n;for(var r,i,o=function(t){var e=S(t,u);if(E(e)){e=e.call(t);if(b(e))return e}throw new TypeError}(t.keys()),a=0;;){var s=function(t){t=t.next();return!t.done&&t}(o);if(!s)return n.length=a,n;s=s.value;try{n[a]=s}catch(t){try{i=void 0,(i=(r=o).return)&&i.call(r)}finally{throw t}}a++}}function g(t){if(null===t)return 1;switch(typeof t){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===t?1:6;default:return 6}}function v(t){return void 0===t}function m(t){return null===t}function b(t){return"object"==typeof t?null!==t:"function"==typeof t}function x(t,e){switch(g(t)){case 0:case 1:case 2:case 3:case 4:case 5:return t}var e=3===e?"string":5===e?"number":"default",n=S(t,l);if(void 0===n){var r=t;if("string"===(a="default"==e?"number":e)){a=r.toString;if(E(a))if(!b(o=a.call(r)))return o;var i=r.valueOf;if(E(i))if(!b(o=i.call(r)))return o}else{i=r.valueOf;if(E(i))if(!b(o=i.call(r)))return o;var o,a=r.toString;if(E(a))if(!b(o=a.call(r)))return o}throw new TypeError}i=n.call(t,e);if(b(i))throw new TypeError;return i}function w(t){t=x(t,3);return"symbol"==typeof t?t:""+t}function k(t){return Array.isArray?Array.isArray(t):t instanceof Object?t instanceof Array:"[object Array]"===Object.prototype.toString.call(t)}function E(t){return"function"==typeof t}function _(t){return"function"==typeof t}function S(t,e){t=t[e];if(null!=t){if(E(t))return t;throw new TypeError}}function M(t){var e=Object.getPrototypeOf(t);if("function"!=typeof t||t===r)return e;if(e!==r)return e;var n=t.prototype,n=n&&Object.getPrototypeOf(n);if(null==n||n===Object.prototype)return e;n=n.constructor;return"function"!=typeof n||n===t?e:n}function T(t){return t.__=void 0,delete t.__,t}function O(n,r){return function(t,e){"function"!=typeof n[t]&&Object.defineProperty(n,t,{configurable:!0,writable:!0,value:e}),r&&r(t,e)}}void 0===e.Reflect?e.Reflect=ur:n=O(e.Reflect,n),e=n,s=Object.prototype.hasOwnProperty,n="function"==typeof Symbol,l=n&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",u=n&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",n="function"==typeof Object.create,t={__proto__:[]}instanceof Array,c={create:n?function(){return T(Object.create(null))}:t?function(){return T({__proto__:null})}:function(){return T({})},has:(n=!n&&!t)?function(t,e){return s.call(t,e)}:function(t,e){return e in t},get:n?function(t,e){return s.call(t,e)?t[e]:void 0}:function(t,e){return t[e]}},r=Object.getPrototypeOf(Function),t="object"==typeof fr&&fr.env&&"true"===fr.env.REFLECT_METADATA_USE_MAP_POLYFILL,i=t||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?function(){var i={},n=[],t=function(){function t(t,e,n){this._index=0,this._keys=t,this._values=e,this._selector=n}return t.prototype["@@iterator"]=function(){return this},t.prototype[u]=function(){return this},t.prototype.next=function(){var t,e=this._index;return 0<=e&&e<this._keys.length?(t=this._selector(this._keys[e],this._values[e]),e+1>=this._keys.length?(this._index=-1,this._keys=n,this._values=n):this._index++,{value:t,done:!1}):{value:void 0,done:!0}},t.prototype.throw=function(t){throw 0<=this._index&&(this._index=-1,this._keys=n,this._values=n),t},t.prototype.return=function(t){return 0<=this._index&&(this._index=-1,this._keys=n,this._values=n),{value:t,done:!0}},t}();function e(){this._keys=[],this._values=[],this._cacheKey=i,this._cacheIndex=-2}return Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),e.prototype.has=function(t){return 0<=this._find(t,!1)},e.prototype.get=function(t){t=this._find(t,!1);return 0<=t?this._values[t]:void 0},e.prototype.set=function(t,e){t=this._find(t,!0);return this._values[t]=e,this},e.prototype.delete=function(t){var e=this._find(t,!1);if(0<=e){for(var n=this._keys.length,r=e+1;r<n;r++)this._keys[r-1]=this._keys[r],this._values[r-1]=this._values[r];return this._keys.length--,this._values.length--,t===this._cacheKey&&(this._cacheKey=i,this._cacheIndex=-2),!0}return!1},e.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=i,this._cacheIndex=-2},e.prototype.keys=function(){return new t(this._keys,this._values,r)},e.prototype.values=function(){return new t(this._keys,this._values,o)},e.prototype.entries=function(){return new t(this._keys,this._values,a)},e.prototype["@@iterator"]=function(){return this.entries()},e.prototype[u]=function(){return this.entries()},e.prototype._find=function(t,e){return this._cacheKey!==t&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=t)),this._cacheIndex<0&&e&&(this._cacheIndex=this._keys.length,this._keys.push(t),this._values.push(void 0)),this._cacheIndex},e;function r(t,e){return t}function o(t,e){return e}function a(t,e){return[t,e]}}():Map,h=t||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?function(){function t(){this._map=new i}return Object.defineProperty(t.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),t.prototype.has=function(t){return this._map.has(t)},t.prototype.add=function(t){return this._map.set(t,t),this},t.prototype.delete=function(t){return this._map.delete(t)},t.prototype.clear=function(){this._map.clear()},t.prototype.keys=function(){return this._map.keys()},t.prototype.values=function(){return this._map.values()},t.prototype.entries=function(){return this._map.entries()},t.prototype["@@iterator"]=function(){return this.keys()},t.prototype[u]=function(){return this.keys()},t}():Set,o=new(t||"function"!=typeof WeakMap?function(){var i=16,e=c.create(),n=r();function t(){this._key=r()}return t.prototype.has=function(t){t=o(t,!1);return void 0!==t&&c.has(t,this._key)},t.prototype.get=function(t){t=o(t,!1);return void 0!==t?c.get(t,this._key):void 0},t.prototype.set=function(t,e){return o(t,!0)[this._key]=e,this},t.prototype.delete=function(t){t=o(t,!1);return void 0!==t&&delete t[this._key]},t.prototype.clear=function(){this._key=r()},t;function r(){for(var t;t="@@WeakMap@@"+function(){for(var t=function(t){return"function"!=typeof Uint8Array?a(new Array(t),t):"undefined"!=typeof crypto?crypto.getRandomValues(new Uint8Array(t)):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(new Uint8Array(t)):a(new Uint8Array(t),t)}(i),e=(t[6]=79&t[6]|64,t[8]=191&t[8]|128,""),n=0;n<i;++n){var r=t[n];4!==n&&6!==n&&8!==n||(e+="-"),r<16&&(e+="0"),e+=r.toString(16).toLowerCase()}return e}(),c.has(e,t););return e[t]=!0,t}function o(t,e){if(!s.call(t,n)){if(!e)return;Object.defineProperty(t,n,{value:c.create()})}return t[n]}function a(t,e){for(var n=0;n<e;++n)t[n]=255*Math.random()|0;return t}}():WeakMap),e("decorate",function(t,e,n,r){{if(v(n)){if(k(t)&&_(e))return function(t,e){for(var n=t.length-1;0<=n;--n){var r=(0,t[n])(e);if(!v(r)&&!m(r)){if(!_(r))throw new TypeError;e=r}}return e}(t,e)}else if(k(t)&&b(e)&&(b(r)||v(r)||m(r)))return m(r)&&(r=void 0),n=w(n),function(t,e,n,r){for(var i=t.length-1;0<=i;--i){var o=(0,t[i])(e,n,r);if(!v(o)&&!m(o)){if(!b(o))throw new TypeError;r=o}}return r}(t,e,n,r);throw new TypeError}}),e("metadata",function(n,r){return function(t,e){if(!b(t))throw new TypeError;if(!v(e)&&!function(t){switch(g(t)){case 3:case 4:return 1;default:return}}(e))throw new TypeError;p(n,r,t,e)}}),e("defineMetadata",function(t,e,n,r){if(!b(n))throw new TypeError;v(r)||(r=w(r));return p(t,e,n,r)}),e("hasMetadata",function(t,e,n){if(!b(e))throw new TypeError;v(n)||(n=w(n));return function t(e,n,r){var i=a(e,n,r);if(i)return!0;i=M(n);if(!m(i))return t(e,i,r);return!1}(t,e,n)}),e("hasOwnMetadata",function(t,e,n){if(!b(e))throw new TypeError;v(n)||(n=w(n));return a(t,e,n)}),e("getMetadata",function(t,e,n){if(!b(e))throw new TypeError;v(n)||(n=w(n));return function t(e,n,r){var i=a(e,n,r);if(i)return f(e,n,r);i=M(n);if(!m(i))return t(e,i,r);return}(t,e,n)}),e("getOwnMetadata",function(t,e,n){if(!b(e))throw new TypeError;v(n)||(n=w(n));return f(t,e,n)}),e("getMetadataKeys",function(t,e){if(!b(t))throw new TypeError;v(e)||(e=w(e));return function t(e,n){var r=y(e,n);e=M(e);if(null===e)return r;e=t(e,n);if(e.length<=0)return r;if(r.length<=0)return e;var i=new h;var o=[];for(var a=0,s=r;a<s.length;a++){var l=s[a];i.has(l)||(i.add(l),o.push(l))}for(var u=0,c=e;u<c.length;u++){l=c[u];i.has(l)||(i.add(l),o.push(l))}return o}(t,e)}),e("getOwnMetadataKeys",function(t,e){if(!b(t))throw new TypeError;v(e)||(e=w(e));return y(t,e)}),e("deleteMetadata",function(t,e,n){if(!b(e))throw new TypeError;v(n)||(n=w(n));var r=d(e,n,!1);return!v(r)&&(!!r.delete(t)&&(0<r.size||((t=o.get(e)).delete(n),0<t.size||o.delete(e)),!0))})}(),(cr=d=d||{}).defineToken=function(t){return new cr.DefinedToken(t,1<arguments.length&&void 0!==arguments[1]?arguments[1]:{multiple:!0})},_t=gr(function t(e){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},r=this,i=t;if(!(r instanceof i))throw new TypeError("Cannot call a class as a function");this.prototype={},this.name=void 0,this.multiple=void 0,this.symbol=void 0;r=n.multiple,i=void 0!==r&&r;this.name=e,this.symbol=Symbol(this.name),this.multiple=i}),cr.DefinedToken=_t,cr.isModule=function(t){return!!t&&"object"===pr(t)&&"id"in t},(dt=_t=cr.Lifecycle||(cr.Lifecycle={})).singleton="singleton",dt.transient="transient",cr.ClassOptionSymbol=Symbol("SyringeClassOptionSymbol"),cr.DefaultOption={lifecycle:_t.transient},(dr=hr=hr||{}).toArray=function(t){return Array.isArray(t)?t:void 0===t?[]:[t]},dr.isClass=function(t){return!!(t&&"function"==typeof t&&"prototype"in t)},dr.isDefinedToken=function(t){return!!(t&&"object"===pr(t)&&"symbol"in t&&"multiple"in t)},dr.isInjectOption=function(t){return!!(t&&"object"===pr(t)&&"token"in t)},dr.isNamedToken=function(t){return!!(t&&"object"===pr(t)&&"token"in t&&"named"in t)},dr.isMultipleEnabled=function(t){return dr.isDefinedToken(t)&&t.multiple};ft=new V.Container;function _r(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 Sr(r){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?_r(Object(i),!0).forEach(function(t){var e,n;e=r,n=i[t=t],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)):_r(Object(i)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(i,t))})}return r}function Mr(t){var e=0<arguments.length&&void 0!==t?t:{},n=V.injectable();return function(t){Reflect.defineMetadata(d.ClassOptionSymbol,Sr(Sr({},e),{},{target:t}),t),n(t)}}function f(t){return Mr(Sr(Sr({},0<arguments.length&&void 0!==t?t:{}),{},{lifecycle:d.Lifecycle.singleton}))}function p(t){return V.inject(Er(t))}var Tr=Symbol("SyringeOptionSymbol");function Or(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 Pr(r){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Or(Object(i),!0).forEach(function(t){var e,n;e=r,n=i[t=t],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)):Or(Object(i)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(i,t))})}return r}function Ar(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,r.key,r)}}var Cr=function(){function u(t,e,n){if(!(this instanceof u))throw new TypeError("Cannot call a class as a function");this.token=void 0,this.rawToken=void 0,this.named=void 0,this.generalToken=void 0,this.option=void 0,this.register=void 0,this.mutiple=void 0,this.register=t,this.token=e,this.option=n,this.rawToken=hr.isNamedToken(e)?e.token:e,this.named=hr.isNamedToken(e)?e.named:void 0,this.mutiple=!!this.named||hr.isMultipleEnabled(this.rawToken),this.generalToken=this.rawToken}var t,e,n;return t=u,n=[{key:"resolveTarget",value:function(t,e){var n,r,i,o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};try{try{var a=Reflect.getMetadata(Tr,e);a&&u.resolveOption(t,a)}catch(t){}hr.isClass(e)&&(o.useClass?((n=hr.toArray(o.useClass)).unshift(e),o.useClass=n):o.useClass=[e]);try{r=Reflect.getMetadata(d.ClassOptionSymbol,e)}catch(t){}(r=Pr(Pr({},r||{}),o)).token?((i=hr.toArray(r.token)).unshift(e),r.token=i):r.token=[e],u.resolveOption(t,r)}catch(t){}}},{key:"resolveOption",value:function(e,t){t=Pr(Pr({},u.globalConfig),t),n=hr.toArray(t.token),r=hr.toArray(t.useClass),i=hr.toArray(t.useDynamic),o=hr.toArray(t.useFactory),a=hr.toArray(t.contrib),s=t.lifecycle||d.Lifecycle.transient,n={token:n,useClass:r,lifecycle:0<a.length?d.Lifecycle.singleton:s,contrib:a,useDynamic:i,useFactory:o},"useValue"in t&&(n.useValue=t.useValue);var n,r,i,o,a,s,l=n;(0!==l.useClass.length||0!==l.useDynamic.length||0!==l.useFactory.length||"useValue"in l)&&l.token.forEach(function(t){new u(e,t,Pr({},l)).resolve()})}}],(e=[{key:"resolve",value:function(){var t,e=this,n=this.register;(t=n)&&"object"===vr(t)&&"bind"in t&&"unbind"in t&&"rebind"in t&&"isBound"in t&&(this.mutiple?this.resolveMutilple(n):(this.resolveMono(n),!this.named&&0<this.option.contrib.length&&this.option.contrib.forEach(function(t){(hr.isMultipleEnabled(t)?xr:wr)(t,n).toService(e.generalToken)})))}},{key:"resolveMono",value:function(t){return"useValue"in this.option?wr(this.generalToken,t).toConstantValue(this.option.useValue):0<this.option.useDynamic.length?(e=this.option.useDynamic[this.option.useDynamic.length-1],mr(wr(this.generalToken,t).toDynamicValue(function(t){t=Xr.getContainer(t.container);return e({container:t})}),this.option)):0<this.option.useFactory.length?(n=this.option.useFactory[this.option.useFactory.length-1],wr(this.generalToken,t).toFactory(function(t){t=Xr.getContainer(t.container);return n({container:t})})):0<this.option.useClass.length?(r=this.option.useClass[this.option.useClass.length-1],mr(wr(this.generalToken,t).to(r),this.option)):void 0;var e,n,r}},{key:"resolveMutilple",value:function(n){var r=this,t=this.option.useClass.map(function(t){return mr(xr(r.generalToken,n).to(t),r.option)}),e=this.option.useDynamic.map(function(e){return mr(xr(r.generalToken,n).toDynamicValue(function(t){t=Xr.getContainer(t.container);return e({container:t})}),r.option)}),i=this.option.useFactory.map(function(e){return xr(r.generalToken,n).toFactory(function(t){t=Xr.getContainer(t.container);return e({container:t})})}),o="useValue"in this.option?xr(this.generalToken,n).toConstantValue(this.option.useValue):void 0;this.named&&(t.forEach(function(t){return r.named&&br(t,r.named)}),e.forEach(function(t){return r.named&&br(t,r.named)}),i.forEach(function(t){return r.named&&br(t,r.named)}),o&&br(o,this.named))}}])&&Ar(t.prototype,e),n&&Ar(t,n),Object.defineProperty(t,"prototype",{writable:!1}),u}(),Nr=(Cr.globalConfig=d.DefaultOption,d.defineToken("ContributionProvider"));function Lr(t){return function(t){if(Array.isArray(t))return Ir(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Ir(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Map"===(n="Object"===n&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ir(t,e):void 0}}(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 Ir(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 Rr(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 Dr(r){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Rr(Object(i),!0).forEach(function(t){var e,n;e=r,n=i[t=t],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)):Rr(Object(i)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(i,t))})}return r}function jr(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,r.key,r)}}var Br=function(){function r(t,e,n){if(!(this instanceof r))throw new TypeError("Cannot call a class as a function");this.option={recursive:!1,cache:!0},this.services=void 0,this.serviceIdentifier=void 0,this.container=void 0,this.container=e,this.serviceIdentifier=t,n&&(this.option=Dr(Dr({},this.option),n))}var t,e,n;return t=r,(e=[{key:"setServices",value:function(t){for(var e,n=[],r=this.container;r;)r.isBound(this.serviceIdentifier)&&(e=r.getAll(this.serviceIdentifier),n.push.apply(n,Lr(e))),r=t?r.parent:void 0;return n}},{key:"getContributions",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=Dr(Dr({},this.option),t),e=t.cache,t=t.recursive;return e&&void 0!==this.services||(this.services=this.setServices(!!t)),this.services}}])&&jr(t.prototype,e),n&&jr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),r}();function Fr(t,e,n){t({token:{token:Nr,named:e},useDynamic:function(t){return new Br(e,t.container,n)},lifecycle:d.Lifecycle.singleton})}function zr(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,r.key,r)}}var Vr=function(){function e(t){var a=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.id=void 0,this.inversifyModule=void 0,this.baseRegistry=void 0,this.optionCollection=void 0,this.inversifyRegister=function(t,e,n,r){function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};hr.isInjectOption(t)?Cr.resolveOption(o,t):Cr.resolveTarget(o,t,e)}var o={bind:t,unbind:e,isBound:n,rebind:r};a.baseRegistry&&a.baseRegistry(i),a.optionCollection&&a.optionCollection.forEach(function(t){return i(t)})},this.baseRegistry=t,this.inversifyModule=new V.ContainerModule(this.inversifyRegister),this.id=this.inversifyModule.id}var t,n,r;return t=e,(n=[{key:"options",get:function(){return this.optionCollection||(this.optionCollection=[]),this.optionCollection}},{key:"register",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach(function(t){return e.options.push(t)}),this}},{key:"contribution",value:function(){for(var r=this,t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.forEach(function(t){return r.options.push({token:{token:Nr,named:e=t},useDynamic:function(t){return new Br(e,t.container,n)},lifecycle:d.Lifecycle.singleton});var e,n}),this}}])&&zr(t.prototype,n),r&&zr(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Gr(t){return t&&"inversifyModule"in t}function Hr(t){return new Vr(t)}function Wr(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,r.key,r)}}function Ur(r){return function(t,e,n){V.named(kr(r))(t,e,n),p(Nr)(t,e,n)}}var Yr,qr=new Map,Xr=function(){function n(t){if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");this.loadedModules=[],this.container=void 0,this.inversify=!0,this.parent=void 0,this.container=t||new V.Container,n.setContainer(this.container,this)}var t,e,r;return t=n,r=[{key:"setContainer",value:function(t,e){return qr.set(t.id,e)}},{key:"getContainer",value:function(t){var e=qr.get(t.id);return e||(e=new n(t),n.setContainer(t,e),e)}},{key:"config",value:function(t){Cr.globalConfig=t}}],(e=[{key:"load",value:function(t,e){var n=this;return e||!this.loadedModules.includes(t.id)?(Gr(t)&&this.container.load(t.inversifyModule),this.loadedModules.push(t.id),{dispose:function(){n.unload(t)}}):(console.warn("Unsupported module."),{dispose:function(){}})}},{key:"unload",value:function(e){Gr(e)&&(this.container.unload(e.inversifyModule),this.loadedModules=this.loadedModules.filter(function(t){return t!==e.id}))}},{key:"remove",value:function(t){return this.container.unbind(Er(t))}},{key:"get",value:function(t){return this.container.get(Er(t))}},{key:"getNamed",value:function(t,e){return this.container.getNamed(Er(t),kr(e))}},{key:"getAll",value:function(t){return this.container.getAll(Er(t))}},{key:"getAllNamed",value:function(t,e){return this.container.getAllNamed(Er(t),kr(e))}},{key:"isBound",value:function(t){return this.container.isBound(Er(t))}},{key:"isBoundNamed",value:function(t,e){return this.container.isBoundNamed(Er(t),kr(e))}},{key:"createChild",value:function(){var t=new n(this.container.createChild());return t.parent=this,t}},{key:"register",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};hr.isInjectOption(t)?Cr.resolveOption(this.container,t):Cr.resolveTarget(this.container,t,e)}}])&&Wr(t.prototype,e),r&&Wr(t,r),Object.defineProperty(t,"prototype",{writable:!1}),n}(),Zr=new Xr(ft);Zr.register.bind(Zr);function Kr(t,e,n,r,i){!function t(e,n,r,i,o){for(;r<i;){600<i-r&&(a=i-r+1,c=n-r+1,l=Math.log(a),s=.5*Math.exp(2*l/3),l=.5*Math.sqrt(l*s*(a-s)/a)*(c-a/2<0?-1:1),u=Math.max(r,Math.floor(n-c*s/a+l)),c=Math.min(i,Math.floor(n+(a-c)*s/a+l)),t(e,n,u,c,o));var a,s,l,u,c,h=e[n],d=r,f=i;for($r(e,r,n),0<o(e[i],h)&&$r(e,r,i);d<f;){for($r(e,d,f),d++,f--;o(e[d],h)<0;)d++;for(;0<o(e[f],h);)f--}0===o(e[r],h)?$r(e,r,f):$r(e,++f,i),f<=n&&(r=f+1),n<=f&&(i=f-1)}}(t,e,n||0,r||t.length-1,i||Jr)}function $r(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function Jr(t,e){return t<e?-1:e<t?1:0}(n=Yr=Yr||{}).Provider=Nr,n.register=Fr;class Qr{constructor(t=9){this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}all(){return this._all(this.data,[])}search(e){let n=this.data;const r=[];if(li(e,n)){const a=this.toBBox,s=[];for(;n;){for(let t=0;t<n.children.length;t++){var i=n.children[t],o=n.leaf?a(i):i;li(e,o)&&(n.leaf?r.push(i):si(e,o)?this._all(i,r):s.push(i))}n=s.pop()}}return r}collides(e){let n=this.data;if(li(e,n)){const o=[];for(;n;){for(let t=0;t<n.children.length;t++){var r=n.children[t],i=n.leaf?this.toBBox(r):r;if(li(e,i)){if(n.leaf||si(e,i))return!0;o.push(r)}}n=o.pop()}}return!1}load(e){if(e&&e.length)if(e.length<this._minEntries)for(let t=0;t<e.length;t++)this.insert(e[t]);else{let t=this._build(e.slice(),0,e.length-1,0);var n;this.data.children.length?this.data.height===t.height?this._splitRoot(this.data,t):(this.data.height<t.height&&(n=this.data,this.data=t,t=n),this._insert(t,this.data.height-t.height-1,!0)):this.data=t}return this}insert(t){return t&&this._insert(t,this.data.height-1),this}clear(){return this.data=ui([]),this}remove(i,o){if(i){let t=this.data;var a=this.toBBox(i);const l=[],u=[];let e,n,r;for(;t||l.length;){if(t||(t=l.pop(),n=l[l.length-1],e=u.pop(),r=!0),t.leaf){var s=function(e,n,r){if(!r)return n.indexOf(e);for(let t=0;t<n.length;t++)if(r(e,n[t]))return t;return-1}(i,t.children,o);if(-1!==s)return t.children.splice(s,1),l.push(t),this._condense(l),this}r||t.leaf||!si(t,a)?n?(e++,t=n.children[e],r=!1):t=null:(l.push(t),u.push(e),e=0,t=(n=t).children[0])}}return this}toBBox(t){return t}compareMinX(t,e){return t.minX-e.minX}compareMinY(t,e){return t.minY-e.minY}toJSON(){return this.data}fromJSON(t){return this.data=t,this}_all(t,e){const n=[];for(;t;)(t.leaf?e:n).push(...t.children),t=n.pop();return e}_build(n,t,r,i){var e=r-t+1;let o=this._maxEntries,a;if(e<=o)ti(a=ui(n.slice(t,r+1)),this.toBBox);else{i||(i=Math.ceil(Math.log(e)/Math.log(o)),o=Math.ceil(e/Math.pow(o,i-1))),(a=ui([])).leaf=!1,a.height=i;var s=Math.ceil(e/o),l=s*Math.ceil(Math.sqrt(o));ci(n,t,r,l,this.compareMinX);for(let e=t;e<=r;e+=l){var u=Math.min(e+l-1,r);ci(n,e,u,s,this.compareMinY);for(let t=e;t<=u;t+=s){var c=Math.min(t+s-1,u);a.children.push(this._build(n,t,c,i-1))}}ti(a,this.toBBox)}return a}_chooseSubtree(i,o,t,a){for(;;){if(a.push(o),o.leaf||a.length-1===t)break;let e=1/0,n=1/0,r;for(let t=0;t<o.children.length;t++){var s=o.children[t],l=oi(s),u=(c=i,u=s,(Math.max(u.maxX,c.maxX)-Math.min(u.minX,c.minX))*(Math.max(u.maxY,c.maxY)-Math.min(u.minY,c.minY))-l);u<n?(n=u,e=l<e?l:e,r=s):u===n&&l<e&&(e=l,r=s)}o=r||o.children[0]}var c,u;return o}_insert(t,e,n){var n=n?t:this.toBBox(t),r=[];const i=this._chooseSubtree(n,this.data,e,r);for(i.children.push(t),ni(i,n);0<=e&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(n,r,e)}_split(t,e){const n=t[e];var r=n.children.length,i=this._minEntries,i=(this._chooseSplitAxis(n,i,r),this._chooseSplitIndex(n,i,r));const o=ui(n.children.splice(i,n.children.length-i));o.height=n.height,o.leaf=n.leaf,ti(n,this.toBBox),ti(o,this.toBBox),e?t[e-1].children.push(o):this._splitRoot(n,o)}_splitRoot(t,e){this.data=ui([t,e]),this.data.height=t.height+1,this.data.leaf=!1,ti(this.data,this.toBBox)}_chooseSplitIndex(e,n,r){let i,o=1/0,a=1/0;for(let t=n;t<=r-n;t++){var s=ei(e,0,t,this.toBBox),l=ei(e,t,r,this.toBBox),u=(h=s,u=l,c=f=d=void 0,d=Math.max(h.minX,u.minX),f=Math.max(h.minY,u.minY),c=Math.min(h.maxX,u.maxX),h=Math.min(h.maxY,u.maxY),Math.max(0,c-d)*Math.max(0,h-f)),c=oi(s)+oi(l);u<o?(o=u,i=t,a=c<a?c:a):u===o&&c<a&&(a=c,i=t)}var h,u,d,f,c;return i||r-n}_chooseSplitAxis(t,e,n){var r=t.leaf?this.compareMinX:ri,i=t.leaf?this.compareMinY:ii;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)}_allDistMargin(e,n,r,t){e.children.sort(t);const i=this.toBBox;var o=ei(e,0,n,i),a=ei(e,r-n,r,i);let s=ai(o)+ai(a);for(let t=n;t<r-n;t++){var l=e.children[t];ni(o,e.leaf?i(l):l),s+=ai(o)}for(let t=r-n-1;t>=n;t--){var u=e.children[t];ni(a,e.leaf?i(u):u),s+=ai(a)}return s}_adjustParentBBoxes(e,n,r){for(let t=r;0<=t;t--)ni(n[t],e)}_condense(n){for(let t=n.length-1,e;0<=t;t--)0===n[t].children.length?0<t?(e=n[t-1].children).splice(e.indexOf(n[t]),1):this.clear():ti(n[t],this.toBBox)}}function ti(t,e){ei(t,0,t.children.length,e,t)}function ei(e,n,r,i,o){(o=o||ui(null)).minX=1/0,o.minY=1/0,o.maxX=-1/0,o.maxY=-1/0;for(let t=n;t<r;t++){var a=e.children[t];ni(o,e.leaf?i(a):a)}return o}function ni(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 ri(t,e){return t.minX-e.minX}function ii(t,e){return t.minY-e.minY}function oi(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function ai(t){return t.maxX-t.minX+(t.maxY-t.minY)}function si(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function li(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function ui(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function ci(t,e,n,r,i){const o=[e,n];for(;o.length;){var a;(n=o.pop())-(e=o.pop())<=r||(Kr(t,a=e+Math.ceil((n-e)/r/2)*r,e,n,i),o.push(e,a,a,n))}}var hi=1e-6,di="undefined"!=typeof Float32Array?Float32Array:Array;function fi(){var t=new di(9);return di!=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 pi=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],e=e[8],h=n[0],d=n[1],f=n[2],p=n[3],y=n[4],g=n[5],v=n[6],m=n[7],n=n[8];return t[0]=h*r+d*a+f*u,t[1]=h*i+d*s+f*c,t[2]=h*o+d*l+f*e,t[3]=p*r+y*a+g*u,t[4]=p*i+y*s+g*c,t[5]=p*o+y*l+g*e,t[6]=v*r+m*a+n*u,t[7]=v*i+m*s+n*c,t[8]=v*o+m*l+n*e,t};function yi(){var t=new di(16);return di!=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 gi(t){var e=new di(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}function vi(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 mi(t,e,n,r,i,o,a,s,l,u,c,h,d,f,p,y){var g=new di(16);return g[0]=t,g[1]=e,g[2]=n,g[3]=r,g[4]=i,g[5]=o,g[6]=a,g[7]=s,g[8]=l,g[9]=u,g[10]=c,g[11]=h,g[12]=d,g[13]=f,g[14]=p,g[15]=y,g}function bi(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 xi(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],h=e[9],d=e[10],f=e[11],p=e[12],y=e[13],g=e[14],e=e[15],v=n*s-r*a,m=n*l-i*a,b=n*u-o*a,x=r*l-i*s,w=r*u-o*s,k=i*u-o*l,E=c*y-h*p,_=c*g-d*p,S=c*e-f*p,M=h*g-d*y,T=h*e-f*y,O=d*e-f*g,P=v*O-m*T+b*M+x*S-w*_+k*E;return P?(t[0]=(s*O-l*T+u*M)*(P=1/P),t[1]=(i*T-r*O-o*M)*P,t[2]=(y*k-g*w+e*x)*P,t[3]=(d*w-h*k-f*x)*P,t[4]=(l*S-a*O-u*_)*P,t[5]=(n*O-i*S+o*_)*P,t[6]=(g*b-p*k-e*m)*P,t[7]=(c*k-d*b+f*m)*P,t[8]=(a*T-s*S+u*E)*P,t[9]=(r*S-n*T-o*E)*P,t[10]=(p*w-y*b+e*v)*P,t[11]=(h*b-c*w-f*v)*P,t[12]=(s*_-a*M-l*E)*P,t[13]=(n*M-r*_+i*E)*P,t[14]=(y*m-p*x-g*v)*P,t[15]=(c*x-h*m+d*v)*P,t):null}function wi(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],h=e[8],d=e[9],f=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],w=n[3];return t[0]=m*r+b*s+x*h+w*y,t[1]=m*i+b*l+x*d+w*g,t[2]=m*o+b*u+x*f+w*v,t[3]=m*a+b*c+x*p+w*e,m=n[4],b=n[5],x=n[6],w=n[7],t[4]=m*r+b*s+x*h+w*y,t[5]=m*i+b*l+x*d+w*g,t[6]=m*o+b*u+x*f+w*v,t[7]=m*a+b*c+x*p+w*e,m=n[8],b=n[9],x=n[10],w=n[11],t[8]=m*r+b*s+x*h+w*y,t[9]=m*i+b*l+x*d+w*g,t[10]=m*o+b*u+x*f+w*v,t[11]=m*a+b*c+x*p+w*e,m=n[12],b=n[13],x=n[14],w=n[15],t[12]=m*r+b*s+x*h+w*y,t[13]=m*i+b*l+x*d+w*g,t[14]=m*o+b*u+x*f+w*v,t[15]=m*a+b*c+x*p+w*e,t}function ki(t,e,n){var r,i,o,a,s,l,u,c,h,d,f,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],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],h=e[8],d=e[9],f=e[10],p=e[11],t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t[6]=u,t[7]=c,t[8]=h,t[9]=d,t[10]=f,t[11]=p,t[12]=r*y+s*g+h*n+e[12],t[13]=i*y+l*g+d*n+e[13],t[14]=o*y+u*g+f*n+e[14],t[15]=a*y+c*g+p*n+e[15]),t}function Ei(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 _i(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[4],o=e[5],a=e[6],s=e[7],l=e[8],u=e[9],c=e[10],h=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]=o*n+u*r,t[6]=a*n+c*r,t[7]=s*n+h*r,t[8]=l*n-i*r,t[9]=u*n-o*r,t[10]=c*n-a*r,t[11]=h*n-s*r,t}function Si(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[0],o=e[1],a=e[2],s=e[3],l=e[8],u=e[9],c=e[10],h=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]=o*n-u*r,t[2]=a*n-c*r,t[3]=s*n-h*r,t[8]=i*r+l*n,t[9]=o*r+u*n,t[10]=a*r+c*n,t[11]=s*r+h*n,t}function Mi(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 Ti(t,e,n){var r=e[0],i=e[1],o=e[2],e=e[3],a=r+r,s=i+i,l=o+o,u=r*a,c=r*s,r=r*l,h=i*s,i=i*l,o=o*l,a=e*a,s=e*s,e=e*l;return t[0]=1-(h+o),t[1]=c+e,t[2]=r-s,t[3]=0,t[4]=c-e,t[5]=1-(u+o),t[6]=i+a,t[7]=0,t[8]=r+s,t[9]=i-a,t[10]=1-(u+h),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function Oi(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function Pi(t,e){var n=e[0],r=e[1],i=e[2],o=e[4],a=e[5],s=e[6],l=e[8],u=e[9],e=e[10];return t[0]=Math.hypot(n,r,i),t[1]=Math.hypot(o,a,s),t[2]=Math.hypot(l,u,e),t}function Ai(t,e){var n=new di(3),r=(Pi(n,e),1/n[0]),i=1/n[1],n=1/n[2],o=e[0]*r,a=e[1]*i,s=e[2]*n,l=e[4]*r,u=e[5]*i,c=e[6]*n,r=e[8]*r,i=e[9]*i,e=e[10]*n,n=o+u+e,h=0;return 0<n?(h=2*Math.sqrt(1+n),t[3]=.25*h,t[0]=(c-i)/h,t[1]=(r-s)/h,t[2]=(a-l)/h):u<o&&e<o?(h=2*Math.sqrt(1+o-u-e),t[3]=(c-i)/h,t[0]=.25*h,t[1]=(a+l)/h,t[2]=(r+s)/h):e<u?(h=2*Math.sqrt(1+u-o-e),t[3]=(r-s)/h,t[0]=(a+l)/h,t[1]=.25*h,t[2]=(c+i)/h):(h=2*Math.sqrt(1+e-o-u),t[3]=(a-l)/h,t[0]=(r+s)/h,t[1]=(c+i)/h,t[2]=.25*h),t}function Ci(t,e,n,r,i){var o=e[0],a=e[1],s=e[2],e=e[3],l=o+o,u=a+a,c=s+s,h=o*l,d=o*u,o=o*c,f=a*u,a=a*c,s=s*c,l=e*l,u=e*u,e=e*c,c=r[0],p=r[1],r=r[2],y=i[0],g=i[1],i=i[2],v=(1-(f+s))*c,m=(d+e)*c,c=(o-u)*c,d=(d-e)*p,e=(1-(h+s))*p,s=(a+l)*p,p=(o+u)*r,o=(a-l)*r,u=(1-(h+f))*r;return t[0]=v,t[1]=m,t[2]=c,t[3]=0,t[4]=d,t[5]=e,t[6]=s,t[7]=0,t[8]=p,t[9]=o,t[10]=u,t[11]=0,t[12]=n[0]+y-(v*y+d*g+p*i),t[13]=n[1]+g-(m*y+e*g+o*i),t[14]=n[2]+i-(c*y+s*g+u*i),t[15]=1,t}function Ni(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],o=n+n,a=r+r,s=i+i,n=n*o,l=r*o,r=r*a,u=i*o,c=i*a,i=i*s,o=e*o,a=e*a,e=e*s;return t[0]=1-r-i,t[1]=l+e,t[2]=u-a,t[3]=0,t[4]=l-e,t[5]=1-n-i,t[6]=c+o,t[7]=0,t[8]=u+a,t[9]=c-o,t[10]=1-n-r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Li(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 Ii(t,e,n,r,i,o,a){var s=1/(e-n),l=1/(r-i),u=1/(o-a);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*u,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*l,t[14]=(a+o)*u,t[15]=1,t}var Ri=Ii;function Di(t,e,n,r){var i,o,a,s,l=e[0],u=e[1],e=e[2],c=r[0],h=r[1],r=r[2],d=n[0],f=n[1],n=n[2];return Math.abs(l-d)<hi&&Math.abs(u-f)<hi&&Math.abs(e-n)<hi?bi(t):(n=e-n,i=h*(n*=s=1/Math.hypot(d=l-d,f=u-f,n))-r*(f*=s),r=r*(d*=s)-c*n,c=c*f-h*d,(s=Math.hypot(i,r,c))?(i*=s=1/s,r*=s,c*=s):c=r=i=0,h=f*c-n*r,o=n*i-d*c,a=d*r-f*i,(s=Math.hypot(h,o,a))?(h*=s=1/s,o*=s,a*=s):a=o=h=0,t[0]=i,t[1]=h,t[2]=d,t[3]=0,t[4]=r,t[5]=o,t[6]=f,t[7]=0,t[8]=c,t[9]=a,t[10]=n,t[11]=0,t[12]=-(i*l+r*u+c*e),t[13]=-(h*l+o*u+a*e),t[14]=-(d*l+f*u+n*e),t[15]=1,t)}function ji(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 Bi=Object.freeze({__proto__:null,create:yi,clone:gi,copy:vi,fromValues:mi,set:function(t,e,n,r,i,o,a,s,l,u,c,h,d,f,p,y,g){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s,t[7]=l,t[8]=u,t[9]=c,t[10]=h,t[11]=d,t[12]=f,t[13]=p,t[14]=y,t[15]=g,t},identity:bi,transpose:function(t,e){var n,r,i,o,a,s;return t===e?(n=e[1],r=e[2],i=e[3],o=e[6],a=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]=o,t[11]=e[14],t[12]=i,t[13]=a,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},invert:xi,adjoint:function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],h=e[9],d=e[10],f=e[11],p=e[12],y=e[13],g=e[14],e=e[15];return t[0]=s*(d*e-f*g)-h*(l*e-u*g)+y*(l*f-u*d),t[1]=-(r*(d*e-f*g)-h*(i*e-o*g)+y*(i*f-o*d)),t[2]=r*(l*e-u*g)-s*(i*e-o*g)+y*(i*u-o*l),t[3]=-(r*(l*f-u*d)-s*(i*f-o*d)+h*(i*u-o*l)),t[4]=-(a*(d*e-f*g)-c*(l*e-u*g)+p*(l*f-u*d)),t[5]=n*(d*e-f*g)-c*(i*e-o*g)+p*(i*f-o*d),t[6]=-(n*(l*e-u*g)-a*(i*e-o*g)+p*(i*u-o*l)),t[7]=n*(l*f-u*d)-a*(i*f-o*d)+c*(i*u-o*l),t[8]=a*(h*e-f*y)-c*(s*e-u*y)+p*(s*f-u*h),t[9]=-(n*(h*e-f*y)-c*(r*e-o*y)+p*(r*f-o*h)),t[10]=n*(s*e-u*y)-a*(r*e-o*y)+p*(r*u-o*s),t[11]=-(n*(s*f-u*h)-a*(r*f-o*h)+c*(r*u-o*s)),t[12]=-(a*(h*g-d*y)-c*(s*g-l*y)+p*(s*d-l*h)),t[13]=n*(h*g-d*y)-c*(r*g-i*y)+p*(r*d-i*h),t[14]=-(n*(s*g-l*y)-a*(r*g-i*y)+p*(r*l-i*s)),t[15]=n*(s*d-l*h)-a*(r*d-i*h)+c*(r*l-i*s),t},determinant:function(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],l=t[7],u=t[8],c=t[9],h=t[10],d=t[11],f=t[12],p=t[13],y=t[14],t=t[15];return(e*a-n*o)*(h*t-d*y)-(e*s-r*o)*(c*t-d*p)+(e*l-i*o)*(c*y-h*p)+(n*s-r*a)*(u*t-d*f)-(n*l-i*a)*(u*y-h*f)+(r*l-i*s)*(u*p-c*f)},multiply:wi,translate:ki,scale:Ei,rotate:function(t,e,n,r){var i,o,a,s,l,u,c,h,d,f,p,y,g,v,m,b,x,w,k,E,_=r[0],S=r[1],r=r[2],M=Math.hypot(_,S,r);return M<hi?null:(_*=M=1/M,S*=M,r*=M,M=Math.sin(n),n=Math.cos(n),o=e[0],a=e[1],s=e[2],l=e[3],u=e[4],c=e[5],h=e[6],d=e[7],f=e[8],p=e[9],y=e[10],g=e[11],m=_*S*(i=1-n)-r*M,b=S*S*i+n,x=r*S*i+_*M,w=_*r*i+S*M,k=S*r*i-_*M,E=r*r*i+n,t[0]=o*(n=_*_*i+n)+u*(v=S*_*i+r*M)+f*(r=r*_*i-S*M),t[1]=a*n+c*v+p*r,t[2]=s*n+h*v+y*r,t[3]=l*n+d*v+g*r,t[4]=o*m+u*b+f*x,t[5]=a*m+c*b+p*x,t[6]=s*m+h*b+y*x,t[7]=l*m+d*b+g*x,t[8]=o*w+u*k+f*E,t[9]=a*w+c*k+p*E,t[10]=s*w+h*k+y*E,t[11]=l*w+d*k+g*E,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)},rotateX:_i,rotateY:Si,rotateZ:function(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[0],o=e[1],a=e[2],s=e[3],l=e[4],u=e[5],c=e[6],h=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]=o*n+u*r,t[2]=a*n+c*r,t[3]=s*n+h*r,t[4]=l*n-i*r,t[5]=u*n-o*r,t[6]=c*n-a*r,t[7]=h*n-s*r,t},fromTranslation:Mi,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],o=n[1],n=n[2],a=Math.hypot(i,o,n);return a<hi?null:(i*=a=1/a,o*=a,n*=a,a=Math.sin(e),e=Math.cos(e),t[0]=i*i*(r=1-e)+e,t[1]=o*i*r+n*a,t[2]=n*i*r-o*a,t[3]=0,t[4]=i*o*r-n*a,t[5]=o*o*r+e,t[6]=n*o*r+i*a,t[7]=0,t[8]=i*n*r+o*a,t[9]=o*n*r-i*a,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:Ti,fromQuat2:function(t,e){var n=new di(3),r=-e[0],i=-e[1],o=-e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],h=r*r+i*i+o*o+a*a;return 0<h?(n[0]=2*(s*a+c*r+l*o-u*i)/h,n[1]=2*(l*a+c*i+u*r-s*o)/h,n[2]=2*(u*a+c*o+s*i-l*r)/h):(n[0]=2*(s*a+c*r+l*o-u*i),n[1]=2*(l*a+c*i+u*r-s*o),n[2]=2*(u*a+c*o+s*i-l*r)),Ti(t,e,n),t},getTranslation:Oi,getScaling:Pi,getRotation:Ai,fromRotationTranslationScale:function(t,e,n,r){var i=e[0],o=e[1],a=e[2],e=e[3],s=i*(c=i+i),l=i*(h=o+o),i=i*(d=a+a),u=o*h,o=o*d,a=a*d,c=e*c,h=e*h,e=e*d,d=r[0],f=r[1],r=r[2];return t[0]=(1-(u+a))*d,t[1]=(l+e)*d,t[2]=(i-h)*d,t[3]=0,t[4]=(l-e)*f,t[5]=(1-(s+a))*f,t[6]=(o+c)*f,t[7]=0,t[8]=(i+h)*r,t[9]=(o-c)*r,t[10]=(1-(s+u))*r,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t},fromRotationTranslationScaleOrigin:Ci,fromQuat:Ni,frustum:function(t,e,n,r,i,o,a){var s=1/(n-e),l=1/(i-r),u=1/(o-a);return t[0]=2*o*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*l,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*l,t[10]=(a+o)*u,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*u,t[15]=0,t},perspectiveNO:Li,perspective:Li,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),o=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),e=Math.tan(e.rightDegrees*Math.PI/180),s=2/(a+e),l=2/(i+o);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]=-(a-e)*s*.5,t[9]=(i-o)*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:Ii,ortho:Ri,orthoZO:function(t,e,n,r,i,o,a){var s=1/(e-n),l=1/(r-i),a=1/(o-a);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]=a,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*l,t[14]=o*a,t[15]=1,t},lookAt:Di,targetTo:function(t,e,n,r){var i=e[0],o=e[1],e=e[2],a=r[0],s=r[1],r=r[2],l=i-n[0],u=o-n[1],n=e-n[2],c=l*l+u*u+n*n,h=(0<c&&(l*=c=1/Math.sqrt(c),u*=c,n*=c),s*n-r*u);return 0<(c=h*h+(r=r*l-a*n)*r+(a=a*u-s*l)*a)&&(h*=c=1/Math.sqrt(c),r*=c,a*=c),t[0]=h,t[1]=r,t[2]=a,t[3]=0,t[4]=u*a-n*r,t[5]=n*h-l*a,t[6]=l*r-u*h,t[7]=0,t[8]=l,t[9]=u,t[10]=n,t[11]=0,t[12]=i,t[13]=o,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:ji,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],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],h=t[9],d=t[10],f=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],w=e[4],k=e[5],E=e[6],_=e[7],S=e[8],M=e[9],T=e[10],O=e[11],P=e[12],A=e[13],C=e[14],e=e[15];return Math.abs(n-v)<=hi*Math.max(1,Math.abs(n),Math.abs(v))&&Math.abs(r-m)<=hi*Math.max(1,Math.abs(r),Math.abs(m))&&Math.abs(i-b)<=hi*Math.max(1,Math.abs(i),Math.abs(b))&&Math.abs(o-x)<=hi*Math.max(1,Math.abs(o),Math.abs(x))&&Math.abs(a-w)<=hi*Math.max(1,Math.abs(a),Math.abs(w))&&Math.abs(s-k)<=hi*Math.max(1,Math.abs(s),Math.abs(k))&&Math.abs(l-E)<=hi*Math.max(1,Math.abs(l),Math.abs(E))&&Math.abs(u-_)<=hi*Math.max(1,Math.abs(u),Math.abs(_))&&Math.abs(c-S)<=hi*Math.max(1,Math.abs(c),Math.abs(S))&&Math.abs(h-M)<=hi*Math.max(1,Math.abs(h),Math.abs(M))&&Math.abs(d-T)<=hi*Math.max(1,Math.abs(d),Math.abs(T))&&Math.abs(f-O)<=hi*Math.max(1,Math.abs(f),Math.abs(O))&&Math.abs(p-P)<=hi*Math.max(1,Math.abs(p),Math.abs(P))&&Math.abs(y-A)<=hi*Math.max(1,Math.abs(y),Math.abs(A))&&Math.abs(g-C)<=hi*Math.max(1,Math.abs(g),Math.abs(C))&&Math.abs(t-e)<=hi*Math.max(1,Math.abs(t),Math.abs(e))},mul:wi,sub:ji});function v(){var t=new di(3);return di!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function Fi(t){var e=new di(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function zi(t){var e=t[0],n=t[1],t=t[2];return Math.hypot(e,n,t)}function E(t,e,n){var r=new di(3);return r[0]=t,r[1]=e,r[2]=n,r}function Vi(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function Gi(t,e,n,r){t[0]=e,t[1]=n,t[2]=r}function Hi(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function Wi(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function Ui(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function Yi(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 qi(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Xi(t,e,n,r){var i=e[0],o=e[1],e=e[2];t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=e+r*(n[2]-e)}function Zi(t,e,n){var r=e[0],i=e[1],e=e[2],o=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])/(o=o||1),t[1]=(n[1]*r+n[5]*i+n[9]*e+n[13])/o,t[2]=(n[2]*r+n[6]*i+n[10]*e+n[14])/o,t}function Ki(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 $i(t,e){var n=t[0],r=t[1],t=t[2],i=e[0],o=e[1],e=e[2];return Math.abs(n-i)<=hi*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(r-o)<=hi*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(t-e)<=hi*Math.max(1,Math.abs(t),Math.abs(e))}var Ji=Wi,Qi=function(t,e){var n=e[0]-t[0],r=e[1]-t[1],e=e[2]-t[2];return Math.hypot(n,r,e)},to=zi;function eo(){var t=new di(4);return di!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function no(t,e,n){var r=e[0],i=e[1],o=e[2],e=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*e,t[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*e,t[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*e,t[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*e,t}function ro(){var t=new di(4);return di!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function io(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 oo(t,e,n){var r=e[0],i=e[1],o=e[2],e=e[3],a=n[0],s=n[1],l=n[2],n=n[3];return t[0]=r*n+e*a+i*l-o*s,t[1]=i*n+e*s+o*a-r*l,t[2]=o*n+e*l+r*s-i*a,t[3]=e*n-r*a-i*s-o*l,t}function ao(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],o=n*n+r*r+i*i+e*e,o=o?1/o:0;return t[0]=-n*o,t[1]=-r*o,t[2]=-i*o,t[3]=e*o,t}function so(t,e,n,r){var i=.5*Math.PI/180,i=(e*=i,n*=i,r*=i,Math.sin(e)),e=Math.cos(e),o=Math.sin(n),n=Math.cos(n),a=Math.sin(r),r=Math.cos(r);t[0]=i*n*r-e*o*a,t[1]=e*o*r+i*n*a,t[2]=e*n*a-i*o*r,t[3]=e*n*r+i*o*a}v(),eo();var lo=function(t,e,n,r){var i=new di(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i},uo=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},co=oo,ho=function(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],o=n*n+r*r+i*i+e*e;return 0<o&&(o=1/Math.sqrt(o)),t[0]=n*o,t[1]=r*o,t[2]=i*o,t[3]=e*o,t};function fo(t,e){var n=new di(2);return n[0]=t,n[1]=e,n}function po(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function yo(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function go(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}function vo(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function mo(t,e){var n=e[0]-t[0],e=e[1]-t[1];return Math.hypot(n,e)}function bo(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(),E(1,0,0),E(0,1,0),ro(),ro(),fi();var xo,wo,ko=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t},Eo=(G=new di(2),di!=Float32Array&&(G[0]=0,G[1]=0),{exports:{}});function _o(){}function So(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function Mo(t,e,n,r,i){if("function"!=typeof n)throw new TypeError("The listener must be a function");n=new So(n,r||t,i),r=wo?wo+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 To(t,e){0==--t._eventsCount?t._events=new _o:delete t._events[e]}function Oo(){this._events=new _o,this._eventsCount=0}function Po(t,e,n){(t.prototype=e.prototype=n).constructor=t}function Ao(t,e){var n,r=Object.create(t.prototype);for(n in e)r[n]=e[n];return r}function Co(){}J=Eo,xo=Object.prototype.hasOwnProperty,wo="~",Object.create&&(_o.prototype=Object.create(null),(new _o).__proto__||(wo=!1)),Oo.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)xo.call(t,e)&&n.push(wo?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},Oo.prototype.listeners=function(t){var t=wo?wo+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},Oo.prototype.listenerCount=function(t){t=wo?wo+t:t,t=this._events[t];return t?t.fn?1:t.length:0},Oo.prototype.emit=function(t,e,n,r,i,o){var a=wo?wo+t:t;if(!this._events[a])return!1;var s,l=this._events[a],u=arguments.length;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),u){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,o),!0}for(d=1,s=new Array(u-1);d<u;d++)s[d-1]=arguments[d];l.fn.apply(l.context,s)}else for(var c,h=l.length,d=0;d<h;d++)switch(l[d].once&&this.removeListener(t,l[d].fn,void 0,!0),u){case 1:l[d].fn.call(l[d].context);break;case 2:l[d].fn.call(l[d].context,e);break;case 3:l[d].fn.call(l[d].context,e,n);break;case 4:l[d].fn.call(l[d].context,e,n,r);break;default:if(!s)for(c=1,s=new Array(u-1);c<u;c++)s[c-1]=arguments[c];l[d].fn.apply(l[d].context,s)}return!0},Oo.prototype.on=function(t,e,n){return Mo(this,t,e,n,!1)},Oo.prototype.once=function(t,e,n){return Mo(this,t,e,n,!0)},Oo.prototype.removeListener=function(t,e,n,r){t=wo?wo+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||To(this,t);else{for(var o=0,a=[],s=i.length;o<s;o++)(i[o].fn!==e||r&&!i[o].once||n&&i[o].context!==n)&&a.push(i[o]);a.length?this._events[t]=1===a.length?a[0]:a:To(this,t)}}else To(this,t);return this},Oo.prototype.removeAllListeners=function(t){return t?(t=wo?wo+t:t,this._events[t]&&To(this,t)):(this._events=new _o,this._eventsCount=0),this},Oo.prototype.off=Oo.prototype.removeListener,Oo.prototype.addListener=Oo.prototype.on,Oo.prefixed=wo,J.exports=Oo.EventEmitter=Oo;var h="\\s*([+-]?\\d+)\\s*",at="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Z="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",No=/^#([0-9a-f]{3,8})$/,Lo=new RegExp("^rgb\\("+[h,h,h]+"\\)$"),Io=new RegExp("^rgb\\("+[Z,Z,Z]+"\\)$"),Ro=new RegExp("^rgba\\("+[h,h,h,at]+"\\)$"),Do=new RegExp("^rgba\\("+[Z,Z,Z,at]+"\\)$"),jo=new RegExp("^hsl\\("+[at,Z,Z]+"\\)$"),Bo=new RegExp("^hsla\\("+[at,Z,Z,at]+"\\)$"),Fo={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 zo(){return this.rgb().formatHex()}function Vo(){return this.rgb().formatRgb()}function Go(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=No.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Ho(e):3===n?new Uo(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Wo(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Wo(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=Lo.exec(t))?new Uo(e[1],e[2],e[3],1):(e=Io.exec(t))?new Uo(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Ro.exec(t))?Wo(e[1],e[2],e[3],e[4]):(e=Do.exec(t))?Wo(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=jo.exec(t))?Zo(e[1],e[2]/100,e[3]/100,1):(e=Bo.exec(t))?Zo(e[1],e[2]/100,e[3]/100,e[4]):Fo.hasOwnProperty(t)?Ho(Fo[t]):"transparent"===t?new Uo(NaN,NaN,NaN,0):null}function Ho(t){return new Uo(t>>16&255,t>>8&255,255&t,1)}function Wo(t,e,n,r){return new Uo(t=r<=0?e=n=NaN:t,e,n,r)}function Uo(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Yo(){return"#"+Xo(this.r)+Xo(this.g)+Xo(this.b)}function qo(){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 Xo(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Zo(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new $o(t,e,n,r)}function Ko(t){if(t instanceof $o)return new $o(t.h,t.s,t.l,t.opacity);if(!(t=t instanceof Co?t:Go(t)))return new $o;if(t instanceof $o)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=e===o?(n-r)/s+6*(n<r):n===o?(r-e)/s+2:(e-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=0<l&&l<1?0:a,new $o(a,s,l,t.opacity)}function $o(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Jo(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 Qo(t){return t.map(function(t){return Array.isArray(t)?[].concat(t):t})}function ta(t,e){return function(t,n){if("off"===n)return Qo(t);var r="number"==typeof n&&1<=n?Math.pow(10,n):1;return t.map(function(t){var e=t.slice(1).map(Number).map(function(t){return n?Math.round(t*r)/r:Math.round(t)});return[t[0]].concat(e)})}(t,e=void 0===e?"off":e).map(function(t){return t[0]+t.slice(1).join(" ")}).join("")}Po(Co,Go,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:zo,formatHex:zo,formatHsl:function(){return Ko(this).formatHsl()},formatRgb:Vo,toString:Vo}),Po(Uo,function(t,e,n,r){return 1===arguments.length?(i=(i=t)instanceof Co?i:Go(i))?new Uo((i=i.rgb()).r,i.g,i.b,i.opacity):new Uo:new Uo(t,e,n,null==r?1:r);var i},Ao(Co,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Uo(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Uo(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:Yo,formatHex:Yo,formatRgb:qo,toString:qo})),Po($o,function(t,e,n,r){return 1===arguments.length?Ko(t):new $o(t,e,n,null==r?1:r)},Ao(Co,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new $o(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new $o(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 Uo(Jo(240<=t?t-240:120+t,n,e),Jo(t,n,e),Jo(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 ea={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};var na={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function ra(t){return Array.isArray(t)&&t.every(function(t){var e=t[0].toLowerCase();return na[e]===t.length-1&&"achlmqstvz".includes(e)})}function ia(t){return ra(t)&&t.every(function(t){t=t[0];return t===t.toUpperCase()})}function oa(t){return ia(t)&&t.every(function(t){t=t[0];return"ACLMQZ".includes(t)})}function aa(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=na[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,na[n]))),na[n]););}function sa(t){return 48<=t&&t<=57}function la(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 ua(t){var e,n,r,i,o,a=t.max,s=t.pathValue,l=t.index,u=s.charCodeAt(l),c=na[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}}(u)){if(t.index+=1,la(t),t.data=[],c)for(;;){for(var h=c;0<h;--h){if(97!=(32|u)||3!==h&&4!==h?function(t){var e,n,r=t.max,i=t.pathValue,o=t.index,a=o,s=!1,l=!1,u=!1;if(r<=a)t.err="[path-util]: Invalid path value at index "+a+', "pathValue" is missing param';else if(sa(n=43!==(n=i.charCodeAt(a))&&45!==n?n:i.charCodeAt(a+=1))||46===n){if(46!==n){if(e=48===n,n=i.charCodeAt(a+=1),e&&a<r&&n&&sa(n))return t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" illegal number';for(;a<r&&sa(i.charCodeAt(a));)a+=1,s=!0;n=i.charCodeAt(a)}if(46===n){for(u=!0,a+=1;sa(i.charCodeAt(a));)a+=1,l=!0;n=i.charCodeAt(a)}if(101===n||69===n){if(u&&!s&&!l)return t.err="[path-util]: Invalid path value at index "+a+', "'+i[a]+'" invalid float exponent';if(43!==(n=i.charCodeAt(a+=1))&&45!==n||(a+=1),!(a<r&&sa(i.charCodeAt(a))))return t.err="[path-util]: Invalid path value at index "+a+', "'+i[a]+'" invalid integer exponent';for(;a<r&&sa(i.charCodeAt(a));)a+=1}t.index=a,t.param=+t.pathValue.slice(o,a)}else t.err="[path-util]: Invalid path value at index "+a+', "'+i[a]+'" is not a number'}(t):(o=i=r=void 0,r=(n=t).index,i=n.pathValue,48===(o=i.charCodeAt(r))?(n.param=0,n.index+=1):49===o?(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),la(t),t.index<a&&44===s.charCodeAt(t.index)&&(t.index+=1,la(t))}if(t.index>=t.max)break;if(!(48<=(e=s.charCodeAt(t.index))&&e<=57||43===e||45===e||46===e))break}aa(t)}else t.err='[path-util]: Invalid path value "'+s[l]+'" is not a path command'}var ca=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 ha(t){if(ia(t))return Qo(t);var t=function(t){if(ra(t))return Qo(t);var e=new ca(t);for(la(e);e.index<e.max&&!e.err.length;)ua(e);return e.err||e.segments}(t),a=0,s=0,l=0,u=0;return t.map(function(t){var e=t.slice(1).map(Number),t=t[0],n=t.toUpperCase();if("M"===t)return a=e[0],s=e[1],["M",l=a,u=s];if(t!==n)switch(n){case"A":i=[n,e[0],e[1],e[2],e[3],e[4],e[5]+a,e[6]+s];break;case"V":i=[n,e[0]+s];break;case"H":i=[n,e[0]+a];break;default:var r=e.map(function(t,e){return t+(e%2?s:a)}),i=[n].concat(r)}else i=[n].concat(e);var o=i.length;switch(n){case"Z":a=l,s=u;break;case"H":a=i[1];break;case"V":s=i[1];break;default:a=i[o-2],s=i[o-1],"M"===n&&(l=a,u=s)}return i})}function da(t){if(oa(t))return Qo(t);for(var e,n,r,i,o,a,s,l=ha(t),u=S({},ea),c=l.length,h=0;h<c;h+=1){l[h][0],l[h]=(e=l[h],n=u,s=a=f=o=d=i=r=void 0,r=e[0],i=n.x1,d=n.y1,o=n.x2,f=n.y2,a=e.slice(1).map(Number),s=e,"TQ".includes(r)||(n.qx=null,n.qy=null),"H"===r?s=["L",e[1],d]:"V"===r?s=["L",i,e[1]]:"S"===r?(e=2*d-f,s=["C",n.x1=2*i-o,n.y1=e].concat(a)):"T"===r?(f=2*i-n.qx,o=2*d-n.qy,s=["Q",n.qx=f,n.qy=o].concat(a)):"Q"===r&&(e=a[0],i=a[1],n.qx=e,n.qy=i),s);var d=l[h],f=d.length;u.x1=+d[f-2],u.y1=+d[f-1],u.x2=+d[f-4]||u.x1,u.y2=+d[f-3]||u.y1}return l}function fa(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}function pa(t,e,n){var r=t[0],t=t[1];return[r+(e[0]-r)*n,t+(e[1]-t)*n]}function ya(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function ga(t,e,n,r,i){var o=ya([t,e],[n,r]),a={x:0,y:0};return{length:o,point:a="number"==typeof i?i<=0?{x:t,y:e}:o<=i?{x:n,y:r}:{x:(i=pa([t,e],[n,r],i/o))[0],y:i[1]}:a,min:{x:Math.min(t,n),y:Math.min(e,r)},max:{x:Math.max(t,n),y:Math.max(e,r)}}}function va(t,e,n,r){var t=[t,e],e=[n,r],i=pa(t,e,.5),e=pa(e,i,.5),o=pa(i,e,.5),a=pa(e,o,.5),s=pa(o,a,.5),t=ga(t[0],t[1],i[0],i[1],o[0]).point,i=ga(s[0],s[1],a[0],a[1],e[0]).point;return[t.x,t.y,i.x,i.y,n,r]}function ma(t,e){var n,r,i,o,a,s,l=t[0],u=t.slice(1).map(Number),c=u[0],h=u[1],d=e.x1,f=e.y1,p=e.x,y=e.y;switch("TQ".includes(l)||(e.qx=null,e.qy=null),l){case"M":return e.x=c,e.y=h,t;case"A":return s=[d,f].concat(u),["C"].concat(function t(e,n,r,i,o,a,s,l,u,c){var h=120*Math.PI/180,d=Math.PI/180*(+o||0),f=[],p=(c?(x=c[0],w=c[1],m=c[2],b=c[3]):(e=(g=fa(e,n,-d)).x,n=g.y,1<(p=(y=(e-(l=(g=fa(l,u,-d)).x))/2)*y/(r*r)+(g=(n-(u=g.y))/2)*g/(i*i))&&(r*=p=Math.sqrt(p),i*=p),p=r*r,v=i*i,m=(a=(a===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=a*-i*y/r+(n+u)/2,x=Math.asin(((n-b)/i*Math.pow(10,9)>>0)/Math.pow(10,9)),w=Math.asin(((u-b)/i*Math.pow(10,9)>>0)/Math.pow(10,9)),x=e<m?Math.PI-x:x,w=l<m?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),y=(Math.abs(p)>h&&(v=w,g=l,a=u,w=x+h*(s&&x<w?1:-1),f=t(l=m+r*Math.cos(w),u=b+i*Math.sin(w),r,i,o,0,s,g,a,[w,v,m,b])),p=w-x,Math.cos(x)),h=Math.sin(x),o=Math.cos(w),s=Math.sin(w),g=Math.tan(p/4),a=4/3*r*g,v=4/3*i*g,m=[e,n],b=[e+a*h,n-v*y],x=[l+a*s,u-v*o],w=[l,u];if(b[0]=2*m[0]-b[0],b[1]=2*m[1]-b[1],c)return b.concat(x,w,f);for(var k=[],E=0,_=(f=b.concat(x,w,f)).length;E<_;E+=1)k[E]=E%2?fa(f[E-1],f[E],d).y:fa(f[E],f[E+1],d).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=c,e.qy=h,s=[d,f].concat(u),["C"].concat((n=s[0],r=s[1],i=s[2],o=s[3],a=s[4],s=s[5],[1/3*n+2/3*i,1/3*r+2/3*o,1/3*a+2/3*i,1/3*s+2/3*o,a,s]));case"L":return["C"].concat(va(d,f,c,h));case"Z":return d===p&&f===y?["C",d,f,p,y,p,y]:["C"].concat(va(d,f,p,y))}return t}function ba(t,e){var n;if(void 0===e&&(e=!1),oa(n=t)&&n.every(function(t){t=t[0];return"MC".includes(t)}))return n=Qo(t),e?[n,[]]:n;for(var r,i=da(t),o=S({},ea),a=[],s="",l=i.length,u=[],c=0;c<l;c+=1){i[c]&&(s=i[c][0]),a[c]=s;var h=ma(i[c],o),d=(i[c]=h,g=y=p=f=d=void 0,i),f=a,p=c;if(7<d[p].length){d[p].shift();for(var y=d[p],g=p;y.length;)f[p]="A",d.splice(g+=1,0,["C"].concat(y.splice(0,6)));d.splice(p,1)}l=i.length,"Z"===s&&u.push(c),r=(h=i[c]).length,o.x1=+h[r-2],o.y1=+h[r-1],o.x2=+h[r-4]||o.x1,o.y2=+h[r-3]||o.y1}return e?[i,u]:i}function xa(t,e){var n=t.x,t=t.y,r=e.x,e=e.y,i=n*r+t*e,o=Math.sqrt((Math.pow(n,2)+Math.pow(t,2))*(Math.pow(r,2)+Math.pow(e,2)));return(n*e-t*r<0?-1:1)*Math.acos(i/o)}function wa(t,e,n,r,i,o,a,s,l,u){for(var c="number"==typeof u,h=0,d=[m=t,b=e,h],f=[m,b],p={x:0,y:0},y=[{x:m,y:b}],g=(c&&u<=0&&(p={x:m,y:b}),0);g<=100;g+=1){var v,m=(v=function(t,e,n,r,i,o,a,s,l,u){var c=Math.abs,h=Math.sin,d=Math.cos,f=Math.sqrt,p=Math.PI,n=c(n),c=c(r),r=p/180*((i%360+360)%360);if(t===s&&e===l)return{x:t,y:e};if(0===n||0===c)return ga(t,e,s,l,u).point;var i=(t-s)/2,y=(e-l)/2,i={x:d(r)*i+h(r)*y,y:-h(r)*i+d(r)*y};return 1<(y=Math.pow(i.x,2)/Math.pow(n,2)+Math.pow(i.y,2)/Math.pow(c,2))&&(n*=f(y),c*=f(y)),y=(Math.pow(n,2)*Math.pow(c,2)-Math.pow(n,2)*Math.pow(i.y,2)-Math.pow(c,2)*Math.pow(i.x,2))/(Math.pow(n,2)*Math.pow(i.y,2)+Math.pow(c,2)*Math.pow(i.x,2)),o=(o!==a?1:-1)*f(y=y<0?0:y),f=n*i.y/c*o,y=-c*i.x/n*o,o=d(r)*f-h(r)*y+(t+s)/2,t=h(r)*f+d(r)*y+(e+l)/2,e=xa({x:1,y:0},s={x:(i.x-f)/n,y:(i.y-y)/c}),l=xa(s,{x:(-i.x-f)/n,y:(-i.y-y)/c}),!a&&0<l?l-=2*p:a&&l<0&&(l+=2*p),s=e+(l%=2*p)*u,f=n*d(s),i=c*h(s),{x:d(r)*f-h(r)*i+o,y:h(r)*f+d(r)*i+t}}(t,e,n,r,i,o,a,s,l,g/100)).x,b=v.y,y=y.concat({x:m,y:b});h+=ya(f,[m,b]),f=[m,b],c&&u<=h&&u>d[2]&&(v=(h-u)/(h-d[2]),p={x:f[0]*(1-v)+d[0]*v,y:f[1]*(1-v)+d[1]*v}),d=[m,b,h]}return{length:h,point:p=c&&h<=u?{x:s,y:l}:p,min:{x:Math.min.apply(null,y.map(function(t){return t.x})),y:Math.min.apply(null,y.map(function(t){return t.y}))},max:{x:Math.max.apply(null,y.map(function(t){return t.x})),y:Math.max.apply(null,y.map(function(t){return t.y}))}}}function ka(t,e,n,r,i,o,a,s,l){for(var u,c,h,d,f,p,y,g,v,m,b="number"==typeof l,x=t,w=e,k=0,E=[x,w,k],_=[x,w],S={x:0,y:0},M=[{x:x,y:w}],T=(b&&l<=0&&(S={x:x,y:w}),0);T<=30;T+=1)u=t,c=e,h=n,d=r,f=i,p=o,y=a,g=s,m=void 0,m=1-(v=T/30),u={x:Math.pow(m,3)*u+3*Math.pow(m,2)*v*h+3*m*Math.pow(v,2)*f+Math.pow(v,3)*y,y:Math.pow(m,3)*c+3*Math.pow(m,2)*v*d+3*m*Math.pow(v,2)*p+Math.pow(v,3)*g},M=M.concat({x:x=u.x,y:w=u.y}),k+=ya(_,[x,w]),_=[x,w],b&&l<=k&&l>E[2]&&(h=(k-l)/(k-E[2]),S={x:_[0]*(1-h)+E[0]*h,y:_[1]*(1-h)+E[1]*h}),E=[x,w,k];return{length:k,point:S=b&&k<=l?{x:a,y:s}:S,min:{x:Math.min.apply(null,M.map(function(t){return t.x})),y:Math.min.apply(null,M.map(function(t){return t.y}))},max:{x:Math.max.apply(null,M.map(function(t){return t.x})),y:Math.max.apply(null,M.map(function(t){return t.y}))}}}function Ea(t,e,n,r,i,o,a){for(var s,l,u,c,h,d,f,p,y="number"==typeof a,g=t,v=e,m=0,b=[g,v,m],x=[g,v],w={x:0,y:0},k=[{x:g,y:v}],E=(y&&a<=0&&(w={x:g,y:v}),0);E<=30;E+=1)s=t,l=e,u=n,c=r,h=i,d=o,p=void 0,p=1-(f=E/30),s={x:Math.pow(p,2)*s+2*p*f*u+Math.pow(f,2)*h,y:Math.pow(p,2)*l+2*p*f*c+Math.pow(f,2)*d},k=k.concat({x:g=s.x,y:v=s.y}),m+=ya(x,[g,v]),x=[g,v],y&&a<=m&&a>b[2]&&(u=(m-a)/(m-b[2]),w={x:x[0]*(1-u)+b[0]*u,y:x[1]*(1-u)+b[1]*u}),b=[g,v,m];return{length:m,point:w=y&&m<=a?{x:i,y:o}:w,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 _a(t,e){for(var n,r,i,o=da(t),a="number"==typeof e,s=[],l=0,u=0,c=0,h=0,d=[],f=[],p=0,y={x:0,y:0},g=y,v=y,m=y,b=0,x=0,w=o.length;x<w;x+=1)s=(n="M"===(r=(i=o[x])[0]))?s:[l,u].concat(i.slice(1)),n?(g=y={x:c=i[1],y:h=i[2]},p=0,a&&e<.001&&(m=y)):"L"===r?(p=(n=ga(s[0],s[1],s[2],s[3],(e||0)-b)).length,y=n.min,g=n.max,v=n.point):"A"===r?(p=(n=wa(s[0],s[1],s[2],s[3],s[4],s[5],s[6],s[7],s[8],(e||0)-b)).length,y=n.min,g=n.max,v=n.point):"C"===r?(p=(n=ka(s[0],s[1],s[2],s[3],s[4],s[5],s[6],s[7],(e||0)-b)).length,y=n.min,g=n.max,v=n.point):"Q"===r?(p=(n=Ea(s[0],s[1],s[2],s[3],s[4],s[5],(e||0)-b)).length,y=n.min,g=n.max,v=n.point):"Z"===r&&(p=(n=ga((s=[l,u,c,h])[0],s[1],s[2],s[3],(e||0)-b)).length,y=n.min,g=n.max,v=n.point),a&&b<e&&e<=b+p&&(m=v),f.push(g),d.push(y),b+=p,l=(n="Z"!==r?i.slice(-2):[c,h])[0],u=n[1];return{length:b,point:m=a&&b<=e?{x:l,y:u}:m,min:{x:Math.min.apply(null,d.map(function(t){return t.x})),y:Math.min.apply(null,d.map(function(t){return t.y}))},max:{x:Math.max.apply(null,f.map(function(t){return t.x})),y:Math.max.apply(null,f.map(function(t){return t.y}))}}}function Sa(t){return(u=l=s=0)<=ba(t).map(function(t){if("M"===t[0])return s=t[1],l=t[2],0;var e=t.slice(1),n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],e=e[5];return u=3*((e-l)*(n+i)-(a-s)*(r+o)+r*(s-i)-n*(l-o)+e*(i+s/3)-a*(o+l/3))/20,r=t.slice(-2),s=r[0],l=r[1],u}).reduce(function(t,e){return t+e},0);var s,l,u}function Ma(t){return t.map(function(t,e,n){var r,i,o,a,n=e&&n[e-1].slice(-2).concat(t.slice(1)),s=e?ka(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8]).length:0,n=e?s?(void 0===r&&(r=.5),n=(e=n).slice(0,2),i=e.slice(2,4),o=e.slice(4,6),e=e.slice(6,8),n=pa(n,i,r),i=pa(i,o,r),o=pa(o,e,r),a=pa(n,i,r),i=pa(i,o,r),r=pa(a,i,r),[["C"].concat(n,a,r),["C"].concat(i,o,e)]):[t,t]:[t];return{s:t,ss:n,l:s}})}function Ta(t,e,n,r){t-=n,n=e-r;return Math.sqrt(t*t+n*n)}function Oa(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}}var Pa={box:function(t,e,n,r){return Oa([t,n],[e,r])},length:Ta,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,o){var a=(n-t)*(i-t)+(r-e)*(o-e);return a<0?Ta(t,e,i,o):(n-t)*(n-t)+(r-e)*(r-e)<a?Ta(n,r,i,o):this.pointToLine(t,e,n,r,i,o)},pointToLine:function(t,e,n,r,i,o){n=[n-t,r-e];if((r=n)[0]===(a=[0,0])[0]&&r[1]===a[1])return Math.sqrt((i-t)*(i-t)+(o-e)*(o-e));var r=[-n[1],n[0]],a=(bo(r,r),[i-t,o-e]);return Math.abs(a[0]*r[0]+a[1]*r[1])},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}};function Aa(t){for(var e=0,n=[],r=0;r<t.length-1;r++){var i=t[r],o=t[r+1],a=Ta(i[0],i[1],o[0],o[1]);n.push({from:i,to:o,length:a}),e+=a}return{segments:n,totalLength:e}}var Ca={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 Oa(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],o=e[r+1];n+=Ta(i[0],i[1],o[0],o[1])}return n},pointAt:function(t,e){var n=e;if(1<n||n<0||t.length<2)return null;var e=Aa(t),r=e.segments,i=e.totalLength;if(0===i)return{x:t[0][0],y:t[0][1]};for(var o=0,a=null,s=0;s<r.length;s++){var l=r[s],u=l.from,c=l.to,l=l.length/i;if(o<=n&&n<=o+l){a=Pa.pointAt(u[0],u[1],c[0],c[1],(n-o)/l);break}o+=l}return a},pointDistance:function(t,e,n){for(var r=t,i=e,o=n,a=1/0,s=0;s<r.length-1;s++){var l=r[s],u=r[s+1],l=Pa.pointDistance(l[0],l[1],u[0],u[1],i,o);l<a&&(a=l)}return a},tangentAngle:function(t,e){var n=e;if(1<n||n<0||t.length<2)return 0;for(var r=(t=Aa(t)).segments,i=t.totalLength,o=0,a=0,s=0;s<r.length;s++){var l=r[s],u=l.from,c=l.to,l=l.length/i;if(o<=n&&n<=o+l){a=Math.atan2(c[1]-u[1],c[0]-u[0]);break}o+=l}return a}};var Na,La,Ia=function(t,e){var n=e[15];if(0===n)return!1;for(var r=1/n,i=0;i<16;i++)t[i]=e[i]*r;return!0},W=function(){var t=new Float32Array(16);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},Ra=function(t){var e=new Float32Array(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},Da=function(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],l=t[7],u=t[8],c=t[9],h=t[10],d=t[11],f=t[12],p=t[13],y=t[14],t=t[15];return(e*a-n*o)*(h*t-d*y)-(e*s-r*o)*(c*t-d*p)+(e*l-i*o)*(c*y-h*p)+(n*s-r*a)*(u*t-d*f)-(n*l-i*a)*(u*y-h*f)+(r*l-i*s)*(u*p-c*f)},ja=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],h=e[9],d=e[10],f=e[11],p=e[12],y=e[13],g=e[14],e=e[15],v=n*s-r*a,m=n*l-i*a,b=n*u-o*a,x=r*l-i*s,w=r*u-o*s,k=i*u-o*l,E=c*y-h*p,_=c*g-d*p,S=c*e-f*p,M=h*g-d*y,T=h*e-f*y,O=d*e-f*g,P=v*O-m*T+b*M+x*S-w*_+k*E;return P?(P=1/P,t[0]=(s*O-l*T+u*M)*P,t[1]=(i*T-r*O-o*M)*P,t[2]=(y*k-g*w+e*x)*P,t[3]=(d*w-h*k-f*x)*P,t[4]=(l*S-a*O-u*_)*P,t[5]=(n*O-i*S+o*_)*P,t[6]=(g*b-p*k-e*m)*P,t[7]=(c*k-d*b+f*m)*P,t[8]=(a*T-s*S+u*E)*P,t[9]=(r*S-n*T-o*E)*P,t[10]=(p*w-y*b+e*v)*P,t[11]=(h*b-c*w-f*v)*P,t[12]=(s*_-a*M-l*E)*P,t[13]=(n*M-r*_+i*E)*P,t[14]=(y*m-p*x-g*v)*P,t[15]=(c*x-h*m+d*v)*P,t):null},Ba=function(t,e){{var n,r,i,o,a,s;t===e?(n=e[1],r=e[2],i=e[3],o=e[6],a=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]=o,t[11]=e[14],t[12]=i,t[13]=a,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])}return t},Fa={length:function(t){var e=t[0],n=t[1],t=t[2];return Math.sqrt(e*e+n*n+t*t)},normalize:function(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);return t},dot:function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]},cross:function(t,e,n){var r=e[0],i=e[1],e=e[2],o=n[0],a=n[1],n=n[2];return t[0]=i*n-e*a,t[1]=e*o-r*n,t[2]=r*a-i*o,t}},za=W(),Va=W(),Ga=[0,0,0,0],y=[[0,0,0],[0,0,0],[0,0,0]],Ha=[0,0,0];function Wa(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}let Ua=1;const Ya="object"==typeof self&&self.self==self?self:"object"==typeof Yn&&Yn.global==Yn?Yn:{},qa=Date.now();let Xa={},Za=Date.now();const Ka=t=>"string"!=typeof t?t=>{if("function"!=typeof t)throw new TypeError(t+" is not a function");const n=Date.now(),e=n-Za,r=16<e?0:16-e,i=Ua++;return Xa[i]=t,1<Object.keys(Xa).length||setTimeout(()=>{Za=n;const e=Xa;Xa={},Object.keys(e).forEach(t=>e[t](Ya.performance&&"function"==typeof Ya.performance.now?Ya.performance.now():Date.now()-qa))},r),i}:""===t?Ya.requestAnimationFrame:Ya[t+"RequestAnimationFrame"],$a=((t,e)=>{let n=0;for(;void 0!==t[n];){if(e(t[n]))return t[n];n+=1}})(["","webkit","moz","ms","o"],t=>!!Ka(t)),Ja=Ka($a),Qa="string"!=typeof(pt=$a)?t=>{delete Xa[t]}:""===pt?Ya.cancelAnimationFrame:Ya[pt+"CancelAnimationFrame"]||Ya[pt+"CancelRequestAnimationFrame"];function _(){_=function(){return a};var a={},t=Object.prototype,l=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function o(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{o({},"")}catch(t){o=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,o,a,s,e=e&&e.prototype instanceof h?e:h,e=Object.create(e.prototype),r=new x(r||[]);return e._invoke=(i=t,o=n,a=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 k()}for(a.method=t,a.arg=e;;){var n=a.delegate;if(n){n=function t(e,n){var r=e.iterator[n.method];if(void 0===r){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method))return c;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}r=u(r,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,c;r=r.arg;return r?r.done?(n[e.resultName]=r.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,c):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,c)}(n,a);if(n){if(n===c)continue;return n}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===s)throw s="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s="executing";n=u(i,o,a);if("normal"===n.type){if(s=a.done?"completed":"suspendedYield",n.arg===c)continue;return{value:n.arg,done:a.done}}"throw"===n.type&&(s="completed",a.method="throw",a.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}}}a.wrap=s;var c={};function h(){}function d(){}function f(){}var e={},p=(o(e,r,function(){return this}),Object.getPrototypeOf),p=p&&p(p(w([]))),y=(p&&p!==t&&l.call(p,r)&&(e=p),f.prototype=h.prototype=Object.create(e));function g(t){["next","throw","return"].forEach(function(e){o(t,e,function(t){return this._invoke(e,t)})})}function v(a,s){var e;this._invoke=function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var o,t=u(a[t],a,n);if("throw"!==t.type)return(n=(o=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){o.value=t,r(o)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}}function m(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 b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(m,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:k}}function k(){return{value:void 0,done:!0}}return o(y,"constructor",d.prototype=f),o(f,"constructor",d),d.displayName=o(f,i,"GeneratorFunction"),a.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,o(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},a.awrap=function(t){return{__await:t}},g(v.prototype),o(v.prototype,n,function(){return this}),a.AsyncIterator=v,a.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var o=new v(s(t,e,n,r),i);return a.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},g(y),o(y,i,"Generator"),o(y,r,function(){return this}),o(y,"toString",function(){return"[object Generator]"}),a.keys=function(n){var t,r=[];for(t in n)r.push(t);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}},a.values=w,x.prototype={constructor:x,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(b),!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 o.type="throw",o.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],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(a&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){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 o=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,c):this.complete(o)},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),c},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),b(n),c}},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,b(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),c}},a}function ts(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function es(s){return function(){var t=this,a=arguments;return new Promise(function(e,n){var r=s.apply(t,a);function i(t){ts(r,e,n,i,o,"next",t)}function o(t){ts(r,e,n,i,o,"throw",t)}i(void 0)})}}function ns(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,r.key,r)}}function rs(t,e,n){e&&ns(t.prototype,e),n&&ns(t,n),Object.defineProperty(t,"prototype",{writable:!1})}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 g(t,e){t.prototype=Object.create(e.prototype),os(t.prototype.constructor=t,e)}function os(t,e){return(os=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function as(t,e,n){return(as=function(){if("undefined"!=typeof Reflect&&Reflect.construct&&!Reflect.construct.sham){if("function"==typeof Proxy)return 1;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),1}catch(t){}}}()?Reflect.construct.bind():function(t,e,n){var r=[null];r.push.apply(r,e);e=new(Function.bind.apply(t,r));return n&&os(e,n.prototype),e}).apply(null,arguments)}function ss(t,e){if(null==t)return{};for(var n,r={},i=Object.keys(t),o=0;o<i.length;o++)n=i[o],0<=e.indexOf(n)||(r[n]=t[n]);return r}function ls(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function us(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 cs(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){if(t){if("string"==typeof t)return us(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Map"===(n="Object"===n&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?us(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.")}Ya.requestAnimationFrame=Ja,Ya.cancelAnimationFrame=Qa,"undefined"!=typeof module&&module.exports&&(module.exports={requestAnimationFrame:Ja,cancelAnimationFrame:Qa}),(Q=Na=Na||{}).Layout="layout",Q.IntrinsicSizes="intrinsic-sizes",(s=La=La||{}).LAYOUT="display",s.LEFT="left",s.TOP="top",s.BOTTOM="bottom",s.RIGHT="right",s.WIDTH="width",s.HEIGHT="height",s.MIN_WIDTH="minWidth",s.MAX_WIDTH="maxWidth",s.MIN_HEIGHT="minHeight",s.MAX_HEIGHT="maxHeight",s.BOX_SIZING="boxSizing",s.PADDING="padding",s.PADDING_TOP="paddingTop",s.PADDING_BOTTOM="paddingBottom",s.PADDING_START="paddingLeft",s.PADDING_END="paddingRight",s.MARGIN="margin",s.MARGIN_TOP="marginTop",s.MARGIN_BOTTOM="marginBottom",s.MARGIN_START="marginLeft",s.MARGIN_END="marginRight",s.BORDER="border",s.BORDER_TOP="borderTop",s.BORDER_BOTTOM="borderBottom",s.BORDER_START="borderLeft",s.BORDER_END="borderRight",s.FLEX_DIRECTION="flexDirection",s.FLEX_WRAP="flexWrap",s.FLEX_FLOW="flexFlow",s.ALIGN_ITEMS="alignItems",s.ALIGN_CONTENT="alignContent",s.JUSTIFY_CONTENT="justifyContent",s.FLEX="flex",s.ALIGN_SELF="alignSelf",s.FLEX_SHRINK="flexShrink",s.FLEX_BASIS="flexBasis",s.FLEX_GROW="flexGrow",s.OFFSET_WIDTH="offsetWidth",s.OFFSET_HEIGHT="offsetHeight",s.ORDER="order";var hs=1,ge=function(){function t(t){void 0===t&&(t=new Map),this.id=void 0,this.style=void 0,this.dirty=void 0,this.parent=void 0,this.children=void 0,this.internalIntrisicSizes=void 0,this.computedLayout=void 0,this.measureFn=void 0,this.id=hs++,this.style=t,this.parent=void 0,this.children=[],this.dirty=!1}var e=t.prototype;return e.setMeasure=function(t){this.measureFn=t},e.setIntrisicSizes=function(t){this.internalIntrisicSizes=t},e.addChild=function(t){var e;null!=(e=this.children)&&e.push(t)},e.insertChild=function(t,e){this.children.splice(t,0,e)},e.removeChild=function(e){var t=null==(t=this.children)?void 0:t.findIndex(function(t){return t.id===e.id});this.removeChildAtIndex(t)},e.removeChildAtIndex=function(t){this.children.splice(t,1)},e.replaceChildAtIndex=function(t,e){this.children.splice(t,1,e)},e.setStyle=function(t,e){this.style.set(t,e)},e.getStyle=function(){for(var n=this,r=new Map,t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return e.forEach(function(t){var e=n.style.get(t);e&&r.set(t,e)}),r},e.getAllStyle=function(){return this.style},e.markDirty=function(){this.dirty=!0},e.idDirty=function(){return this.dirty},e.getSize=function(){var t;return{width:null!=(t=null==(t=this.style.get(La.WIDTH))?void 0:t.value)?t:0,height:null!=(t=null==(t=this.style.get(La.HEIGHT))?void 0:t.value)?t:0}},e.computeLayout=function(){var t=es(_().mark(function t(){var e;return _().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.getSize(),t.next=3,Hf.computeLayout(this,{availableInlineSize:e.width,availableBlockSize:e.height,fixedInlineSize:e.width,fixedBlockSize:e.height,percentageInlineSize:e.width,percentageBlockSize:e.height,data:void 0});case 3:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),e.setComputedLayout=function(t){this.computedLayout=t},e.getComputedLayout=function(){return this.computedLayout},e.getAllComputedLayout=function(){},e.toString=function(){return"LayoutObject "+this.id},rs(t,[{key:"intrisicSizes",get:function(){return this.internalIntrisicSizes}},{key:"childCount",get:function(){return this.children.length}}]),t}(),ds=d.defineToken("LayoutContextFactory"),fs=d.defineToken("LayoutContextOptions"),ps=0,ys=function(){function t(t){this.options=void 0,this.contextId=void 0,this.workQueue=[],this.mode=void 0,this.layoutChildrenFactory=void 0,this.fragmentResultFactory=void 0,this.layoutFragmentFactory=void 0,this.options=t,this.contextId=""+ps++,this.mode=t.mode,this.layoutChildrenFactory=t.layoutChildrenFactory,this.fragmentResultFactory=t.fragmentResultFactory,this.layoutFragmentFactory=t.layoutFragmentFactory}var e=t.prototype;return e.appendWorkTask=function(t){this.workQueue.push(t)},e.clearWorkQueue=function(){this.workQueue=[]},t}(),ys=t([f(),D(0,p(fs)),e("design:paramtypes",[Object])],ys),gs=d.defineToken("FragmentResultFactory"),vs=d.defineToken("FragmentResultOptions"),ms=d.defineToken("contextNode"),bs=function(t,e,n){this._layoutContext=void 0,this._node=void 0,this.options=void 0,this.layoutContext=void 0,this.inlineSize=void 0,this.blockSize=void 0,this.node=void 0,this.childFragments=void 0,this.data=void 0,this._layoutContext=t,this._node=e,this.options=n,this.layoutContext=t,this.inlineSize=null==n?void 0:n.inlineSize,this.blockSize=null==n?void 0:n.blockSize,this.childFragments=null==n?void 0:n.childFragments,this.data=n.data,this.node=e};function xs(t){if(!t)throw new Error}function ws(t,e){if(t===e)throw new Error}function ks(t){return void 0===t}function T(t){return null==t}function Es(t){return"number"==typeof t}function _s(t){return"function"==typeof t}function Ss(t){return"boolean"==typeof t}function Ms(t){return"[object Object]"===Object.prototype.toString.call(t)}var bs=t([Mr(),D(0,p(ys)),D(1,p(ms)),D(2,p(vs)),e("design:paramtypes",[ys,ge,Object])],bs),Ts={},Os=0;function Ps(b,e,x,n){if(!(0<=b&&b<=1&&0<=x&&x<=1))throw new Error("bezier x values must be in [0, 1] range");if(b===e&&x===n)return function(t){return t};for(var w=new(Is?Float32Array:Array)(11),t=0;t<11;++t)w[t]=Bs(.1*t,b,x);function r(t){for(var e=0,n=1;10!==n&&w[n]<=t;++n)e+=.1;var r=e+.1*((t-w[--n])/(w[n+1]-w[n])),i=Fs(r,b,x);if(.001<=i){for(var o=t,a=r,s=b,l=x,u=0;u<Cs;++u){var c=Fs(a,s,l);if(0===c)return a;a-=(Bs(a,s,l)-o)/c}return a}if(0===i)return r;for(var h,d,f=t,p=e,y=e+.1,g=b,v=x,m=0;0<(h=Bs(d=p+(y-p)/2,g,v)-f)?y=d:p=d,Math.abs(h)>Ns&&++m<Ls;);return d}return function(t){return 0===t||1===t?t:Bs(r(t),e,n)}}var As="undefined"!=typeof window&&void 0!==window.document,Cs=4,Ns=1e-7,Ls=10,Is="function"==typeof Float32Array,Rs=function(t,e){return 1-3*e+3*t},Ds=function(t,e){return 3*e-6*t},js=function(t){return 3*t},Bs=function(t,e,n){return((Rs(e,n)*t+Ds(e,n))*t+js(e))*t},Fs=function(t,e,n){return 3*Rs(e,n)*t*t+2*Ds(e,n)*t+js(e)};function zs(t,e,n){return n?Math.min(t,e)===t?e:Math.max(t,n)===t?n:t:Math.max(t,e)===e?t:e}function Vs(t){return void 0===t?0:360<t||t<-360?t%360:t}function Gs(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),Es(t)?E(t,e,n):Array.isArray(t)&&3===t.length?Fi(t):E(t[0],t[1]||e,t[2]||n)}function Hs(t){return t*(Math.PI/180)}function Ws(t){return t*(180/Math.PI)}function Us(t,e){return 16===e.length?(n=t,r=e,a=.5*Math.PI,s=(u=Pi(v(),r))[0],l=u[1],u=u[2],(c=Math.asin(-r[2]/s))<a?-a<c?(i=Math.atan2(r[6]/l,r[10]/u),o=Math.atan2(r[1]/s,r[0]/s)):(o=0,i=-Math.atan2(r[4]/l,r[5]/l)):(o=0,i=Math.atan2(r[4]/l,r[5]/l)),n[0]=i,n[1]=c,n[2]=o,n):(a=t,s=(u=e)[0],r=u[1],l=u[2],u=u[3],.499995*(n=s*s+(i=r*r)+(c=l*l)+(o=u*u))<(t=s*u-r*l)?(a[0]=Math.PI/2,a[1]=2*Math.atan2(r,s),a[2]=0):t<-.499995*n?(a[0]=-Math.PI/2,a[1]=2*Math.atan2(r,s),a[2]=0):(a[0]=Math.asin(2*(s*l-u*r)),a[1]=Math.atan2(2*(s*u+r*l),1-2*(c+o)),a[2]=Math.atan2(2*(s*r+l*u),1-2*(i+c))),a);var n,r,i,o,a,s,l,u,c}function Ys(t,e,n,r,i){var o,a,s,l,u=Math.cos(t),t=Math.sin(t);return o=r*u,a=i*t,r=-r*t,t=i*u,u=i=0,e=e,n=n,s=1,(l=new di(9))[0]=o,l[1]=a,l[2]=i,l[3]=r,l[4]=t,l[5]=u,l[6]=e,l[7]=n,l[8]=s,l}function qs(t){var e=t[0],n=t[1],r=t[3],i=t[4],o=Math.sqrt(e*e+n*n),a=Math.sqrt(r*r+i*i);e*i-n*r<0&&(e<i?o=-o:a=-a),o&&(e*=1/o,n*=1/o),a&&(i*=1/a);r=Ws(Math.atan2(n,e));return[t[6],t[7],o,a,r]}function Xs(t){return Math.pow(t,2)}function Zs(t){return Math.pow(t,3)}function Ks(t){return Math.pow(t,4)}function $s(t){return Math.pow(t,5)}function Js(t){return Math.pow(t,6)}function Qs(t){return 1-Math.cos(t*Math.PI/2)}function tl(t){return 1-Math.sqrt(1-t*t)}function el(t){return t*t*(3*t-2)}function nl(t){for(var e,n=4;t<((e=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*e-2)/22-t,2)}function rl(t,e){var n=(e=e=void 0===e?[]:e)[0],e=void 0===(e=e[1])?.5:e,n=zs(Number(void 0===n?1:n),1,10),e=zs(Number(e),.1,2);return 0===t||1===t?t:-n*Math.pow(2,10*(t-1))*Math.sin((t-1-e/(2*Math.PI)*Math.asin(1/n))*(2*Math.PI)/e)}function il(t,e,n){var r=(e=e=void 0===e?[]:e)[0],i=void 0===(i=e[1])?100:i,o=void 0===(o=e[2])?10:o,e=void 0===(e=e[3])?0:e,r=zs(void 0===r?1:r,.1,1e3),i=zs(i,.1,1e3),o=zs(o,.1,1e3),e=zs(e,.1,1e3),a=Math.sqrt(i/r),i=(o=o/(2*Math.sqrt(i*r)))<1?a*Math.sqrt(1-o*o):0,r=o<1?(o*a-e)/i:-e+a,e=n?n*t/1e3:t,e=o<1?Math.exp(-e*o*a)*(+Math.cos(i*e)+r*Math.sin(i*e)):(1+r*e)*Math.exp(-e*a);return 0===t||1===t?t:1-e}function ol(t,e){var e=e=void 0===e?[]:e,n=void 0===(n=e[0])?10:n;return("start"==e[1]?Math.ceil:Math.floor)(zs(t,0,1)*n)/n}function al(t,e){var n=(e=e=void 0===e?[]:e)[0],r=e[1],i=e[2],e=e[3];return Ps(n,r,i,e)(t)}function sl(r){return function(t,e,n){return 1-r(1-t,e=void 0===e?[]:e,n)}}function ll(r){return function(t,e,n){return void 0===e&&(e=[]),t<.5?r(2*t,e,n)/2:1-r(-2*t+2,e,n)/2}}function ul(r){return function(t,e,n){return void 0===e&&(e=[]),t<.5?(1-r(1-2*t,e,n))/2:(r(2*t-1,e,n)+1)/2}}function cl(){var n=this;this.resolve=void 0,this.reject=void 0,this.promise=new Promise(function(t,e){n.resolve=t,n.reject=e})}var c=Ps(.42,0,1,1),hl={steps:ol,"step-start":function(t){return ol(t,[1,"start"])},"step-end":function(t){return ol(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":al,ease:function(t){return al(t,[.25,.1,.25,1])},in:c,out:sl(c),"in-out":ll(c),"out-in":ul(c),"in-quad":Xs,"out-quad":sl(Xs),"in-out-quad":ll(Xs),"out-in-quad":ul(Xs),"in-cubic":Zs,"out-cubic":sl(Zs),"in-out-cubic":ll(Zs),"out-in-cubic":ul(Zs),"in-quart":Ks,"out-quart":sl(Ks),"in-out-quart":ll(Ks),"out-in-quart":ul(Ks),"in-quint":$s,"out-quint":sl($s),"in-out-quint":ll($s),"out-in-quint":ul($s),"in-expo":Js,"out-expo":sl(Js),"in-out-expo":ll(Js),"out-in-expo":ul(Js),"in-sine":Qs,"out-sine":sl(Qs),"in-out-sine":ll(Qs),"out-in-sine":ul(Qs),"in-circ":tl,"out-circ":sl(tl),"in-out-circ":ll(tl),"out-in-circ":ul(tl),"in-back":el,"out-back":sl(el),"in-out-back":ll(el),"out-in-back":ul(el),"in-bounce":nl,"out-bounce":sl(nl),"in-out-bounce":ll(nl),"out-in-bounce":ul(nl),"in-elastic":rl,"out-elastic":sl(rl),"in-out-elastic":ll(rl),"out-in-elastic":ul(rl),spring:il,"spring-in":il,"spring-out":sl(il),"spring-in-out":ll(il),"spring-out-in":ul(il)},dl=function(t){return("-"===(t=(t=t).replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})).charAt(0)?t.substring(1):t).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()};function fl(t,e){if(As)return document.defaultView.getComputedStyle(t,null).getPropertyValue(e)}var pl={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"};yl={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]+\.?))/},gl="";var yl,gl,vl=function(t){return gl=t,bl()};function ml(t){throw new Error(gl+": "+t)}function bl(){var t=Pl(xl);return 0<gl.length&&ml("Invalid input not EOF"),t}function xl(){return wl("linear-gradient",yl.linearGradient,El)||wl("repeating-linear-gradient",yl.repeatingLinearGradient,El)||wl("radial-gradient",yl.radialGradient,_l)||wl("repeating-radial-gradient",yl.repeatingRadialGradient,_l)||wl("conic-gradient",yl.conicGradient,_l)}function wl(n,t,r){return kl(t,function(t){var e=r();return e&&!Rl(yl.comma)&&ml("Missing comma before color stops"),{type:n,orientation:e,colorStops:Pl(Al)}})}function kl(t,e){t=Rl(t);if(t)return Rl(yl.startCall)||ml("Missing ("),e=e(t),Rl(yl.endCall)||ml("Missing )"),e}function El(){return Il("directional",yl.sideOrCorner,1)||Il("angular",yl.angleValue,1)}function _l(){var t,e,n=Sl();return n&&((t=[]).push(n),e=gl,Rl(yl.comma)&&((n=Sl())?t.push(n):gl=e)),t}function Sl(){var t,e=function(){var t=Il("shape",/^(circle)/i,0);t&&(t.style=Ll()||Ml());return t}()||function(){var t=Il("shape",/^(ellipse)/i,0);t&&(t.style=Nl()||Ml());return t}();return e?e.at=Tl():(t=Ml())?(e=t,(t=Tl())&&(e.at=t)):(t=Ol())&&(e={type:"default-radial",at:t}),e}function Ml(){return Il("extent-keyword",yl.extentKeywords,1)}function Tl(){var t;if(Il("position",/^at/,0))return(t=Ol())||ml("Missing positioning value"),t}function Ol(){var t={x:Nl(),y:Nl()};if(t.x||t.y)return{type:"position",value:t}}function Pl(t){var e=t(),n=[];if(e)for(n.push(e);Rl(yl.comma);)(e=t())?n.push(e):ml("One extra comma");return n}function Al(){var t=Il("hex",yl.hexColor,1)||kl(yl.rgbaColor,function(){return{type:"rgba",value:Pl(Cl)}})||kl(yl.rgbColor,function(){return{type:"rgb",value:Pl(Cl)}})||Il("literal",yl.literalColor,0);return t||ml("Expected color definition"),t.length=Nl(),t}function Cl(){return Rl(yl.number)[1]}function Nl(){return Il("%",yl.percentageValue,1)||Il("position-keyword",yl.positionKeywords,1)||Ll()}function Ll(){return Il("px",yl.pixelValue,1)||Il("em",yl.emValue,1)}function Il(t,e,n){e=Rl(e);if(e)return{type:t,value:e[n]}}function Rl(t){var e=/^[\n\r\t\s]+/.exec(gl),e=(e&&Dl(e[0].length),t.exec(gl));return e&&Dl(e[0].length),e}function Dl(t){gl=gl.substring(t)}(a=b=b||{}).COORDINATE="<coordinate>",a.COLOR="<color>",a.PAINT="<paint>",a.NUMBER="<number>",a.ANGLE="<angle>",a.OPACITY_VALUE="<opacity-value>",a.SHADOW_BLUR="<shadow-blur>",a.LENGTH="<length>",a.PERCENTAGE="<percentage>",a.LENGTH_PERCENTAGE="<length> | <percentage>",a.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",a.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",a.LIST_OF_POINTS="<list-of-points>",a.PATH="<path>",a.FILTER="<filter>",a.Z_INDEX="<z-index>",a.OFFSET_PATH="<offset-path>",a.OFFSET_DISTANCE="<offset-distance>",a.CLIP_PATH="<clip-path>",a.MARKER="<marker>",a.TRANSFORM="<transform>",a.TRANSFORM_ORIGIN="<transform-origin>",a.TEXT="<text>",a.TEXT_TRANSFORM="<text-transform>";function jl(t){return t}var Bl=d.defineToken("StyleValueRegistry");function Fl(n,r){return function(t){if(1<=t)return 1;var e=1/n;return(t+=r*e)-t%e}}var l="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",zl=new RegExp("cubic-bezier\\("+l+","+l+","+l+","+l+"\\)"),Vl=/steps\(\s*(\d+)\s*\)/,Gl=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function Hl(t){var e=zl.exec(t);if(e)return Ps.apply(void 0,e.slice(1).map(Number));e=Vl.exec(t);if(e)return Fl(Number(e[1]),0);e=Gl.exec(t);return e?Fl(Number(e[1]),{start:1,middle:.5,end:0}[e[2]]):hl[dl(t)]||hl.linear}function Wl(t){return Math.abs((0!==(e=t).duration&&0!==e.iterations?("auto"===e.duration?0:Number(e.duration))*(null!=(e=e.iterations)?e:1):0)/(t.playbackRate||1));var e}var Ul=0,Yl=1,ql=2,Xl=3;function Zl(t,e,n){var r=function(t,e,n){if(null===e)return Ul;var r=n.endTime;return e<Math.min(n.delay,r)?Yl:e>=Math.min(n.delay+t+n.endDelay,r)?ql:Xl}(t,e,n),t=function(t,e,n,r,i){switch(r){case Yl:return"backwards"===e||"both"===e?0:null;case Xl:return n-i;case ql:return"forwards"===e||"both"===e?t:null;case Ul:return null}}(t,n.fill,e,r,n.delay);if(null===t)return null;var i,o,e="auto"===n.duration?0:n.duration,a=(o=e,a=r,s=n.iterations,i=t,l=n.iterationStart,0===o?a!==Yl&&(l+=s):l+=i/o,l),s=(s=a,i=n.iterationStart,o=r,l=n.iterations,t=t,e=e,i=0!==(i=s===1/0?i%1:s%1)||o!==ql||0===l||0===t&&0!==e?i:1),e=(o=n.iterations,l=s,t=a,r===ql&&o===1/0?1/0:1===l?Math.floor(t)-1:Math.floor(t)),l=(i=n.direction,a=e,r=s,"normal"!==(o=i)&&"reverse"!==i&&(a=a,"alternate-reverse"===i&&(a+=1),o=a!==1/0&&a%2!=0?"reverse":"normal"),"normal"===o?r:1-r);return n.currentIteration=e,n.progress=l,n.easingFunction(l)}function Kl(a,s){if("function"!=typeof a||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=s?s.apply(this,e):e[0],i=l.cache;if(i.has(r))return i.get(r);var o=a.apply(this,e);return l.cache=i.set(r,o)||i,o}return l.cache=new(Kl.Cache||Map),l}Kl.Cache=Map;var $l=Kl(function(t){return(t=void 0===t?"":t).replace(/-([a-z])/g,function(t){return t[1].toUpperCase()})});function Jl(t){return!T(t)&&"string"==typeof t}function Ql(t,e,n){var o=function(t,e){for(var n={},r=0;r<t.length;r++)for(var i in t[r]){var o;tu(i)&&(o={offset:t[r].offset,computedOffset:t[r].computedOffset,easing:t[r].easing,easingFunction:Hl(t[r].easing)||e.easingFunction,value:t[r][i]},n[i]=n[i]||[],n[i].push(o))}return n}(t,e),a=function(t,e){var n,r=[];for(n in t)for(var i=t[n],o=0;o<i.length-1;o++){var a=o,s=o+1,l=i[a].computedOffset,u=i[s].computedOffset,c=l,h=u;0===o&&(c=-1/0,0===u&&(s=a)),o===i.length-2&&(h=1/0,1===l&&(a=s)),r.push({applyFrom:c,applyTo:h,startOffset:i[a].computedOffset,endOffset:i[s].computedOffset,easingFunction:i[a].easingFunction,property:n,interpolation:function(t,e,n,r){var i=e,o=n,a=Zr.get(Bl),t=a.getMetadata(t);if(t&&t.syntax&&t.interpolable){a=a.getPropertySyntax(t.syntax);if(a){a.parser&&(i=a.parser(e,r),o=a.parser(n,r));var s,t=a.mixer(i,o,r);if(t)return s=eu.apply(void 0,t),function(t){return 0===t?e:1===t?n:s(t)}}}return eu(!1,!0,function(t){return t?n:e})}(n,i[a].value,i[s].value,e)})}return r.sort(function(t,e){return t.startOffset-e.startOffset}),r}(o,n);return function(r,i){if(null!==i)a.filter(function(t){return i>=t.applyFrom&&i<t.applyTo}).forEach(function(t){var e=i-t.startOffset,n=t.endOffset-t.startOffset,e=0==n?0:t.easingFunction(e/n);r.style[t.property]=t.interpolation(e)});else for(var t in o)tu(t)&&(r.style[t]=null)}}function tu(t){return"offset"!==t&&"easing"!==t&&"composite"!==t&&"computedOffset"!==t}var eu=function(e,n,r){return function(t){return r(function t(e,n,r){if("number"==typeof e&&"number"==typeof n)return e*(1-r)+n*r;if("boolean"==typeof e&&"boolean"==typeof n||"string"==typeof e&&"string"==typeof n)return r<.5?e:n;if(Array.isArray(e)&&Array.isArray(n)&&e.length===n.length){for(var i=[],o=0;o<e.length;o++)i.push(t(e[o],n[o],r));return i}throw new Error("Mismatched interpolation arguments "+e+":"+n)}(e,n,t))}};var M,nu={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign",values:{middle:"center"}},src:{alias:"img"}},ru=Kl(function(t){var t=$l(t),e=nu[t];return[t=(null==e?void 0:e.alias)||t,e]});function iu(t,e){var t=ru(t),n=t[0],t=t[1];return[n,Jl(e)&&(null==t||null==(n=t.values)?void 0:n[e])||e]}(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";var ou=d.defineToken("CanvasConfig");function au(t,e,n,r){var i=(-1+Math.sqrt(2))/3*4,o=t*i,i=e*i,a=n-t,t=n+t,s=r-e,e=r+e;return[["M",a,r],["C",a,r-i,n-o,s,n,s],["C",n+o,s,t,r-i,t,r],["C",t,r+i,n+o,e,n,e],["C",n-o,e,a,r+i,a,r],["Z"]]}function su(t,e){void 0===e&&(e=!0);var n,r,i,o,a,s,l,u,c,h,d=[];switch(t.nodeName){case M.LINE:var f=t.parsedStyle,p=f.x1,y=f.y1,g=f.x2,f=f.y2,d=[["M",p.value,y.value],["L",g.value,f.value]];break;case M.CIRCLE:var p=t.parsedStyle,y=p.r,g=p.cx,f=p.cy;d=au(y.value,y.value,g.value,f.value);break;case M.ELLIPSE:p=t.parsedStyle,y=p.rx,g=p.ry,f=p.cx,p=p.cy;d=au(y.value,g.value,f.value,p.value);break;case M.POLYLINE:case M.POLYGON:y=t.parsedStyle.points;g=y.points,f=t.nodeName===M.POLYGON,g=g.map(function(t,e){return[0===e?"M":"L",t[0],t[1]]}),f&&g.push(["Z"]),d=g;break;case M.RECT:var p=t.parsedStyle,v=p.width,m=p.height,y=p.x,b=p.y,p=p.radius,x=p&&p.some(function(t){return 0!==t.value});n=v.value,r=m.value,y=y.value,b=b.value,x=x&&p.map(function(t){return zs(t.value,0,Math.min(Math.abs(v.value)/2,Math.abs(m.value)/2))}),d=x?(o=(p=0<n?1:-1)+(k=0<r?1:-1)!=0?1:0,[["M",p*(i=x[0])+y,b],["L",n-p*(w=x[1])+y,b],w?["A",w,w,0,0,o,n+y,k*w+b]:null,["L",n+y,r-k*(w=x[2])+b],w?["A",w,w,0,0,o,n+y-p*w,r+b]:null,["L",y+p*(w=x[3]),r+b],w?["A",w,w,0,0,o,y,r+b-k*w]:null,["L",y,k*i+b],i?["A",i,i,0,0,o,p*i+y,b]:null,["Z"]].filter(function(t){return t})):[["M",y,b],["L",y+n,b],["L",y+n,b+r],["L",y,b+r],["Z"]];break;case M.PATH:var x=t.parsedStyle.path,w=x.curve,k=x.zCommandIndexes;d=[].concat(w),k.forEach(function(t,e){d.splice(t+e,1,["Z"])})}if(d.length)return a=d,s=t,(l=void 0===(l=e)?!0:l)&&(u=s.getLocalTransform()),e=(s=s.parsedStyle).defX,c=void 0===e?0:e,h=void 0===(e=s.defY)?0:e,a.reduce(function(t,e){var n,r,i,o="";return"M"===e[0]||"L"===e[0]?(i=E(e[1]-c,e[2]-h,0),l&&Zi(i,i,u),o=""+e[0]+i[0]+","+i[1]):"Z"===e[0]?o=e[0]:"C"===e[0]?(i=E(e[1]-c,e[2]-h,0),n=E(e[3]-c,e[4]-h,0),r=E(e[5]-c,e[6]-h,0),l&&(Zi(i,i,u),Zi(n,n,u),Zi(r,r,u)),o=""+e[0]+i[0]+","+i[1]+","+n[0]+","+n[1]+","+r[0]+","+r[1]):"A"===e[0]&&(i=E(e[6]-c,e[7]-h,0),l&&Zi(i,i,u),o=""+e[0]+e[1]+","+e[2]+","+e[3]+","+e[4]+","+e[5]+","+i[0]+","+i[1]),t+o},"")}function lu(){return this.call=this._createCall("sync"),this.call.apply(this,arguments)}function uu(){return this.callAsync=this._createCall("async"),this.callAsync.apply(this,arguments)}function cu(){return this.promise=this._createCall("promise"),this.promise.apply(this,arguments)}function hu(t){return bu.setup(this,t),bu.create(t)}function du(t){return wu.setup(this,t),wu.create(t)}function fu(){throw new Error("tapAsync is not supported on a SyncHook")}function pu(){throw new Error("tapPromise is not supported on a SyncHook")}function yu(t){return Eu.setup(this,t),Eu.create(t)}function gu(){throw new Error("tapAsync is not supported on a SyncWaterfallHook")}function vu(){throw new Error("tapPromise is not supported on a SyncWaterfallHook")}function mu(t){return Su.setup(this,t),Su.create(t)}var o=function(){function t(t,e){void 0===t&&(t=[]),void 0===e&&(e=void 0),this.name=void 0,this.taps=void 0,this.promise=void 0,this._promise=void 0,this._args=t,this.name=e,this.taps=[],this.interceptors=[],this._call=lu,this.call=lu,this._callAsync=uu,this.callAsync=uu,this._promise=cu,this.promise=cu,this._x=void 0}var e=t.prototype;return e.compile=function(t){throw new Error("Abstract: should be overridden")},e._createCall=function(t){return this.compile({taps:this.taps,interceptors:this.interceptors,args:this._args,type:t})},e._tap=function(t,e,n){if("string"==typeof e)e={name:e.trim()};else if("object"!=typeof e||null===e)throw new Error("Invalid tap options");if("string"!=typeof e.name||""===e.name)throw new Error("Missing name for tap");e=Object.assign({type:t,fn:n},e),e=this._runRegisterInterceptors(e),this._insert(e)},e.tap=function(t,e){this._tap("sync",t,e)},e.tapAsync=function(t,e){this._tap("async",t,e)},e.tapPromise=function(t,e){this._tap("promise",t,e)},e._runRegisterInterceptors=function(t){for(var e=cs(this.interceptors);!(n=e()).done;){var n=n.value;!n.register||void 0!==(n=n.register(t))&&(t=n)}return t},e.withOptions=function(e){function n(t){return Object.assign({},e,"string"==typeof t?{name:t}:t)}var r=this;return{name:this.name,tap:function(t,e){return r.tap(n(t),e)},tapAsync:function(t,e){return r.tapAsync(n(t),e)},tapPromise:function(t,e){return r.tapPromise(n(t),e)},isUsed:function(){return r.isUsed()},withOptions:function(t){return r.withOptions(n(t))}}},e.isUsed=function(){return 0<this.taps.length||0<this.interceptors.length},e._resetCompilation=function(){this.call=this._call,this.callAsync=this._callAsync,this.promise=this._promise},e._insert=function(t){this._resetCompilation(),"string"==typeof t.before?e=new Set([t.before]):Array.isArray(t.before)&&(e=new Set(t.before));for(var e,n=0,r=("number"==typeof t.stage&&(n=t.stage),this.taps.length);0<r;){r--;var i=this.taps[r],o=(this.taps[r+1]=i).stage||0;if(e){if(e.has(i.name)){e.delete(i.name);continue}if(0<e.size)continue}if(!(n<o)){r++;break}}this.taps[r]=t},t}(),H=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,o=t.onResult,n=t.onDone,e="",a=0;a<this.options.interceptors.length;a++){var s=this.options.interceptors[a];s.call&&(e+=this.getInterceptor(a)+".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:o&&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+=o(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=cs(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,o=e.rethrowIfPossible,a="",s=!1,l=0;l<this.options.interceptors.length;l++){var u=this.options.interceptors[l];u.tap&&(s||(a+="var _tap"+t+" = "+this.getTap(t)+";\n",s=!0),a+=this.getInterceptor(l)+".tap("+(u.context?"_context, ":"")+"_tap"+t+");\n")}a+="var _fn"+t+" = "+this.getTapFn(t)+";\n";var c=this.options.taps[t];switch(c.type){case"sync":o||(a=a+"var _hasError"+t+" = false;\ntry {\n"),a+=r?"var _result"+t+" = _fn"+t+"("+this.args({before:c.context?"_context":void 0})+");\n":"_fn"+t+"("+this.args({before:c.context?"_context":void 0})+");\n",o||(a=(a=(a=a+"} catch(_err) {\n_hasError"+t+" = true;\n")+n("_err"))+"}\nif(!_hasError"+t+") {\n"),r&&(a+=r("_result"+t)),i&&(a+=i()),o||(a+="}\n");break;case"async":var h=(h=(h="")+(r?"(function(_err"+t+", _result"+t+") {\n":"(function(_err"+t+") {\n")+("if(_err"+t+") {\n"))+n("_err"+t)+"} else {\n";r&&(h+=r("_result"+t)),i&&(h+=i()),a+="_fn"+t+"("+this.args({before:c.context?"_context":void 0,after:h=h+"}\n"+"})"})+");\n";break;case"promise":a=(a=(a=(a+="var _hasResult"+t+" = false;\n")+("var _promise"+t+" = _fn"+t+"("+this.args({before:c.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&&(a+=r("_result"+t)),i&&(a+=i()),a=(a=a+("}), function(_err"+t+") {\n")+("if(_hasResult"+t+") throw _err"+t+";\n"))+n("_err"+t)+"});\n"}return a},e.callTapsSeries=function(t){var o=this,a=t.onError,s=t.onResult,e=t.resultReturns,l=t.onDone,n=t.doneReturns,u=t.rethrowIfPossible;if(0===this.options.taps.length)return l();for(var c=this.options.taps.findIndex(function(t){return"sync"!==t.type}),h=e||n,d="",f=l,p=0,r=function(t){function e(t){return t?"":l()}var n=t,r=(f!==l&&("sync"!==o.options.taps[n].type||20<p++)&&(p=0,d=(d+="function _next"+n+"() {\n")+f()+"}\n",f=function(){return(h?"return ":"")+"_next"+n+"();\n"}),f),i=o.callTap(n,{onError:function(t){return a(n,t,r,e)},onResult:s&&function(t){return s(n,t,r,e)},onDone:!s&&r,rethrowIfPossible:u&&(c<0||n<c)});f=function(){return i}},i=this.options.taps.length-1;0<=i;i--)r(i);return d+=f()},e.callTapsLooping=function(t){var e=t.onError,n=t.onDone,t=t.rethrowIfPossible;if(0===this.options.taps.length)return n();var o=this.options.taps.every(function(t){return"sync"===t.type}),r="";o||(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 a=this.options.interceptors[i];a.loop&&(r+=this.getInterceptor(i)+".loop("+this.args({before:a.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 o||(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&&o})+"} while(_loop);\n",o||(r+="_loopAsync = true;\n});\n_looper();\n"),r},e.callTapsParallel=function(t){var e=this,o=t.onError,a=t.onResult,s=t.onDone,l=t.rethrowIfPossible,t=t.onTap,u=void 0===t?function(t,e){return e()}:t;if(this.options.taps.length<=1)return this.callTapsSeries({onError:o,onResult:a,onDone:s,rethrowIfPossible:l});for(var c="",n=(c=(c+="do {\n")+("var _counter = "+this.options.taps.length+";\n"),s&&(c=(c+="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"}c=(c+="if(_counter <= 0) break;\n")+u(n,function(){return e.callTap(n,{onError:function(t){var e="";return(e+="if(_counter > 0) {\n")+o(n,t,r,i)+"}\n"},onResult:a&&function(t){var e="";return(e+="if(_counter > 0) {\n")+a(n,t,r,i)+"}\n"},onDone:!a&&r,rethrowIfPossible:l})},r,i)}),r=0;r<this.options.taps.length;r++)n(r);return c+="} 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}(),bu=new(function(t){function e(){return t.apply(this,arguments)||this}return g(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}(H)),xu=function(n){function t(t,e){return(t=n.call(this,t=void 0===t?[]:t,e=void 0===e?void 0:e)||this).compile=hu,t._call=void 0,t.call=void 0,t}return g(t,n),t}(o),wu=new(function(t){function e(){return t.apply(this,arguments)||this}return g(e,t),e.prototype.content=function(t){var i=this,o=t.onError,e=t.onResult;return t.onDone,this.callTapsSeries({onError:function(t,e,n,r){return o(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}(H)),ku=function(n){function t(t,e){return(t=n.call(this,t=void 0===t?[]:t,e=void 0===e?void 0:e)||this).compile=du,t._call=void 0,t.call=void 0,t}return g(t,n),t}(o),Eu=new(function(t){function e(){return t.apply(this,arguments)||this}return g(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}(H)),_u=function(n){function t(t,e){return(t=n.call(this,t=void 0===t?[]:t,e=void 0===e?void 0:e)||this).tapAsync=fu,t.tapPromise=pu,t.compile=yu,t}return g(t,n),t}(o),Su=new(function(t){function e(){return t.apply(this,arguments)||this}return g(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}(H)),Mu=function(n){function t(t,e){return(t=n.call(this,t=void 0===t?[]:t,e=void 0===e?void 0:e)||this).tapAsync=gu,t.tapPromise=vu,t.compile=mu,t}return g(t,n),t}(_u),Tu=["serif","sans-serif","monospace","cursive","fantasy","system-ui"];function Ou(e){return void 0===e&&(e=0),new Promise(function(t){setTimeout(function(){t()},e)})}var Pu,O,Au,Cu,Nu,Lu,Iu=d.defineToken("LayoutChildrenFactory"),Ru=d.defineToken("LayoutChildrenOptions"),Du=function(){function t(t,e){this._layoutContext=void 0,this.options=void 0,this.node=void 0,this.styleMap=void 0,this.layoutContext=void 0,this._layoutContext=t,this.options=e,this.layoutContext=t,this.node=e.node,this.styleMap=e.node.getAllStyle()}var e=t.prototype;return e.intrinsicSizes=function(){var t=new cl;return this.layoutContext.appendWorkTask({layoutChild:this,taskType:Na.IntrinsicSizes,deferred:t}),t.promise},e.layoutNextFragment=function(t){if(this.layoutContext.mode===Na.IntrinsicSizes)throw new Error("Not Supported: cant call layoutNextFragment in intrinsicSizes");var e=new cl;return this.layoutContext.appendWorkTask({layoutConstraints:t,layoutChild:this,taskType:Na.Layout,deferred:e}),e.promise},t}(),Du=t([Mr(),D(0,p(ys)),D(1,p(Ru)),e("design:paramtypes",[ys,Object])],Du),ju=d.defineToken("LayoutEdgesFactory"),Bu=d.defineToken("LayoutEdgesOptions"),Fu=[0,0,0,0],zu=function(t){this.options=void 0,this.inlineStart=void 0,this.inlineEnd=void 0,this.blockStart=void 0,this.blockEnd=void 0,this.inline=void 0,this.block=void 0;var t=(this.options=t).node.getAllStyle(),e=null!=(e=null==(e=t.get(La.PADDING_TOP))?void 0:e.value)?e:0,n=null!=(n=null==(n=t.get(La.PADDING_END))?void 0:n.value)?n:0,r=null!=(r=null==(r=t.get(La.PADDING_BOTTOM))?void 0:r.value)?r:0,i=null!=(i=null==(i=t.get(La.PADDING_START))?void 0:i.value)?i:0,o=null!=(o=null==(o=t.get(La.PADDING_TOP))?void 0:o.value)?o:0,a=null!=(a=null==(a=t.get(La.PADDING_END))?void 0:a.value)?a:0,s=null!=(s=null==(s=t.get(La.PADDING_BOTTOM))?void 0:s.value)?s:0,t=null!=(t=null==(t=t.get(La.PADDING_START))?void 0:t.value)?t:0;this.blockStart=e+Fu[0]+o,this.inlineStart=n+Fu[1]+a,this.blockEnd=r+Fu[2]+s,this.inlineEnd=i+Fu[3]+t,this.block=this.blockStart+this.blockEnd,this.inline=this.inlineStart+this.inlineEnd},zu=t([Mr(),D(0,p(Bu)),e("design:paramtypes",[Object])],zu),Vu=((tt=function(){function t(){this.registry=new Map}var e=t.prototype;return e.hasLayout=function(t){return this.registry.has(t)},e.getLayout=function(t){if(this.hasLayout(t=void 0===t?"absolute":t))return this.registry.get(t);throw new Error("invalid layout property: "+t)},e.updateLayout=function(t,e){this.registry.set(t,e)},e.registerLayout=function(t,e){if(""===t)throw new TypeError("layout name cant't be empty");if(Pu.reservedLayout.includes(t))throw new Error("layout name '"+t+"' is a system reserved layout name, please use another name");if(this.hasLayout(t))throw new Error("layout '"+t+"' already exist.");this.registry.set(t,e)},e.deleteLayout=function(t){this.registry.delete(t)},rs(t,[{key:"size",get:function(){return this.registry.size}}]),t}()).reservedLayout=[],Pu=tt),Vu=Pu=t([f()],Vu),Gu=function(){function t(t,e,n){this._layoutRegistry=void 0,this._layoutContextFactory=void 0,this._layoutEdgesFactory=void 0,this.layoutRegistry=void 0,this.layoutContextFactory=void 0,this.layoutEdgesFactory=void 0,this._layoutRegistry=t,this._layoutContextFactory=e,this._layoutEdgesFactory=n,this.layoutRegistry=t,this.layoutContextFactory=e,this.layoutEdgesFactory=n}var e=t.prototype;return e.computeLayout=function(){var n=es(_().mark(function t(e,n){return _().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.determineIntrinsicSizes(e,e.children);case 2:return t.next=4,this.calculateLayout(e,e.children,n);case 4:case"end":return t.stop()}},t,this)}));return function(t,e){return n.apply(this,arguments)}}(),e.determineAllIntrinsicSizes=function(){var e=es(_().mark(function t(e){return _().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),e.getLayoutDefinitionName=function(t){t=t.getAllStyle().get(La.LAYOUT);if(t)return t.value;throw new Error("layout property not found")},e.determineIntrinsicSizes=function(){var n=es(_().mark(function t(e,n){var r;return _().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=this.getLayoutDefinitionName(e),t.next=3,this.invokeIntrinsicSizesCallback(r,e,n);case 3:case"end":return t.stop()}},t,this)}));return function(t,e){return n.apply(this,arguments)}}(),e.invokeIntrinsicSizesCallback=function(){var r=es(_().mark(function t(e,n,r){var i,o,a,s,l;return _().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return l=this.layoutRegistry.getLayout(e),a=new l,i=this.layoutContextFactory({mode:Na.IntrinsicSizes}),l=l.inputProperties,l=void 0===l?[]:l,o=[],r.forEach(function(t){t=i.layoutChildrenFactory({node:t});o.push(t)}),s=this.layoutEdgesFactory({node:n}),l=n.getStyle.apply(n,l),a=a.intrinsicSizes(o,s,l),(s=this.runWorkQueue(a,i.workQueue)).next(),t.next=13,Ou();case 13:l=s.next().value,i.clearWorkQueue(),n.setIntrisicSizes(l);case 16:case"end":return t.stop()}},t,this)}));return function(t,e,n){return r.apply(this,arguments)}}(),e.calculateLayout=function(){var r=es(_().mark(function t(e,n,r){var i;return _().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return i=this.getLayoutDefinitionName(e),t.next=3,this.invokeLayoutCallback(i,e,n,r);case 3:case"end":return t.stop()}},t,this)}));return function(t,e,n){return r.apply(this,arguments)}}(),e.invokeLayoutCallback=function(){var i=es(_().mark(function t(e,n,r,i){var o,a,s,l,u,c;return _().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return l=this.layoutRegistry.getLayout(e),c=new l,o=this.layoutContextFactory({mode:Na.Layout}),l=l.inputProperties,l=void 0===l?[]:l,a=[],r.forEach(function(t){t=o.layoutChildrenFactory({node:t});a.push(t)}),s=this.layoutEdgesFactory({node:n}),l=n.getStyle.apply(n,l),c=c.layout(a,s,i,l),(s=this.runWorkQueue(c,o.workQueue)).next(),t.next=13,Ou();case 13:l=s.next().value,o.clearWorkQueue(),u=l instanceof bs?l:o.fragmentResultFactory(l),c=o.layoutFragmentFactory({inlineSize:u.inlineSize,blockSize:u.blockSize,data:u.data}),n.setComputedLayout(c),r.forEach(function(t,e){t.setComputedLayout(u.childFragments[e])});case 19:case"end":return t.stop()}},t,this)}));return function(t,e,n,r){return i.apply(this,arguments)}}(),e.runWorkQueue=_().mark(function t(e,n){var r,i=this;return _().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=function(t){if(t.isRejected||t.isFulfilled)return t;var e,n=!0,r=!1,i=!1,t=t.then(function(t){return n=!(i=!0),e=t},function(t){throw n=!(r=!0),t});return t.isFulfilled=function(){return i},t.isPending=function(){return n},t.isRejected=function(){return r},t.getFullFilledValue=function(){return e},t}(e),0<n.length&&r.isPending()&&n.forEach(function(t){var e,n,r;t.taskType===Na.IntrinsicSizes&&(e=t.layoutChild,n=t.deferred,e=e.node,n.resolve(i.getNodeIntrisicSizes(e))),t.taskType===Na.Layout&&(n=t.layoutChild,e=t.deferred,t=t.layoutConstraints,r=n.node,n=n.layoutContext,r=i.getNodeFragment(r,t),e.resolve(n.layoutFragmentFactory(r)))}),void(t.next=4);case 4:if(r.isFulfilled()){t.next=6;break}throw new Error("promise not fullfilled!");case 6:return t.abrupt("return",r.getFullFilledValue());case 7:case"end":return t.stop()}},t)}),e.getNodeIntrisicSizes=function(t){var e,n=t.getAllStyle();return{minContentInlineSize:(null==(e=n.get(La.MIN_WIDTH))?void 0:e.value)||(null==(e=t.intrisicSizes)?void 0:e.minContentInlineSize)||(null==(e=n.get(La.WIDTH))?void 0:e.value)||0,maxContentInlineSize:(null==(e=n.get(La.MAX_WIDTH))?void 0:e.value)||(null==(e=t.intrisicSizes)?void 0:e.maxContentInlineSize)||(null==(e=n.get(La.WIDTH))?void 0:e.value)||0,minContentBlockSize:(null==(e=n.get(La.MIN_HEIGHT))?void 0:e.value)||(null==(e=t.intrisicSizes)?void 0:e.minContentBlockSize)||(null==(e=n.get(La.HEIGHT))?void 0:e.value)||0,maxContentBlockSize:(null==(e=n.get(La.MAX_HEIGHT))?void 0:e.value)||(null==(e=t.intrisicSizes)?void 0:e.maxContentBlockSize)||(null==(t=n.get(La.HEIGHT))?void 0:t.value)||0}},e.getNodeFragment=function(t,e){var n;return{inlineSize:(null==(n=t.getComputedLayout())?void 0:n.inlineSize)||(null==(n=t.getAllStyle().get(La.MIN_WIDTH))?void 0:n.value)||(null==(n=t.getAllStyle().get(La.WIDTH))?void 0:n.value)||0,blockSize:(null==(n=t.getComputedLayout())?void 0:n.blockSize)||(null==(n=t.getAllStyle().get(La.MIN_HEIGHT))?void 0:n.value)||(null==(n=t.getAllStyle().get(La.HEIGHT))?void 0:n.value)||0,data:e.data}},t}(),Gu=t([f(),D(0,p(Vu)),D(1,p(ds)),D(2,p(ju)),e("design:paramtypes",[Vu,Function,Function])],Gu),Hu=d.defineToken("LayoutFragmentFactory"),Wu=d.defineToken("LayoutFragmentOptions"),Uu=function(t,e){this._layoutContext=void 0,this.options=void 0,this.layoutContext=void 0,this.inlineSize=void 0,this.blockSize=void 0,this.inlineOffset=void 0,this.blockOffset=void 0,this.data=void 0,this._layoutContext=t,this.options=e,this.layoutContext=t,this.inlineSize=e.inlineSize,this.blockSize=e.blockSize,this.inlineOffset=0,this.blockOffset=0,this.data=e.data},Uu=t([Mr(),D(0,p(ys)),D(1,p(Wu)),e("design:paramtypes",[ys,Object])],Uu),Yu=((u=O=O||{})[u.kUnknown=0]="kUnknown",u[u.kNumber=1]="kNumber",u[u.kPercentage=2]="kPercentage",u[u.kEms=3]="kEms",u[u.kExs=4]="kExs",u[u.kPixels=5]="kPixels",u[u.kCentimeters=6]="kCentimeters",u[u.kMillimeters=7]="kMillimeters",u[u.kInches=8]="kInches",u[u.kPoints=9]="kPoints",u[u.kPicas=10]="kPicas",u[u.kQuarterMillimeters=11]="kQuarterMillimeters",u[u.kViewportWidth=12]="kViewportWidth",u[u.kViewportHeight=13]="kViewportHeight",u[u.kViewportInlineSize=14]="kViewportInlineSize",u[u.kViewportBlockSize=15]="kViewportBlockSize",u[u.kViewportMin=16]="kViewportMin",u[u.kViewportMax=17]="kViewportMax",u[u.kSmallViewportWidth=18]="kSmallViewportWidth",u[u.kSmallViewportHeight=19]="kSmallViewportHeight",u[u.kSmallViewportInlineSize=20]="kSmallViewportInlineSize",u[u.kSmallViewportBlockSize=21]="kSmallViewportBlockSize",u[u.kSmallViewportMin=22]="kSmallViewportMin",u[u.kSmallViewportMax=23]="kSmallViewportMax",u[u.kLargeViewportWidth=24]="kLargeViewportWidth",u[u.kLargeViewportHeight=25]="kLargeViewportHeight",u[u.kLargeViewportInlineSize=26]="kLargeViewportInlineSize",u[u.kLargeViewportBlockSize=27]="kLargeViewportBlockSize",u[u.kLargeViewportMin=28]="kLargeViewportMin",u[u.kLargeViewportMax=29]="kLargeViewportMax",u[u.kDynamicViewportWidth=30]="kDynamicViewportWidth",u[u.kDynamicViewportHeight=31]="kDynamicViewportHeight",u[u.kDynamicViewportInlineSize=32]="kDynamicViewportInlineSize",u[u.kDynamicViewportBlockSize=33]="kDynamicViewportBlockSize",u[u.kDynamicViewportMin=34]="kDynamicViewportMin",u[u.kDynamicViewportMax=35]="kDynamicViewportMax",u[u.kContainerWidth=36]="kContainerWidth",u[u.kContainerHeight=37]="kContainerHeight",u[u.kContainerInlineSize=38]="kContainerInlineSize",u[u.kContainerBlockSize=39]="kContainerBlockSize",u[u.kContainerMin=40]="kContainerMin",u[u.kContainerMax=41]="kContainerMax",u[u.kRems=42]="kRems",u[u.kChs=43]="kChs",u[u.kUserUnits=44]="kUserUnits",u[u.kDegrees=45]="kDegrees",u[u.kRadians=46]="kRadians",u[u.kGradians=47]="kGradians",u[u.kTurns=48]="kTurns",u[u.kMilliseconds=49]="kMilliseconds",u[u.kSeconds=50]="kSeconds",u[u.kHertz=51]="kHertz",u[u.kKilohertz=52]="kKilohertz",u[u.kDotsPerPixel=53]="kDotsPerPixel",u[u.kDotsPerInch=54]="kDotsPerInch",u[u.kDotsPerCentimeter=55]="kDotsPerCentimeter",u[u.kFraction=56]="kFraction",u[u.kInteger=57]="kInteger",u[u.kQuirkyEms=58]="kQuirkyEms",(dt=Au=Au||{})[dt.kUNumber=0]="kUNumber",dt[dt.kUPercent=1]="kUPercent",dt[dt.kULength=2]="kULength",dt[dt.kUAngle=3]="kUAngle",dt[dt.kUTime=4]="kUTime",dt[dt.kUFrequency=5]="kUFrequency",dt[dt.kUResolution=6]="kUResolution",dt[dt.kUOther=7]="kUOther",0,(_t=Cu=Cu||{})[_t.kYes=0]="kYes",_t[_t.kNo=1]="kNo",(ft=Nu=Nu||{})[ft.kYes=0]="kYes",ft[ft.kNo=1]="kNo",[{name:"em",unit_type:O.kEms},{name:"px",unit_type:O.kPixels},{name:"deg",unit_type:O.kDegrees},{name:"rad",unit_type:O.kRadians},{name:"grad",unit_type:O.kGradians},{name:"ms",unit_type:O.kMilliseconds},{name:"s",unit_type:O.kSeconds},{name:"rem",unit_type:O.kRems},{name:"turn",unit_type:O.kTurns}]);(n=Lu=Lu||{})[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";var qu,Xu,Zu=function(){function t(){}t.parse=function(t,e){return[][0]},t.parseAll=function(t,e){return[]},t.unitFromName=function(t){return t?"number"===t?O.kNumber:"percent"===t||"%"===t?O.kPercentage:this.stringToUnitType(t):O.kUnknown},t.unitTypeToUnitCategory=function(t){switch(t){case O.kNumber:case O.kInteger:return Au.kUNumber;case O.kPercentage:return Au.kUPercent;case O.kPixels:case O.kCentimeters:case O.kMillimeters:case O.kQuarterMillimeters:case O.kInches:case O.kPoints:case O.kPicas:case O.kUserUnits:return Au.kULength;case O.kMilliseconds:case O.kSeconds:return Au.kUTime;case O.kDegrees:case O.kRadians:case O.kGradians:case O.kTurns:return Au.kUAngle;case O.kHertz:case O.kKilohertz:return Au.kUFrequency;case O.kDotsPerPixel:case O.kDotsPerInch:case O.kDotsPerCentimeter:return Au.kUResolution;default:return Au.kUOther}},t.unitTypeToString=function(t){switch(t){case O.kNumber:case O.kInteger:case O.kUserUnits:return"";case O.kPercentage:return"%";case O.kEms:case O.kQuirkyEms:return"em";case O.kRems:return"rem";case O.kPixels:return"px";case O.kDegrees:return"deg";case O.kRadians:return"rad";case O.kGradians:return"grad";case O.kMilliseconds:return"ms";case O.kSeconds:return"s";case O.kTurns:return"turn"}return""},t.stringToUnitType=function(e){return Yu.find(function(t){return t.name===e}).unit_type},t.canonicalUnitTypeForCategory=function(t){switch(t){case Au.kUNumber:return O.kNumber;case Au.kULength:return O.kPixels;case Au.kUPercent:return O.kPercentage;case Au.kUTime:return O.kSeconds;case Au.kUAngle:return O.kDegrees;case Au.kUFrequency:return O.kHertz;case Au.kUResolution:return O.kDotsPerPixel;default:return O.kUnknown}},t.conversionToCanonicalUnitsScaleFactor=function(t){var e=1;switch(t){case O.kPixels:case O.kUserUnits:case O.kDegrees:case O.kSeconds:case O.kHertz:break;case O.kMilliseconds:e=.001;break;case O.kCentimeters:case O.kDotsPerCentimeter:case O.kMillimeters:case O.kQuarterMillimeters:case O.kInches:case O.kDotsPerInch:case O.kPoints:case O.kPicas:break;case O.kRadians:e=180/Math.PI;break;case O.kGradians:e=.9;break;case O.kTurns:e=360;break;case O.kKilohertz:e=1e3}return e},t.isAngle=function(t){return t===O.kDegrees||t===O.kRadians||t===O.kGradians||t===O.kTurns},t.isViewportPercentageLength=function(t){return t>=O.kViewportWidth&&t<=O.kDynamicViewportMax},t.isContainerPercentageLength=function(t){return t>=O.kContainerWidth&&t<=O.kContainerMax},t.isLength=function(t){return t>=O.kEms&&t<=O.kUserUnits||t==O.kQuirkyEms},t.isRelativeUnit=function(t){return t===O.kPercentage||t===O.kEms||t===O.kExs||t===O.kRems||t===O.kChs||this.isViewportPercentageLength(t)||this.isContainerPercentageLength(t)},t.isTime=function(t){return t===O.kSeconds||t===O.kMilliseconds},t.isFrequency=function(t){return t==O.kHertz||t==O.kKilohertz},t.isResolution=function(t){return t>=O.kDotsPerPixel&&t<=O.kDotsPerCentimeter},t.isFlex=function(t){return t===O.kFraction};var e=t.prototype;return e.toString=function(){return this.buildCSSText(Cu.kNo,Nu.kNo,"")},e.isNumericValue=function(){return this.getType()>=Lu.kUnitType&&this.getType()<=Lu.kClampType},t}(),G=function(n){function t(t){var e=n.call(this)||this;return e.colorSpace=void 0,e.colorSpace=t,e}g(t,n);var e=t.prototype;return e.getType=function(){return Lu.kColorType},e.to=function(t){return this},t}(Zu),Ku=function(n){function t(t){var e=n.call(this)||this;return e.value=void 0,e.value=t,e}g(t,n);var e=t.prototype;return e.clone=function(){return new t(this.value)},e.getType=function(){return Lu.kKeywordType},e.buildCSSText=function(t,e,n){return n+this.value},t}(Zu);(J=qu=qu||{}).kAdd="+",J.kSubtract="-",J.kMultiply="*",J.kDivide="/",J.kMin="min",J.kMax="max",J.kClamp="clamp",J.kInvalid="",(h=Xu=Xu||{})[h.kLength=0]="kLength",h[h.kAngle=1]="kAngle",h[h.kTime=2]="kTime",h[h.kFrequency=3]="kFrequency",h[h.kResolution=4]="kResolution",h[h.kFlex=5]="kFlex",h[h.kPercent=6]="kPercent",h[h.kNumBaseTypes=7]="kNumBaseTypes";var $u=function(){function t(t,e){void 0===t&&(t=O.kNumber),void 0===e&&(e=1),this.exponents=[],this.numNonZeroEntries=0,this.percentHint=Xu.kPercent,this.hasPercentHint=!1,this.exponents=new Array(Xu.kNumBaseTypes).fill(0),t!==O.kNumber&&this.setExponent(function(t){switch(ws(t,O.kNumber),t){case O.kEms:case O.kExs:case O.kPixels:case O.kCentimeters:case O.kMillimeters:case O.kQuarterMillimeters:case O.kInches:case O.kPoints:case O.kPicas:case O.kUserUnits:case O.kViewportWidth:case O.kViewportHeight:case O.kViewportInlineSize:case O.kViewportBlockSize:case O.kViewportMin:case O.kViewportMax:case O.kSmallViewportWidth:case O.kSmallViewportHeight:case O.kSmallViewportInlineSize:case O.kSmallViewportBlockSize:case O.kSmallViewportMin:case O.kSmallViewportMax:case O.kLargeViewportWidth:case O.kLargeViewportHeight:case O.kLargeViewportInlineSize:case O.kLargeViewportBlockSize:case O.kLargeViewportMin:case O.kLargeViewportMax:case O.kDynamicViewportWidth:case O.kDynamicViewportHeight:case O.kDynamicViewportInlineSize:case O.kDynamicViewportBlockSize:case O.kDynamicViewportMin:case O.kDynamicViewportMax:case O.kContainerWidth:case O.kContainerHeight:case O.kContainerInlineSize:case O.kContainerBlockSize:case O.kContainerMin:case O.kContainerMax:case O.kRems:case O.kChs:return Xu.kLength;case O.kMilliseconds:case O.kSeconds:return Xu.kTime;case O.kDegrees:case O.kRadians:case O.kGradians:case O.kTurns:return Xu.kAngle;case O.kHertz:case O.kKilohertz:return Xu.kFrequency;case O.kDotsPerPixel:case O.kDotsPerInch:case O.kDotsPerCentimeter:return Xu.kResolution;case O.kFraction:return Xu.kFlex;case O.kPercentage:return Xu.kPercent;default:return Xu.kLength}}(t),e)}var e=t.prototype;return e.applyPercentHint=function(t){ws(t,Xu.kPercent),this.setExponent(t,this.exponent(t)+this.exponent(Xu.kPercent)),this.setExponent(Xu.kPercent,0),this.percentHint=t,this.hasPercentHint=!0},e.hasNonZeroEntries=function(){return 0<this.numNonZeroEntries},e.isOnlyNonZeroEntry=function(t,e){return ws(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 ws(t,Xu.kPercent),this.isOnlyNonZeroEntry(t,1)&&!this.hasPercentHint},e.matchesPercentage=function(){return this.isOnlyNonZeroEntry(Xu.kPercent,1)},e.matchesBaseTypePercentage=function(t){return ws(t,Xu.kPercent),this.isOnlyNonZeroEntry(t,1)||this.isOnlyNonZeroEntry(Xu.kPercent,1)},e.matchesNumber=function(){return!this.hasNonZeroEntries()&&!this.hasPercentHint},e.matchesNumberPercentage=function(){return!this.hasNonZeroEntries()||this.isOnlyNonZeroEntry(Xu.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 o=0;o<Xu.kNumBaseTypes;++o){var a=o;if(t.exponents[o]!==e.exponents[o]&&(a!==Xu.kPercent&&(t.applyPercentHint(a),e.applyPercentHint(a)),t.exponents[o]!==e.exponents[o]))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<Xu.kNumBaseTypes;++r){var i=r;t.setExponent(i,t.exponent(i)+e.exponent(i))}}return t},t}(),Ju=function(n){function f(t){var e=n.call(this)||this;return e.type_=void 0,e.type_=t,e}g(f,n),f.fromNumberish=function(t){return"number"==typeof t?new P(t,O.kNumber):t},f.fromPercentish=function(t){return"number"==typeof t?new P(100*t,O.kPercentage):t};var t=f.prototype;return t.getType=function(){return Lu.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 Qu(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=Qu(e),i=(tc(Lu.kSumType,r,this),nc(r,qu.kAdd));return i||cc.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=Qu(e)).map(function(t){return t.negate()}),i=(tc(Lu.kSumType,r,this),nc(r,qu.kAdd));return i||cc.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=Qu(e),i=(tc(Lu.kProductType,r,this),rc(r));return i||hc.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=Qu(e)).map(function(t){return t.invert()}),i=(tc(Lu.kProductType,r,this),rc(r));return i||hc.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=Qu(e),i=(tc(Lu.kMinType,r,this),nc(r,qu.kMin));return i||lc.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=Qu(e),i=(tc(Lu.kMaxType,r,this),nc(r,qu.kMax));return i||uc.create(r)},t.to=function(t){var e=this.sumValue();if(0===e.length||1!==e.length)return null;e=ec(e[0]);return e?(t="string"==typeof t?P.unitFromName(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 o=i[r];if(!f.isValidUnit(f.unitFromName(o)))return null}var a=this.sumValue();if(!a.length)return null;for(var s=[],l=cs(a);!(u=l()).done;){var u=ec(u.value);if(!u)return null;s.push(u)}if(0===e.length)return s.sort(function(t,e){return t.unit-e.unit}),xs(!!(a=cc.create(s))),a;for(var c=[],h=0,d=e;h<d.length;h++)!function(){var t=d[h],r=f.unitFromName(t),t=(xs(f.isValidUnit(r)),s.reduce(function(t,e,n){return e&&(e=e.convertTo(r))&&(t+=e.value,s[n]=null),t},0));c.push(new P(t,r))}();if(s.some(function(t){return!!t}))throw new Error("There were leftover terms that were not converted");return cc.create(c)},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(Xu.kLength);return e&&(t.length=e),(e=this.type_.exponent(Xu.kAngle))&&(t.angle=e),(e=this.type_.exponent(Xu.kTime))&&(t.time=e),(e=this.type_.exponent(Xu.kFrequency))&&(t.frequency=e),(e=this.type_.exponent(Xu.kResolution))&&(t.resolution=e),(e=this.type_.exponent(Xu.kFlex))&&(t.flex=e),(e=this.type_.exponent(Xu.kPercent))&&(t.percent=e),this.type_.hasPercentHint&&(t.percentHint=function(t){switch(t){case Xu.kLength:return"length";case Xu.kAngle:return"angle";case Xu.kTime:return"time";case Xu.kFrequency:return"frequency";case Xu.kResolution:return"resolution";case Xu.kFlex:return"flex";case Xu.kPercent:return"percent"}return""}(this.type_.percentHint)),t},f.isValidUnit=function(t){return t!==O.kUserUnits&&!!(t===O.kNumber||t==O.kPercentage||this.isLength(t)||this.isAngle(t)||this.isTime(t)||this.isFrequency(t)||this.isResolution(t)||this.isFlex(t))},t.negate=function(){return oc.create(this)},t.invert=function(){return ic.create(this)},f}(Zu);function Qu(t){return t.map(Ju.fromNumberish)}function tc(t,e,n){xs(!!n),n.getType()===t?e.unshift.apply(e,n.numericValues()):e.unshift(n)}function ec(t){return 0===Object.keys(t.units).length?new P(t.value):1===Object.keys(t.units).length&&1===t.units[Object.keys(t.units)[0]]?new P(t.value,Number(Object.keys(t.units)[0])):null}function nc(t,e){xs(!!t.length);var n=t[0]instanceof P?t[0]:null;if(!n)return null;for(var r=n.value,i=1;i<t.length;i++){var o=t[i]instanceof P?t[i]:null;if(!o||o.unit!==n.unit)return null;e===qu.kAdd?r+=o.value:e===qu.kMax?r=Math.max(r,o.value):e===qu.kMin&&(r=Math.min(r,o.value))}return new P(r,n.unit)}function rc(t){xs(!!t.length);for(var e=O.kNumber,n=1,r=0;r<t.length;r++){var i=t[r]instanceof P?t[r]:null;if(!i)return null;if(i.unit!==O.kNumber){if(e!==O.kNumber)return null;e=i.unit}n*=i.value}return new P(n,e)}var P=function(r){function s(t,e){var n,e="string"==typeof(e=void 0===e?O.kNumber:e)?s.unitFromName(e):e;return xs(s.isValidUnit(e)),(n=r.call(this,new $u(e))||this).unit=void 0,n.value=void 0,n.unit=e,n.value=t,n}g(s,r),s.toCanonicalUnit=function(t){return this.canonicalUnitTypeForCategory(this.unitTypeToUnitCategory(t))},s.toCanonicalUnitIfPossible=function(t){var e=this.toCanonicalUnit(t);return e===O.kUnknown?t:e},s.formatInfinityOrNaN=function(t,e){void 0===e&&(e="");return(Number.isFinite(t)?(xs(Number.isNaN(t)),"NaN"):0<t?"infinity":"-infinity")+e},s.formatNumber=function(t,e){return t+(e=void 0===e?"":e)};var t=s.prototype;return t.clone=function(){return new s(this.value,this.unit)},t.convertTo=function(t){if(this.unit===t)return new s(this.value,this.unit);var e=s.toCanonicalUnit(this.unit);if(e!==s.toCanonicalUnit(t)||e===O.kUnknown)return null;e=Zu.conversionToCanonicalUnitsScaleFactor(this.unit)/Zu.conversionToCanonicalUnitsScaleFactor(t);return new s(this.value*e,t)},t.equals=function(t){return this.value===t.value&&this.unit===t.unit},t.getType=function(){return Lu.kUnitType},t.sumValue=function(){var t=[],e={};return this.unit!==O.kNumber&&(e[s.toCanonicalUnitIfPossible(this.unit)]=1),t.push({value:this.value*Zu.conversionToCanonicalUnitsScaleFactor(this.unit),units:e}),t},t.negate=function(){return new s(-this.value,this.unit)},t.invert=function(){return this.unit===O.kNumber?0===this.value?null:new s(1/this.value,this.unit):ic.create(this)},t.buildCSSText=function(t,e,n){switch(this.unit){case O.kUnknown:break;case O.kInteger:i=Number(this.value).toFixed(0);break;case O.kNumber:case O.kPercentage:case O.kEms:case O.kQuirkyEms:case O.kExs:case O.kRems:case O.kChs:case O.kPixels:case O.kCentimeters:case O.kDotsPerPixel:case O.kDotsPerInch:case O.kDotsPerCentimeter:case O.kMillimeters:case O.kQuarterMillimeters:case O.kInches:case O.kPoints:case O.kPicas:case O.kUserUnits:case O.kDegrees:case O.kRadians:case O.kGradians:case O.kMilliseconds:case O.kSeconds:case O.kHertz:case O.kKilohertz:case O.kTurns:case O.kFraction:case O.kViewportWidth:case O.kViewportHeight:case O.kViewportInlineSize:case O.kViewportBlockSize:case O.kViewportMin:case O.kViewportMax:case O.kSmallViewportWidth:case O.kSmallViewportHeight:case O.kSmallViewportInlineSize:case O.kSmallViewportBlockSize:case O.kSmallViewportMin:case O.kSmallViewportMax:case O.kLargeViewportWidth:case O.kLargeViewportHeight:case O.kLargeViewportInlineSize:case O.kLargeViewportBlockSize:case O.kLargeViewportMin:case O.kLargeViewportMax:case O.kDynamicViewportWidth:case O.kDynamicViewportHeight:case O.kDynamicViewportInlineSize:case O.kDynamicViewportBlockSize:case O.kDynamicViewportMin:case O.kDynamicViewportMax:case O.kContainerWidth:case O.kContainerHeight:case O.kContainerInlineSize:case O.kContainerBlockSize:case O.kContainerMin:case O.kContainerMax:var r,i,o=this.value,a=s.unitTypeToString(this.unit);i=o<-999999||999999<o?(r=s.unitTypeToString(this.unit),!Number.isFinite(o)||Number.isNaN(o)?s.formatInfinityOrNaN(o,r):s.formatNumber(o,r)):""+o+a}return n+=i},s}(Ju),Z=function(t){function e(){return t.apply(this,arguments)||this}return g(e,t),e.prototype.isUnitValue=function(){return!1},e}(Ju),ic=function(n){function e(t,e){e=n.call(this,e)||this;return e.value=void 0,e.operator="invert",e.value=t,e}g(e,n),e.create=function(t){return new e(t,$u.negateExponents(t.type_))};var t=e.prototype;return t.clone=function(){return new e(this.value,this.type_)},t.getType=function(){return Lu.kInvertType},t.equals=function(t){return t.getType()===Lu.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==Nu.kNo&&(n+=t===Cu.kYes?"(":"calc("),n=this.value.buildCSSText(Cu.kYes,Nu.kNo,n+="1 / "),e===Nu.kNo&&(n+=")"),n},e}(Z),oc=function(n){function e(t,e){e=n.call(this,e)||this;return e.value=void 0,e.operator="negate",e.value=t,e}g(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 Lu.kNegateType},t.equals=function(t){return t.getType()===Lu.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==Nu.kNo&&(n+=t===Cu.kYes?"(":"calc("),n=this.value.buildCSSText(Cu.kYes,Nu.kNo,n+="-"),e===Nu.kNo&&(n+=")"),n},e}(Z);function ac(t,e){for(var n=t[0].type_,r=1;r<t.length;r++)n=e(n,t[r].type_,!1);return n}var sc,at=function(n){function t(t,e){e=n.call(this,e)||this;return e.values=void 0,e.values=t,e}g(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}(Z),lc=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}g(e,i),e.create=function(t){return new e(t,ac(t,$u.add))};var t=e.prototype;return t.clone=function(){return new e(this.values,this.type_)},t.getType=function(){return Lu.kMinType},t.sumValue=function(){var t=this.numericValues()[0].sumValue();if(!t.length)return null;for(var e=cs(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,o=cs(this.numericValues());!(r=o()).done;)i||(n+=", "),i=!1,n=r.value.buildCSSText(Cu.kYes,Nu.kYes,n);return n+=")"},e}(at),uc=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}g(e,i),e.create=function(t){return new e(t,ac(t,$u.add))};var t=e.prototype;return t.clone=function(){return new e(this.values,this.type_)},t.getType=function(){return Lu.kMaxType},t.sumValue=function(){var t=this.numericValues()[0].sumValue();if(!t.length)return null;for(var e=cs(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,o=cs(this.numericValues());!(r=o()).done;)i||(n+=", "),i=!1,n=r.value.buildCSSText(Cu.kYes,Nu.kYes,n);return n+=")"},e}(at),cc=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}g(e,i),e.create=function(t){return new e(t,ac(t,$u.add))},e.numericTypeFromUnitMap=function(n){var r=new $u;return Object.keys(n).forEach(function(t){var e=n[t];r=$u.multiply(r,new $u(Number(t),e),!1),xs(!0)}),r},e.canCreateNumericTypeFromSumValue=function(t){var e=this,n=(xs(!!t.length),this.numericTypeFromUnitMap(t[0].units));return t.every(function(t){return $u.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 Lu.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(is({},e)):n[t].value+=e.value})}),e.canCreateNumericTypeFromSumValue(n)?n:null},t.buildCSSText=function(t,e,n){e==Nu.kNo&&(n+=t===Cu.kYes?"(":"calc(");var r=this.numericValues();n=r[0].buildCSSText(Cu.kYes,Nu.kNo,n);for(var i=1;i<r.length;i++){var o=r[i];n=o.getType()===Lu.kNegateType?(n+=" - ",o.value.buildCSSText(Cu.kYes,Nu.kNo,n)):(n+=" + ",o.buildCSSText(Cu.kYes,Nu.kNo,n))}return e===Nu.kNo&&(n+=")"),n},e}(at),hc=function(i){function o(){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}g(o,i),o.create=function(t){return new o(t,ac(t,$u.multiply))},o.multiplyUnitMaps=function(n,r){return Object.keys(r).forEach(function(t){ws(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=o.prototype;return t.clone=function(){return new o(this.values,this.type_)},t.getType=function(){return Lu.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:o.multiplyUnitMaps(e.units,t.units)})})}),e=r}),e},t.buildCSSText=function(t,e,n){e==Nu.kNo&&(n+=t===Cu.kYes?"(":"calc(");var r=this.numericValues();n=r[0].buildCSSText(Cu.kYes,Nu.kNo,n);for(var i=1;i<r.length;i++){var o=r[i];n=o.getType()===Lu.kInvertType?(n+=" / ",o.value.buildCSSText(Cu.kYes,Nu.kNo,n)):(n+=" * ",o.buildCSSText(Cu.kYes,Nu.kNo,n))}return e===Nu.kNo&&(n+=")"),n},o}(at),dc=new P(0,"px"),fc=new P(0,"deg"),pc=function(a){function t(t,e,n,r,i){var o;return void 0===r&&(r=1),void 0===i&&(i=!1),(o=a.call(this,"rgb")||this).r=void 0,o.g=void 0,o.b=void 0,o.alpha=void 0,o.isNone=void 0,o.r=t,o.g=e,o.b=n,o.alpha=r,o.isNone=i,o}g(t,a);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}(G),yc=((W=sc=sc||{})[W.Constant=0]="Constant",W[W.LinearGradient=1]="LinearGradient",W[W.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}g(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 Lu.kColorType},t}(Zu)),gc=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,vc=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,mc=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,bc=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;var xc={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},wc=Kl(function(t){t="angular"===t.type?Number(t.value):xc[t.value]||0;return t}),kc=Kl(function(t){var e,n=.5,r=.5;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=.5:"right"===e.value?n=1:"top"===e.value?r=0:"bottom"===e.value&&(r=1)),"position-keyword"===(null==t?void 0:t.type)&&("left"===t.value?n=0:"center"===t.value?r=.5:"right"===t.value?n=1:"top"===t.value?r=0:"bottom"===t.value&&(r=1)),"%"===(null==e?void 0:e.type)&&(n=Number(e.value)/100),"%"===(null==t?void 0:t.type)&&(r=Number(e.value)/100)),{cx:n,cy:r}}),Ec=Kl(function(d){if(-1<d.indexOf("linear")||-1<d.indexOf("radial"))return vl(d).map(function(t){for(var e=t.type,n=t.orientation,t=t.colorStops,r=t,i=r.length,o=(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),a=Number(r[0].length.value),s=1;s<i;s++){var l,u=null==(l=r[s].length)?void 0:l.value;if(!T(u)&&!T(a)){for(var c=1;c<s-o;c++)r[o+c].length={type:"%",value:""+(a+(Number(u)-a)*c/(s-o))};o=s,a=Number(u)}}var h=t.map(function(t){return[Number(t.length.value)/100,(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 yc(sc.LinearGradient,{angle:n?wc(n):0,steps:h,hash:d}):"radial-gradient"===e&&"shape"===(n=n||[{type:"shape",value:"circle"}])[0].type&&"circle"===n[0].value?(e=(t=kc(n[0].at)).cx,n=t.cy,new yc(sc.RadialGradient,{cx:e,cy:n,steps:h,hash:d})):void 0});var t=d[0];if("("===d[1]||"("===d[2])if("l"===t){var e=gc.exec(d);if(e)return n=(null==(n=e[2].match(bc))?void 0:n.map(function(t){return t.split(":")}))||[],[new yc(sc.LinearGradient,{angle:parseFloat(e[1]),steps:n.map(function(t){var e=t[0],t=t[1];return[Number(e),t]}),hash:d})]}else if("r"===t){e=function(t){var e=vc.exec(t);if(e)return{cx:.5,cy:.5,steps:((null==(e=e[4].match(bc))?void 0:e.map(function(t){return t.split(":")}))||[]).map(function(t){var e=t[0],t=t[1];return[Number(e),t]}),hash:t};return null}(d);if(e){if(!Jl(e))return[new yc(sc.RadialGradient,e)];d=e}}else if("p"===t){var n=d;if(n=mc.exec(n)){var r=n[1],n=n[2];switch(r){case"a":r="repeat";break;case"x":r="repeat-x";break;case"y":r="repeat-y";break;default:r="no-repeat"}return{image:n,repetition:r}}return null}});function _c(t){return Ms(t)&&t.image}var Sc=Kl(function(t){if(_c(t))return is({repetition:"repeat"},t);if("transparent"===(t=T(t)?"":t))return new pc(0,0,0,0);var e=Ec(t="currentColor"===t?"black":t);if(e)return e;e=Go(t),t=[0,0,0,0];return null!==e&&(t[0]=e.r||0,t[1]=e.g||0,t[2]=e.b||0,t[3]=e.opacity),as(pc,t)});function Mc(t,e){if(t instanceof pc&&e instanceof pc)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(zs(e[n],0,255));return e[3]=zs(e[3],0,1),"rgba("+e.join(",")+")"}]}var Tc,Oc=function(){function g(t,e){this.center=v(),this.halfExtents=v(),this.min=v(),this.max=v(),this.update(t,e)}g.isEmpty=function(t){return!t||0===t.halfExtents[0]&&0===t.halfExtents[1]&&0===t.halfExtents[2]};var t=g.prototype;return t.update=function(t,e){t&&Vi(this.center,t),e&&Vi(this.halfExtents,e||E(0,0,0)),this.min=Ji(this.min,this.center,this.halfExtents),this.max=Hi(this.max,this.center,this.halfExtents)},t.setMinMax=function(t,e){Hi(this.center,e,t),Ui(this.center,this.center,.5),Ji(this.halfExtents,e,t),Ui(this.halfExtents,this.halfExtents,.5),Vi(this.min,t),Vi(this.max,e)},t.getMin=function(){return this.min},t.getMax=function(){return this.max},t.add=function(t){var e,n,r,i,o,a,s,l,u,c,h,d,f,p,y;g.isEmpty(t)||(g.isEmpty(this)?this.setMinMax(t.getMin(),t.getMax()):(n=(e=this.center)[0],p=e[1],o=e[2],i=(r=this.halfExtents)[0],h=r[1],a=r[2],l=(d=t.center)[0],y=d[1],d=d[2],u=(t=t.halfExtents)[0],(f=y-(c=t[1]))<(s=p-h)&&(s=f),(f=p+h)<(p=y+c)&&(f=p),(y=d-(h=t[2]))<(c=o-a)&&(c=y),(p=o+a)<(t=d+h)&&(p=t),e[0]=.5*((o=(y=l-u)<(o=n-i)?y:o)+(a=(a=n+i)<(d=l+u)?d:a)),e[1]=.5*(s+f),e[2]=.5*(c+p),r[0]=.5*(a-o),r[1]=.5*(f-s),r[2]=.5*(p-c),this.min[0]=o,this.min[1]=s,this.min[2]=c,this.max[0]=a,this.max[1]=f,this.max[2]=p))},t.setFromTransformedAABB=function(t,e){var n=this.center,r=this.halfExtents,i=t.center,t=t.halfExtents,o=e[0],a=e[4],s=e[8],l=e[1],u=e[5],c=e[9],h=e[2],d=e[6],f=e[10],p=Math.abs(o),y=Math.abs(a),g=Math.abs(s),v=Math.abs(l),m=Math.abs(u),b=Math.abs(c),x=Math.abs(h),w=Math.abs(d),k=Math.abs(f);Gi(n,e[12]+o*i[0]+a*i[1]+s*i[2],e[13]+l*i[0]+u*i[1]+c*i[2],e[14]+h*i[0]+d*i[1]+f*i[2]),Gi(r,p*t[0]+y*t[1]+g*t[2],v*t[0]+m*t[1]+b*t[2],x*t[0]+w*t[1]+k*t[2]),this.min=Ji(this.min,n,r),this.max=Hi(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){if(!this.intersects(t))return null;var e,n,r=new g,i=(n=v(),i=this.getMin(),e=t.getMin(),n[0]=Math.max(i[0],e[0]),n[1]=Math.max(i[1],e[1]),n[2]=Math.max(i[2],e[2]),n);return e=v(),n=this.getMax(),t=t.getMax(),e[0]=Math.min(n[0],t[0]),e[1]=Math.min(n[1],t[1]),e[2]=Math.min(n[2],t[2]),r.setMinMax(i,e),r},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?Vi(v(),this.min):272===t.pnVertexFlag?E(this.min[0],this.min[1],this.max[2]):257===t.pnVertexFlag?E(this.min[0],this.max[1],this.min[2]):256===t.pnVertexFlag?E(this.min[0],this.max[1],this.max[2]):17===t.pnVertexFlag?E(this.max[0],this.min[1],this.min[2]):16===t.pnVertexFlag?E(this.max[0],this.min[1],this.max[2]):1===t.pnVertexFlag?E(this.max[0],this.max[1],this.min[2]):E(this.max[0],this.max[1],this.max[2])},t.getPositiveFarPoint=function(t){return 273===t.pnVertexFlag?Vi(v(),this.max):272===t.pnVertexFlag?E(this.max[0],this.max[1],this.min[2]):257===t.pnVertexFlag?E(this.max[0],this.min[1],this.max[2]):256===t.pnVertexFlag?E(this.max[0],this.min[1],this.min[2]):17===t.pnVertexFlag?E(this.min[0],this.max[1],this.max[2]):16===t.pnVertexFlag?E(this.min[0],this.max[1],this.min[2]):1===t.pnVertexFlag?E(this.min[0],this.min[1],this.max[2]):E(this.min[0],this.min[1],this.min[2])},g}(),Pc=(v(),function(){function t(t,e){this.distance=void 0,this.normal=void 0,this.pnVertexFlag=void 0,this.distance=t||0,this.normal=e||E(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 qi(t,this.normal)-this.distance},e.normalize=function(){var t=1/to(this.normal);Ui(this.normal,this.normal,t),this.distance*=t},e.intersectsLine=function(t,e,n){var r=this.distanceToPoint(t),r=r/(r-this.distanceToPoint(e)),i=0<=r&&r<=1;return i&&n&&Xi(n,t,e,r),i},t}()),Ac=((pt=Tc=Tc||{})[pt.OUTSIDE=4294967295]="OUTSIDE",pt[pt.INSIDE=0]="INSIDE",pt[pt.INDETERMINATE=2147483647]="INDETERMINATE",function(){function t(t){if(this.planes=[],t)this.planes=t;else for(var e=0;e<6;e++)this.planes.push(new Pc)}return t.prototype.extractFromVPMatrix=function(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],l=t[7],u=t[8],c=t[9],h=t[10],d=t[11],f=t[12],p=t[13],y=t[14],t=t[15];Gi(this.planes[0].normal,i-e,l-o,d-u),this.planes[0].distance=t-f,Gi(this.planes[1].normal,i+e,l+o,d+u),this.planes[1].distance=t+f,Gi(this.planes[2].normal,i+n,l+a,d+c),this.planes[2].distance=t+p,Gi(this.planes[3].normal,i-n,l-a,d-c),this.planes[3].distance=t-p,Gi(this.planes[4].normal,i-r,l-s,d-h),this.planes[4].distance=t-y,Gi(this.planes[5].normal,i+r,l+s,d+h),this.planes[5].distance=t+y,this.planes.forEach(function(t){t.normalize(),t.updatePNVertexFlag()})},t}()),Cc=(v(),v(),v(),v(),v(),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}()),Nc=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 Lc(t,e){if(T(e))return new P(0,"px");if(e=(""+e).trim().toLowerCase(),isFinite(Number(e))){if(0<="px".search(t))return new P(Number(e),"px");if(0<="deg".search(t))return new P(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 new P(Number(e.replace(new RegExp("U"+t,"g"),"").replace(new RegExp(r,"g"),"*0")),t)})[0]}function Ic(t){return Lc(new RegExp("px","g"),t)}function Rc(t){return Es(t)?new P(t,"px"):Lc(new RegExp("px|%|em|rem","g"),t)}function Dc(t){return Lc(new RegExp("deg|rad|grad|turn","g"),t)}function jc(t,e,n,r,i){void 0===i&&(i=0);var o="",a=t.value||0,s=e.value||0,l=P.toCanonicalUnit(t.unit),u=t.convertTo(l),l=e.convertTo(l);return u&&l?(a=u.value,s=l.value,o=P.unitTypeToString(t.unit)):(P.isLength(t.unit)||P.isLength(e.unit))&&(a=Vc(t,i,n),s=Vc(e,i,n),o="px"),[a,s,function(t){return(t=r?Math.max(t,0):t)+o}]}function Bc(t){var e=0;return t.unit===O.kDegrees?e=t.value:t.unit===O.kRadians?e=Ws(Number(t.value)):t.unit===O.kTurns&&(e=360*Number(t.value)),e}function Fc(t){return Jl(t)?t.split(" ").map(function(t){return Rc(t)}):t.map(function(t){return Rc(t.toString())})}function zc(t,e,n){var r;if(t.length===e.length)return r=t[0].unit,[t.map(function(t){return t.value}),e.map(function(t){return t.value}),function(t){return t.map(function(t){return new P(t,r)}).join(" ")}]}function Vc(t,e,n){return t.unit===O.kPixels?Number(t.value):t.unit===O.kPercentage&&n?(n=n.nodeName===M.GROUP?n.getLocalBounds():n.getGeometryBounds(),r=0,Oc.isEmpty(n)||(r=2*n.halfExtents[e]),Number(t.value)/100*r):0;var r}function Gc(t){return t.toString()}function Hc(t){return"number"==typeof t?new P(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?new P(Number(t)):new P(0)}function Wc(t,e){return[t.value,e.value,Gc]}function Uc(n,r){return function(t,e){return[t.value,e.value,function(t){return Gc(zs(t,n,r))}]}}var Yc=Kl(function(e){var n;try{if(Array.isArray(e)&&0===e.length)throw new Error;n=da(e)}catch(t){n=da(""),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 o=t[i],a=o[0];"M"===a?(r.length&&(n.push(r),r=[]),r.push([o[1],o[2]])):"Z"===a?r.length&&(e.push(r),r=[]):r.push([o[1],o[2]])}return 0<r.length&&n.push(r),{polygons:e,polylines:n}}(n),r=t.polygons,t=t.polylines,i=ba(n,!0),o=i[0],i=i[1],a=function(t){for(var e=[],n=null,r=0,i=t.length,o=0;o<i;o++){var a=t[o],s=t[o+1],l=a[0],u={command:l,prePoint:n,params:a,startTangent:null,endTangent:null},c=("M"===l&&(r=o),a.length),n=[a[c-2],a[c-1]],c=(u.currentPoint=n,e[r]&&(c=n,h=e[r].currentPoint,c[0]===h[0]&&c[1]===h[1])&&(e[r].prePoint=u.prePoint),s?[s[s.length-2],s[s.length-1]]:null),h=(u.nextPoint=c,u.prePoint);"C"===l&&(s=[a[1],a[2]],c=[a[3],a[4]],u.startTangent=[h[0]-s[0],h[1]-s[1]],u.endTangent=[n[0]-c[0],n[1]-c[1]],0===u.startTangent[0]&&0===u.startTangent[1]&&(u.startTangent=[s[0]-c[0],s[1]-c[1]]),0===u.endTangent[0]&&0===u.endTangent[1]&&(u.endTangent=[c[0]-s[0],c[1]-s[1]])),e.push(u)}return e}(o),s=function(t){if(!t)return{length:0,x:0,y:0,width:0,height:0,x2:0,y2:0,cx:0,cy:0,cz:0};var e=(t=_a(t)).length,n=(r=t.min).x,r=r.y,i=(t=t.max).x,t=t.y,o=i-n,a=t-r;return{length:e,width:o,height:a,x:n,y:r,x2:i,y2:t,cx:n+o/2,cy:r+a/2,cz:Math.max(o,a)+Math.min(o,a)/2}}(n),l=s.x,u=s.y,c=s.width,h=s.height;return{absolutePath:n,hasArc:e,segments:a,polygons:r,polylines:t,curve:o,totalLength:s.length,zCommandIndexes:i,rect:new Nc(Number.isFinite(l)?l:0,Number.isFinite(u)?u:0,Number.isFinite(c)?c:0,Number.isFinite(h)?h:0)}},function(t){return Jl(t)?t:ta(t)});function qc(t,e){t=Yc(t);return e&&(e.parsedStyle.defX=t.rect.x,e.parsedStyle.defY=t.rect.y),t}function Xc(t,e,n){var r,i,o,a,s,l,u,c,h,t=t.curve,e=e.curve,d=[t,e],e=Sa((d=t.length!==e.length?function t(e,n,r){var i,e=Ma(e),n=Ma(n),o=e.length,a=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,u=r||Math.max(o,a),c=[s,l],h=[u-o,u-a],r=[e,n].map(function(t,n){return t.l===u?t.map(function(t){return t.s}):t.map(function(t,e){return i=e&&h[n]&&t.l>=c[n],h[n]-=i?1:0,i?t.ss:[t.s]}).flat()});return r[0].length===r[1].length?r:t(r[0],r[1],u)}(t,e):d)[0])!==Sa(d[1])?(r=d[0],t=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(t[0].slice(0,2))].concat(t.map(function(t){return["C"].concat(t.slice(2))}))):Qo(d[0]);return[e,(i=d[1],o=e,u=i.length-1,c=[],h=0,s=(a=i).length,l=s-1,(t=a.map(function(t,r){return a.map(function(t,e){var n=r+e;return 0===e||a[n]&&"M"===a[n][0]?(e=a[n],["M"].concat(e.slice(-2))):(s<=n&&(n-=l),a[n])})})).forEach(function(t,n){i.slice(1).forEach(function(t,e){h+=ya(i[(n+e)%u].slice(-2),o[e%u].slice(-2))}),c[n]=h,h=0}),t[c.indexOf(Math.min.apply(null,c))]),function(t){return t}]}function Zc(t,e){var n,r,i=Jl(t)?t.split(" ").map(function(t){var t=t.split(","),e=t[0],t=t[1];return[Number(e),Number(t)]}):t,o=[],a=0,s=Ca.length(i),t=(i.forEach(function(t,e){i[e+1]&&((n=[0,0])[0]=a/s,r=Pa.length(t[0],t[1],i[e+1][0],i[e+1][1]),a+=r,n[1]=a/s,o.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:o}}var Kc=function(t){return Lc(/deg|rad|grad|turn|px|%/g,t)},$c=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function Jc(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<$c.indexOf(e[1])&&r.push({name:e[1],params:e[2].split(" ").map(function(t){return Kc(t)||Sc(t)})}),n.lastIndex===t.length)return r}return[]}var Q=function(t){return new P(t)},Qc=null;function th(t){return function(e){var n=0;return t.map(function(t){return t===Qc?e[n++]:t})}}function eh(t){return t}var nh={matrix:["NNNNNN",[Qc,Qc,0,0,Qc,Qc,0,0,0,0,1,0,Qc,Qc,0,1],eh],matrix3d:["NNNNNNNNNNNNNNNN",eh],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",th([Qc,Qc,Q(1)]),eh],scalex:["N",th([Qc,Q(1),Q(1)]),th([Qc,Q(1)])],scaley:["N",th([Q(1),Qc,Q(1)]),th([Q(1),Qc])],scalez:["N",th([Q(1),Q(1),Qc])],scale3d:["NNN",eh],skew:["Aa",null,eh],skewx:["A",null,th([Qc,fc])],skewy:["A",null,th([fc,Qc])],translate:["Tt",th([Qc,Qc,dc]),eh],translatex:["T",th([Qc,dc,dc]),th([Qc,dc])],translatey:["T",th([dc,Qc,dc]),th([dc,Qc])],translatez:["L",th([dc,dc,Qc])],translate3d:["TTL",eh]};function rh(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,o=e[1],a=nh[o];if(!a)return[];var s=e[2].split(","),l=a[0];if(l.length<s.length)return[];for(var u=[],c=0;c<l.length;c++){var h=s[c],d=l[c],f=void 0;if(void 0===(f=h?{A:function(t){return"0"===t.trim()?fc:Dc(t)},N:Hc,T:Rc,L:Ic}[d.toUpperCase()](h):{a:fc,n:u[0],t:dc}[d]))return[];u.push(f)}if(r.push({t:o,d:u}),n.lastIndex===t.length)return r}return[]}function ih(t){switch(t.t){case"rotatex":return i=Hs(Bc(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=Hs(Bc(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=Hs(Bc(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=Hs(Bc(t.d[3])),o=e*e+n*n+r*r,o=(0==o?(e=1,r=n=0):1!=o&&(e/=o=Math.sqrt(o),n/=o,r/=o),Math.sin(i/2)),a=o*Math.cos(i/2),o=o*o;return[1-2*(n*n+r*r)*o,2*(e*n*o+r*a),2*(e*r*o-n*a),0,2*(e*n*o-r*a),1-2*(e*e+r*r)*o,2*(n*r*o+e*a),0,2*(e*r*o+n*a),2*(n*r*o-e*a),1-2*(e*e+n*n)*o,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":a=Hs(Bc(t.d[0])),o=Hs(Bc(t.d[1]));return[1,Math.tan(o),0,0,Math.tan(a),1,0,0,0,0,1,0,0,0,0,1];case"skewx":return i=Hs(Bc(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=Hs(Bc(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=Vc(t.d[0],0,null)||0,n=Vc(t.d[1],0,null)||0,0,1];case"translatex":return[1,0,0,0,0,1,0,0,0,0,1,0,e=Vc(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=Vc(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=Vc(t.d[0],0,null)||0,1];case"translate3d":return[1,0,0,0,0,1,0,0,0,0,1,0,e=Vc(t.d[0],0,null)||0,n=Vc(t.d[1],0,null)||0,r=Vc(t.d[2],0,null)||0,1];case"perspective":o=Vc(t.d[0],0,null)||0;return[1,0,0,0,0,1,0,0,0,0,1,o?-1/o: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 oh(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 ah(t){var e=[0,0,0],n=[1,1,1],r=[0,0,0],i=[0,0,0,1],o=[0,0,0,1];return function(t,e,n,r,i,o){if(e=e||[0,0,0],n=n||[0,0,0],r=r||[0,0,0],i=i||[0,0,0,1],o=o||[0,0,0,1],!Ia(za,t))return;if(Ra(Va),Va[3]=0,Va[7]=0,Va[11]=0,Va[15]=1,Math.abs(Da(Va)<1e-8))return;var a,s,t=za[3],l=za[7],u=za[11],c=za[12],h=za[13],d=za[14],f=za[15];if(0!==t||0!==l||0!==u){if(Ga[0]=t,Ga[1]=l,Ga[2]=u,Ga[3]=f,!ja(Va,Va))return;Ba(Va,Va),t=i,l=Va,f=(u=Ga)[0],a=u[1],s=u[2],u=u[3],t[0]=l[0]*f+l[4]*a+l[8]*s+l[12]*u,t[1]=l[1]*f+l[5]*a+l[9]*s+l[13]*u,t[2]=l[2]*f+l[6]*a+l[10]*s+l[14]*u,t[3]=l[3]*f+l[7]*a+l[11]*s+l[15]*u}else i[0]=i[1]=i[2]=0,i[3]=1;if(e[0]=c,e[1]=h,e[2]=d,t=za,(f=y)[0][0]=t[0],f[0][1]=t[1],f[0][2]=t[2],f[1][0]=t[4],f[1][1]=t[5],f[1][2]=t[6],f[2][0]=t[8],f[2][1]=t[9],f[2][2]=t[10],n[0]=Fa.length(y[0]),Fa.normalize(y[0],y[0]),r[0]=Fa.dot(y[0],y[1]),Wa(y[1],y[1],y[0],1,-r[0]),n[1]=Fa.length(y[1]),Fa.normalize(y[1],y[1]),r[0]/=n[1],r[1]=Fa.dot(y[0],y[2]),Wa(y[2],y[2],y[0],1,-r[1]),r[2]=Fa.dot(y[1],y[2]),Wa(y[2],y[2],y[1],1,-r[2]),n[2]=Fa.length(y[2]),Fa.normalize(y[2],y[2]),r[1]/=n[2],r[2]/=n[2],Fa.cross(Ha,y[1],y[2]),Fa.dot(y[0],Ha)<0)for(var p=0;p<3;p++)n[p]*=-1,y[p][0]*=-1,y[p][1]*=-1,y[p][2]*=-1;o[0]=.5*Math.sqrt(Math.max(1+y[0][0]-y[1][1]-y[2][2],0)),o[1]=.5*Math.sqrt(Math.max(1-y[0][0]+y[1][1]-y[2][2],0)),o[2]=.5*Math.sqrt(Math.max(1-y[0][0]-y[1][1]+y[2][2],0)),o[3]=.5*Math.sqrt(Math.max(1+y[0][0]+y[1][1]+y[2][2],0)),y[2][1]>y[1][2]&&(o[0]=-o[0]),y[0][2]>y[2][0]&&(o[1]=-o[1]),y[1][0]>y[0][1]&&(o[2]=-o[2])}(0===(t=t).length?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:t.map(ih).reduce(oh),e,n,r,i,o),[[e,n,r,o,i]]}var sh=function(t,e,n,r,i){for(var o=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],a=0;a<4;a++)o[a][3]=i[a];for(var s=0;s<3;s++)for(var l=0;l<3;l++)o[3][s]+=t[l]*o[l][s];var u=r[0],c=r[1],h=r[2],r=r[3],d=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],h=(d[0][0]=1-2*(c*c+h*h),d[0][1]=2*(u*c-h*r),d[0][2]=2*(u*h+c*r),d[1][0]=2*(u*c+h*r),d[1][1]=1-2*(u*u+h*h),d[1][2]=2*(c*h-u*r),d[2][0]=2*(u*h-c*r),d[2][1]=2*(c*h+u*r),d[2][2]=1-2*(u*u+c*c),o=lh(o,d),[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]);n[2]&&(h[2][1]=n[2],o=lh(o,h)),n[1]&&(h[2][1]=0,h[2][0]=n[0],o=lh(o,h)),n[0]&&(h[2][0]=0,h[1][0]=n[0],o=lh(o,h));for(var f=0;f<3;f++)for(var p=0;p<3;p++)o[f][p]*=e[f];return 0==(r=o)[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]?[o[0][0],o[0][1],o[1][0],o[1][1],o[3][0],o[3][1]]:o[0].concat(o[1],o[2],o[3])};function lh(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 o=0;o<4;o++)n[r][i]+=e[r][o]*t[o][i];return n}function uh(t){return t.toFixed(6).replace(".000000","")}function ch(e,n){var r,i;return e.decompositionPair!==n&&(e.decompositionPair=n,r=ah(e)),n.decompositionPair!==e&&(n.decompositionPair=e,i=ah(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){r=zs(r=function(t,e){for(var n=0,r=0;r<t.length;r++)n+=t[r]*e[r];return n}(t,e),-1,1);var r,i=[];if(1===r)i=t;else for(var o=Math.acos(r),a=+Math.sin(n*o)/Math.sqrt(1-r*r),s=0;s<4;s++)i.push(t[s]*(Math.cos(n*o)-r*a)+e[s]*a);return i}(r[0][3],i[0][3],t[5]);return sh(t[0],t[1],t[2],e,t[4]).map(uh).join(",")}])}function hh(t){return t.replace(/[xy]/,"")}function dh(t){return t.replace(/(x|y|z|3d)?$/,"3d")}var fh=function(t,e){return"perspective"===t&&"perspective"===e||("matrix"===t||"matrix3d"===t)&&("matrix"===e||"matrix3d"===e)};function ph(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?new P(n):new P(n,t.unit)})})}(n)}var o=[],a=[],s=[];if(r.length!==i.length)var l=ch(r,i),o=[l[0]],a=[l[1]],s=[["matrix",[l[2]]]];else for(var u=0;u<r.length;u++){var c=r[u].t,h=i[u].t,d=r[u].d,f=i[u].d,p=nh[c],y=nh[h],g=void 0;if(fh(c,h)){var v=ch([r[u]],[i[u]]);o.push(v[0]),a.push(v[1]),s.push(["matrix",[v[2]]])}else{if(c===h)g=c;else if(p[2]&&y[2]&&hh(c)===hh(h))g=hh(c),d=p[2](d),f=y[2](f);else{if(!p[1]||!y[1]||dh(c)!==dh(h)){v=ch(r,i);o=[v[0]],a=[v[1]],s=[["matrix",[v[2]]]];break}g=dh(c),d=p[1](d),f=y[1](f)}for(var m=[],b=[],x=[],w=0;w<d.length;w++){var k=(d[w].unit===O.kNumber?Wc:jc)(d[w],f[w],t,!1,w);m[w]=k[0],b[w]=k[1],x.push(k[2])}o.push(m),a.push(b),s.push([g,x])}}return e&&(l=o,o=a,a=l),[o,a,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(" ")}]}function yh(t){if(Jl(t)){if("text-anchor"===t)return[new P(0,"px"),new P(0,"px")];var e=t.split(" ");return 1===e.length&&("top"===e[0]||"bottom"===e[0]?(e[1]=e[0],e[0]="center"):e[1]="center"),2!==e.length?null:[Rc(gh(e[0])),Rc(gh(e[1]))]}return[new P(t[0]||0,"px"),new P(t[1]||0,"px")]}function gh(t){return"center"===t?"50%":"left"===t||"top"===t?"0":"right"===t||"bottom"===t?"100%":t}function vh(){this.contentBounds=void 0,this.renderBounds=void 0}function mh(){this.aabb=void 0}function bh(){this.bounds=void 0,this.boundsDirty=!0,this.renderBounds=void 0,this.renderBoundsDirty=!0,this.dirtyRenderBounds=void 0,this.dirty=!1,this.proxyNodeName=void 0}function xh(){this.dirty=!1,this.sorted=void 0,this.lastSortedIndex=void 0,this.renderOrder=0}function wh(){this.dirtyFlag=!1,this.localDirtyFlag=!1,this.frozen=!1,this.localPosition=E(0,0,0),this.localRotation=lo(0,0,0,1),this.localScale=E(1,1,1),this.localTransform=yi(),this.localSkew=fo(0,0),this.position=E(0,0,0),this.rotation=lo(0,0,0,1),this.scaling=E(1,1,1),this.worldTransform=yi(),this.origin=E(0,0,0)}var m,kh,Eh=d.defineToken("CSSPropertySyntaxFactory"),_h=d.defineToken("CSSProperty"),Sh=function(){function t(){this.parser=Dc,this.mixer=jc}return t.prototype.calculator=function(t,e,n,r){return new P(Bc(n),"deg")},t}(),Sh=t([f({token:{token:_h,named:b.ANGLE}})],Sh),Mh=((s=m=m||{}).DESTROY="destroy",s.ATTR_MODIFIED="DOMAttrModified",s.INSERTED="DOMNodeInserted",s.CHILD_INSERTED="child-inserted",s.REMOVED="removed",s.CHILD_REMOVED="child-removed",s.MOUNTED="DOMNodeInsertedIntoDocument",s.UNMOUNTED="DOMNodeRemovedFromDocument",s.BOUNDS_CHANGED="bounds-changed",s.RENDER_ORDER_CHANGED="render-order-changed",s.CULLED="culled",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 Cc,this.page=new Cc,this.canvas=new Cc,this.viewport=new Cc,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(){},rs(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}()),Th=function(r){function t(t,e){var n=r.call(this,null)||this;return n.type=t,n.detail=e,Object.assign(ls(n),e),n}return g(t,r),t}(Mh),ge=function(){function t(){this.emitter=new Eo.exports.EventEmitter}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,o,a=Ss(n)&&n||Ms(n)&&n.capture,n=Ms(n)&&n.once,s=_s(e)?void 0:e,l=!1,u="";return-1<t.indexOf(":")&&(i=(r=t.split(":"))[0],t=r[1],u=i,l=!0),t=a?t+"capture":t,e=_s(e)?e:e.handleEvent,l&&(o=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)===u&&o.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=Ss(n)&&n||Ms(n)&&n.capture,i=_s(e)?void 0:e;return e=_s(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 Th(t,e))},e.dispatchEvent=function(t){if(t instanceof Mh)return(e=this.document?this:this.defaultView||(null==(e=this.ownerDocument)?void 0:e.defaultView))&&(t.manager=e.getEventService()||null,t.defaultPrevented=!1,t.path=[],t.target=this,null!=(e=t.manager)&&e.dispatchEvent(t)),!t.defaultPrevented;var e;throw new Error("DisplayObject cannot propagate events outside of the Federated Events API")},t}(),Oh=function(i){function f(){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}g(f,i),f.isNode=function(t){return!!t.childNodes};var t=f.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("Method not implemented.")},t.lookupNamespaceURI=function(t){throw new Error("Method not implemented.")},t.lookupPrefix=function(t){throw new Error("Method not implemented.")},t.normalize=function(){throw new Error("Method not implemented.")},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 f))throw new TypeError("Node.compareDocumentPosition: Argument 1 does not implement interface Node.");for(var e=[i=t],n=[o=this];null!=(r=i.parentNode)?r:o.parentNode;)var r,i=i.parentNode?(e.push(i.parentNode),i.parentNode):i,o=o.parentNode?(n.push(o.parentNode),o.parentNode):o;if(i!==o)return f.DOCUMENT_POSITION_DISCONNECTED|f.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|f.DOCUMENT_POSITION_PRECEDING;var a=e.length>n.length?e:n,s=a===e?n:e;if(a[a.length-s.length]===s[0])return a===e?f.DOCUMENT_POSITION_CONTAINED_BY|f.DOCUMENT_POSITION_FOLLOWING:f.DOCUMENT_POSITION_CONTAINS|f.DOCUMENT_POSITION_PRECEDING;for(var l=a.length-s.length,u=s.length-1;0<=u;u--){var c,h=s[u],d=a[l+u];if(d!==h)return(c=h.parentNode.childNodes).indexOf(h)<c.indexOf(d)?s===e?f.DOCUMENT_POSITION_PRECEDING:f.DOCUMENT_POSITION_FOLLOWING:a===e?f.DOCUMENT_POSITION_PRECEDING:f.DOCUMENT_POSITION_FOLLOWING}return f.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)})},rs(f,[{key:"textContent",get:function(){var t="";this.nodeName===M.TEXT&&(t+=this.style.text);for(var e=cs(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,!0)}),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}}]),f}(ge),Ph=(Oh.DOCUMENT_POSITION_DISCONNECTED=1,Oh.DOCUMENT_POSITION_PRECEDING=2,Oh.DOCUMENT_POSITION_FOLLOWING=4,Oh.DOCUMENT_POSITION_CONTAINS=8,Oh.DOCUMENT_POSITION_CONTAINED_BY=16,Oh.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32,kh=kh||{},kh[kh.Standard=0]="Standard",function(){function t(){this.strategy=kh.Standard,this.visibilityPlaneMask=-1,this.visible=!0,this.enable=!0}return t.prototype.isCulled=function(){return this.enable&&!this.visible},t}()),Ah=(Ph.tag="c-cullable",vh.tag="c-geometry",mh.tag="c-rbush-node",d.defineToken("RBushRoot")),Ch=(bh.tag="c-renderable",xh.tag="c-sortable",wh.tag="c-transform",function(u){function t(t,e,n,r,i,o,a,s){var l=u.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=o,l.prevParsedValue=a,l.newParsedValue=s,l.type=t,l}return g(t,u),t}(Mh)),Nh=(Ch.ADDITION=2,Ch.MODIFICATION=1,Ch.REMOVAL=3,0),Lh=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).sceneGraphService=Zr.get(Cd),t.entity=Nh++,t.renderable=new bh,t.cullable=new Ph,t.transformable=new wh,t.sortable=new xh,t.geometry=new vh,t.rBushNode=new mh,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={},t.parsedStyle={},t.attributes={},t}g(t,i),t.isElement=function(t){return!!t.getAttribute};var e=t.prototype;return e.cloneNode=function(t){throw new Error("Method not implemented.")},e.appendChild=function(t,e){return this.sceneGraphService.attach(t,this,e),this.dispatchEvent(new Th(m.CHILD_INSERTED,{child:t})),t.dispatchEvent(new Ch(m.INSERTED,this,"","","",0,"","")),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,n){var r=this.childNodes.indexOf(e);return this.removeChild(e,n),this.appendChild(t,r),e},e.removeChild=function(t,e){return void 0===e&&(e=!0),t.dispatchEvent(new Ch(m.REMOVED,this,"","","",0,"","")),e&&(t.dispatchEvent(new Th(m.DESTROY)),t.destroyed=!0),this.dispatchEvent(new Th(m.CHILD_REMOVED,{child:t})),this.sceneGraphService.detach(t),e&&t.emitter.removeAllListeners(),t},e.removeChildren=function(e){var n=this;void 0===e&&(e=!0),this.childNodes.slice().forEach(function(t){n.removeChild(t,e)})},e.matches=function(t){return this.sceneGraphService.matches(t,this)},e.getElementById=function(t){return this.sceneGraphService.querySelector("#"+t,this)},e.getElementsByName=function(t){return this.sceneGraphService.querySelectorAll('[name="'+t+'"]',this)},e.getElementsByClassName=function(t){return this.sceneGraphService.querySelectorAll("."+t,this)},e.getElementsByTagName=function(t){return this.sceneGraphService.querySelectorAll(t,this)},e.querySelector=function(t){return this.sceneGraphService.querySelector(t,this)},e.querySelectorAll=function(t){return this.sceneGraphService.querySelectorAll(t,this)},e.closest=function(t){var e=this;do{if(this.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],o=n.slice(1);this.parentNode.appendChild(i,t),i.after.apply(i,o)}},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(t){return void 0===t&&(t=!0),this.parentNode?this.parentNode.removeChild(this,t):this},e.destroy=function(){this.dispatchEvent(new Th(m.DESTROY)),this.remove(!1),this.emitter.removeAllListeners(),this.destroyed=!0},e.getGeometryBounds=function(){return this.sceneGraphService.getGeometryBounds(this)},e.getRenderBounds=function(){return this.sceneGraphService.getBounds(this,!0)},e.getBounds=function(){return this.sceneGraphService.getBounds(this)},e.getLocalBounds=function(){return this.sceneGraphService.getLocalBounds(this)},e.getBoundingClientRect=function(){return this.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=iu(t.toString(),"")[0],e=this.attributes[t]),T(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("Method not implemented.")},e.getAttributeNode=function(t){throw new Error("Method not implemented.")},e.getAttributeNodeNS=function(t,e){throw new Error("Method not implemented.")},e.hasAttributeNS=function(t,e){throw new Error("Method not implemented.")},e.removeAttributeNS=function(t,e){throw new Error("Method not implemented.")},e.removeAttributeNode=function(t){throw new Error("Method not implemented.")},e.setAttributeNS=function(t,e,n){throw new Error("Method not implemented.")},e.setAttributeNode=function(t){throw new Error("Method not implemented.")},e.setAttributeNodeNS=function(t){throw new Error("Method not implemented.")},e.toggleAttribute=function(t,e){throw new Error("Method not implemented.")},rs(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):null}},{key:"previousSibling",get:function(){var t;return this.parentNode?(t=this.parentNode.childNodes.indexOf(this),this.parentNode.childNodes[t-1]||null):null}}]),t}(Oh),Ih=function(){function t(){this.pool={},this.htmlPool=[]}var e=t.prototype;return e.getByEntity=function(t){return this.pool[t]},e.add=function(t,e){(this.pool[t]=e).nodeName===M.HTML&&this.htmlPool.push(e)},e.remove=function(t){var e=this.pool[t];delete this.pool[t],e.nodeName===M.HTML&&(t=this.htmlPool.indexOf(e),this.htmlPool.splice(t,1))},e.getHTMLs=function(){return this.htmlPool},t}(),Ih=t([f()],Ih),Rh={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:""},k=function(i){function a(t){var r=i.call(this)||this;return r.config=void 0,r.styleValueRegistry=Zr.get(Bl),r.isCustomElement=!1,r.activeAnimations=[],r.mutationEvent=new Ch(m.ATTR_MODIFIED,ls(r),null,null,null,Ch.MODIFICATION,null,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=is({},Rh,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"),r.style=new Proxy(is({},r.attributes,{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}}),r.initAttributes(r.config.style),Zr.get(Ih).add(r.entity,ls(r)),r}g(a,i);var t=a.prototype;return t.destroy=function(){i.prototype.destroy.call(this),Zr.get(Ih).remove(this.entity),this.getAnimations().forEach(function(t){t.cancel()})},t.cloneNode=function(e,t){var n,r=is({},this.attributes);for(n in r){var i=r[n];i instanceof a&&(r[n]=i.cloneNode(e)),t&&(r[n]=t(n,i))}var o=new this.constructor({id:this.id,name:this.name,className:this.name,interactive:this.interactive,style:r});return o.setLocalTransform(this.getLocalTransform()),e&&this.children.forEach(function(t){t.style.isMarker||(t=t.cloneNode(e),o.appendChild(t))}),o},t.initAttributes=function(t){var e=this.renderable;this.styleValueRegistry.processProperties(this,t=void 0===t?{}:t),e.dirty=!0},t.setAttribute=function(t,e,n){void 0===n&&(n=!1);var t=iu(t,e),r=t[0],t=t[1];ks(e)||!n&&t===this.attributes[r]||(this.internalSetAttribute(r,t),i.prototype.setAttribute.call(this,r,t))},t.internalSetAttribute=function(t,e,n){var r=this,i=(void 0===n&&(n={}),this.renderable),o=this.attributes[t],a=this.parsedStyle[t],s=(this.styleValueRegistry.processProperties(this,((s={})[t]=e,s),n),this.parsedStyle.clipPathTargets&&this.parsedStyle.clipPathTargets.length&&this.parsedStyle.clipPathTargets.forEach(function(t){r.sceneGraphService.dirtifyToRoot(t),t.dispatchEvent(new Ch(m.ATTR_MODIFIED,t,r,r,"clipPath",Ch.MODIFICATION,r,r)),t.isCustomElement&&t.isConnected&&t.attributeChangedCallback&&t.attributeChangedCallback("clipPath",r,r)}),i.dirty=!0,this.parsedStyle[t]);this.isConnected&&(this.mutationEvent.prevValue=o,this.mutationEvent.newValue=e,this.mutationEvent.attrName=t,this.mutationEvent.prevParsedValue=a,this.mutationEvent.newParsedValue=s,this.dispatchEvent(this.mutationEvent)),(this.isCustomElement&&this.isConnected||!this.isCustomElement)&&this.attributeChangedCallback&&this.attributeChangedCallback(t,o,e,a,s)},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 Nc(n,e,r-n,t-e)},t.setOrigin=function(t,e,n){return this.sceneGraphService.setOrigin(this,Gs(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},t.getOrigin=function(){return this.sceneGraphService.getOrigin(this)},t.setPosition=function(t,e,n){return this.sceneGraphService.setPosition(this,Gs(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},t.setLocalPosition=function(t,e,n){return this.sceneGraphService.setLocalPosition(this,Gs(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},t.translate=function(t,e,n){return this.sceneGraphService.translate(this,Gs(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},t.translateLocal=function(t,e,n){return this.sceneGraphService.translateLocal(this,Gs(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},t.getPosition=function(){return this.sceneGraphService.getPosition(this)},t.getLocalPosition=function(){return this.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=Gs(t,e=e||t,n=n||t)),this.sceneGraphService.scaleLocal(this,t),this},t.setLocalScale=function(t,e,n){return"number"==typeof t&&(t=Gs(t,e=e||t,n=n||t)),this.sceneGraphService.setLocalScale(this,t),this},t.getLocalScale=function(){return this.sceneGraphService.getLocalScale(this)},t.getScale=function(){return this.sceneGraphService.getScale(this)},t.getEulerAngles=function(){var t=Us(v(),this.sceneGraphService.getWorldTransform(this));return t[0],t[1],Ws(t[2])},t.getLocalEulerAngles=function(){var t=Us(v(),this.sceneGraphService.getLocalRotation(this));return t[0],t[1],Ws(t[2])},t.setEulerAngles=function(t){return this.sceneGraphService.setEulerAngles(this,0,0,t),this},t.setLocalEulerAngles=function(t){return this.sceneGraphService.setLocalEulerAngles(this,0,0,t),this},t.rotateLocal=function(t,e,n){return T(e)&&T(n)?this.sceneGraphService.rotateLocal(this,0,0,t):this.sceneGraphService.rotateLocal(this,t,e,n),this},t.rotate=function(t,e,n){return T(e)&&T(n)?this.sceneGraphService.rotate(this,0,0,t):this.sceneGraphService.rotate(this,t,e,n),this},t.setRotation=function(t,e,n,r){return this.sceneGraphService.setRotation(this,t,e,n,r),this},t.setLocalRotation=function(t,e,n,r){return this.sceneGraphService.setLocalRotation(this,t,e,n,r),this},t.setLocalSkew=function(t,e){return this.sceneGraphService.setLocalSkew(this,t,e),this},t.getRotation=function(){return this.sceneGraphService.getRotation(this)},t.getLocalRotation=function(){return this.sceneGraphService.getLocalRotation(this)},t.getLocalSkew=function(){return this.sceneGraphService.getLocalSkew(this)},t.getLocalTransform=function(){return this.sceneGraphService.getLocalTransform(this)},t.getWorldTransform=function(){return this.sceneGraphService.getWorldTransform(this)},t.setLocalTransform=function(t){return this.sceneGraphService.setLocalTransform(this,t),this},t.resetLocalTransform=function(){this.sceneGraphService.resetLocalTransform(this)},t.getAnimations=function(){return this.activeAnimations},t.animate=function(t,e){var n,r=null==(r=this.ownerDocument)?void 0:r.timeline;return this.parsedStyle.clipPathTargets&&this.parsedStyle.clipPathTargets.length&&(r=null==(n=this.parsedStyle.clipPathTargets[0].ownerDocument)?void 0:n.timeline),delete this.parsedStyle.transform,r?r.play(new xd(this,t,e)):null},t.show=function(){this.style.visibility="visible"},t.hide=function(){this.style.visibility="hidden"},t.isVisible=function(){var t;return"visible"===(null==(t=this.parsedStyle)||null==(t=t.visibility)?void 0:t.value)},t.isInteractive=function(){var t;return"none"!==(null==(t=this.parsedStyle)||null==(t=t.pointerEvents)?void 0:t.value)},t.isCulled=function(){return!(!this.cullable||!this.cullable.isCulled())},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.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.getClip=function(){return this.style.clipPath||null},t.set=function(t,e){this.config[t]=e},t.get=function(t){return this.config[t]},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],o=n[1];return i?Ms(i)?(Object.keys(i).forEach(function(t){e.setAttribute(t,i[t])}),this):2===n.length?(this.setAttribute(i,o),this):this.attributes[i]:this.attributes},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},t.getMatrix=function(t){var t=t||this.getWorldTransform(),e=Oi(v(),t),n=e[0],e=e[1],r=Pi(v(),t),i=r[0],r=r[1],t=Ai(ro(),t),t=Us(v(),t),o=t[0],t=(t[1],t[2]);return Ys(o||t,n,e,i,r)},t.getLocalMatrix=function(){return this.getMatrix(this.getLocalTransform())},t.setMatrix=function(t){var t=qs(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=qs(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)},rs(a,[{key:"interactive",get:function(){return this.isInteractive()},set:function(t){this.style.pointerEvents=t?"auto":"none"}}]),a}(Lh),Dh=["style"],jh=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=ss(t,Dh),e=n.call(this,is({style:is({x:"",y:""},e)},t))||this;return e.isCustomElement=!0,e}return g(t,n),t}(k),Bh=["style"],Fh=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=ss(t,Bh);return n.call(this,is({type:M.CIRCLE,style:is({cx:"",cy:"",r:""},e)},t))||this}return g(t,n),t}(k),zh=["style"],Vh=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=ss(t,zh);return n.call(this,is({type:M.ELLIPSE,style:is({cx:"",cy:"",rx:"",ry:""},e)},t))||this}return g(t,n),t}(k),Gh=["style"],Hh=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=ss(t,Gh);return n.call(this,is({type:M.GROUP,style:is({x:"",y:"",width:"",height:""},e)},t))||this}return g(t,n),t}(k),Wh=["style"],Uh=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=ss(t,Wh);return n.call(this,is({type:M.IMAGE,style:is({x:"",y:"",img:"",width:"",height:""},e)},t))||this}return g(t,n),t}(k),Yh=["style"],qh=function(r){function t(t){var t=void 0===t?{}:t,e=t.style,t=ss(t,Yh),e=r.call(this,is({type:M.LINE,style:is({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0,isBillboard:!1},e)},t))||this,t=(e.markerStartAngle=0,e.markerEndAngle=0,e.parsedStyle),n=t.markerStart,t=t.markerEnd;return n&&n instanceof k&&(e.markerStartAngle=n.getLocalEulerAngles(),e.appendChild(n)),t&&t instanceof k&&(e.markerEndAngle=t.getLocalEulerAngles(),e.appendChild(t)),e.transformMarker(!0),e.transformMarker(!1),e}g(t,r);var e=t.prototype;return e.attributeChangedCallback=function(t,e,n,r,i){"x1"===t||"y1"===t||"x2"===t||"y2"===t||"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&r instanceof k&&(this.markerStartAngle=0,r.remove()),i&&i instanceof k&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t&&(r&&r instanceof k&&(this.markerEndAngle=0,r.remove()),i&&i instanceof k&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1)))},e.transformMarker=function(t){var e,n,r,i,o,a=this.parsedStyle,s=a.markerStart,l=a.markerEnd,u=a.markerStartOffset,c=a.markerEndOffset,h=a.x1,d=a.x2,f=a.y1,p=a.y2,y=a.defX,a=a.defY,s=t?s:l;s&&s instanceof k&&(l=0,t=t?(r=h.value-y,i=f.value-a,e=d.value-h.value,n=p.value-f.value,o=(null==u?void 0:u.value)||0,this.markerStartAngle):(r=d.value-y,i=p.value-a,e=h.value-d.value,n=f.value-p.value,o=(null==c?void 0:c.value)||0,this.markerEndAngle),l=Math.atan2(n,e),s.setLocalEulerAngles(180*l/Math.PI+t),s.setLocalPosition(r+Math.cos(l)*o,i+Math.sin(l)*o))},e.getPoint=function(t){var e=this.parsedStyle,n=e.x1,r=e.y1,i=e.x2,o=e.y2,a=e.defX,e=e.defY,n=Pa.pointAt(n.value,r.value,i.value,o.value,t),r=n.x,i=n.y,o=Zi(v(),E(r-a,i-e,0),this.getLocalTransform());return new Cc(o[0],o[1])},e.getTotalLength=function(){var t=this.parsedStyle,e=t.x1,n=t.y1,r=t.x2,t=t.y2;return Pa.length(e.value,n.value,r.value,t.value)},t}(k),Xh=["style"],Zh=function(i){function t(t){var t=void 0===t?{}:t,e=t.style,t=ss(t,Xh),e=i.call(this,is({type:M.PATH,style:is({path:"",miterLimit:""},e)},t))||this,t=(e.markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[],e.parsedStyle),n=t.markerStart,r=t.markerEnd,t=t.markerMid;return n&&n instanceof k&&(e.markerStartAngle=n.getLocalEulerAngles(),e.appendChild(n)),t&&t instanceof k&&e.placeMarkerMid(t),r&&r instanceof k&&(e.markerEndAngle=r.getLocalEulerAngles(),e.appendChild(r)),e.transformMarker(!0),e.transformMarker(!1),e}g(t,i);var e=t.prototype;return e.attributeChangedCallback=function(t,e,n,r,i){"path"===t?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&r instanceof k&&(this.markerStartAngle=0,r.remove()),i&&i instanceof k&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&r instanceof k&&(this.markerEndAngle=0,r.remove()),i&&i instanceof k&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))):"markerMid"===t&&this.placeMarkerMid(i)},e.transformMarker=function(t){var e,n,r,i,o,a=this.parsedStyle,s=a.markerStart,l=a.markerEnd,u=a.markerStartOffset,c=a.markerEndOffset,h=a.defX,a=a.defY,s=t?s:l;s&&s instanceof k&&(l=0,h=t?(i=(t=this.getStartTangent())[0],e=(t=t[1])[0]-h,n=t[1]-a,r=i[0]-t[0],i=i[1]-t[1],o=(null==u?void 0:u.value)||0,this.markerStartAngle):(u=(t=this.getEndTangent())[0],e=(t=t[1])[0]-h,n=t[1]-a,r=u[0]-t[0],i=u[1]-t[1],o=(null==c?void 0:c.value)||0,this.markerEndAngle),l=Math.atan2(i,r),s.setLocalEulerAngles(180*l/Math.PI+h),s.setLocalPosition(e+Math.cos(l)*o,n+Math.sin(l)*o))},e.placeMarkerMid=function(t){var e=this.parsedStyle,n=e.path.segments,r=e.defX,i=e.defY;if(this.markerMidList.forEach(function(t){t.remove()}),t&&t instanceof k)for(var o=1;o<n.length-1;o++){var a=n[o].currentPoint,s=a[0],a=a[1],l=1===o?t:t.cloneNode(!0);this.markerMidList.push(l),this.appendChild(l),l.setLocalPosition(s-r,a-i)}},e.getTotalLength=function(){return this.parsedStyle.path.totalLength},e.getPoint=function(t){var e=this.parsedStyle,n=e.defX,r=e.defY,e=e.path,i=e.totalLength,e=_a(e.absolutePath,t*i).point,t=e.x,i=e.y,e=Zi(v(),E(t-n,i-r,0),this.getLocalTransform());return new Cc(e[0],e[1])},e.getStartTangent=function(){var t,e,n=this.parsedStyle.path.segments,r=[];return 1<n.length&&(t=n[0].currentPoint,e=n[1].currentPoint,r=[],(n=n[1].startTangent)?r.push([t[0]-n[0],t[1]-n[1]]):r.push([e[0],e[1]]),r.push([t[0],t[1]])),r},e.getEndTangent=function(){var t,e,n=this.parsedStyle.path.segments,r=n.length,i=[];return 1<r&&(t=n[r-2].currentPoint,e=n[r-1].currentPoint,i=[],(n=n[r-1].endTangent)?i.push([e[0]-n[0],e[1]-n[1]]):i.push([t[0],t[1]]),i.push([e[0],e[1]])),i},t}(k),Kh=["style"],$h=function(i){function t(t){var t=void 0===t?{}:t,e=t.style,t=ss(t,Kh),e=i.call(this,is({type:M.POLYGON,style:is({points:"",miterLimit:"",isClosed:!0},e)},t))||this,t=(e.markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[],e.parsedStyle),n=t.markerStart,r=t.markerEnd,t=t.markerMid;return n&&n instanceof k&&(e.markerStartAngle=n.getLocalEulerAngles(),e.appendChild(n)),t&&t instanceof k&&e.placeMarkerMid(t),r&&r instanceof k&&(e.markerEndAngle=r.getLocalEulerAngles(),e.appendChild(r)),e.transformMarker(!0),e.transformMarker(!1),e}g(t,i);var e=t.prototype;return e.attributeChangedCallback=function(t,e,n,r,i){"points"===t?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&r instanceof k&&(this.markerStartAngle=0,r.remove()),i&&i instanceof k&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&r instanceof k&&(this.markerEndAngle=0,r.remove()),i&&i instanceof k&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))):"markerMid"===t&&this.placeMarkerMid(i)},e.transformMarker=function(t){var e,n,r,i,o,a=this.parsedStyle,s=a.markerStart,l=a.markerEnd,u=a.markerStartOffset,c=a.markerEndOffset,h=a.points.points,d=a.defX,a=a.defY,s=t?s:l;s&&s instanceof k&&(i=h[l=0][0]-d,o=h[0][1]-a,u=t?(e=h[1][0]-h[0][0],n=h[1][1]-h[0][1],r=(null==u?void 0:u.value)||0,this.markerStartAngle):(t=h.length,n=this.style.isClosed?(e=h[t-1][0]-h[0][0],h[t-1][1]-h[0][1]):(i=h[t-1][0]-d,o=h[t-1][1]-a,e=h[t-2][0]-h[t-1][0],h[t-2][1]-h[t-1][1]),r=(null==c?void 0:c.value)||0,this.markerEndAngle),l=Math.atan2(n,e),s.setLocalEulerAngles(180*l/Math.PI+u),s.setLocalPosition(i+Math.cos(l)*r,o+Math.sin(l)*r))},e.placeMarkerMid=function(t){var e=this.parsedStyle,n=e.points.points,r=e.defX,i=e.defY;if(this.markerMidList.forEach(function(t){t.remove()}),t&&t instanceof k)for(var o=1;o<(this.style.isClosed?n.length:n.length-1);o++){var a=n[o][0]-r,s=n[o][1]-i,l=1===o?t:t.cloneNode(!0);this.markerMidList.push(l),this.appendChild(l),l.setLocalPosition(a,s)}},t}(k),Jh=["style"],Qh=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=ss(t,Jh);return n.call(this,is({type:M.POLYLINE,style:is({points:"",miterLimit:"",isClosed:!1},e)},t))||this}g(t,n);var e=t.prototype;return e.getTotalLength=function(){return this.parsedStyle.points.totalLength},e.getPoint=function(n){var t=this.parsedStyle,e=t.defX,r=t.defY,t=t.points,i=t.points,t=t.segments,o=0,a=0,t=(t.forEach(function(t,e){n>=t[0]&&n<=t[1]&&(o=(n-t[0])/(t[1]-t[0]),a=e)}),Pa.pointAt(i[a][0],i[a][1],i[a+1][0],i[a+1][1],o)),i=t.x,t=t.y,i=Zi(v(),E(i-e,t-r,0),this.getLocalTransform());return new Cc(i[0],i[1])},e.getStartTangent=function(){var t=this.parsedStyle.points.points,e=[];return e.push([t[1][0],t[1][1]]),e.push([t[0][0],t[0][1]]),e},e.getEndTangent=function(){var t=this.parsedStyle.points.points,e=t.length-1,n=[];return n.push([t[e-1][0],t[e-1][1]]),n.push([t[e][0],t[e][1]]),n},t}($h),td=["style"],ed=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=ss(t,td);return n.call(this,is({type:M.RECT,style:is({x:"",y:"",width:"",height:"",radius:""},e)},t))||this}return g(t,n),t}(k),nd=["style"],rd=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=ss(t,nd);return n.call(this,is({type:M.TEXT,style:is({x:"",y:"",text:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",fill:"black",letterSpacing:"",lineHeight:"",miterLimit:"",whiteSpace:"pre",wordWrap:!1,wordWrapWidth:0,leading:0,dx:"",dy:""},e)},t))||this}g(t,n);var e=t.prototype;return e.getComputedTextLength=function(){var t;return(null==(t=this.parsedStyle.metrics)?void 0:t.maxLineWidth)||0},e.getLineBoundingRects=function(){var t;return(null==(t=this.parsedStyle.metrics)?void 0:t.lineMetrics)||[]},t}(k),id=["style"],od=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=ss(t,id),e=n.call(this,is({type:M.HTML,style:is({x:"",y:"",width:"auto",height:"auto",innerHTML:""},e)},t))||this;return e.cullable.enable=!1,e}g(t,n);var e=t.prototype;return e.getDomElement=function(){return this.parsedStyle.$el},e.getBoundingClientRect=function(){return this.parsedStyle.$el.getBoundingClientRect()},e.getClientRects=function(){return[this.getBoundingClientRect()]},e.getBounds=function(){var t,e,n=this.getBoundingClientRect(),r=null==(r=this.ownerDocument)||null==(r=r.defaultView)?void 0:r.getContextService().getBoundingClientRect();return r?(t=n.left-r.left,r=n.top-r.top,(e=new Oc).setMinMax(E(t,r,0),E(t+n.width,r+n.height,0)),e):null},e.getLocalBounds=function(){if(this.parentNode){var t,e=xi(yi(),this.parentNode.getWorldTransform()),n=this.getBounds();if(!Oc.isEmpty(n))return(t=new Oc).setFromTransformedAABB(n,e),t}return this.getBounds()},t}(k),ad=function(i){function t(t,e,n,r){t=i.call(this,t)||this;return t.currentTime=void 0,t.timelineTime=void 0,t.currentTime=n,t.timelineTime=r,t.target=e,t.type="finish",t.bubbles=!1,t.currentTarget=e,t.defaultPrevented=!1,t.eventPhase=t.AT_TARGET,t.timeStamp=Date.now(),t.currentTime=n,t.timelineTime=r,t}return g(t,i),t}(Mh),sd=0,ld=function(){function t(t,e){this.effect=void 0,this.timeline=void 0,this.id=void 0,this.currentTimePending=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this.oldPlayState=void 0,this._holdTime=void 0,this.readyPromise=void 0,this.finishedPromise=void 0,this.resolveReadyPromise=void 0,this.rejectReadyPromise=void 0,this.resolveFinishedPromise=void 0,this.rejectFinishedPromise=void 0,this.onfinish=void 0,this.oncancel=void 0,this.onframe=void 0,this._currentTime=0,this._startTime=void 0,this._playbackRate=1,this._inEffect=void 0,this._inTimeline=!0,this.onremove=void 0,((this.effect=t).animation=this).timeline=e,this.id=""+sd++,this._inEffect=!!this.effect.update(0),this._holdTime=0,this._paused=!1,this.oldPlayState="idle",this.updatePromises()}var e=t.prototype;return e.updatePromises=function(){var t=this.oldPlayState,e=this.pending?"pending":this.playState;return this.readyPromise&&e!==t&&("idle"===e?(this.rejectReadyPromise(),this.readyPromise=void 0):"pending"===t?this.resolveReadyPromise():"pending"===e&&(this.readyPromise=void 0)),this.finishedPromise&&e!==t&&("idle"===e?(this.rejectFinishedPromise(),this.finishedPromise=void 0):"finished"===e?this.resolveFinishedPromise():"finished"===t&&(this.finishedPromise=void 0)),this.oldPlayState=e,this.readyPromise||this.finishedPromise},e.play=function(){this.updatePromises(),this._paused=!1,(this._isFinished||this._idle)&&(this.rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this),-1===this.timeline.animations.indexOf(this)&&this.timeline.animations.push(this),this.updatePromises()},e.pause=function(){this.updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),this._isFinished||this._paused||this._idle?this._idle&&(this.rewind(),this._idle=!1):this.currentTimePending=!0,this._startTime=null,this._paused=!0,this.updatePromises()},e.finish=function(){this.updatePromises(),this._idle||(this.currentTime=0<this._playbackRate?this.totalDuration:0,this._startTime=this.totalDuration-this.currentTime,this.currentTimePending=!1,this.timeline.applyDirtiedAnimation(this),this.updatePromises())},e.cancel=function(){this.updatePromises(),this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this.effect.update(null),this.timeline.applyDirtiedAnimation(this),this.updatePromises())},e.reverse=function(){this.updatePromises();var t=this.currentTime;this.playbackRate*=-1,this.play(),null!==t&&(this.currentTime=t),this.updatePromises()},e.updatePlaybackRate=function(t){this.playbackRate=t},e.targetAnimations=function(){var t;return(null==(t=this.effect)?void 0:t.target).getAnimations()},e.markTarget=function(){var t=this.targetAnimations();-1===t.indexOf(this)&&t.push(this)},e.unmarkTarget=function(){var t=this.targetAnimations(),e=t.indexOf(this);-1!==e&&t.splice(e,1)},e.tick=function(t,e){this._idle||this._paused||(null===this._startTime?e&&(this.startTime=t-this._currentTime/this.playbackRate):this._isFinished||this.tickCurrentTime((t-this._startTime)*this.playbackRate)),e&&(this.currentTimePending=!1,this.fireEvents(t))},e.rewind=function(){if(0<=this.playbackRate)this.currentTime=0;else{if(!(this.totalDuration<1/0))throw new Error("Unable to rewind negative playback rate animation with infinite duration");this.currentTime=this.totalDuration}},e.persist=function(){throw new Error("Method not implemented.")},e.addEventListener=function(t,e,n){throw new Error("Method not implemented.")},e.removeEventListener=function(t,e,n){throw new Error("Method not implemented.")},e.dispatchEvent=function(t){throw new Error("Method not implemented.")},e.commitStyles=function(){throw new Error("Method not implemented.")},e.ensureAlive=function(){var t;this.playbackRate<0&&0===this.currentTime?this._inEffect=!(null==(t=this.effect)||!t.update(-1)):this._inEffect=!(null==(t=this.effect)||!t.update(this.currentTime)),this._inTimeline||!this._inEffect&&this._finishedFlag||(this._inTimeline=!0,this.timeline.animations.push(this))},e.tickCurrentTime=function(t,e){t!==this._currentTime&&(this._currentTime=t,this._isFinished&&!e&&(this._currentTime=0<this._playbackRate?this.totalDuration:0),this.ensureAlive())},e.fireEvents=function(t){var e,n=this;this._isFinished?this._finishedFlag||(this.onfinish&&(e=new ad(null,this,this.currentTime,t),setTimeout(function(){n.onfinish&&n.onfinish(e)})),this._finishedFlag=!0):(this.onframe&&"running"===this.playState&&(t=new ad(null,this,this.currentTime,t),this.onframe(t)),this._finishedFlag=!1)},rs(t,[{key:"pending",get:function(){return null===this._startTime&&!this._paused&&0!==this.playbackRate||this.currentTimePending}},{key:"playState",get:function(){return this._idle?"idle":this._isFinished?"finished":this._paused?"paused":"running"}},{key:"ready",get:function(){var n=this;return this.readyPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.readyPromise=new Promise(function(t,e){n.resolveReadyPromise=function(){t(n)},n.rejectReadyPromise=function(){e(new Error)}}),this.pending||this.resolveReadyPromise()),this.readyPromise}},{key:"finished",get:function(){var n=this;return this.finishedPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.finishedPromise=new Promise(function(t,e){n.resolveFinishedPromise=function(){t(n)},n.rejectFinishedPromise=function(){e(new Error)}}),"finished"===this.playState&&this.resolveFinishedPromise()),this.finishedPromise}},{key:"currentTime",get:function(){return this.updatePromises(),this._idle||this.currentTimePending?null:this._currentTime},set:function(t){var e;t=Number(t),isNaN(t)||(this.timeline.restart(),this._paused||null===this._startTime||(this._startTime=Number(null==(e=this.timeline)?void 0:e.currentTime)-t/this.playbackRate),this.currentTimePending=!1,this._currentTime!==t&&(this._idle&&(this._idle=!1,this._paused=!0),this.tickCurrentTime(t,!0),this.timeline.applyDirtiedAnimation(this)))}},{key:"startTime",get:function(){return this._startTime},set:function(t){null!==t&&(this.updatePromises(),t=Number(t),isNaN(t)||this._paused||this._idle||(this._startTime=t,this.tickCurrentTime((Number(this.timeline.currentTime)-this._startTime)*this.playbackRate),this.timeline.applyDirtiedAnimation(this),this.updatePromises()))}},{key:"playbackRate",get:function(){return this._playbackRate},set:function(t){var e;t!==this._playbackRate&&(this.updatePromises(),e=this.currentTime,this._playbackRate=t,this.startTime=null,"paused"!==this.playState&&"idle"!==this.playState&&(this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this)),null!==e&&(this.currentTime=e),this.updatePromises())}},{key:"_isFinished",get:function(){return!this._idle&&(0<this._playbackRate&&Number(this._currentTime)>=this.totalDuration||this._playbackRate<0&&Number(this._currentTime)<=0)}},{key:"totalDuration",get:function(){var t;return Number(null==(t=this.effect)?void 0:t.getComputedTiming().endTime)}},{key:"_needsTick",get:function(){return this.pending||"running"===this.playState||!this._finishedFlag}}]),t}();function ud(t,e){return Number(t.id)-Number(e.id)}var cd=function(){function t(t){var n=this;this.document=void 0,this.animations=[],this.ticking=!1,this.timelineTicking=!1,this.hasRestartedThisFrame=!1,this.animationsWithPromises=[],this.inTick=!1,this.pendingEffects=[],this.currentTime=null,this.rafId=0,this.rafCallbacks=[],this.frameId=void 0,this.webAnimationsNextTick=function(t){n.currentTime=t,n.discardAnimations(),0===n.animations.length?n.timelineTicking=!1:n.requestAnimationFrame(n.webAnimationsNextTick)},this.processRafCallbacks=function(e){var t=n.rafCallbacks;n.rafCallbacks=[],e<Number(n.currentTime)&&(e=Number(n.currentTime)),n.animations.sort(ud),n.animations=n.tick(e,!0,n.animations)[0],t.forEach(function(t){t[1](e)}),n.applyPendingEffects()},this.document=t}var e=t.prototype;return e.getAnimations=function(){return this.discardAnimations(),this.animations.slice()},e.isTicking=function(){return this.inTick},e.play=function(t){t=new ld(t,this);return this.animations.push(t),this.restartWebAnimationsNextTick(),t.updatePromises(),t.play(),t.updatePromises(),t},e.applyDirtiedAnimation=function(t){var e=this;this.inTick||(t.markTarget(),(t=t.targetAnimations()).sort(ud),this.tick(Number(this.currentTime),!1,t.slice())[1].forEach(function(t){t=e.animations.indexOf(t);-1!==t&&e.animations.splice(t,1)}),this.applyPendingEffects())},e.restart=function(){return this.ticking||(this.ticking=!0,this.requestAnimationFrame(function(){}),this.hasRestartedThisFrame=!0),this.hasRestartedThisFrame},e.destroy=function(){this.document.defaultView.cancelAnimationFrame(this.frameId)},e.applyPendingEffects=function(){this.pendingEffects.forEach(function(t){null!=t&&t.applyInterpolations()}),this.pendingEffects=[]},e.updateAnimationsPromises=function(){this.animationsWithPromises=this.animationsWithPromises.filter(function(t){return t.updatePromises()})},e.discardAnimations=function(){this.updateAnimationsPromises(),this.animations=this.animations.filter(function(t){return"finished"!==t.playState&&"idle"!==t.playState})},e.restartWebAnimationsNextTick=function(){this.timelineTicking||(this.timelineTicking=!0,this.requestAnimationFrame(this.webAnimationsNextTick))},e.rAF=function(t){var e=this.rafId++;return 0===this.rafCallbacks.length&&(this.frameId=this.document.defaultView.requestAnimationFrame(this.processRafCallbacks)),this.rafCallbacks.push([e,t]),e},e.requestAnimationFrame=function(e){var n=this;return this.rAF(function(t){n.updateAnimationsPromises(),e(t),n.updateAnimationsPromises()})},e.tick=function(n,r,t){var i=this,o=(this.inTick=!0,this.hasRestartedThisFrame=!1,this.currentTime=n,this.ticking=!1,[]),a=[],s=[],l=[];return t.forEach(function(t){t.tick(n,r),t._inEffect?(a.push(t.effect),t.markTarget()):(o.push(t.effect),t.unmarkTarget()),t._needsTick&&(i.ticking=!0);var e=t._inEffect||t._needsTick;((t._inTimeline=e)?s:l).push(t)}),(t=this.pendingEffects).push.apply(t,o),(t=this.pendingEffects).push.apply(t,a),this.ticking&&this.requestAnimationFrame(function(){}),this.inTick=!1,[s,l]},t}(),hd=function(e){function t(){var t=e.call(this)||this,r=(t.defaultView=null,t.documentElement=void 0,t.timeline=void 0,t.ownerDocument=null,t.nodeName="document",t.timeline=new cd(ls(t)),{});return Nf.forEach(function(t){var e=t.name,n=t.inherited,t=t.defaultValue;n&&t&&(r[e]=_s(t)?t(M.GROUP):t)}),t.documentElement=new Hh({id:"g-root",style:r}),t.documentElement.ownerDocument=ls(t),t.documentElement.parentNode=ls(t),t.childNodes=[t.documentElement],t}g(t,e);var n=t.prototype;return n.createElement=function(t,e){if("svg"===t)return this.documentElement;var n=this.defaultView.customElements.get(t),t=(n||(console.warn("Unsupported tagName: ",t),n="tspan"===t?rd:Hh),new n(e));return t.ownerDocument=this,t},n.createElementNS=function(t,e,n){return this.createElement(e,n)},n.cloneNode=function(t){throw new Error("Method not implemented.")},n.destroy=function(){try{this.documentElement.destroy()}catch(t){}this.timeline.destroy()},n.elementFromPoint=function(){var n=es(_().mark(function t(e,n){var r,i,o,a,s,l;return _().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(i=this.defaultView.canvas2Viewport({x:e,y:n}),r=i.x,i=i.y,a=this.defaultView.getConfig(),o=a.width,a=a.height,r<0||i<0||o<r||a<i)return t.abrupt("return",null);t.next=4;break;case 4:return o=this.defaultView.viewport2Client({x:r,y:i}),a=o.x,s=o.y,t.next=7,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!0,position:{x:e,y:n,viewportX:r,viewportY:i,clientX:a,clientY:s},picked:[]});case 7:return s=t.sent,l=s.picked,t.abrupt("return",l&&l[0]||this.documentElement);case 10:case"end":return t.stop()}},t,this)}));return function(t,e){return n.apply(this,arguments)}}(),n.elementsFromPoint=function(){var n=es(_().mark(function t(e,n){var r,i,o,a,s,l;return _().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(i=this.defaultView.canvas2Viewport({x:e,y:n}),r=i.x,i=i.y,a=this.defaultView.getConfig(),o=a.width,a=a.height,r<0||i<0||o<r||a<i)return t.abrupt("return",[]);t.next=4;break;case 4:return o=this.defaultView.viewport2Client({x:r,y:i}),a=o.x,s=o.y,t.next=7,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!1,position:{x:e,y:n,viewportX:r,viewportY:i,clientX:a,clientY:s},picked:[]});case 7:return s=t.sent,(l=s.picked)[l.length-1]!==this.documentElement&&l.push(this.documentElement),t.abrupt("return",l);case 11:case"end":return t.stop()}},t,this)}));return function(t,e){return n.apply(this,arguments)}}(),n.appendChild=function(t,e){throw new Error("Use document.documentElement instead.")},n.insertBefore=function(t,e){throw new Error("Use document.documentElement instead.")},n.removeChild=function(t,e){throw new Error("Use document.documentElement instead.")},n.replaceChild=function(t,e,n){throw new Error("Use document.documentElement instead.")},n.append=function(){throw new Error("Use document.documentElement instead.")},n.prepend=function(){throw new Error("Use document.documentElement instead.")},n.getElementById=function(t){return this.documentElement.getElementById(t)},n.getElementsByName=function(t){return this.documentElement.getElementsByName(t)},n.getElementsByTagName=function(t){return this.documentElement.getElementsByTagName(t)},n.getElementsByClassName=function(t){return this.documentElement.getElementsByClassName(t)},n.querySelector=function(t){return this.documentElement.querySelector(t)},n.querySelectorAll=function(t){return this.documentElement.querySelectorAll(t)},n.find=function(t){return this.documentElement.find(t)},n.findAll=function(t){return this.documentElement.findAll(t)},rs(t,[{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}}]),t}(Oh),dd=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).altKey=void 0,t.button=void 0,t.buttons=void 0,t.ctrlKey=void 0,t.metaKey=void 0,t.relatedTarget=void 0,t.shiftKey=void 0,t.client=new Cc,t.movement=new Cc,t.offset=new Cc,t.global=new Cc,t.screen=new Cc,t}g(t,i);var e=t.prototype;return e.getModifierState=function(t){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(t)},e.initMouseEvent=function(){throw new Error("Method not implemented.")},rs(t,[{key:"clientX",get:function(){return this.client.x}},{key:"clientY",get:function(){return this.client.y}},{key:"movementX",get:function(){return this.movement.x}},{key:"movementY",get:function(){return this.movement.y}},{key:"offsetX",get:function(){return this.offset.x}},{key:"offsetY",get:function(){return this.offset.y}},{key:"globalX",get:function(){return this.global.x}},{key:"globalY",get:function(){return this.global.y}},{key:"screenX",get:function(){return this.screen.x}},{key:"screenY",get:function(){return this.screen.y}}]),t}(Mh),fd=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).pointerId=void 0,t.width=0,t.height=0,t.isPrimary=!1,t.pointerType=void 0,t.pressure=void 0,t.tangentialPressure=void 0,t.tiltX=void 0,t.tiltY=void 0,t.twist=void 0,t}g(t,i);var e=t.prototype;return e.getCoalescedEvents=function(){return"pointermove"===this.type||"mousemove"===this.type||"touchmove"===this.type?[this]:[]},e.getPredictedEvents=function(){throw new Error("getPredictedEvents is not supported!")},t}(dd),pd=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).deltaMode=void 0,t.deltaX=void 0,t.deltaY=void 0,t.deltaZ=void 0,t.DOM_DELTA_LINE=0,t.DOM_DELTA_PAGE=1,t.DOM_DELTA_PIXEL=2,t}return g(t,i),t}(dd),yd=function(){function t(){this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=jl,this.endDelay=0,this.fill="auto",this.iterationStart=0,this.iterations=1,this.playbackRate=void 0,this.effect=void 0,this.composite=void 0,this.activeDuration=void 0,this.endTime=void 0,this.currentIteration=null,this.progress=null}return rs(t,[{key:"easing",get:function(){return this._easing},set:function(t){this.easingFunction=Hl(t),this._easing=t}}]),t}();function gd(t,i){if(null===t)return[];for(var e=(t=Array.isArray(t)?t:function(t){var e,n=[];for(e in t)if(!(e in["easing","offset","composite"]))for(var r,i=t[e],o=(i=Array.isArray(i)?i:[i]).length,a=0;a<o;a++)n[a]||(r={},"offset"in t&&(r.offset=Number(t.offset)),"easing"in t&&(r.easing=t.easing),"composite"in t&&(r.composite=t.composite),n[a]=r),void 0!==i[a]&&null!==i[a]&&(n[a][e]=i[a]);return n.sort(function(t,e){return(t.computedOffset||0)-(e.computedOffset||0)}),n}(t)).map(function(t){var e,n={};for(e in null!=i&&i.composite&&(n.composite="auto"),t){var r=t[e];if("offset"===e){if(null!==r){if(r=Number(r),!isFinite(r))throw new Error("Keyframe offsets must be numbers.");if(r<0||1<r)throw new Error("Keyframe offsets must be between 0 and 1.");n.computedOffset=r}}else if("composite"===e&&-1===["replace","add","accumulate","auto"].indexOf(r))throw new Error(r+" compositing is not supported");n[e]=r}return void 0===n.offset&&(n.offset=null),void 0===n.easing&&(n.easing=(null==i?void 0:i.easing)||"linear"),void 0===n.composite&&(n.composite="auto"),n}),n=!0,r=-1/0,o=0;o<e.length;o++){var a=e[o].offset;if(T(a))n=!1;else{if(a<r)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");r=a}}if(e=e.filter(function(t){return 0<=Number(t.offset)&&Number(t.offset)<=1}),!n)for(var s=e.length,l=(e[s-1].computedOffset=Number(null!=(t=e[s-1].offset)?t:1),1<s&&(e[0].computedOffset=Number(null!=(t=e[0].offset)?t:0)),0),u=Number(e[0].computedOffset),c=1;c<s;c++){var h=e[c].computedOffset;if(!T(h)&&!T(u)){for(var d=1;d<c-l;d++)e[l+d].computedOffset=u+(Number(h)-u)*d/(c-l);l=c,u=Number(h)}}return e}var vd="backwards|forwards|both|none".split("|"),md="reverse|alternate|alternate-reverse".split("|");function bd(t,e){var n,r,i;return t=function(t){"number"==typeof t&&(t=isNaN(t)?{duration:"auto"}:{duration:t});return t}(null!=(r=t)?r:{duration:"auto"}),n=t,r=e,i=new yd,r&&(i.fill="both",i.duration="auto"),"number"!=typeof n||isNaN(n)?void 0!==n&&Object.keys(n).forEach(function(t){void 0===n[t]||null===n[t]||"auto"===n[t]||!("number"!=typeof i[t]&&"duration"!==t||"number"==typeof n[t]&&!isNaN(n[t]))||"fill"===t&&-1===vd.indexOf(n[t])||"direction"===t&&-1===md.indexOf(n[t])||(i[t]=n[t])}):i.duration=n,i}var xd=function(){function t(t,e,n){var r=this;this.composite="replace",this.iterationComposite="replace",this.target=void 0,this.animation=void 0,this.timing=void 0,this.computedTiming=void 0,this.normalizedKeyframes=void 0,this.timeFraction=void 0,this.interpolations=void 0,this.target=t,this.timing=bd(n,!1),(this.timing.effect=this).timing.activeDuration=Wl(this.timing),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=gd(e,this.timing),this.interpolations=Ql(this.normalizedKeyframes,this.timing,this.target),this.computedTiming=new Proxy(this.timing,{get:function(t,e){return"duration"===e?"auto"===t.duration?0:t.duration:"fill"===e?"auto"===t.fill?"none":t.fill:"localTime"===e?r.animation&&r.animation.currentTime||null:"currentIteration"===e?r.animation&&"running"===r.animation.playState?t.currentIteration||0:null:"progress"===e?r.animation&&"running"===r.animation.playState?t.progress||0:null:t[e]},set:function(){return!0}})}var e=t.prototype;return e.applyInterpolations=function(){this.interpolations(this.target,Number(this.timeFraction))},e.update=function(t){return null!==t&&(this.timeFraction=Zl(this.timing.activeDuration,t,this.timing),null!==this.timeFraction)},e.getKeyframes=function(){return this.normalizedKeyframes},e.setKeyframes=function(t){this.normalizedKeyframes=gd(t)},e.getComputedTiming=function(){return this.computedTiming},e.getTiming=function(){return this.timing},e.updateTiming=function(e){var n=this;Object.keys(e||{}).forEach(function(t){n.timing=e[t]})},t}(),wd=function(){function t(){this.registry={},this.define(M.CIRCLE,Fh),this.define(M.ELLIPSE,Vh),this.define(M.RECT,ed),this.define(M.IMAGE,Uh),this.define(M.LINE,qh),this.define(M.GROUP,Hh),this.define(M.PATH,Zh),this.define(M.POLYGON,$h),this.define(M.POLYLINE,Qh),this.define(M.TEXT,rd),this.define(M.HTML,od)}var e=t.prototype;return e.define=function(t,e){this.registry[t]=e},e.get=function(t){return this.registry[t]},t}(),kd=d.defineToken("SceneGraphSelectorFactory"),Ed=d.defineToken("SceneGraphSelector",{multiple:!1}),_d=/\[\s*(.*)=(.*)\s*\]/,Sd=function(){function t(){}var e=t.prototype;return e.selectOne=function(e,n){var t,r,i,o=this;return e.startsWith(".")?n.find(function(t){return-1<((null==t?void 0:t.classList)||[]).indexOf(o.getIdOrClassname(e))}):e.startsWith("#")?n.find(function(t){return t.id===o.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:o.attributeToString(t,r)===i)}):null):n.find(function(t){return n!==t&&t.nodeName===e})},e.selectAll=function(e,n){var t,r,i,o=this;return e.startsWith(".")?n.findAll(function(t){return n!==t&&-1<((null==t?void 0:t.classList)||[]).indexOf(o.getIdOrClassname(e))}):e.startsWith("#")?n.findAll(function(t){return n!==t&&t.id===o.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:o.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(_d),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){if(!t.getAttribute)return"";t=t.getAttribute(e);return!T(t)&&t.toString?t.toString():""},t}();function Md(t,e){var n=Number(t.style.zIndex),r=Number(e.style.zIndex);if(n===r){var i=t.parentNode;if(i)return(i=i.childNodes||[]).indexOf(t)-i.indexOf(e)}return n-r}var Td,Od,Pd,Ad,Sd=t([f({token:Ed})],Sd),Cd=d.defineToken("SceneGraphService"),Nd=function(){function t(){var a,i,o,r,s,l,u,y=this;this.sceneGraphSelectorFactory=void 0,this.pendingEvents=[],this.boundsChangedEvent=new Th(m.BOUNDS_CHANGED),this.rotate=(a=ro(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=E(e,n,r));var i,o,n=t.transformable;null!==t.parentNode&&t.parentNode.transformable?(so(r=ro(),e[0],e[1],e[2]),i=y.getRotation(t),o=y.getRotation(t.parentNode),uo(a,o),ao(a,a),oo(r,a,r),oo(n.localRotation,r,i),ho(n.localRotation,n.localRotation),y.dirtifyLocal(t,n)):y.rotateLocal(t,e)}),this.rotateLocal=(i=ro(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=E(e,n,r));n=t.transformable;so(i,e[0],e[1],e[2]),co(n.localRotation,n.localRotation,i),y.dirtifyLocal(t,n)}),this.setEulerAngles=(o=ro(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=E(e,n,r));n=t.transformable;null!==t.parentNode&&t.parentNode.transformable?(so(n.localRotation,e[0],e[1],e[2]),r=y.getRotation(t.parentNode),uo(o,ao(ro(),r)),co(n.localRotation,n.localRotation,o),y.dirtifyLocal(t,n)):y.setLocalEulerAngles(t,e)}),this.translateLocal=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=E(e,n,r));var i,o,a,s,l,u,c,h,d,f,p,n=t.transformable;$i(e,v())||(i=r=e,o=n.localRotation,a=o[0],s=o[1],l=o[2],o=o[3],u=i[0],c=i[1],i=i[2],p=s*(f=a*c-s*u)-l*(d=l*u-a*i),l=l*(h=s*i-l*c)-a*f,a=a*d-s*h,d*=s=2*o,f*=s,l*=2,a*=2,r[0]=u+(h*=s)+(p*=2),r[1]=c+d+l,r[2]=i+f+a,Hi(n.localPosition,n.localPosition,e),y.dirtifyLocal(t,n))},this.setPosition=(r=yi(),s=v(),function(t,e){var n=t.transformable;s[0]=e[0],s[1]=e[1],s[2]=e[2]||0,$i(y.getPosition(t),s)||(Vi(n.position,s),null!==t.parentNode&&t.parentNode.transformable?(e=t.parentNode.transformable,vi(r,e.worldTransform),xi(r,r),Zi(n.localPosition,s,r)):Vi(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,$i(n.localPosition,l)||(Vi(n.localPosition,l),y.dirtifyLocal(t,n))}),this.translate=(u=v(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),$i(e="number"==typeof e?E(e,n,r):e,v())||(Hi(u,y.getPosition(t),e),y.setPosition(t,u))}),this.setRotation=function(){var a=ro();return function(t,e,n,r,i){var o=t.transformable;"number"==typeof e&&(e=lo(e,n,r,i)),null!==t.parentNode&&t.parentNode.transformable?(n=y.getRotation(t.parentNode),uo(a,n),ao(a,a),oo(o.localRotation,a,e),ho(o.localRotation,o.localRotation),y.dirtifyLocal(t,o)):y.setLocalRotation(t,e)}}}var e=t.prototype;return e.matches=function(t,e){return this.sceneGraphSelectorFactory().is(t,e)},e.querySelector=function(t,e){return this.sceneGraphSelectorFactory().selectOne(t,e)},e.querySelectorAll=function(t,e){return this.sceneGraphSelectorFactory().selectAll(t,e)},e.attach=function(t,e,n){t.parentNode&&this.detach(t),t.parentNode=e,T(n)?t.parentNode.childNodes.push(t):t.parentNode.childNodes.splice(n,0,t);n=e.sortable,n&&(n.dirty=!0),e=t.transformable;e&&this.dirtifyWorld(t,e),e.frozen&&this.unfreezeParentToRoot(t)},e.detach=function(t){var e,n;t.parentNode&&(e=t.transformable,(n=t.parentNode.sortable)&&(n.dirty=!0),-1<(n=t.parentNode.childNodes.indexOf(t))&&t.parentNode.childNodes.splice(n,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=E(e,n,r));n=t.transformable;$i(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=E(e,n,r));n=t.transformable;so(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=E(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=E(e[0],e[1],e[2]||n.localScale[2]);$i(e,n.localScale)||(Vi(n.localScale,e),this.dirtifyLocal(t,n))},e.setLocalRotation=function(t,e,n,r,i){"number"==typeof e&&(e=lo(e,n,r,i));n=t.transformable;uo(n.localRotation,e),this.dirtifyLocal(t,n)},e.setLocalSkew=function(t,e,n){"number"==typeof e&&(e=fo(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){i.has(t.entity)||(n.boundsChangedEvent.detail=e,t.dispatchEvent(n.boundsChangedEvent),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=[]},e.dirtifyToRoot=function(t,e){void 0===e&&(e=!1);var 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.pendingEvents.push([t,{affectChildren:e}])},e.getPosition=function(t){var e=t.transformable;return Oi(e.position,this.getWorldTransform(t,e))},e.getRotation=function(t){var e=t.transformable;return Ai(e.rotation,this.getWorldTransform(t,e))},e.getScale=function(t){var e=t.transformable;return Pi(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.calcLocalTransform=function(t){Ci(t.localTransform,t.localRotation,t.localPosition,E(1,1,1),t.origin),0===t.localSkew[0]&&0===t.localSkew[1]||((e=bi(yi()))[4]=Math.tan(t.localSkew[0]),e[1]=Math.tan(t.localSkew[1]),wi(t.localTransform,t.localTransform,e));var e=Ci(yi(),lo(0,0,0,1),v(),t.localScale,t.origin);wi(t.localTransform,t.localTransform,e)},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=Oi(v(),e),r=Ai(ro(),e),e=Pi(v(),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){var n,e=this.getGeometryBounds(t,e=void 0===e?!1:e);return Oc.isEmpty(e)?null:((n=new Oc).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 Oc},e.getBounds=function(t,e){var n=this,r=(void 0===e&&(e=!1),t.renderable);if(!r.boundsDirty&&!e&&r.bounds)return r.bounds;if(!r.renderBoundsDirty&&e&&r.renderBounds)return r.renderBounds;var i,o=this.getTransformedGeometryBounds(t,e),a=(t.childNodes.forEach(function(t){t=n.getBounds(t,e);t&&(o?o.add(t):(o=new Oc).update(t.center,t.halfExtents))}),t.parsedStyle.clipPath);return a&&((a=this.getTransformedGeometryBounds(a,!0))&&(i=new Oc).setFromTransformedAABB(a,this.getWorldTransform(t)),o?i&&(o=i.intersection(o)):o=i),o&&(e?r.renderBounds=o:r.bounds=o),e?r.renderBoundsDirty=!1:r.boundsDirty=!1,o||new Oc},e.getLocalBounds=function(t){if(t.parentNode){var e,n=yi(),r=(t.parentNode.transformable&&(n=xi(yi(),this.getWorldTransform(t.parentNode))),this.getBounds(t));if(!Oc.isEmpty(r))return(e=new Oc).setFromTransformedAABB(r,n),e}return this.getBounds(t)},e.getBoundingClientRect=function(t){var e,n,r,i=this.getGeometryBounds(t),i=(Oc.isEmpty(i)||(r=new Oc).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 Nc(e+((null==i?void 0:i.left)||0),t+((null==i?void 0:i.top)||0),n-e,r-t)):new Nc((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?wi(e.worldTransform,n.worldTransform,e.localTransform):vi(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}(),Ld=(t([p(kd),e("design:type",Function)],Nd.prototype,"sceneGraphSelectorFactory",void 0),Nd=t([f({token:Cd})],Nd),d.defineToken("ContextService",{multiple:!1})),Id=((c=Td=Td||{})[c.CAMERA_CHANGED=0]="CAMERA_CHANGED",c[c.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",c[c.NONE=2]="NONE",d.defineToken("RenderingContext")),Rd=d.defineToken("DefaultCamera");(a=Od=Od||{})[a.ORBITING=0]="ORBITING",a[a.EXPLORING=1]="EXPLORING",a[a.TRACKING=2]="TRACKING",(l=Pd=Pd||{})[l.DEFAULT=0]="DEFAULT",l[l.ROTATIONAL=1]="ROTATIONAL",l[l.TRANSLATIONAL=2]="TRANSLATIONAL",l[l.CINEMATIC=3]="CINEMATIC",(r=Ad=Ad||{})[r.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",r[r.PERSPECTIVE=1]="PERSPECTIVE";var Dd="updated",jd=Math.PI/180,Bd=180/Math.PI,Fd=function(r){function a(t,e){var n;return void 0===t&&(t=Od.EXPLORING),void 0===e&&(e=Pd.DEFAULT),(n=r.call(this)||this).canvas=void 0,n.matrix=yi(),n.right=E(1,0,0),n.up=E(0,1,0),n.forward=E(0,0,1),n.position=E(0,0,1),n.focalPoint=E(0,0,0),n.distanceVector=E(0,0,-1),n.distance=1,n.azimuth=0,n.elevation=0,n.roll=0,n.relAzimuth=0,n.relElevation=0,n.relRoll=0,n.dollyingStep=0,n.maxDistance=1/0,n.minDistance=-1/0,n.zoom=1,n.rotateWorld=!1,n.fov=30,n.near=.1,n.far=1e3,n.aspect=1,n.left=void 0,n.rright=void 0,n.top=void 0,n.bottom=void 0,n.projectionMatrix=yi(),n.projectionMatrixInverse=yi(),n.jitteredProjectionMatrix=void 0,n.view=void 0,n.enableUpdate=!0,n.type=Od.EXPLORING,n.trackingMode=Pd.DEFAULT,n.projectionMode=Ad.PERSPECTIVE,n.frustum=new Ac,n.landmarks=[],n.landmarkAnimationID=void 0,n.orthoMatrix=yi(),n.setType(t,e),n}g(a,r);var t=a.prototype;return t.isOrtho=function(){return this.projectionMode===Ad.ORTHOGRAPHIC},t.getProjectionMode=function(){return this.projectionMode},t.getPerspective=function(){return this.jitteredProjectionMatrix||this.projectionMatrix},t.getPerspectiveInverse=function(){return this.projectionMatrixInverse},t.getFrustum=function(){return this.frustum},t.getPosition=function(){return this.position},t.getFocalPoint=function(){return this.focalPoint},t.getDollyingStep=function(){return this.dollyingStep},t.getNear=function(){return this.near},t.getFar=function(){return this.far},t.getZoom=function(){return this.zoom},t.getOrthoMatrix=function(){return this.orthoMatrix},t.getView=function(){return this.view},t.setEnableUpdate=function(t){this.enableUpdate=t},t.setType=function(t,e){return this.type=t,this.type===Od.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===Od.TRACKING&&void 0!==e&&this.setTrackingMode(e),this},t.setProjectionMode=function(t){return this.projectionMode=t,this},t.setTrackingMode=function(t){if(this.type!==Od.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=t,this},t.setWorldRotation=function(t){return this.rotateWorld=t,this._getAngles(),this},t.getViewTransform=function(){return xi(yi(),this.matrix)},t.getWorldTransform=function(){return this.matrix},t.jitterProjectionMatrix=function(t,e){t=Mi(yi(),[t,e,0]);this.jitteredProjectionMatrix=wi(yi(),t,this.projectionMatrix)},t.clearJitterProjectionMatrix=function(){this.jitteredProjectionMatrix=void 0},t.setMatrix=function(t){return this.matrix=t,this._update(),this},t.setFov=function(t){return this.setPerspective(this.near,this.far,t,this.aspect),this},t.setAspect=function(t){return this.setPerspective(this.near,this.far,this.fov,t),this},t.setNear=function(t){return this.projectionMode===Ad.PERSPECTIVE?this.setPerspective(t,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,t,this.far),this},t.setFar=function(t){return this.projectionMode===Ad.PERSPECTIVE?this.setPerspective(this.near,t,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,t),this},t.setViewOffset=function(t,e,n,r,i,o){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=o,this.projectionMode===Ad.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},t.clearViewOffset=function(){return void 0!==this.view&&(this.view.enabled=!1),this.projectionMode===Ad.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},t.setZoom=function(t){return this.zoom=t,this.projectionMode===Ad.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===Ad.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this},t.setPerspective=function(t,e,n,r){this.projectionMode=Ad.PERSPECTIVE,this.fov=n,this.near=t,this.far=e,this.aspect=r;var i,o,a,s,n=this.near*Math.tan(.5*jd*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,o=this.view.fullHeight,l+=this.view.offsetX*r/i,n-=this.view.offsetY*e/o,r*=this.view.width/i,e*=this.view.height/o),i=this.projectionMatrix,l=(o=l)+r,n=(r=n)-e,e=this.far,a=2*t/(r-n),s=(l+o)/(l-o),r=(r+n)/(r-n),n=-(e+t)/(e-t),e=-2*e*t/(e-t),i[0]=2*t/(l-o),i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=a,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,Ei(this.projectionMatrix,this.projectionMatrix,E(1,-1,1)),xi(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},t.setOrthographic=function(t,e,n,r,i,o){this.projectionMode=Ad.ORTHOGRAPHIC,this.rright=e,this.left=t,this.top=n,this.bottom=r,this.near=i,this.far=o;var a,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,a=(this.top-this.bottom)/this.view.fullHeight/this.zoom,n=(s+=t*this.view.offsetX)+t*this.view.width,r=(e-=a*this.view.offsetY)-a*this.view.height),Ri(this.projectionMatrix,s,n,r,e,i,o),Ei(this.projectionMatrix,this.projectionMatrix,E(1,-1,1)),xi(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this},t.setPosition=function(t,e,n){t=Gs(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},t.setFocalPoint=function(t,e,n){void 0===e&&(e=this.focalPoint[1]),void 0===n&&(n=this.focalPoint[2]);var r,i=E(0,1,0);return this.focalPoint=Gs(t,e,n),this.trackingMode===Pd.CINEMATIC&&(t=(r=Wi(v(),this.focalPoint,this.position))[0],e=r[1],n=r[2],r=zi(r),e=Math.asin(e/r)*Bd,r=90+Math.atan2(n,t)*Bd,Si(n=yi(),n,r*jd),_i(n,n,e*jd),i=Zi(v(),[0,1,0],n)),xi(this.matrix,Di(yi(),this.position,this.focalPoint,i)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this},t.getDistance=function(){return this.distance},t.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=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},t.setMaxDistance=function(t){return this.maxDistance=t,this},t.setMinDistance=function(t){return this.minDistance=t,this},t.setAzimuth=function(t){return this.azimuth=Vs(t),this.computeMatrix(),this._getAxes(),this.type===Od.ORBITING||this.type===Od.EXPLORING?this._getPosition():this.type===Od.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},t.getAzimuth=function(){return this.azimuth},t.setElevation=function(t){return this.elevation=Vs(t),this.computeMatrix(),this._getAxes(),this.type===Od.ORBITING||this.type===Od.EXPLORING?this._getPosition():this.type===Od.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},t.getElevation=function(){return this.elevation},t.setRoll=function(t){return this.roll=Vs(t),this.computeMatrix(),this._getAxes(),this.type===Od.ORBITING||this.type===Od.EXPLORING?this._getPosition():this.type===Od.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},t.getRoll=function(){return this.roll},t.rotate=function(t,e,n){if(this.relElevation=Vs(e),this.relAzimuth=Vs(t),this.relRoll=Vs(n),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===Od.EXPLORING){e=io(ro(),[1,0,0],(this.rotateWorld?1:-1)*this.relElevation*jd),t=io(ro(),[0,1,0],(this.rotateWorld?1:-1)*this.relAzimuth*jd),n=io(ro(),[0,0,1],this.relRoll*jd),t=oo(ro(),t,e),t=oo(ro(),t,n),e=Ni(yi(),t);ki(this.matrix,this.matrix,[0,0,-this.distance]),wi(this.matrix,this.matrix,e),ki(this.matrix,this.matrix,[0,0,this.distance])}else{if(90<Math.abs(this.elevation))return this;this.computeMatrix()}return this._getAxes(),this.type===Od.ORBITING||this.type===Od.EXPLORING?this._getPosition():this.type===Od.TRACKING&&this._getFocalPoint(),this._update(),this},t.pan=function(t,e){t=Gs(t,e,0),e=Fi(this.position);return Hi(e,e,Ui(v(),this.right,t[0])),Hi(e,e,Ui(v(),this.up,t[1])),this._setPosition(e),this.triggerUpdate(),this},t.dolly=function(t){var e=this.forward,n=Fi(this.position),t=(this.dollyingStep,this.distance+t*this.dollyingStep),t=Math.max(Math.min(t,this.maxDistance),this.minDistance)-this.distance;return n[0]+=t*e[0],n[1]+=t*e[1],n[2]+=t*e[2],this._setPosition(n),this.type===Od.ORBITING||this.type===Od.EXPLORING?this._getDistance():this.type===Od.TRACKING&&Hi(this.focalPoint,n,this.distanceVector),this.triggerUpdate(),this},t.createLandmark=function(t,e){var e=e=void 0===e?{}:e,n=e.position,n=void 0===n?this.position:n,r=e.focalPoint,r=void 0===r?this.focalPoint:r,i=e.roll,e=e.zoom,o=new a,n=(o.setType(this.type,void 0),o.setPosition(n[0],n[1]||this.position[1],n[2]||this.position[2]),o.setFocalPoint(r[0],r[1]||this.focalPoint[1],r[2]||this.focalPoint[2]),o.setRoll(i||this.roll),o.setZoom(e||this.zoom),{name:t,matrix:gi(o.matrix),right:Fi(o.right),up:Fi(o.up),forward:Fi(o.forward),position:Fi(o.position),focalPoint:Fi(o.focalPoint),distanceVector:Fi(o.distanceVector),distance:o.distance,dollyingStep:o.dollyingStep,azimuth:o.azimuth,elevation:o.elevation,roll:o.roll,relAzimuth:o.relAzimuth,relElevation:o.relElevation,relRoll:o.relRoll,zoom:o.zoom});return this.landmarks.push(n),n},t.gotoLandmark=function(e,t){var n,s,r,i,l,u,c,h,d,f,p,y,g=this,o=(void 0===t&&(t={}),Jl(e)?this.landmarks.find(function(t){return t.name===e}):e);o&&(n=void 0===(n=(t=Es(t)?{duration:t}:t).easing)?"linear":n,r=t.duration,s=void 0===r?100:r,r=void 0===(r=t.easingFunction)?void 0:r,t=t.onfinish,i=void 0===t?void 0:t,l=.01,0===s?(this.syncFromLandmark(o),i&&i()):(void 0!==this.landmarkAnimationID&&this.canvas.cancelAnimationFrame(this.landmarkAnimationID),u=o.position,c=o.focalPoint,h=o.zoom,d=o.roll,f=r||Hl(n),y=function(){g.setFocalPoint(c),g.setPosition(u),g.setRoll(d),g.setZoom(h),g.computeMatrix(),g.triggerUpdate(),i&&i()},this.canvas.requestAnimationFrame(function t(e){var n,r,i,o,a,e=e-(p=void 0===p?e:p);s<e?y():(n=f(e/s),r=v(),i=v(),o=1,a=0,Xi(r,g.focalPoint,c,n),Xi(i,g.position,u,n),a=g.roll*(1-n)+d*n,o=g.zoom*(1-n)+h*n,g.setFocalPoint(r),g.setPosition(i),g.setRoll(a),g.setZoom(o),Qi(r,c)+Qi(i,u)<=l?y():(g.computeMatrix(),g.triggerUpdate(),e<s&&(g.landmarkAnimationID=g.canvas.requestAnimationFrame(t))))})))},t._update=function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()},t.computeMatrix=function(){var t=io(ro(),[0,0,1],this.roll*jd),e=(bi(this.matrix),io(ro(),[1,0,0],(this.rotateWorld&&this.type!==Od.TRACKING||this.type===Od.TRACKING?1:-1)*this.elevation*jd)),n=io(ro(),[0,1,0],(this.rotateWorld&&this.type!==Od.TRACKING||this.type===Od.TRACKING?1:-1)*this.azimuth*jd),n=oo(ro(),n,e),n=oo(ro(),n,t),e=Ni(yi(),n);this.type===Od.ORBITING||this.type===Od.EXPLORING?(ki(this.matrix,this.matrix,this.focalPoint),wi(this.matrix,this.matrix,e),ki(this.matrix,this.matrix,[0,0,this.distance])):this.type===Od.TRACKING&&(ki(this.matrix,this.matrix,this.position),wi(this.matrix,this.matrix,e))},t._setPosition=function(t,e,n){this.position=Gs(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()},t._getAxes=function(){Vi(this.right,Gs(no(eo(),[1,0,0,0],this.matrix))),Vi(this.up,Gs(no(eo(),[0,1,0,0],this.matrix))),Vi(this.forward,Gs(no(eo(),[0,0,1,0],this.matrix))),Yi(this.right,this.right),Yi(this.up,this.up),Yi(this.forward,this.forward)},t._getAngles=function(){var t=this.distanceVector[0],e=this.distanceVector[1],n=this.distanceVector[2],r=zi(this.distanceVector);0===r?(this.elevation=0,this.azimuth=0):this.type===Od.TRACKING||this.rotateWorld?(this.elevation=Math.asin(e/r)*Bd,this.azimuth=Math.atan2(-t,-n)*Bd):(this.elevation=-Math.asin(e/r)*Bd,this.azimuth=-Math.atan2(-t,-n)*Bd)},t._getPosition=function(){Vi(this.position,Gs(no(eo(),[0,0,0,1],this.matrix))),this._getDistance()},t._getFocalPoint=function(){var t,e;Ki(this.distanceVector,[0,0,-this.distance],(t=fi(),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)),Hi(this.focalPoint,this.position,this.distanceVector),this._getDistance()},t._getDistance=function(){this.distanceVector=Wi(v(),this.focalPoint,this.position),this.distance=zi(this.distanceVector),this.dollyingStep=this.distance/100},t._getOrthoMatrix=function(){var t,e;this.projectionMode===Ad.ORTHOGRAPHIC&&(t=this.position,e=io(ro(),[0,0,1],-this.roll*Math.PI/180),Ci(this.orthoMatrix,e,E((this.rright-this.left)/2-t[0],(this.top-this.bottom)/2-t[1],0),E(this.zoom,this.zoom,1),t))},t.triggerUpdate=function(){var t;this.enableUpdate&&(t=this.getViewTransform(),t=wi(yi(),this.getPerspective(),t),this.getFrustum().extractFromVPMatrix(t),this.emit(Dd))},t.syncFromLandmark=function(t){this.matrix=vi(this.matrix,t.matrix),this.right=Vi(this.right,t.right),this.up=Vi(this.up,t.up),this.forward=Vi(this.forward,t.forward),this.position=Vi(this.position,t.position),this.focalPoint=Vi(this.focalPoint,t.focalPoint),this.distanceVector=Vi(this.distanceVector,t.distanceVector),this.azimuth=t.azimuth,this.elevation=t.elevation,this.roll=t.roll,this.relAzimuth=t.relAzimuth,this.relElevation=t.relElevation,this.relRoll=t.relRoll,this.dollyingStep=t.dollyingStep,this.distance=t.distance,this.zoom=t.zoom},a}(Eo.exports.EventEmitter),zd=d.defineToken("RenderingPluginContribution"),Vd=function(){function t(){this.renderingPluginProvider=void 0,this.canvasConfig=void 0,this.renderingContext=void 0,this.sceneGraphService=void 0,this.styleValueRegistry=void 0,this.camera=void 0,this.inited=!1,this.stats={total:0,rendered:0},this.zIndexCounter=0,this.renderOrderChangedEvent=new Th(m.RENDER_ORDER_CHANGED),this.hooks={init:new xu,dirtycheck:new Mu(["object"]),cull:new Mu(["object","camera"]),beginFrame:new _u([]),beforeRender:new _u(["objectToRender"]),render:new _u(["objectToRender"]),afterRender:new _u(["objectToRender"]),endFrame:new _u([]),destroy:new _u([]),pick:new ku(["result"]),pointerDown:new _u(["event"]),pointerUp:new _u(["event"]),pointerMove:new _u(["event"]),pointerOut:new _u(["event"]),pointerOver:new _u(["event"]),pointerWheel:new _u(["event"]),pointerCancel:new _u(["event"])}}var e=t.prototype;return e.init=function(){var t=es(_().mark(function t(){var e=this;return _().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.renderingPluginProvider.getContributions({cache:!1}).forEach(function(t){t.apply(e)}),t.next=3,this.hooks.init.promise();case 3:this.inited=!0;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),e.getStats=function(){return this.stats},e.disableDirtyRectangleRendering=function(){return!this.canvasConfig.renderer.getConfig().enableDirtyRectangleRendering||this.renderingContext.renderReasons.has(Td.CAMERA_CHANGED)},e.render=function(t){var e=this;this.stats.total=0,this.stats.rendered=0,this.zIndexCounter=0,this.sceneGraphService.syncHierarchy(this.renderingContext.root),this.sceneGraphService.triggerPendingEvents(),this.renderingContext.renderReasons.size&&this.inited&&(this.renderDisplayObject(this.renderingContext.root,t),this.hooks.beginFrame.call(),this.renderingContext.renderListCurrentFrame.forEach(function(t){e.hooks.beforeRender.call(t),e.hooks.render.call(t),e.hooks.afterRender.call(t)}),this.hooks.endFrame.call(),this.renderingContext.renderListCurrentFrame=[],this.renderingContext.renderReasons.clear())},e.renderDisplayObject=function(t,e){var n=this,r=e.renderer.getConfig(),i=r.enableDirtyCheck,r=r.enableCulling,i=(this.styleValueRegistry.recalc(t),i?this.hooks.dirtycheck.call(t):t),i=(!i||(r=r?this.hooks.cull.call(i,this.camera):i)&&(this.stats.rendered++,this.renderingContext.renderListCurrentFrame.push(r)),t.renderable.dirty=!1,t.sortable.renderOrder=this.zIndexCounter++,this.stats.total++,t.sortable),r=!1;i.dirty&&(i.sorted=t.childNodes.slice().sort(Md),i.dirty=!(r=!0)),(i.sorted||t.childNodes).forEach(function(t){n.renderDisplayObject(t,e)}),r&&t.forEach(function(t){n.renderOrderChangedEvent.detail={renderOrder:t.sortable.renderOrder},t.dispatchEvent(n.renderOrderChangedEvent)})},e.destroy=function(){this.inited=!1,this.hooks.destroy.call()},e.dirtify=function(){this.renderingContext.renderReasons.add(Td.DISPLAY_OBJECT_CHANGED)},t}(),Gd=(t([Ur(zd),e("design:type",Object)],Vd.prototype,"renderingPluginProvider",void 0),t([p(ou),e("design:type",Object)],Vd.prototype,"canvasConfig",void 0),t([p(Id),e("design:type",Object)],Vd.prototype,"renderingContext",void 0),t([p(Cd),e("design:type",Object)],Vd.prototype,"sceneGraphService",void 0),t([p(Bl),e("design:type",Object)],Vd.prototype,"styleValueRegistry",void 0),t([p(Rd),e("design:type",Fd)],Vd.prototype,"camera",void 0),Vd=t([f()],Vd),function(r){function t(){for(var d,t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return(d=r.call.apply(r,[this].concat(e))||this).renderingContext=void 0,d.contextService=void 0,d.canvasConfig=void 0,d.displayObjectPool=void 0,d.rootTarget=void 0,d.cursor="default",d.mappingTable={},d.mappingState={trackingData:{}},d.eventPool=new Map,d.pickHandler=void 0,d.onPointerDown=function(){var e=es(_().mark(function t(e){var n,r;return _().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof fd){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,d.createPointerEvent(e);case 4:n=t.sent,d.dispatchEvent(n,"pointerdown"),"touch"===n.pointerType?d.dispatchEvent(n,"touchstart"):"mouse"!==n.pointerType&&"pen"!==n.pointerType||(r=2===n.button,d.dispatchEvent(n,r?"rightdown":"mousedown")),d.trackingData(e.pointerId).pressTargetsByButton[e.button]=n.composedPath(),d.freeEvent(n);case 10:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),d.onPointerUp=function(){var e=es(_().mark(function t(e){var n,r,i,o,a,s,l;return _().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof fd){t.next=2;break}return t.abrupt("return");case 2:return n=performance.now(),t.next=5,d.createPointerEvent(e);case 5:if(r=t.sent,d.dispatchEvent(r,"pointerup"),"touch"===r.pointerType?d.dispatchEvent(r,"touchend"):"mouse"!==r.pointerType&&"pen"!==r.pointerType||(i=2===r.button,d.dispatchEvent(r,i?"rightup":"mouseup")),i=d.trackingData(e.pointerId),s=d.findMountedTarget(i.pressTargetsByButton[e.button]),(l=s)&&!r.composedPath().includes(s)){for(o=s;o&&!r.composedPath().includes(o);)r.currentTarget=o,d.notifyTarget(r,"pointerupoutside"),"touch"===r.pointerType?d.notifyTarget(r,"touchendoutside"):"mouse"!==r.pointerType&&"pen"!==r.pointerType||(a=2===r.button,d.notifyTarget(r,a?"rightupoutside":"mouseupoutside")),Oh.isNode(o)&&(o=o.parentNode);delete i.pressTargetsByButton[e.button],l=o}l&&((s=d.clonePointerEvent(r,"click")).target=l,s.path=[],i.clicksByButton[e.button]||(i.clicksByButton[e.button]={clickCount:0,target:s.target,timeStamp:n}),(l=i.clicksByButton[e.button]).target===s.target&&n-l.timeStamp<200?++l.clickCount:l.clickCount=1,l.target=s.target,l.timeStamp=n,s.detail=l.clickCount,null!=(l=r.detail)&&l.preventClick||("mouse"===s.pointerType||"touch"===s.pointerType?d.dispatchEvent(s,"click"):d.dispatchEvent(s,"pointertap")),d.freeEvent(s)),d.freeEvent(r);case 14:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),d.onPointerMove=function(){var e=es(_().mark(function t(e){var n,r,i,o,a,s,l,u,c,h;return _().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof fd){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,d.createPointerEvent(e);case 4:if(n=t.sent,r="mouse"===n.pointerType||"pen"===n.pointerType,i=d.trackingData(e.pointerId),o=d.findMountedTarget(i.overTargets),i.overTargets&&o!==n.target)return l="mousemove"===e.type?"mouseout":"pointerout",t.next=12,d.createPointerEvent(e,l,o||void 0);t.next=23;break;case 12:if(a=t.sent,d.dispatchEvent(a,"pointerout"),r&&d.dispatchEvent(a,"mouseout"),n.composedPath().includes(o)){t.next=22;break}return t.next=18,d.createPointerEvent(e,"pointerleave",o||void 0);case 18:for((s=t.sent).eventPhase=s.AT_TARGET;s.target&&!n.composedPath().includes(s.target);)s.currentTarget=s.target,d.notifyTarget(s),r&&d.notifyTarget(s,"mouseleave"),Oh.isNode(s.target)&&(s.target=s.target.parentNode);d.freeEvent(s);case 22:d.freeEvent(a);case 23:if(o===n.target){t.next=38;break}l="mousemove"===e.type?"mouseover":"pointerover",u=d.clonePointerEvent(n,l),d.dispatchEvent(u,"pointerover"),r&&d.dispatchEvent(u,"mouseover"),c=o&&Oh.isNode(o)&&o.parentNode;case 29:if(!c||c===(Oh.isNode(d.rootTarget)&&d.rootTarget.parentNode)){t.next=35;break}if(c===n.target)return t.abrupt("break",35);t.next=32;break;case 32:c=c.parentNode,t.next=29;break;case 35:if(!c||c===(Oh.isNode(d.rootTarget)&&d.rootTarget.parentNode)){for((h=d.clonePointerEvent(n,"pointerenter")).eventPhase=h.AT_TARGET;h.target&&h.target!==o&&h.target!==(Oh.isNode(d.rootTarget)&&d.rootTarget.parentNode);)h.currentTarget=h.target,d.notifyTarget(h),r&&d.notifyTarget(h,"mouseenter"),Oh.isNode(h.target)&&(h.target=h.target.parentNode);d.freeEvent(h)}d.freeEvent(u);case 38:d.dispatchEvent(n,"pointermove"),"touch"===n.pointerType&&d.dispatchEvent(n,"touchmove"),r&&(d.dispatchEvent(n,"mousemove"),d.cursor=d.getCursor(n.target)),i.overTargets=n.composedPath(),d.freeEvent(n);case 43:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),d.onPointerOut=function(){var e=es(_().mark(function t(e){var n,r,i,o,a;return _().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof fd){t.next=2;break}return t.abrupt("return");case 2:if((n=d.trackingData(e.pointerId)).overTargets)return r="mouse"===e.pointerType||"pen"===e.pointerType,i=d.findMountedTarget(n.overTargets),t.next=8,d.createPointerEvent(e,"pointerout",i||void 0);t.next=19;break;case 8:return o=t.sent,d.dispatchEvent(o),r&&d.dispatchEvent(o,"mouseout"),t.next=13,d.createPointerEvent(e,"pointerleave",i||void 0);case 13:for((a=t.sent).eventPhase=a.AT_TARGET;a.target&&a.target!==(Oh.isNode(d.rootTarget)&&d.rootTarget.parentNode);)a.currentTarget=a.target,d.notifyTarget(a),r&&d.notifyTarget(a,"mouseleave"),Oh.isNode(a.target)&&(a.target=a.target.parentNode);n.overTargets=null,d.freeEvent(o),d.freeEvent(a);case 19:d.cursor=null;case 20:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),d.onPointerOver=function(){var e=es(_().mark(function t(e){var n,r,i,o;return _().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof fd){t.next=2;break}return t.abrupt("return");case 2:return n=d.trackingData(e.pointerId),t.next=5,d.createPointerEvent(e);case 5:for(r=t.sent,i="mouse"===r.pointerType||"pen"===r.pointerType,d.dispatchEvent(r,"pointerover"),i&&d.dispatchEvent(r,"mouseover"),"mouse"===r.pointerType&&(d.cursor=d.getCursor(r.target)),(o=d.clonePointerEvent(r,"pointerenter")).eventPhase=o.AT_TARGET;o.target&&o.target!==(Oh.isNode(d.rootTarget)&&d.rootTarget.parentNode);)o.currentTarget=o.target,d.notifyTarget(o),i&&d.notifyTarget(o,"mouseenter"),Oh.isNode(o.target)&&(o.target=o.target.parentNode);n.overTargets=r.composedPath(),d.freeEvent(r),d.freeEvent(o);case 16:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),d.onPointerUpOutside=function(){var e=es(_().mark(function t(e){var n,r,i,o;return _().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof fd){t.next=2;break}return t.abrupt("return");case 2:return n=d.trackingData(e.pointerId),r=d.findMountedTarget(n.pressTargetsByButton[e.button]),t.next=6,d.createPointerEvent(e);case 6:if(i=t.sent,r){for(o=r;o;)i.currentTarget=o,d.notifyTarget(i,"pointerupoutside"),"touch"===i.pointerType||"mouse"!==i.pointerType&&"pen"!==i.pointerType||d.notifyTarget(i,2===i.button?"rightupoutside":"mouseupoutside"),Oh.isNode(o)&&(o=o.parentNode);delete n.pressTargetsByButton[e.button]}d.freeEvent(i);case 9:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),d.onWheel=function(){var e=es(_().mark(function t(e){var n;return _().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof pd){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,d.createWheelEvent(e);case 4:n=t.sent,d.dispatchEvent(n),d.freeEvent(n);case 7:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),d}g(t,r);var e=t.prototype;return e.init=function(){this.rootTarget=this.renderingContext.root.parentNode,this.addEventMapping("pointerdown",this.onPointerDown),this.addEventMapping("pointerup",this.onPointerUp),this.addEventMapping("pointermove",this.onPointerMove),this.addEventMapping("pointerout",this.onPointerOut),this.addEventMapping("pointerleave",this.onPointerOut),this.addEventMapping("pointerover",this.onPointerOver),this.addEventMapping("pointerupoutside",this.onPointerUpOutside),this.addEventMapping("wheel",this.onWheel)},e.client2Viewport=function(t){var e=this.contextService.getBoundingClientRect();return new Cc(t.x-((null==e?void 0:e.left)||0),t.y-((null==e?void 0:e.top)||0))},e.viewport2Client=function(t){var e=this.contextService.getBoundingClientRect();return new Cc(t.x+((null==e?void 0:e.left)||0),t.y+((null==e?void 0:e.top)||0))},e.viewport2Canvas=function(t){var e=t.x,t=t.y,n=this.rootTarget.defaultView.getCamera(),r=this.canvasConfig,i=r.width,r=r.height,o=n.getPerspectiveInverse(),n=n.getWorldTransform(),n=wi(yi(),n,o),o=E(e/i*2-1,2*(1-t/r)-1,0);return Zi(o,o,n),new Cc(o[0],o[1])},e.canvas2Viewport=function(t){var e=this.rootTarget.defaultView.getCamera(),n=e.getPerspective(),e=e.getViewTransform(),n=wi(yi(),n,e),e=E(t.x,t.y,0),t=(Zi(e,e,n),this.canvasConfig),n=t.width,t=t.height;return new Cc((e[0]+1)/2*n,(1-(e[1]+1)/2)*t)},e.setPickHandler=function(t){this.pickHandler=t},e.addEventMapping=function(t,e){this.mappingTable[t]||(this.mappingTable[t]=[]),this.mappingTable[t].push({fn:e,priority:0}),this.mappingTable[t].sort(function(t,e){return t.priority-e.priority})},e.mapEvent=function(t){if(this.rootTarget){var e=this.mappingTable[t.type];if(e)for(var n=0,r=e.length;n<r;n++)e[n].fn(t);else console.warn("[EventService]: Event mapping not defined for "+t.type)}},e.dispatchEvent=function(t,e){t.propagationStopped=!1,t.propagationImmediatelyStopped=!1,this.propagate(t,e),this.emit(e||t.type,t)},e.propagate=function(t,e){if(t.target){var n=t.composedPath();t.eventPhase=t.CAPTURING_PHASE;for(var r=n.length-1;1<=r;r--)if(t.currentTarget=n[r],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return;if(t.eventPhase=t.AT_TARGET,t.currentTarget=t.target,this.notifyTarget(t,e),!t.propagationStopped&&!t.propagationImmediatelyStopped){var i=n.indexOf(t.currentTarget);t.eventPhase=t.BUBBLING_PHASE;for(var o=i+1;o<n.length;o++)if(t.currentTarget=n[o],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return}}},e.propagationPath=function(t){var e=[t],n=this.rootTarget.defaultView||null;if(n&&n===t)e.unshift(n.document);else{for(var r=0;r<2048&&t!==this.rootTarget;r++)Oh.isNode(t)&&t.parentNode&&(e.push(t.parentNode),t=t.parentNode);n&&e.push(n)}return e},e.hitTest=function(){var e=es(_().mark(function t(e){var n,r,i,o;return _().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.viewportX,r=e.viewportY,o=this.canvasConfig,i=o.width,o=o.height,n<0||r<0||i<n||o<r)return t.abrupt("return",null);t.next=4;break;case 4:return t.next=6,this.pickHandler(e);case 6:if(t.t1=t.sent,t.t1){t.next=9;break}t.t1=this.rootTarget;case 9:if(t.t0=t.t1,t.t0){t.next=12;break}t.t0=null;case 12:return t.abrupt("return",t.t0);case 13:case"end":return t.stop()}},t,this)}));return function(t){return e.apply(this,arguments)}}(),e.isNativeEventFromCanvas=function(t){var e=this.contextService.getDomElement(),n=null==(n=t.nativeEvent)?void 0:n.target;if(n){if(n===e)return!0;if(e&&e.contains)return e.contains(n)}return!!t.nativeEvent.composedPath&&-1<t.nativeEvent.composedPath().indexOf(e)},e.getExistedHTML=function(t){if(t.nativeEvent.composedPath)for(var e=cs(this.displayObjectPool.getHTMLs());!(n=e()).done;){var n=n.value;if(-1<t.nativeEvent.composedPath().indexOf(n))return n}return null},e.pickTarget=function(){var e=es(_().mark(function t(e){return _().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.hitTest({clientX:e.clientX,clientY:e.clientY,viewportX:e.viewportX,viewportY:e.viewportY,x:e.canvasX,y:e.canvasY}));case 1:case"end":return t.stop()}},t,this)}));return function(t){return e.apply(this,arguments)}}(),e.createPointerEvent=function(){var r=es(_().mark(function t(e,n,r){var i,o;return _().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(i=this.allocateEvent(fd),this.copyPointerData(e,i),this.copyMouseData(e,i),this.copyData(e,i),i.nativeEvent=e.nativeEvent,i.originalEvent=e,o=this.getExistedHTML(i),null==r){t.next=11;break}t.t0=r,t.next=20;break;case 11:if(t.t1=o,t.t1){t.next=19;break}if(t.t2=this.isNativeEventFromCanvas(i),t.t2)return t.next=17,this.pickTarget(i);t.next=18;break;case 17:t.t2=t.sent;case 18:t.t1=t.t2;case 19:t.t0=t.t1;case 20:return i.target=t.t0,"string"==typeof n&&(i.type=n),t.abrupt("return",i);case 23:case"end":return t.stop()}},t,this)}));return function(t,e,n){return r.apply(this,arguments)}}(),e.createWheelEvent=function(){var e=es(_().mark(function t(e){var n,r;return _().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this.allocateEvent(pd),this.copyWheelData(e,n),this.copyMouseData(e,n),this.copyData(e,n),n.nativeEvent=e.nativeEvent,n.originalEvent=e,r=this.getExistedHTML(n),t.t0=r,t.t0){t.next=15;break}if(t.t1=this.isNativeEventFromCanvas(n),t.t1)return t.next=13,this.pickTarget(n);t.next=14;break;case 13:t.t1=t.sent;case 14:t.t0=t.t1;case 15:return n.target=t.t0,t.abrupt("return",n);case 17:case"end":return t.stop()}},t,this)}));return function(t){return e.apply(this,arguments)}}(),e.trackingData=function(t){return this.mappingState.trackingData[t]||(this.mappingState.trackingData[t]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[t]},e.clonePointerEvent=function(t,e){var n=this.allocateEvent(fd);return n.nativeEvent=t.nativeEvent,n.originalEvent=t.originalEvent,this.copyPointerData(t,n),this.copyMouseData(t,n),this.copyData(t,n),n.target=t.target,n.path=t.composedPath().slice(),n.type=null!=e?e:n.type,n},e.copyPointerData=function(t,e){t instanceof fd&&e instanceof fd&&(e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist)},e.copyMouseData=function(t,e){t instanceof dd&&e instanceof dd&&(e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.shiftKey=t.shiftKey,e.client.copyFrom(t.client),e.movement.copyFrom(t.movement),e.canvas.copyFrom(t.canvas),e.screen.copyFrom(t.screen),e.global.copyFrom(t.global),e.offset.copyFrom(t.offset))},e.copyWheelData=function(t,e){e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ},e.copyData=function(t,e){e.isTrusted=t.isTrusted,e.timeStamp=performance.now(),e.type=t.type,e.detail=t.detail,e.view=t.view,e.page.copyFrom(t.page),e.viewport.copyFrom(t.viewport)},e.allocateEvent=function(t){this.eventPool.has(t)||this.eventPool.set(t,[]);t=this.eventPool.get(t).pop()||new t(this);return t.eventPhase=t.NONE,t.currentTarget=null,t.path=[],t.target=null,t},e.freeEvent=function(t){if(t.manager!==this)throw new Error("It is illegal to free an event not managed by this EventBoundary!");var e=t.constructor;this.eventPool.has(e)||this.eventPool.set(e,[]),this.eventPool.get(e).push(t)},e.notifyTarget=function(t,e){e=null!=(n=e)?n:t.type;var n=t.eventPhase===t.CAPTURING_PHASE||t.eventPhase===t.AT_TARGET?e+"capture":e;this.notifyListeners(t,n),t.eventPhase===t.AT_TARGET&&this.notifyListeners(t,e)},e.notifyListeners=function(t,e){var n=t.currentTarget.emitter,r=n._events[e];if(r)if("fn"in r)r.once&&n.removeListener(e,r.fn,void 0,!0),r.fn.call(t.currentTarget||r.context,t);else for(var i=0;i<r.length&&!t.propagationImmediatelyStopped;i++)r[i].once&&n.removeListener(e,r[i].fn,void 0,!0),r[i].fn.call(t.currentTarget||r[i].context,t)},e.findMountedTarget=function(t){if(!t)return null;for(var e=t[t.length-1],n=t.length-2;0<=n;n--){var r=t[n];if(!(r===this.rootTarget||Oh.isNode(r)&&r.parentNode===e))break;e=t[n]}return e},e.getCursor=function(t){for(var e=t;e;){var n=Lh.isElement(e)&&e.getAttribute("cursor");if(n)return n;e=Oh.isNode(e)&&e.parentNode}},t}(Eo.exports.EventEmitter)),Hd=(t([p(Id),e("design:type",Object)],Gd.prototype,"renderingContext",void 0),t([p(Ld),e("design:type",Object)],Gd.prototype,"contextService",void 0),t([p(ou),e("design:type",Object)],Gd.prototype,"canvasConfig",void 0),t([p(Ih),e("design:type",Ih)],Gd.prototype,"displayObjectPool",void 0),t([V.postConstruct(),e("design:type",Function),e("design:paramtypes",[]),e("design:returntype",void 0)],Gd.prototype,"init",null),Gd=t([f()],Gd),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}()),Hd=t([f()],Hd),Wd={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]},Ud=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,Yd=new RegExp(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source+"|"+/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source+"|"+/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source+"|"+/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source),qd=new RegExp(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source+"|"+/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source+"|"+/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source+"|"+/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source),Xd=function(){function t(){var n=this;this.cache={},this.offscreenCanvas=void 0,this.shouldBreakByKinsokuShorui=function(t,e){return!n.isBreakingSpace(e)&&!(!t||!qd.exec(e)&&!Yd.exec(t))},this.trimByKinsokuShorui=function(t){var e=[].concat(t),n=e[e.length-2];if(!n)return t;t=n[n.length-1];return e[e.length-2]=n.slice(0,-1),e[e.length-1]=t+e[e.length-1],e}}var e=t.prototype;return e.measureFont=function(t,e){if(this.cache[t])return this.cache[t];for(var n={ascent:0,descent:0,fontSize:0},r=this.offscreenCanvas.getOrCreateCanvas(e),e=this.offscreenCanvas.getOrCreateContext(e),i=(e.font=t,Wd.MetricsString+Wd.BaselineSymbol),o=Math.ceil(e.measureText(i).width),a=Math.ceil(e.measureText(Wd.BaselineSymbol).width),s=Wd.HeightMultiplier*a,a=a*Wd.BaselineMultiplier|0,l=(r.width=o,r.height=s,e.fillStyle="#f00",e.fillRect(0,0,o,s),e.font=t,e.textBaseline="alphabetic",e.fillStyle="#000",e.fillText(i,0,a),e.getImageData(0,0,o||1,s||1).data),r=l.length,u=4*o,c=0,h=0,d=!1,c=0;c<a;++c){for(var f=0;f<u;f+=4)if(255!==l[h+f]){d=!0;break}if(d)break;h+=u}for(n.ascent=a-c,h=r-u,d=!1,c=s;a<c;--c){for(var p=0;p<u;p+=4)if(255!==l[h+p]){d=!0;break}if(d)break;h-=u}return n.descent=c-a,n.fontSize=n.ascent+n.descent,this.cache[t]=n},e.measureText=function(t,e,n){var r=e.fontSize,i=e.wordWrap,o=e.lineHeight,a=e.lineWidth,s=e.textBaseline,l=e.textAlign,u=e.letterSpacing,c=e.leading,c=void 0===c?0:c,h=function(t){for(var e=t.fontSize,n=t.fontFamily,r=t.fontStyle,i=t.fontVariant,t=t.fontWeight,e=Es(e)?e+"px":e.toString(),o=Jl(n)?n.split(","):[n.value],a=o.length-1;0<=a;a--){var s=o[a].trim();!/([\"\'])[^\'\"]+\1/.test(s)&&Tu.indexOf(s)<0&&(s='"'+s+'"'),o[a]=s}return r+" "+i+" "+t+" "+e+" "+o.join(",")}(e),d=this.measureFont(h,n),f=(0===d.fontSize&&(d.fontSize=r.value,d.ascent=r.value),this.offscreenCanvas.getOrCreateContext(n));f.font=h;for(var p=(i?this.wordWrap(t,e,n):t).split(/(?:\r\n|\r|\n)/),y=new Array(p.length),g=0,v=0;v<p.length;v++){var m=f.measureText(p[v]).width+(p[v].length-1)*u.value;y[v]=m,g=Math.max(g,m)}var r=g+a.value,b=o.value||d.fontSize+a.value,i=Math.max(b,d.fontSize+a.value)+(p.length-1)*(b+c),x=0;return"middle"===s.value?x=-i/2:"bottom"===s.value||"alphabetic"===s.value||"ideographic"===s.value?x=-i:"top"!==s.value&&"hanging"!==s.value||(x=0),{font:h,width:r,height:i,lines:p,lineWidths:y,lineHeight:b+=c,maxLineWidth:g,fontProperties:d,lineMetrics:y.map(function(t,e){var n=0;return"center"===l.value?n-=t/2:"right"!==l.value&&"end"!==l.value||(n-=t),new Nc(n-a.value/2,x+e*b,t+a.value,b)})}},e.wordWrap=function(i,t,e){function o(t){return a.getFromCache(t,r.value,d,s)}var a=this,n=t.wordWrapWidth,n=void 0===n?0:n,r=t.letterSpacing,s=this.offscreenCanvas.getOrCreateContext(e),l=n+r.value,u=[],c=0,h=0,d={};return Array.from(i).forEach(function(t,e){var n=i[e-1],e=i[e+1],r=o(t);if(a.isNewline(t))h=0,u[++c]="";else{if(0<h&&l<h+r){if(h=0,u[++c]="",a.isBreakingSpace(t))return;a.canBreakInLastChar(t)||(u=a.trimToBreakable(u),h=a.sumTextWidthByCache(u[c]||"",d)),a.shouldBreakByKinsokuShorui(t,e)&&(u=a.trimByKinsokuShorui(u),h+=o(n||""))}h+=r,u[c]=(u[c]||"")+t}}),u.join("\n")},e.isBreakingSpace=function(t){return"string"==typeof t&&0<=Wd.BreakingSpaces.indexOf(t.charCodeAt(0))},e.isNewline=function(t){return"string"==typeof t&&0<=Wd.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||!Ud.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(!Ud.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}(),Zd=(t([p(Hd),e("design:type",Hd)],Xd.prototype,"offscreenCanvas",void 0),Xd=t([f()],Xd),d.defineToken("GeometryUpdaterFactory")),Kd=d.defineToken("GeometryAABBUpdater"),$d=function(){function t(){}return t.prototype.update=function(t,e){t=t.r;return{width:2*t.value,height:2*t.value}},t}(),$d=t([f({token:{token:Kd,named:M.CIRCLE}})],$d),Jd=function(){function t(){}return t.prototype.update=function(t,e){var n=t.rx,t=t.ry;return{width:2*n.value,height:2*t.value}},t}(),Jd=t([f({token:{token:Kd,named:M.ELLIPSE}})],Jd),Qd=function(){function t(){}return t.prototype.update=function(t,e){var n=t.img,r=t.width,t=t.height,i=0,o=0;return r instanceof P&&r.unit===O.kPixels&&(i=r.value),t instanceof P&&t.unit===O.kPixels&&(o=t.value),n&&!Jl(n)&&(i=i||n.width,o=o||n.height),r instanceof P&&(r.value=i),t instanceof P&&(t.value=o),{width:i,height:o}},t}(),Qd=t([f({token:[{token:Kd,named:M.RECT},{token:Kd,named:M.IMAGE},{token:Kd,named:M.GROUP}]})],Qd),tf=function(){function t(){this.textService=void 0}var e=t.prototype;return e.isReadyToMeasure=function(t,e){var n=t.text,r=t.textAlign,i=t.textBaseline,o=t.fontSize,a=t.fontStyle,s=t.fontWeight,l=t.fontVariant,t=t.lineWidth;return n&&o&&a&&s&&l&&r&&i&&t},e.update=function(t,e){var n=t.text,r=t.textAlign,i=t.lineWidth,o=t.textBaseline,a=t.dx,s=t.dy,l=((null==e||null==(l=e.ownerDocument)||null==(l=l.defaultView)?void 0:l.getConfig())||{}).offscreenCanvas;if(!this.isReadyToMeasure(t,e))return 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};var e=this.textService.measureText(n,t,l),n=(t.metrics=e).width,l=e.height,u=e.lineHeight,e=e.fontProperties,n=E(n/2,l/2,0),l=[0,1],c=0,r=("center"===r.value?(c=i.value/2,l=[.5,1]):"right"!==r.value&&"end"!==r.value||(c=i.value,l=[1,1]),0);return"middle"===o.value?r=n[1]:"top"===o.value||"hanging"===o.value?r=2*n[1]:"alphabetic"===o.value?r=u-e.ascent:"bottom"!==o.value&&"ideographic"!==o.value||(r=0),a&&(c+=a.value),s&&(r+=s.value),t.anchor=[new P(l[0]),new P(l[1]),new P(0)],{width:2*n[0],height:2*n[1],offsetX:c,offsetY:r}},t}(),ef=(t([p(Xd),e("design:type",Xd)],tf.prototype,"textService",void 0),tf=t([f({token:{token:Kd,named:M.TEXT}})],tf),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.value,r.value),e=Math.max(e.value,r.value),r=Math.min(n.value,t.value);return{width:e-i,height:Math.max(n.value,t.value)-r}},t}()),ef=t([f({token:{token:Kd,named:M.LINE}})],ef),nf=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}(),nf=t([f({token:[{token:Kd,named:M.POLYLINE},{token:Kd,named:M.POLYGON}]})],nf),rf=function(){function t(){}return t.prototype.update=function(t){t=t.path.rect;return{width:t.width,height:t.height}},t}(),rf=t([f({token:{token:Kd,named:M.PATH}})],rf),of=function(){function t(){this.sceneGraphService=void 0}return t.prototype.calculator=function(t,e,n,r){var i;return n instanceof Ku&&(n=null),e&&e!==n&&e.parsedStyle.clipPathTargets&&(i=e.parsedStyle.clipPathTargets.indexOf(r),e.parsedStyle.clipPathTargets.splice(i,1)),n&&(n.parsedStyle.clipPathTargets||(n.parsedStyle.clipPathTargets=[]),n.parsedStyle.clipPathTargets.push(r)),this.sceneGraphService.dirtifyToRoot(r),n},t}(),af=(t([p(Cd),e("design:type",Object)],of.prototype,"sceneGraphService",void 0),of=t([f({token:{token:_h,named:b.CLIP_PATH}})],of),function(){function t(){this.parser=Sc,this.mixer=Mc}return t.prototype.calculator=function(t,e,n,r){return n instanceof Ku?new pc(0,0,0,0,"none"===n.value):n},t}()),af=t([f({token:[{token:_h,named:b.PAINT},{token:_h,named:b.COLOR}]})],af),sf=function(){function t(){this.parser=Jc}return t.prototype.calculator=function(t,e,n){return n instanceof Ku?[]:n},t}();function lf(t){t=t.parsedStyle.fontSize;return t&&!P.isRelativeUnit(t.unit)?t.clone():null}function uf(){this.container=void 0}var cf,hf,df,ff,pf,sf=t([f({token:{token:_h,named:b.FILTER}})],sf),yf=function(){function t(){this.parser=Rc,this.mixer=jc}return t.prototype.calculator=function(t,e,n,r,i){if(!P.isRelativeUnit(n.unit))return n.clone();if(n.unit===O.kPercentage)return new P(0,"px");if(n.unit===O.kEms){if(r.parentNode){var o=lf(r.parentNode);if(o)return o.value*=n.value,o}return i.addUnresolveProperty(r,t),new P(0,"px")}if(n.unit===O.kRems){if(null!=r&&(null!=(o=r.ownerDocument)&&o.documentElement)){o=lf(r.ownerDocument.documentElement);if(o)return o.value*=n.value,o}return i.addUnresolveProperty(r,t),new P(0,"px")}},t}(),yf=t([f({token:[{token:_h,named:b.LENGTH_PERCENTAGE},{token:_h,named:b.LENGTH}]})],yf),gf=function(){function t(){this.mixer=zc}return t.prototype.parser=function(t){t=Fc(Es(t)?[t]:t),t=1===t.length?[t[0],t[0]]:[t[0],t[1]];return t},t}(),gf=t([f({token:{token:_h,named:b.LENGTH_PERCENTAGE_12}})],gf),vf=function(){function t(){this.mixer=zc}return t.prototype.parser=function(t){t=Fc(Es(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},t}(),vf=t([f({token:{token:_h,named:b.LENGTH_PERCENTAGE_14}})],vf),mf=function(t){function e(){return t.apply(this,arguments)||this}return g(e,t),e.prototype.postProcessor=function(t){var e,n,r;switch(t.nodeName){case M.CIRCLE:case M.ELLIPSE:var i=t.parsedStyle,o=i.cx,i=i.cy;T(o)||(l=o.value),T(i)||(u=i.value);break;case M.LINE:var o=t.parsedStyle,i=o.x1,a=o.x2,s=o.y1,o=o.y2,l=Math.min(i.value,a.value),u=Math.min(s.value,o.value),c=0;break;case M.RECT:case M.IMAGE:case M.GROUP:case M.HTML:case M.TEXT:T(t.parsedStyle.x)||(l=t.parsedStyle.x.value),T(t.parsedStyle.y)||(u=t.parsedStyle.y.value)}t.nodeName!==M.PATH&&t.nodeName!==M.POLYLINE&&t.nodeName!==M.POLYGON&&(t.parsedStyle.defX=l||0,t.parsedStyle.defY=u||0),T(l)&&T(u)&&T(c)||(e=(r=t.getLocalPosition())[0],n=r[1],r=r[2],t.setLocalPosition(T(l)?e:l,T(u)?n:u,T(c)?r:c))},e}(yf),mf=t([f({token:{token:_h,named:b.COORDINATE}})],mf),bf=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){n=null==(n=n=n instanceof Ku?null:n)?void 0:n.cloneNode(!0);return n&&(n.style.isMarker=!0),n},t}(),bf=t([f({token:{token:_h,named:b.MARKER}})],bf),xf=function(){this.mixer=Wc,this.parser=Hc},xf=t([f({token:{token:_h,named:b.NUMBER}})],xf),wf=function(){function t(){this.parser=Hc,this.mixer=Uc(0,1)}return t.prototype.postProcessor=function(t){var e;!t.attributes.offsetPath||(e=t.attributes.offsetPath.nodeName)!==M.LINE&&e!==M.PATH&&e!==M.POLYLINE||(e=t.attributes.offsetPath.getPoint(t.parsedStyle.offsetDistance.value))&&t.setLocalPosition(e.x,e.y)},t}(),wf=t([f({token:{token:_h,named:b.OFFSET_DISTANCE}})],wf),kf=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){var i;return e&&e!==n&&e.style.offsetPathTargets&&(i=e.style.offsetPathTargets.indexOf(r),e.style.offsetPathTargets.splice(i,1)),n&&(n.style.offsetPathTargets||(n.style.offsetPathTargets=[]),n.style.offsetPathTargets.push(r)),n},t}(),kf=t([f({token:{token:_h,named:b.OFFSET_PATH}})],kf),Ef=function(){this.parser=Hc,this.mixer=Uc(0,1)},Ef=t([f({token:{token:_h,named:b.OPACITY_VALUE}})],Ef),_f=function(){function t(){this.parser=qc,this.mixer=Xc}var e=t.prototype;return e.calculator=function(t,e,n){return n instanceof Ku&&"unset"===n.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:[],totalLength:0,zCommandIndexes:[],rect:new Nc(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}(),_f=t([f({token:{token:_h,named:b.PATH}})],_f),Sf=function(){function t(){this.parser=Zc}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}(),Sf=t([f({token:{token:_h,named:b.LIST_OF_POINTS}})],Sf),Mf=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=Uc(0,1/0),t}return g(t,i),t}(yf),Mf=t([f({token:{token:_h,named:b.SHADOW_BLUR}})],Mf),Tf=function(){function t(){}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof Ku?"unset"===n.value?"":n.value:n},e.postProcessor=function(t){t.nodeValue=""+t.parsedStyle.text||""},t}(),Tf=t([f({token:{token:_h,named:b.TEXT}})],Tf),Of=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){var i,o=r.getAttribute("text");return o&&(i=o,"capitalize"===n.value?i=o.charAt(0).toUpperCase()+o.slice(1):"lowercase"===n.value?i=o.toLowerCase():"uppercase"===n.value&&(i=o.toUpperCase()),r.parsedStyle.text=i),n},t}(),Of=t([f({token:{token:_h,named:b.TEXT_TRANSFORM}})],Of),Pf=function(){function t(){this.parser=rh,this.mixer=ph}return t.prototype.postProcessor=function(l){var t=l.parsedStyle,e=t.transform,u=t.defX,c=t.defY;e&&e.length&&(l.resetLocalTransform(),l.setLocalPosition(u,c),e.forEach(function(t){var e,n,r,i,o,a,s=t.t,t=t.d;"scale"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1,1],l.scaleLocal(o[0],o[1],1)):"scalex"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(o[0],1,1)):"scaley"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(1,o[0],1)):"scalez"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(1,1,o[0])):"scale3d"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1,1,1],l.scaleLocal(o[0],o[1],o[2])):"translate"===s?(o=t||[dc,dc],l.translateLocal(o[0].value,o[1].value,0)):"translatex"===s?(o=t||[dc],l.translateLocal(o[0].value,0,0)):"translatey"===s?(o=t||[dc],l.translateLocal(0,o[0].value,0)):"translatez"===s?(o=t||[dc],l.translateLocal(0,0,o[0].value)):"translate3d"===s?(o=t||[dc,dc,dc],l.translateLocal(o[0].value,o[1].value,o[2].value)):"rotate"===s?(o=t||[fc],l.rotateLocal(0,0,o[0].value)):"rotatex"===s?(o=t||[fc],l.rotateLocal(o[0].value,0,0)):"rotatey"===s?(o=t||[fc],l.rotateLocal(0,o[0].value,0)):"rotatez"===s?(o=t||[fc],l.rotateLocal(0,0,o[0].value)):"rotate3d"!==s&&("skew"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0,0],l.setLocalSkew(Hs(o[0]),Hs(o[1]))):"skewx"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0],l.setLocalSkew(Hs(o[0]),l.getLocalSkew()[1])):"skewy"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0],l.setLocalSkew(l.getLocalSkew()[0],Hs(o[0]))):"matrix"===s?(a=(o=t.map(function(t){return t.value}))[0],e=o[1],n=o[2],r=o[3],i=o[4],o=o[5],l.setLocalTransform(mi(a,e,0,0,n,r,0,0,0,0,1,0,i+u,o+c,0,1))):"matrix3d"===s&&((a=mi.apply(Bi,t.map(function(t){return t.value})))[12]+=u,a[13]+=c,l.setLocalTransform(a)))}))},t}(),Pf=t([f({token:{token:_h,named:b.TRANSFORM}})],Pf),Af=function(){this.parser=yh},Af=t([f({token:{token:_h,named:b.TRANSFORM_ORIGIN}})],Af),Cf=function(){function t(){this.parser=Hc}return t.prototype.postProcessor=function(t){var e;t.parentNode&&(e=(t=t.parentNode).renderable,t=t.sortable,e&&(e.dirty=!0),t&&(t.dirty=!0))},t}(),Cf=t([f({token:{token:_h,named:b.Z_INDEX}})],Cf),Nf=[{name:"display",keywords:["none"]},{name:"opacity",interpolable:!0,defaultValue:"1",syntax:b.OPACITY_VALUE},{name:"fillOpacity",interpolable:!0,inherited:!0,defaultValue:"1",syntax:b.OPACITY_VALUE},{name:"strokeOpacity",interpolable:!0,inherited:!0,defaultValue:"1",syntax:b.OPACITY_VALUE},{name:"fill",interpolable:!0,keywords:["none"],defaultValue:"none",syntax:b.PAINT},{name:"stroke",interpolable:!0,keywords:["none"],defaultValue:"none",syntax:b.PAINT},{name:"shadowType",keywords:["inner","outer","both"],defaultValue:"outer",layoutDependent:!0},{name:"shadowColor",interpolable:!0,syntax:b.COLOR},{name:"shadowOffsetX",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:b.LENGTH_PERCENTAGE},{name:"shadowOffsetY",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:b.LENGTH_PERCENTAGE},{name:"shadowBlur",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:b.SHADOW_BLUR},{name:"lineWidth",interpolable:!0,inherited:!0,defaultValue:"1",layoutDependent:!0,alias:["strokeWidth"],syntax:b.LENGTH_PERCENTAGE},{name:"increasedLineWidthForHitTesting",inherited:!0,defaultValue:"0",layoutDependent:!0,syntax:b.LENGTH_PERCENTAGE},{name:"lineJoin",inherited:!0,layoutDependent:!0,alias:["strokeLinejoin"],keywords:["miter","bevel","round"],defaultValue:"miter"},{name:"lineCap",inherited:!0,layoutDependent:!0,alias:["strokeLinecap"],keywords:["butt","round","square"],defaultValue:"butt"},{name:"lineDash",interpolable:!0,inherited:!0,keywords:["none"],alias:["strokeDasharray"],syntax:b.LENGTH_PERCENTAGE_12},{name:"lineDashOffset",interpolable:!0,inherited:!0,defaultValue:"0",alias:["strokeDashoffset"],syntax:b.LENGTH_PERCENTAGE},{name:"offsetPath",syntax:b.OFFSET_PATH},{name:"offsetDistance",interpolable:!0,syntax:b.OFFSET_DISTANCE},{name:"dx",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:b.LENGTH_PERCENTAGE},{name:"dy",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:b.LENGTH_PERCENTAGE},{name:"zIndex",independent:!0,interpolable:!0,defaultValue:"0",keywords:["auto"],syntax:b.Z_INDEX},{name:"visibility",keywords:["visible","hidden"],independent:!0,inherited:!0,defaultValue:"visible"},{name:"pointerEvents",inherited:!0,keywords:["none","auto","stroke","fill","painted","visible","visiblestroke","visiblefill","visiblepainted","bounding-box","all"],defaultValue:"auto"},{name:"filter",independent:!0,layoutDependent:!0,keywords:["none"],defaultValue:"none",syntax:b.FILTER},{name:"clipPath",syntax:b.CLIP_PATH},{name:"transform",parsePriority:100,interpolable:!0,keywords:["none"],defaultValue:"none",syntax:b.TRANSFORM},{name:"transformOrigin",parsePriority:100,defaultValue:function(t){return t===M.CIRCLE||t===M.ELLIPSE?"center":t===M.TEXT?"text-anchor":"left top"},layoutDependent:!0,syntax:b.TRANSFORM_ORIGIN},{name:"anchor",parsePriority:99,defaultValue:function(t){return t===M.CIRCLE||t===M.ELLIPSE?"0.5 0.5":"0 0"},layoutDependent:!0,syntax:b.LENGTH_PERCENTAGE_12},{name:"cx",interpolable:!0,defaultValue:"0",syntax:b.COORDINATE},{name:"cy",interpolable:!0,defaultValue:"0",syntax:b.COORDINATE},{name:"r",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:b.LENGTH_PERCENTAGE},{name:"rx",interpolable:!0,layoutDependent:!0,defaultValue:"auto",syntax:b.LENGTH_PERCENTAGE},{name:"ry",interpolable:!0,layoutDependent:!0,defaultValue:"auto",syntax:b.LENGTH_PERCENTAGE},{name:"x",interpolable:!0,defaultValue:"0",syntax:b.COORDINATE},{name:"y",interpolable:!0,defaultValue:"0",syntax:b.COORDINATE},{name:"z",interpolable:!0,defaultValue:"0",syntax:b.COORDINATE},{name:"width",interpolable:!0,layoutDependent:!0,keywords:["auto","fit-content","min-content","max-content"],defaultValue:"auto",syntax:b.LENGTH_PERCENTAGE},{name:"height",interpolable:!0,layoutDependent:!0,keywords:["auto","fit-content","min-content","max-content"],defaultValue:"auto",syntax:b.LENGTH_PERCENTAGE},{name:"radius",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:b.LENGTH_PERCENTAGE_14},{name:"x1",interpolable:!0,layoutDependent:!0,syntax:b.COORDINATE},{name:"y1",interpolable:!0,layoutDependent:!0,syntax:b.COORDINATE},{name:"z1",interpolable:!0,layoutDependent:!0,syntax:b.COORDINATE},{name:"x2",interpolable:!0,layoutDependent:!0,syntax:b.COORDINATE},{name:"y2",interpolable:!0,layoutDependent:!0,syntax:b.COORDINATE},{name:"z2",interpolable:!0,layoutDependent:!0,syntax:b.COORDINATE},{name:"path",interpolable:!0,layoutDependent:!0,defaultValue:"",alias:["d"],syntax:b.PATH,parsePriority:50},{name:"points",layoutDependent:!0,syntax:b.LIST_OF_POINTS,parsePriority:50},{name:"text",layoutDependent:!0,defaultValue:"",syntax:b.TEXT,parsePriority:50},{name:"textTransform",layoutDependent:!0,inherited:!0,keywords:["capitalize","uppercase","lowercase","none"],defaultValue:"none",syntax:b.TEXT_TRANSFORM,parsePriority:51},{name:"font",layoutDependent:!0},{name:"fontSize",interpolable:!0,inherited:!0,defaultValue:"16px",layoutDependent:!0,syntax:b.LENGTH_PERCENTAGE},{name:"fontFamily",layoutDependent:!0,inherited:!0,defaultValue:"sans-serif"},{name:"fontStyle",layoutDependent:!0,inherited:!0,keywords:["normal","italic","oblique"],defaultValue:"normal"},{name:"fontWeight",layoutDependent:!0,inherited:!0,keywords:["normal","bold","bolder","lighter"],defaultValue:"normal"},{name:"fontVariant",layoutDependent:!0,inherited:!0,keywords:["normal","small-caps"],defaultValue:"normal"},{name:"lineHeight",layoutDependent:!0,syntax:b.LENGTH,interpolable:!0,defaultValue:"0"},{name:"letterSpacing",layoutDependent:!0,syntax:b.LENGTH,interpolable:!0,defaultValue:"0"},{name:"miterLimit",layoutDependent:!0,syntax:b.NUMBER,defaultValue:function(t){return t===M.PATH||t===M.POLYGON||t===M.POLYLINE?"4":"10"}},{name:"wordWrap",layoutDependent:!0},{name:"wordWrapWidth",layoutDependent:!0},{name:"leading",layoutDependent:!0},{name:"textBaseline",layoutDependent:!0,inherited:!0,keywords:["top","hanging","middle","alphabetic","ideographic","bottom"],defaultValue:"alphabetic"},{name:"textAlign",layoutDependent:!0,inherited:!0,keywords:["start","center","end","left","right"],defaultValue:"start"},{name:"whiteSpace",layoutDependent:!0},{name:"markerStart",syntax:b.MARKER},{name:"markerEnd",syntax:b.MARKER},{name:"markerMid",syntax:b.MARKER},{name:"markerStartOffset",syntax:b.LENGTH,layoutDependent:!0,interpolable:!0,defaultValue:"0"},{name:"markerEndOffset",syntax:b.LENGTH,layoutDependent:!0,interpolable:!0,defaultValue:"0"}],Lf=function(){function t(){this.dirty=!1,this.cache={},this.unresolvedProperties={},this.propertySyntaxFactory=void 0,this.sceneGraphService=void 0,this.cascadeProperties={}}var e=t.prototype;return e.init=function(){var e=this;Nf.forEach(function(t){e.registerMetadata(t)})},e.registerMetadata=function(e){var n=this;[e.name].concat(e.alias||[]).forEach(function(t){n.cache[t]=e})},e.unregisterMetadata=function(t){delete this.cache[t]},e.getMetadata=function(t){return this.cache[t]},e.getPropertySyntax=function(t){return this.propertySyntaxFactory(t)},e.processProperties=function(n,r,t){var i=this,t=t=void 0===t?{skipUpdateAttribute:!1,skipParse:!1}:t,o=t.skipUpdateAttribute,t=t.skipParse,a=!1,e=(Object.keys(r).forEach(function(t){var t=iu(t,r[t]),e=t[0],t=t[1];o||(n.attributes[e]=t),!a&&null!=(t=i.getMetadata(e))&&t.layoutDependent&&(a=!0)}),Object.keys(r).sort(function(t,e){return((null==(t=i.getMetadata(t))?void 0:t.parsePriority)||0)-((null==(t=i.getMetadata(e))?void 0:t.parsePriority)||0)})),s=(t||e.forEach(function(t){n.computedStyle[t]=i.parseProperty(t,n.attributes[t],n)}),!1);e.forEach(function(t){t in n.computedStyle&&(s=i.computeProperty(t,n.computedStyle[t],n))}),s?this.dirty=!0:(a&&this.updateGeometry(n),e.forEach(function(t){t in n.parsedStyle&&i.postProcessProperty(t,n)}),e.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=this.getMetadata(t),i=e;return"unset"===(e=""!==e&&!T(e)?e:"unset")||"initial"===e||"inherit"===e?i=new Ku(e):t&&(r=t.keywords,t=(t=t.syntax)&&this.getPropertySyntax(t),r&&-1<r.indexOf(e)?i=new Ku(e):t&&t.parser&&(i=t.parser(e,n))),i},e.computeProperty=function(t,e,n){var r=this.getMetadata(t),i="g-root"===n.id,o=e instanceof Zu?e.clone():e;if(r){var a=r.syntax,s=r.inherited,r=r.defaultValue;if(e instanceof Ku){var l=e.value;if("initial"===(l="unset"===l?s&&!i?"inherit":"initial":l))T(r)||(e=this.parseProperty(t,_s(r)?r(n.nodeName):r,n));else if("inherit"===l)return(s=this.tryToResolveProperty(n,t,{inherited:!0}))?(n.parsedStyle[t]=s,!1):(this.addUnresolveProperty(n,t),!0)}i=a&&this.getPropertySyntax(a);o=i&&i.calculator?(r=n.parsedStyle[t],i.calculator(t,r,e,n,this)):e}return n.parsedStyle[t]=o,!1},e.postProcessProperty=function(t,e){var t=this.getMetadata(t);t&&t.syntax&&((t=t.syntax&&this.getPropertySyntax(t.syntax))&&t.postProcessor&&t.postProcessor(e))},e.isPropertyResolved=function(t,e){return!this.unresolvedProperties[t.entity]||0===this.unresolvedProperties[t.entity].length||this.unresolvedProperties[t.entity].includes(e)},e.addUnresolveProperty=function(t,e){this.unresolvedProperties[t.entity]||(this.unresolvedProperties[t.entity]=[]),-1===this.unresolvedProperties[t.entity].indexOf(e)&&this.unresolvedProperties[t.entity].push(e)},e.tryToResolveProperty=function(t,e,n){var n=(n=void 0===n?{}:n).inherited;if(n&&(t.parentElement&&this.isPropertyResolved(t.parentElement,e)))return(!((n=t.parentElement.parsedStyle[e])instanceof Ku)||"unset"!==n.value&&"initial"!==n.value&&"inherit"!==n.value)&&(!(n instanceof P&&P.isRelativeUnit(n.unit))&&n);return!1},e.recalc=function(e){var n,t=this.unresolvedProperties[e.entity];t&&t.length&&(n={},t.forEach(function(t){n[t]=e.attributes[t]}),this.processProperties(e,n),delete this.unresolvedProperties[e.entity])},e.updateGeometry=function(t){var s,e,n,r,i,o,a,l,u,c,h,d,f,p,y,g,v,m=Zr.get(Zd)(t.nodeName);m&&((s=t.geometry).contentBounds||(s.contentBounds=new Oc),s.renderBounds||(s.renderBounds=new Oc),e=t.parsedStyle,p=(m=m.update(e,t)).width,v=m.height,h=void 0===(h=m.depth)?0:h,c=void 0===(c=m.offsetX)?0:c,u=void 0===(u=m.offsetY)?0:u,m=void 0===(m=m.offsetZ)?0:m,n=p<0,r=v<0,h=E(Math.abs(p)/2,Math.abs(v)/2,h/2),l=e.stroke,y=e.lineWidth,g=e.increasedLineWidthForHitTesting,f=e.shadowType,d=e.shadowColor,i=void 0===(i=e.filter)?[]:i,o=e.transformOrigin,a=e.anchor,t.nodeName===M.TEXT&&delete e.anchor,c=E((1-2*(a&&a[0].value||0))*p/2+c,(1-2*(a&&a[1].value||0))*v/2+u,(1-2*(a&&(null==(p=a[2])?void 0:p.value)||0))*h[2]+m),s.contentBounds.update(c,h),v=t.nodeName===M.POLYLINE||t.nodeName===M.POLYGON||t.nodeName===M.PATH?Math.SQRT2:.5,l&&!l.isNone&&Hi(h,h,E(u=(((null==y?void 0:y.value)||0)+((null==g?void 0:g.value)||0))*v,u,0)),s.renderBounds.update(c,h),d&&"inner"!==(null==f?void 0:f.value)&&(m=(p=s.renderBounds).min,l=p.max,y=e.shadowBlur,g=e.shadowOffsetX,v=e.shadowOffsetY,u=y&&y.value||0,c=g&&g.value||0,h=v&&v.value||0,d=m[0]-u+c,f=l[0]+u+c,p=m[1]-u+h,y=l[1]+u+h,m[0]=Math.min(m[0],d),l[0]=Math.max(l[0],f),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,o,a=t.name,t=t.params;"blur"===a?(i=t[0].value,s.renderBounds.update(s.renderBounds.center,Hi(s.renderBounds.halfExtents,s.renderBounds.halfExtents,E(i,i,0)))):"drop-shadow"===a&&(i=t[0].value,a=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,o=e[1]-t+a,t=n[1]+t+a,e[0]=Math.min(e[0],r),n[0]=Math.max(n[0],i),e[1]=Math.min(e[1],o),n[1]=Math.max(n[1],t),s.renderBounds.setMinMax(e,n))}),a=e.anchor,g=(n?-1:1)*Vc(o[0],0,t),v=(r?-1:1)*Vc(o[1],1,t),g-=(n?-1:1)*(a&&a[0].value||0)*s.contentBounds.halfExtents[0]*2,v-=(r?-1:1)*(a&&a[1].value||0)*s.contentBounds.halfExtents[1]*2,t.setOrigin(g,v),this.sceneGraphService.dirtifyToRoot(t))},e.isPropertyInheritable=function(t){t=this.getMetadata(t);return!!t&&t.inherited},t}(),o=(t([p(Eh),e("design:type",Function)],Lf.prototype,"propertySyntaxFactory",void 0),t([p(Cd),e("design:type",Object)],Lf.prototype,"sceneGraphService",void 0),t([V.postConstruct(),e("design:type",Function),e("design:paramtypes",[]),e("design:returntype",void 0)],Lf.prototype,"init",null),Lf=t([f({token:Bl})],Lf),Hr(function(t){V.decorate(Mr(),Eo.exports.EventEmitter),t(Ih),t(Sd),t({token:kd,useFactory:function(t){return function(){return t.container.get(Ed)}}}),t(Nd),t(Hd),t(Xd),t($d),t(Jd),t(Qd),t(tf),t(ef),t(nf),t(rf),t({token:Zd,useFactory:function(e){var n={};return function(t){return n[t]||e.container.isBoundNamed(Kd,t)&&(n[t]=e.container.getNamed(Kd,t)),n[t]}}}),t(xf),t(Sh),t(of),t(af),t(sf),t(yf),t(gf),t(vf),t(mf),t(wf),t(kf),t(Ef),t(_f),t(Sf),t(Mf),t(Tf),t(Of),t(Pf),t(Af),t(Cf),t(bf),t({token:Eh,useFactory:function(e){var n={};return function(t){return n[t]||e.container.isBoundNamed(_h,t)&&(n[t]=e.container.getNamed(_h,t)),n[t]}}}),t(Lf),t(Vu),t(Gu),t(zu),t({token:ju,useFactory:function(n){return function(t){var e=n.container.createChild();return e.register({token:Bu,useValue:t}),e.get(zu)}}}),t({token:ds,useFactory:function(o){return function(t){var e=o.container.createChild(),n=(e.register(ys),e.register(Du),e.register({token:Iu,useFactory:function(n){return function(t){var e=n.container.createChild();return e.register({token:Ru,useValue:t}),e.get(Du)}}}),e.register(bs),e.register({token:gs,useFactory:function(r){return function(t,e){var n=r.container.createChild();return n.register({token:vs,useValue:t}),n.register({token:ms,useValue:e}),n.get(bs)}}}),e.register(Uu),e.register({token:Hu,useFactory:function(n){return function(t){var e=n.container.createChild();return e.register({token:Wu,useValue:t}),e.get(Uu)}}}),e.get(Iu)),r=e.get(Hu),i=e.get(gs);return e.register({token:fs,useValue:is({},t,{layoutChildrenFactory:n,layoutFragmentFactory:r,fragmentResultFactory:i})}),e.get(ys)}}})})),H=function(){function t(t){this.plugins=[],this.config=void 0,this.config=is({enableDirtyCheck:!0,enableCulling:!1,enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1},t)}var e=t.prototype;return e.registerPlugin=function(t){this.plugins.push(t)},e.unregisterPlugin=function(e){var t=this.plugins.findIndex(function(t){return t===e});-1<t&&this.plugins.splice(t,1)},e.getPlugins=function(){return this.plugins},e.getPlugin=function(e){return this.plugins.find(function(t){return t.name===e})},e.getConfig=function(){return this.config},e.setConfig=function(t){Object.assign(this.config,t)},t}(),If=d.defineToken("CullingStrategyContribution"),Rf=((tt=function(){function t(){this.strategyProvider=void 0,this.renderingContext=void 0}return t.prototype.apply=function(t){var n=this,r=this.strategyProvider.getContributions();t.hooks.cull.tap(cf.tag,function(e){var t;return e&&(t=e.cullable,0===r.length?t.visible=-1<n.renderingContext.unculledEntities.indexOf(e.entity):t.visible=r.every(function(t){return t.isVisible(e)}),!t.isCulled()&&e.isVisible()?e:(e.dispatchEvent(new Th(m.CULLED)),null))}),t.hooks.afterRender.tap(cf.tag,function(t){t.cullable.visibilityPlaneMask=-1})},t}()).tag="Culling",cf=tt),Df=(t([Ur(If),e("design:type",Object)],Rf.prototype,"strategyProvider",void 0),t([p(Id),e("design:type",Object)],Rf.prototype,"renderingContext",void 0),Rf=cf=t([f({contrib:zd})],Rf),(u=function(){function t(){}return t.prototype.apply=function(e){e.hooks.dirtycheck.tap(hf.tag,function(t){return t&&(t.renderable.dirty||e.disableDirtyRectangleRendering()?t:null)})},t}()).tag="DirtyCheck",hf=u),Df=hf=t([f({contrib:zd})],Df),jf=((dt=function(){function t(){var o=this;this.canvasConfig=void 0,this.contextService=void 0,this.renderingService=void 0,this.renderingContext=void 0,this.eventService=void 0,this.autoPreventDefault=!1,this.rootPointerEvent=new fd(null),this.rootWheelEvent=new pd(null),this.onPointerMove=function(t){var e,n=null==(e=o.renderingContext.root)||null==(e=e.ownerDocument)?void 0:e.defaultView;if(!n.supportsTouchEvents||"touch"!==t.pointerType){for(var r=cs(o.normalizeToPointerEvent(t,n));!(i=r()).done;){var i=i.value,i=o.bootstrapEvent(o.rootPointerEvent,i,n);o.eventService.mapEvent(i)}o.setCursor(o.eventService.cursor)}}}var e=t.prototype;return e.apply=function(t){var o=this,a=this.renderingContext.root.ownerDocument.defaultView;this.eventService.setPickHandler(function(){var e=es(_().mark(function t(e){var n;return _().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o.renderingService.hooks.pick.promise({position:e,picked:[],topmost:!0});case 2:return n=t.sent,n=n.picked,t.abrupt("return",n[0]||null);case 5:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}()),t.hooks.pointerWheel.tap(df.tag,function(t){t=o.normalizeWheelEvent(t);o.eventService.mapEvent(t)}),t.hooks.pointerDown.tap(df.tag,function(t){if(!a.supportsTouchEvents||"touch"!==t.pointerType){var e=o.normalizeToPointerEvent(t,a);!o.autoPreventDefault||!e[0].isNormalized||!t.cancelable&&"cancelable"in t||t.preventDefault();for(var n=cs(e);!(r=n()).done;){var r=r.value,r=o.bootstrapEvent(o.rootPointerEvent,r,a);o.eventService.mapEvent(r)}o.setCursor(o.eventService.cursor)}}),t.hooks.pointerUp.tap(df.tag,function(t){if(!a.supportsTouchEvents||"touch"!==t.pointerType){for(var e=o.contextService.getDomElement(),n=e&&t.target&&t.target!==e&&e.contains&&!e.contains(t.target)?"outside":"",r=cs(o.normalizeToPointerEvent(t,a));!(i=r()).done;){var i=i.value,i=o.bootstrapEvent(o.rootPointerEvent,i,a);i.type+=n,o.eventService.mapEvent(i)}o.setCursor(o.eventService.cursor)}}),t.hooks.pointerMove.tap(df.tag,this.onPointerMove),t.hooks.pointerOver.tap(df.tag,this.onPointerMove),t.hooks.pointerOut.tap(df.tag,this.onPointerMove)},e.bootstrapEvent=function(t,e,n){t.view=n,t.originalEvent=null,t.nativeEvent=e,t.pointerId=e.pointerId,t.width=e.width,t.height=e.height,t.isPrimary=e.isPrimary,t.pointerType=e.pointerType,t.pressure=e.pressure,t.tangentialPressure=e.tangentialPressure,t.tiltX=e.tiltX,t.tiltY=e.tiltY,t.twist=e.twist,this.transferMouseData(t,e);var n=this.eventService.client2Viewport(new Cc(e.clientX,e.clientY)),r=n.x,n=n.y,r=(t.viewport.x=r,t.viewport.y=n,this.eventService.viewport2Canvas(t.viewport)),n=r.x,r=r.y;return t.canvas.x=n,t.canvas.y=r,t.global.copyFrom(t.canvas),t.offset.copyFrom(t.canvas),t.isTrusted=e.isTrusted,"pointerleave"===t.type&&(t.type="pointerout"),t.type.startsWith("mouse")&&(t.type=t.type.replace("mouse","pointer")),t.type.startsWith("touch")&&(t.type=pl[t.type]||t.type),t},e.normalizeWheelEvent=function(t){var e=this.rootWheelEvent,n=(this.transferMouseData(e,t),e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ,this.eventService.client2Viewport(new Cc(t.clientX,t.clientY))),r=n.x,n=n.y,r=(e.viewport.x=r,e.viewport.y=n,this.eventService.viewport2Canvas(e.viewport)),n=r.x,r=r.y;return e.canvas.x=n,e.canvas.y=r,e.global.copyFrom(e.canvas),e.offset.copyFrom(e.canvas),e.nativeEvent=t,e.type=t.type,e},e.transferMouseData=function(t,e){t.isTrusted=e.isTrusted,t.srcElement=e.srcElement,t.timeStamp=performance.now(),t.type=e.type,t.altKey=e.altKey,t.metaKey=e.metaKey,t.shiftKey=e.shiftKey,t.ctrlKey=e.ctrlKey,t.button=e.button,t.buttons=e.buttons,t.client.x=e.clientX,t.client.y=e.clientY,t.movement.x=e.movementX,t.movement.y=e.movementY,t.page.x=e.pageX,t.page.y=e.pageY,t.screen.x=e.screenX,t.screen.y=e.screenY,t.relatedTarget=null},e.setCursor=function(t){this.contextService.applyCursorStyle(t||this.canvasConfig.cursor||"default")},e.normalizeToPointerEvent=function(t,e){var n=[];if(e.isTouchEvent(t))for(var r=0;r<t.changedTouches.length;r++){var i=t.changedTouches[r];ks(i.button)&&(i.button=0),ks(i.buttons)&&(i.buttons=1),ks(i.isPrimary)&&(i.isPrimary=1===t.touches.length&&"touchstart"===t.type),ks(i.width)&&(i.width=i.radiusX||1),ks(i.height)&&(i.height=i.radiusY||1),ks(i.tiltX)&&(i.tiltX=0),ks(i.tiltY)&&(i.tiltY=0),ks(i.pointerType)&&(i.pointerType="touch"),ks(i.pointerId)&&(i.pointerId=i.identifier||0),ks(i.pressure)&&(i.pressure=i.force||.5),ks(i.twist)&&(i.twist=0),ks(i.tangentialPressure)&&(i.tangentialPressure=0),i.isNormalized=!0,i.type=t.type,n.push(i)}else e.isMouseEvent(t)?(ks((e=t).isPrimary)&&(e.isPrimary=!0),ks(e.width)&&(e.width=1),ks(e.height)&&(e.height=1),ks(e.tiltX)&&(e.tiltX=0),ks(e.tiltY)&&(e.tiltY=0),ks(e.pointerType)&&(e.pointerType="mouse"),ks(e.pointerId)&&(e.pointerId=1),ks(e.pressure)&&(e.pressure=.5),ks(e.twist)&&(e.twist=0),ks(e.tangentialPressure)&&(e.tangentialPressure=0),e.isNormalized=!0,n.push(e)):n.push(t);return n},t}()).tag="Event",df=dt),Bf=(t([p(ou),e("design:type",Object)],jf.prototype,"canvasConfig",void 0),t([p(Ld),e("design:type",Object)],jf.prototype,"contextService",void 0),t([p(Vd),e("design:type",Vd)],jf.prototype,"renderingService",void 0),t([p(Id),e("design:type",Object)],jf.prototype,"renderingContext",void 0),t([p(Gd),e("design:type",Gd)],jf.prototype,"eventService",void 0),jf=df=t([f({contrib:zd})],jf),[M.CIRCLE,M.ELLIPSE,M.IMAGE,M.RECT,M.LINE,M.POLYLINE,M.POLYGON,M.TEXT,M.PATH,M.HTML]),Ff=function(){function t(){this.camera=void 0}var e=t.prototype;return e.isVisible=function(t){var e=t.cullable;if(!e.enable)return!0;var n=t.getRenderBounds();if(Oc.isEmpty(n))return!1;var r=this.camera.getFrustum(),i=null==(i=t.parentNode)||null==(i=i.cullable)?void 0:i.visibilityPlaneMask;return e.visibilityPlaneMask=this.computeVisibilityWithPlaneMask(t,n,i||Tc.INDETERMINATE,r.planes),e.visible=e.visibilityPlaneMask!==Tc.OUTSIDE,e.visible},e.computeVisibilityWithPlaneMask=function(t,e,n,r){if(n===Tc.OUTSIDE||n===Tc.INSIDE)return n;for(var i=Tc.INSIDE,o=-1<Bf.indexOf(t.nodeName),a=0,s=r.length;a<s;++a){var l=1<<a;if(0!=(n&l)&&(!o||4!==a&&5!==a)){var u=r[a],c=u.normal,u=u.distance;if(qi(c,e.getPositiveFarPoint(r[a]))+u<0)return Tc.OUTSIDE;qi(c,e.getNegativeFarPoint(r[a]))+u<0&&(i|=l)}}return i},t}(),zf=(t([p(Rd),e("design:type",Fd)],Ff.prototype,"camera",void 0),Ff=t([f({contrib:If})],Ff),(_t=function(){function t(){this.renderingContext=void 0,this.styleValueRegistry=void 0,this.sceneGraphService=void 0,this.rBush=void 0,this.toSync=new Set}var e=t.prototype;return e.pushToSync=function(t){var e=this;t.forEach(function(t){e.toSync.add(t)})},e.apply=function(r){function e(t){t.target.renderable.dirty=!0,r.dirtify()}function n(t){var e=t.detail.affectChildren,n=t.target;e&&n.forEach(function(t){a.pushToSync([t])}),a.pushToSync(t.composedPath().slice(0,-2)),r.dirtify()}function i(t){var e=t.target;a.pushToSync(t.composedPath().slice(0,-2)),a.styleValueRegistry.recalc(e),a.sceneGraphService.dirtifyToRoot(e),r.dirtify()}function o(t){var e=t.target,n=e.rBushNode;n.aabb&&(a.rBush.remove(n.aabb),a.toSync.delete(e)),a.sceneGraphService.dirtifyToRoot(t.target),r.dirtify()}var a=this;r.hooks.init.tapPromise(ff.tag,es(_().mark(function t(){return _().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:a.renderingContext.root.addEventListener(m.MOUNTED,i),a.renderingContext.root.addEventListener(m.UNMOUNTED,o),a.renderingContext.root.addEventListener(m.ATTR_MODIFIED,e),a.renderingContext.root.addEventListener(m.BOUNDS_CHANGED,n);case 4:case"end":return t.stop()}},t)}))),r.hooks.destroy.tap(ff.tag,function(){a.renderingContext.root.removeEventListener(m.MOUNTED,i),a.renderingContext.root.removeEventListener(m.UNMOUNTED,o),a.renderingContext.root.removeEventListener(m.ATTR_MODIFIED,e),a.renderingContext.root.removeEventListener(m.BOUNDS_CHANGED,n)}),r.hooks.endFrame.tap(ff.tag,function(){a.syncRTree()})},e.syncRTree=function(){var a=this,s=[];Array.from(this.toSync).filter(function(t){return t.isConnected}).forEach(function(t){var e,n,r,i=t.rBushNode,o=(i&&a.rBush.remove(i.aabb),t.getRenderBounds());o&&(e=(n=o.getMin())[0],n=n[1],r=(o=o.getMax())[0],o=o[1],i.aabb={id:t.entity,minX:e,minY:n,maxX:r,maxY:o}),i.aabb&&s.push(i.aabb)}),this.rBush.load(s),s.length=0,this.toSync.clear()},t}()).tag="Prepare",ff=_t),Vf=(t([p(Id),e("design:type",Object)],zf.prototype,"renderingContext",void 0),t([p(Bl),e("design:type",Object)],zf.prototype,"styleValueRegistry",void 0),t([p(Cd),e("design:type",Object)],zf.prototype,"sceneGraphService",void 0),t([p(Ah),e("design:type",Qr)],zf.prototype,"rBush",void 0),zf=ff=t([f({contrib:zd})],zf),Hr(function(t){Yr.register(t,zd,{cache:!1}),Yr.register(t,If,{cache:!1}),t({token:Ah,useValue:new Qr}),t(Vd),t(Gd),t(jf),t(zf),t(Df),t(Rf),t(Ff)})),Gf=((ft=pf=pf||{}).READY="ready",ft.BEFORE_RENDER="beforerender",ft.AFTER_RENDER="afterrender",ft.BEFORE_DESTROY="beforedestroy",ft.AFTER_DESTROY="afterdestroy",ft.RESIZE="resize",ft.DIRTY_RECTANGLE="dirtyrectangle",function(w){function t(t){var e=w.call(this)||this,n=(e.container=Zr.createChild(),e.document=void 0,e.customElements=void 0,e.requestAnimationFrame=void 0,e.cancelAnimationFrame=void 0,e.devicePixelRatio=void 0,e.supportsPointerEvents=void 0,e.supportsTouchEvents=void 0,e.isTouchEvent=void 0,e.isMouseEvent=void 0,e.Element=k,e.frameId=void 0,e.eventService=void 0,e.renderingService=void 0,e.inited=!1,e.readyPromise=void 0,e.resolveReadyPromise=void 0,e.document=new hd,e.document.defaultView=ls(e),e.customElements=new wd,t.container),r=t.canvas,i=t.offscreenCanvas,o=t.width,a=t.height,s=t.devicePixelRatio,l=t.renderer,u=t.background,c=t.cursor,h=t.document,d=t.requestAnimationFrame,f=t.cancelAnimationFrame,p=t.createImage,y=t.supportsPointerEvents,g=t.supportsTouchEvents,v=t.isTouchEvent,t=t.isMouseEvent,m=(m=n,b=ls(e),m&&(m="string"==typeof m?m:m.id||Os++,Ts[m]&&Ts[m].destroy(),Ts[m]=b),o),b=a,x=s;return r&&(x=1<=(x=s||As&&window.devicePixelRatio||1)?Math.ceil(x):1,m=o||("auto"===(o=fl(s=r,"width"))?s.offsetWidth:parseFloat(o))||r.width/x,b=a||("auto"===(o=fl(s=r,"height"))?s.offsetHeight:parseFloat(o))||r.height/x),e.devicePixelRatio=x,e.requestAnimationFrame=null!=d?d:Ja.bind(globalThis),e.cancelAnimationFrame=null!=f?f:Qa.bind(globalThis),e.supportsTouchEvents=null!=g?g:"ontouchstart"in globalThis,e.supportsPointerEvents=null!=y?y:!!globalThis.PointerEvent,e.isTouchEvent=null!=v?v:function(t){return e.supportsTouchEvents&&t instanceof globalThis.TouchEvent},e.isMouseEvent=null!=t?t:function(t){return!globalThis.MouseEvent||t instanceof globalThis.MouseEvent&&(!e.supportsPointerEvents||!(t instanceof globalThis.PointerEvent))},e.initRenderingContext({container:n,canvas:r,width:m,height:b,renderer:l,offscreenCanvas:i,devicePixelRatio:x,cursor:c||"default",background:u,createImage:p,document:h}),e.initDefaultCamera(m,b),es(_().mark(function t(){return _().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.initRenderer(l);case 2:e.dispatchEvent(new Th(pf.READY)),e.readyPromise&&e.resolveReadyPromise();case 4:case"end":return t.stop()}},t)}))(),e}g(t,w);var e=t.prototype;return e.initRenderingContext=function(t){var e=this;this.container.register({token:ou,useValue:t}),this.container.register({token:Id,useValue:{root:this.document.documentElement,renderListCurrentFrame:[],unculledEntities:[],renderReasons:new Set,force:!1,dirty:!1}}),this.document.documentElement.addEventListener(m.CHILD_INSERTED,function(t){e.mountChildren(t.detail.child)}),this.document.documentElement.addEventListener(m.CHILD_REMOVED,function(t){e.unmountChildren(t.detail.child)})},e.initDefaultCamera=function(t,e){var t=(new Fd).setPosition(t/2,e/2,500).setFocalPoint(t/2,e/2,0).setOrthographic(t/-2,t/2,e/2,e/-2,.1,1e3),n=(t.canvas=this).container.get(Id);t.on(Dd,function(){n.renderReasons.add(Td.CAMERA_CHANGED)}),this.container.register({token:Rd,useValue:t})},e.getConfig=function(){return this.container.get(ou)},e.getContainer=function(){return this.container},e.getRoot=function(){return this.document.documentElement},e.getCamera=function(){return this.container.get(Rd)},e.getContextService=function(){return this.container.get(Ld)},e.getEventService=function(){return this.eventService},e.getRenderingService=function(){return this.renderingService},e.getRenderingContext=function(){return this.container.get(Id)},e.getStats=function(){return this.getRenderingService().getStats()},e.destroy=function(t,e){void 0===t&&(t=!0),(e=void 0===e?!1:e)||this.dispatchEvent(new Th(pf.BEFORE_DESTROY)),this.frameId&&(this.getConfig().cancelAnimationFrame||cancelAnimationFrame)(this.frameId);var n=this.getRoot();this.unmountChildren(n),t&&this.document.destroy(),this.getContextService().destroy(),this.getRenderingService().destroy(),e||this.dispatchEvent(new Th(pf.AFTER_DESTROY))},e.changeSize=function(t,e){this.resize(t,e)},e.resize=function(t,e){var n=this.container.get(ou),n=(n.width=t,n.height=e,this.getContextService().resize(t,e),this.container.get(Rd)),r=n.getProjectionMode();n.setPosition(t/2,e/2,500).setFocalPoint(t/2,e/2,0),r===Ad.ORTHOGRAPHIC?n.setOrthographic(t/-2,t/2,e/2,e/-2,n.getNear(),n.getFar()):n.setAspect(t/e),this.dispatchEvent(new Th(pf.RESIZE,{width:t,height:e}))},e.appendChild=function(t,e){return this.document.documentElement.appendChild(t,e)},e.insertBefore=function(t,e){return this.document.documentElement.insertBefore(t,e)},e.removeChild=function(t,e){return this.document.documentElement.removeChild(t,e=void 0===e?!0:e)},e.removeChildren=function(t){this.document.documentElement.removeChildren(t=void 0===t?!0:t)},e.render=function(){this.dispatchEvent(new Th(pf.BEFORE_RENDER)),this.container.isBound(Vd)&&this.container.get(Vd).render(this.getConfig()),this.dispatchEvent(new Th(pf.AFTER_RENDER))},e.run=function(){var e=this;(function t(){e.render(),e.frameId=requestAnimationFrame(t)})()},e.initRenderer=function(){var e=es(_().mark(function t(e){var n;return _().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e){t.next=2;break}throw new Error("Renderer is required.");case 2:return this.inited=!1,this.readyPromise=void 0,this.loadCommonContainerModule(),this.loadRendererContainerModule(e),n=this.container.get(Ld),this.renderingService=this.container.get(Vd),this.eventService=this.container.get(Gd),t.next=11,n.init();case 11:return t.next=13,this.renderingService.init();case 13:this.inited=!0,this.getRoot().forEach(function(t){t=t.renderable;t&&(t.renderBoundsDirty=!0,t.boundsDirty=!0,t.dirty=!0)}),this.mountChildren(this.getRoot()),e.getConfig().enableAutoRendering&&this.run();case 17:case"end":return t.stop()}},t,this)}));return function(t){return e.apply(this,arguments)}}(),e.loadCommonContainerModule=function(){this.container.unload(Vf),this.container.load(Vf,!0)},e.loadRendererContainerModule=function(t){var e=this;t.getPlugins().forEach(function(t){t.container=e.container,t.init()})},e.setRenderer=function(){var e=es(_().mark(function t(e){var n,r;return _().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((n=this.getConfig()).renderer===e)return t.abrupt("return");t.next=3;break;case 3:return r=n.renderer,n.renderer=e,this.destroy(!1,!0),[].concat(null==r?void 0:r.getPlugins()).reverse().forEach(function(t){t.destroy()}),t.next=9,this.initRenderer(e);case 9:case"end":return t.stop()}},t,this)}));return function(t){return e.apply(this,arguments)}}(),e.setCursor=function(t){this.container.get(ou).cursor=t,this.getContextService().applyCursorStyle(t)},e.unmountChildren=function(t){var e,n=this;this.inited&&(e=[],t.forEach(function(t){t.isConnected&&e.push(t)}),e.reverse().forEach(function(t){t instanceof jh&&t.disconnectedCallback&&t.disconnectedCallback(),t.dispatchEvent(new Th(m.UNMOUNTED)),t!==n.document.documentElement&&(t.ownerDocument=null),t.isConnected=!1}))},e.mountChildren=function(t){var e=this;this.inited?t.forEach(function(t){t.isConnected||(t.ownerDocument=e.document,t.isConnected=!0,t.dispatchEvent(new Th(m.MOUNTED)),t instanceof jh&&t.connectedCallback&&t.connectedCallback())}):console.warn("[g]: You are trying to call `canvas.appendChild` before canvas' initialization finished. You can either await `canvas.ready` or listen to `CanvasEvent.READY` manually.","appended child: ",t.nodeName)},e.client2Viewport=function(t){return this.getEventService().client2Viewport(t)},e.viewport2Client=function(t){return this.getEventService().viewport2Client(t)},e.viewport2Canvas=function(t){return this.getEventService().viewport2Canvas(t)},e.canvas2Viewport=function(t){return this.getEventService().canvas2Viewport(t)},e.getPointByClient=function(t,e){return this.client2Viewport({x:t,y:e})},e.getClientByPoint=function(t,e){return this.viewport2Client({x:t,y:e})},rs(t,[{key:"ready",get:function(){var e=this;return this.readyPromise||(this.readyPromise=new Promise(function(t){e.resolveReadyPromise=function(){t(e)}}),this.inited&&this.resolveReadyPromise()),this.readyPromise}}]),t}(ge)),Hf=(Zr.load(o),Zr.get(Gu)),Wf=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},Uf={}.toString,Yf=function(t,e){return Uf.call(t)==="[object "+e+"]"},qf=function(t){return Yf(t,"Function")},Xf=function(t){return null==t},Zf=function(t){return Array.isArray?Array.isArray(t):Yf(t,"Array")},Kf=function(t){var e=typeof t;return null!==t&&"object"==e||"function"==e};function $f(t,e){if(t)if(Zf(t))for(var n=0,r=t.length;n<r&&!1!==e(t[n],n);n++);else if(Kf(t))for(var i in t)if(t.hasOwnProperty(i)&&!1===e(t[i],i))break}function Jf(t){return"object"==typeof t&&null!==t}function Qf(t){if(Zf(t))return t.reduce(function(t,e){return Math.max(t,e)},t[0])}function tp(t){if(Zf(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])}var ep=function(t){if(!Jf(t)||!Yf(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},np=function(t){return Yf(t,"String")};function rp(t){if(Wf(t))return t[0]}function ip(t){if(Wf(t))return t[t.length-1]}function op(t,e,n){return t<e?e:n<t?n:t}function ap(t){return Yf(t,"Number")}var sp=1e-5;function lp(t,e,n){return void 0===n&&(n=sp),Math.abs(t-e)<n}var up=function(t,e){if(Zf(t)){for(var n,r=-1/0,i=0;i<t.length;i++){var o=t[i],a=qf(e)?e(o):o[e];r<a&&(n=o,r=a)}return n}},cp=function(t,e){if(Zf(t)){for(var n,r=1/0,i=0;i<t.length;i++){var o=t[i],a=qf(e)?e(o):o[e];a<r&&(n=o,r=a)}return n}},hp=Object.values?function(t){return Object.values(t)}:function(n){var r=[];return $f(n,function(t,e){qf(n)&&"prototype"===e||r.push(t)}),r},dp=function(t){return Xf(t)?"":t.toString()};function fp(t){return null===t}function pp(t){return void 0===t}function yp(t){return t instanceof Element||t instanceof HTMLDocument}var gp=function(t){t=dp(t);return t.charAt(0).toUpperCase()+t.substring(1)};function vp(t,e){for(var n in e)e.hasOwnProperty(n)&&"constructor"!==n&&void 0!==e[n]&&(t[n]=e[n])}function mp(t,e,n,r){return e&&vp(t,e),n&&vp(t,n),r&&vp(t,r),t}function bp(o,a){if(qf(o))return s.cache=new Map,s;function s(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=a?a.apply(this,t):t[0],r=s.cache;if(r.has(n))return r.get(n);var i=o.apply(this,t);return r.set(n,i),i}throw new TypeError("Expected a function")}var xp=function(t){if("object"!=typeof t||null===t)return t;if(Zf(t))for(var e=[],n=0,r=t.length;n<r;n++)"object"==typeof t[n]&&null!=t[n]?e[n]=xp(t[n]):e[n]=t[n];else for(var i in e={},t)"object"==typeof t[i]&&null!=t[i]?e[i]=xp(t[i]):e[i]=t[i];return e},wp=5;function kp(t,e,n){for(var r=0,i=np(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return void 0===t||r<i.length?n:t}function Ep(e,t){if(null===e||!ep(e))return{};var n={};return $f(t,function(t){Cp.call(e,t)&&(n[t]=e[t])}),n}function _p(t,r){var n=function(t,e,n){return r.includes(n)||(t[n]=e),t},e={};if(!Zf(t)&&!ep(t))return t;var i=e;return $f(t,function(t,e){i=n(i,t,e)}),i}function Sp(n,r,i){function o(){c=!1===i.leading?0:Date.now(),a=null,u=n.apply(s,l),a||(s=l=null)}function t(){var t=Date.now(),e=(c||!1!==i.leading||(c=t),r-(t-c));return s=this,l=arguments,e<=0||r<e?(a&&(clearTimeout(a),a=null),c=t,u=n.apply(s,l),a||(s=l=null)):a||!1===i.trailing||(a=setTimeout(o,e)),u}var a,s,l,u,c=0;return i=i||{},t.cancel=function(){clearTimeout(a),c=0,a=s=l=null},t}function Mp(){}function Tp(t){return t}var Op,C=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 o in r=r||0,i=i||wp,n){var a;n.hasOwnProperty(o)&&(null!==(a=n[o])&&ep(a)?(ep(e[o])||(e[o]={}),r<i?t(e[o],a,r+1,i):e[o]=n[o]):Zf(a)?(e[o]=[],e[o]=e[o].concat(a)):void 0!==a&&(e[o]=a))}}(t,e[r]);return t},Pp=function(t,e){if(!Wf(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},Ap=function(t,e){if(t===e)return!0;if(t&&e&&!np(t)&&!np(e)){if(Wf(t)||Wf(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=Ap(t[r],e[r]));r++);return n}if(Jf(t)||Jf(e)){var i=Object.keys(t),o=Object.keys(e);if(i.length!==o.length)return!1;for(n=!0,r=0;r<i.length&&(n=Ap(t[i[r]],e[i[r]]));r++);return n}}return!1},Cp=Object.prototype.hasOwnProperty;function Np(t){return Xf(t)?0:(Wf(t)?t:Object.keys(t)).length}var Lp=bp(function(t,e){var n=(e=void 0===e?{}:e).fontSize,r=e.fontFamily,i=e.fontWeight,o=e.fontStyle,e=e.fontVariant;return(Op=Op||document.createElement("canvas").getContext("2d")).font=[o,e,i,n+"px",r].join(" "),Op.measureText(np(t)?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 o=arguments[e],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}([t],hp(e=void 0===e?{}:e)).join("")});function Ip(t,e){return(Ip=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var Rp=d.defineToken("PathGeneratorFactory"),Dp=d.defineToken("PathGenerator");function jp(t,e){e=e.r;t.arc(e.value,e.value,e.value,0,2*Math.PI,!1)}function Bp(t,e){var n,r,i=e.rx,e=e.ry,i=i.value,e=e.value;t.ellipse?t.ellipse(i,e,i,e,0,0,2*Math.PI,!1):(n=e<i?i:e,r=e<i?1:i/e,e=e<i?e/i:1,t.save(),t.scale(r,e),t.arc(0,0,n,0,2*Math.PI))}function Fp(t,e){var n,r,i=e.x1,o=e.y1,a=e.x2,s=e.y2,l=e.defX,l=void 0===l?0:l,u=e.defY,u=void 0===u?0:u,c=e.markerStart,h=e.markerEnd,d=e.markerStartOffset,e=e.markerEndOffset,f=0,p=0,y=0,g=0,v=0;c&&c instanceof k&&d&&(n=a.value-i.value,r=s.value-o.value,v=Math.atan2(r,n),f=Math.cos(v)*((null==d?void 0:d.value)||0),p=Math.sin(v)*((null==d?void 0:d.value)||0)),h&&h instanceof k&&e&&(n=i.value-a.value,r=o.value-s.value,v=Math.atan2(r,n),y=Math.cos(v)*((null==e?void 0:e.value)||0),g=Math.sin(v)*((null==e?void 0:e.value)||0)),t.moveTo(i.value-l+f,o.value-u+p),t.lineTo(a.value-l+y,s.value-u+g)}function zp(t,e){var n,r,i=e.defX,o=void 0===i?0:i,i=e.defY,a=void 0===i?0:i,i=e.markerStart,s=e.markerEnd,l=e.markerStartOffset,u=e.markerEndOffset,e=e.path,c=e.curve,e=e.zCommandIndexes,h=[].concat(c),d=(e.forEach(function(t,e){h.splice(t+e,1,["Z"])}),"Z"===h[h.length-1][0]),f=0,p=0,y=0,g=0,c=0;i&&i instanceof k&&l&&(i=(e=i.parentNode.getStartTangent())[0],e=e[1],n=i[0]-e[0],r=i[1]-e[1],c=Math.atan2(r,n),f=Math.cos(c)*((null==l?void 0:l.value)||0),p=Math.sin(c)*((null==l?void 0:l.value)||0)),s&&s instanceof k&&u&&(e=(i=s.parentNode.getEndTangent())[0],l=i[1],n=e[0]-l[0],r=e[1]-l[1],c=Math.atan2(r,n),y=Math.cos(c)*((null==u?void 0:u.value)||0),g=Math.sin(c)*((null==u?void 0:u.value)||0));for(var v=0;v<h.length;v++){var m=h[v];switch(m[0]){case"M":t.moveTo(m[1]-o+f,m[2]-a+p);break;case"C":var b=v===h.length-(d?2:1)?y:0,x=v===h.length-(d?2:1)?g:0;t.bezierCurveTo(m[1]-o,m[2]-a,m[3]-o,m[4]-a,m[5]-o+b,m[6]-a+x);break;case"Z":t.closePath()}}}function Vp(t,e){var n,r,i=e.defX,o=void 0===i?0:i,i=e.defY,a=void 0===i?0:i,i=e.markerStart,s=e.markerEnd,l=e.markerStartOffset,u=e.markerEndOffset,c=e.points.points,h=c.length,e=c[0][0]-o,d=c[0][1]-a,f=c[h-1][0]-o,p=c[h-1][1]-a,y=0,g=0,v=0,m=0,b=0;i&&i instanceof k&&l&&(n=c[1][0]-c[0][0],r=c[1][1]-c[0][1],b=Math.atan2(r,n),y=Math.cos(b)*((null==l?void 0:l.value)||0),g=Math.sin(b)*((null==l?void 0:l.value)||0)),s&&s instanceof k&&u&&(n=c[h-1][0]-c[0][0],r=c[h-1][1]-c[0][1],b=Math.atan2(r,n),v=Math.cos(b)*((null==u?void 0:u.value)||0),m=Math.sin(b)*((null==u?void 0:u.value)||0)),t.moveTo(e+(y||v),d+(g||m));for(var x=1;x<h-1;x++){var w=c[x];t.lineTo(w[0]-o,w[1]-a)}t.lineTo(f,p)}function Gp(t,e){var n,r,i=e.defX,o=void 0===i?0:i,i=e.defY,a=void 0===i?0:i,i=e.markerStart,s=e.markerEnd,l=e.markerStartOffset,u=e.markerEndOffset,c=e.points.points,h=c.length,e=c[0][0]-o,d=c[0][1]-a,f=c[h-1][0]-o,p=c[h-1][1]-a,y=0,g=0,v=0,m=0,b=0;i&&i instanceof k&&l&&(n=c[1][0]-c[0][0],r=c[1][1]-c[0][1],b=Math.atan2(r,n),y=Math.cos(b)*((null==l?void 0:l.value)||0),g=Math.sin(b)*((null==l?void 0:l.value)||0)),s&&s instanceof k&&u&&(n=c[h-2][0]-c[h-1][0],r=c[h-2][1]-c[h-1][1],b=Math.atan2(r,n),v=Math.cos(b)*((null==u?void 0:u.value)||0),m=Math.sin(b)*((null==u?void 0:u.value)||0)),t.moveTo(e+y,d+g);for(var x=1;x<h-1;x++){var w=c[x];t.lineTo(w[0]-o,w[1]-a)}t.lineTo(f+v,p+m)}function Hp(t,e){var n,r,i,o,a=e.radius,s=e.width,e=e.height,l=s.value,u=e.value;a&&a.some(function(t){return 0!==t.value})?(n=(s=0<s.value?1:-1)+(e=0<e.value?1:-1)==0,r=(a=a.map(function(t){return zs(t.value,0,Math.min(Math.abs(l)/2,Math.abs(u)/2))}))[0],i=a[1],o=a[2],a=a[3],t.moveTo(s*r,0),t.lineTo(l-s*i,0),0!==i&&t.arc(l-s*i,e*i,i,-e*Math.PI/2,0<s?0:Math.PI,n),t.lineTo(l,u-e*o),0!==o&&t.arc(l-s*o,u-e*o,o,0<s?0:Math.PI,0<e?Math.PI/2:1.5*Math.PI,n),t.lineTo(s*a,u),0!==a&&t.arc(s*a,u-e*a,a,0<e?Math.PI/2:-Math.PI/2,0<s?Math.PI:0,n),t.lineTo(0,e*r),0!==r&&t.arc(s*r,e*r,r,0<s?Math.PI:0,0<e?1.5*Math.PI:Math.PI/2,n)):t.rect(0,0,l,u)}var Wp=Hr(function(t){t({token:{token:Dp,named:M.CIRCLE},useValue:jp}),t({token:{token:Dp,named:M.ELLIPSE},useValue:Bp}),t({token:{token:Dp,named:M.RECT},useValue:Hp}),t({token:{token:Dp,named:M.LINE},useValue:Fp}),t({token:{token:Dp,named:M.POLYLINE},useValue:Gp}),t({token:{token:Dp,named:M.POLYGON},useValue:Vp}),t({token:{token:Dp,named:M.PATH},useValue:zp}),t({token:Rp,useFactory:function(e){return function(t){return e.container.isBoundNamed(Dp,t)?e.container.getNamed(Dp,t):null}}})}),Up=function(i){var t;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).name="canvas-path-generator",t}t=i,(n=e).prototype=Object.create(t.prototype),Ip(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){this.container.load(Wp,!0)},n.destroy=function(){this.container.unload(Wp)},e}(uf);function Yp(){Yp=function(){return a};var a={},t=Object.prototype,l=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function o(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{o({},"")}catch(t){o=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,o,a,s,e=e&&e.prototype instanceof h?e:h,e=Object.create(e.prototype),r=new x(r||[]);return e._invoke=(i=t,o=n,a=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 k()}for(a.method=t,a.arg=e;;){var n=a.delegate;if(n){n=function t(e,n){var r=e.iterator[n.method];if(void 0===r){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method))return c;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}r=u(r,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,c;r=r.arg;return r?r.done?(n[e.resultName]=r.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,c):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,c)}(n,a);if(n){if(n===c)continue;return n}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===s)throw s="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s="executing";n=u(i,o,a);if("normal"===n.type){if(s=a.done?"completed":"suspendedYield",n.arg===c)continue;return{value:n.arg,done:a.done}}"throw"===n.type&&(s="completed",a.method="throw",a.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}}}a.wrap=s;var c={};function h(){}function d(){}function f(){}var e={},p=(o(e,r,function(){return this}),Object.getPrototypeOf),p=p&&p(p(w([]))),y=(p&&p!==t&&l.call(p,r)&&(e=p),f.prototype=h.prototype=Object.create(e));function g(t){["next","throw","return"].forEach(function(e){o(t,e,function(t){return this._invoke(e,t)})})}function v(a,s){var e;this._invoke=function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var o,t=u(a[t],a,n);if("throw"!==t.type)return(n=(o=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){o.value=t,r(o)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}}function m(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 b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(m,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:k}}function k(){return{value:void 0,done:!0}}return o(y,"constructor",d.prototype=f),o(f,"constructor",d),d.displayName=o(f,i,"GeneratorFunction"),a.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,o(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},a.awrap=function(t){return{__await:t}},g(v.prototype),o(v.prototype,n,function(){return this}),a.AsyncIterator=v,a.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var o=new v(s(t,e,n,r),i);return a.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},g(y),o(y,i,"Generator"),o(y,r,function(){return this}),o(y,"toString",function(){return"[object Generator]"}),a.keys=function(n){var t,r=[];for(t in n)r.push(t);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}},a.values=w,x.prototype={constructor:x,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(b),!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 o.type="throw",o.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],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(a&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){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 o=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,c):this.complete(o)},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),c},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),b(n),c}},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,b(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),c}},a}function qp(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function Xp(t,e){return(Xp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var Zp,Kp="undefined"!=typeof Float32Array?Float32Array:Array;function $p(){var t=new Kp(16);return Kp!=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 Jp(){var t=new Kp(3);return Kp!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function Qp(t,e,n){var r=new Kp(3);return r[0]=t,r[1]=e,r[2]=n,r}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)}),Jp(),n=new Kp(2),Kp!=Float32Array&&(n[0]=0,n[1]=0);var ty=d.defineToken("PointInPathPicker"),ey=((J=function(){function t(){var L=this;this.displayObjectPool=void 0,this.canvasConfig=void 0,this.offscreenCanvas=void 0,this.rBush=void 0,this.pathGeneratorFactory=void 0,this.pathGeneratorFactoryCache={},this.pointInPathPickerFactory=void 0,this.isHit=function(t,e,n){var r,i,o,a,s,l,u,c,h,d,f,p,y,g,v,m,b,x,w,k,E,_,S,M,T,O=L.pointInPathPickerFactory(t.nodeName);if(O){r=$p(),i=(n=n)[0],o=n[1],a=n[2],s=n[3],l=n[4],u=n[5],c=n[6],h=n[7],d=n[8],f=n[9],p=n[10],N=n[11],y=n[12],g=n[13],v=n[14],n=n[15];var P=(T=(m=i*u-o*l)*(P=p*n-N*v)-(b=i*c-a*l)*(M=f*n-N*g)+(A=i*h-s*l)*(S=f*v-p*g)+(x=o*c-a*u)*(_=d*n-N*y)-(C=o*h-s*u)*(E=d*v-p*y)+(w=a*h-s*c)*(k=d*g-f*y))?(r[0]=(u*P-c*M+h*S)*(T=1/T),r[1]=(a*M-o*P-s*S)*T,r[2]=(g*w-v*C+n*x)*T,r[3]=(p*C-f*w-N*x)*T,r[4]=(c*_-l*P-h*E)*T,r[5]=(i*P-a*_+s*E)*T,r[6]=(v*A-y*w-n*b)*T,r[7]=(d*w-p*A+N*b)*T,r[8]=(l*M-u*_+h*k)*T,r[9]=(o*_-i*M-s*k)*T,r[10]=(y*C-g*A+n*m)*T,r[11]=(f*A-d*C-N*m)*T,r[12]=(u*E-l*S-c*k)*T,r[13]=(i*S-o*E+a*k)*T,r[14]=(g*b-y*x-v*m)*T,r[15]=(d*x-f*b+p*m)*T,r):null,A=(w=Jp(),h=Qp(e[0],e[1],0),_=P,M=h[0],s=h[1],h=h[2],n=_[3]*M+_[7]*s+_[11]*h+_[15],w[0]=(_[0]*M+_[4]*s+_[8]*h+_[12])/(n=n||1),w[1]=(_[1]*M+_[5]*s+_[9]*h+_[13])/n,w[2]=(_[2]*M+_[6]*s+_[10]*h+_[14])/n,w),C=t.getGeometryBounds().halfExtents,N=t.parsedStyle.anchor;if(A[0]+=(N&&N[0].value||0)*C[0]*2,A[1]+=(N&&N[1].value||0)*C[1]*2,O(t,new Cc(A[0],A[1]),L.isPointInPath))return!0}return!1},this.isPointInPath=function(t,e){var n=L.offscreenCanvas.getOrCreateContext(L.canvasConfig.offscreenCanvas),r=(void 0===L.pathGeneratorFactoryCache[t.nodeName]&&(L.pathGeneratorFactoryCache[t.nodeName]=L.pathGeneratorFactory(t.nodeName)),L.pathGeneratorFactoryCache[t.nodeName]);return r&&(n.beginPath(),r(n,t.parsedStyle),n.closePath()),n.isPointInPath(e.x,e.y)}}var e=t.prototype;return e.apply=function(t){var R=this;t.hooks.pick.tapPromise(Zp.tag,function(){s=Yp().mark(function t(E){var _,S,M,T,O,P,A,C,N,L,I;return Yp().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:_=E.topmost,O=E.position,S=O.x,O=O.y,S=Qp(S,O,0),O=R.rBush.search({minX:S[0],minY:S[1],maxX:S[0],maxY:S[1]}),M=O.map(function(t){return t.id}),T=[],O.forEach(function(t){t=t.id,t=R.displayObjectPool.getByEntity(t);!t.isVisible()||t.isCulled()||!t.isInteractive()||t.parentNode&&-1===M.indexOf(t.parentNode.entity)||T.push(t)}),T.sort(function(t,e){return e.sortable.renderOrder-t.sortable.renderOrder}),O=[],P=0,A=T;case 9:if(!(P<A.length)){t.next=37;break}if(C=A[P],N=C.getWorldTransform(),!R.isHit(C,S,N)){t.next=34;break}if(!(L=R.findClosestClipPath(C))){t.next=28;break}if(I=L.style.clipPath,e=$p(),n=L===C?N:L.getWorldTransform(),r=I.getLocalTransform(),k=w=x=b=m=v=g=y=p=f=d=h=c=u=l=s=a=o=i=void 0,i=n[0],o=n[1],a=n[2],s=n[3],l=n[4],u=n[5],c=n[6],h=n[7],d=n[8],f=n[9],p=n[10],y=n[11],g=n[12],v=n[13],m=n[14],n=n[15],b=r[0],x=r[1],w=r[2],k=r[3],e[0]=b*i+x*l+w*d+k*g,e[1]=b*o+x*u+w*f+k*v,e[2]=b*a+x*c+w*p+k*m,e[3]=b*s+x*h+w*y+k*n,b=r[4],x=r[5],w=r[6],k=r[7],e[4]=b*i+x*l+w*d+k*g,e[5]=b*o+x*u+w*f+k*v,e[6]=b*a+x*c+w*p+k*m,e[7]=b*s+x*h+w*y+k*n,b=r[8],x=r[9],w=r[10],k=r[11],e[8]=b*i+x*l+w*d+k*g,e[9]=b*o+x*u+w*f+k*v,e[10]=b*a+x*c+w*p+k*m,e[11]=b*s+x*h+w*y+k*n,b=r[12],x=r[13],w=r[14],k=r[15],e[12]=b*i+x*l+w*d+k*g,e[13]=b*o+x*u+w*f+k*v,e[14]=b*a+x*c+w*p+k*m,e[15]=b*s+x*h+w*y+k*n,N=e,!R.isHit(I,S,N)){t.next=26;break}if(_)return E.picked=[C],t.abrupt("return",E);t.next=25;break;case 25:O.push(C);case 26:t.next=34;break;case 28:if(_)return E.picked=[C],t.abrupt("return",E);t.next=33;break;case 33:O.push(C);case 34:P++,t.next=9;break;case 37:return E.picked=O,t.abrupt("return",E);case 39:case"end":return t.stop()}var e,n,r,i,o,a,s,l,u,c,h,d,f,p,y,g,v,m,b,x,w,k},t)});var s,e=function(){var t=this,a=arguments;return new Promise(function(e,n){var r=s.apply(t,a);function i(t){qp(r,e,n,i,o,"next",t)}function o(t){qp(r,e,n,i,o,"throw",t)}i(void 0)})};return function(t){return e.apply(this,arguments)}}())},e.findClosestClipPath=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}()).tag="CanvasPicker",Zp=J);function ny(t,e,n,r){t-=n,n=e-r;return Math.sqrt(t*t+n*n)}function ry(t,e){return Math.abs(t-e)<.001}function iy(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}}t([p(Ih),e("design:type",Ih)],ey.prototype,"displayObjectPool",void 0),t([p(ou),e("design:type",Object)],ey.prototype,"canvasConfig",void 0),t([p(Hd),e("design:type",Hd)],ey.prototype,"offscreenCanvas",void 0),t([p(Ah),e("design:type",Qr)],ey.prototype,"rBush",void 0),t([p(Rp),e("design:type",Function)],ey.prototype,"pathGeneratorFactory",void 0),t([p(ty),e("design:type",Function)],ey.prototype,"pointInPathPickerFactory",void 0);var ey=Zp=t([f({contrib:zd})],ey),oy={box:function(t,e,n,r){return iy([t,n],[e,r])},length:ny,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,o){var a=(n-t)*(i-t)+(r-e)*(o-e);return a<0?ny(t,e,i,o):(n-t)*(n-t)+(r-e)*(r-e)<a?ny(n,r,i,o):this.pointToLine(t,e,n,r,i,o)},pointToLine:function(t,e,n,r,i,o){n=[n-t,r-e];if((r=n)[0]===(a=[0,0])[0]&&r[1]===a[1])return Math.sqrt((i-t)*(i-t)+(o-e)*(o-e));var a,s,r=[-n[1],n[0]],l=(s=(n=a=r)[0],l=n[1],0<(s=s*s+l*l)&&(s=1/Math.sqrt(s)),a[0]=n[0]*s,a[1]=n[1]*s,[i-t,o-e]);return Math.abs(l[0]*r[0]+l[1]*r[1])},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}};function ay(t,e,n,r,i){var o=1-i;return o*o*o*t+3*e*i*o*o+3*n*i*i*o+r*i*i*i}function sy(t,e,n,r,i){var o=1-i;return 3*(o*o*(e-t)+2*o*i*(n-e)+i*i*(r-n))}function ly(t,e,n,r){var i,o,r=-3*t+9*e-9*n+3*r,n=6*t-12*e+6*n,e=3*e-3*t,t=[];return ry(r,0)?ry(n,0)||0<=(i=-e/n)&&i<=1&&t.push(i):ry(e=n*n-4*r*e,0)?t.push(-n/(2*r)):0<e&&(o=(-n-(e=Math.sqrt(e)))/(2*r),0<=(i=(-n+e)/(2*r))&&i<=1&&t.push(i),0<=o&&o<=1&&t.push(o)),t}function uy(t,e,n,r,i,o,a,s,l){var u=ay(t,n,i,a,l),c=ay(e,r,o,s,l),h=oy.pointAt(t,e,n,r,l),n=oy.pointAt(n,r,i,o,l),r=oy.pointAt(i,o,a,s,l),i=oy.pointAt(h.x,h.y,n.x,n.y,l),o=oy.pointAt(n.x,n.y,r.x,r.y,l);return[[t,e,h.x,h.y,i.x,i.y,u,c],[u,c,o.x,o.y,r.x,r.y,a,s]]}function cy(t,e,n,r,i,o,a,s,l){if(0===l){for(var u=[t,n,i,a],c=[e,r,o,s],h=0,d=u.length,f=0;f<d;f++)h+=ny(u[f],c[f],u[(f+1)%d],c[(f+1)%d]);return h/2}t=uy(t,e,n,r,i,o,a,s,.5),e=[].concat(t[0],[l-1]),n=[].concat(t[1],[l-1]);return cy.apply(void 0,e)+cy.apply(void 0,n)}var hy={extrema:ly,box:function(t,e,n,r,i,o,a,s){for(var l=[t,a],u=[e,s],c=ly(t,n,i,a),h=ly(e,r,o,s),d=0;d<c.length;d++)l.push(ay(t,n,i,a,c[d]));for(var f=0;f<h.length;f++)u.push(ay(e,r,o,s,h[f]));return iy(l,u)},length:function(t,e,n,r,i,o,a,s){return cy(t,e,n,r,i,o,a,s,3)},nearestPoint:function(t,e,n,r,i,o,a,s,l,u,c){for(var h=[t,n,i,a],d=[e,r,o,s],t=l,f=ay,n=c,p=-1,y=1/0,g=[t,u],v=20,m=1/(v=n&&200<n?n/10:v),b=m/10,x=0;x<=v;x++){var w=x*m,k=[f.apply(void 0,h.concat([w])),f.apply(void 0,d.concat([w]))],k=ny(g[0],g[1],k[0],k[1]);k<y&&(p=w,y=k)}if(0===p)return{x:h[0],y:d[0]};if(1===p)return{x:h[(t=h.length)-1],y:d[t-1]};for(var y=1/0,E=0;E<32&&!(b<1e-4);E++){var _=p-b,S=p+b,M=[f.apply(void 0,h.concat([_])),f.apply(void 0,d.concat([_]))],M=ny(g[0],g[1],M[0],M[1]);0<=_&&M<y?(p=_,y=M):(_=[f.apply(void 0,h.concat([S])),f.apply(void 0,d.concat([S]))],M=ny(g[0],g[1],_[0],_[1]),S<=1&&M<y?(p=S,y=M):b*=.5)}return{x:f.apply(void 0,h.concat([p])),y:f.apply(void 0,d.concat([p]))}},pointDistance:function(t,e,n,r,i,o,a,s,l,u,c){t=this.nearestPoint(t,e,n,r,i,o,a,s,l,u,c);return ny(t.x,t.y,l,u)},interpolationAt:ay,pointAt:function(t,e,n,r,i,o,a,s,l){return{x:ay(t,n,i,a,l),y:ay(e,r,o,s,l)}},divide:uy,tangentAngle:function(t,e,n,r,i,o,a,s,l){t=sy(t,n,i,a,l),n=sy(e,r,o,s,l);return(Math.atan2(n,t)+2*Math.PI)%(2*Math.PI)}};function dy(t,e,n,r){t-=n,n=e-r;return Math.sqrt(t*t+n*n)}function fy(t,e,n,r,i,o){return t<=i&&i<=t+n&&e<=o&&o<=e+r}function py(t,e,n,r,i,o,a,s){var l=(Math.atan2(s-e,a-t)+2*Math.PI)%(2*Math.PI);if(l<r||i<l)return!1;r={x:t+n*Math.cos(l),y:e+n*Math.sin(l)};return dy(r.x,r.y,a,s)<=o/2}function yy(t,e,n,r,i,o,a){var s=Math.min(t,n),l=Math.max(t,n),u=Math.min(e,r),c=Math.max(e,r),h=i/2;return s-h<=o&&o<=l+h&&u-h<=a&&a<=c+h&&oy.pointToLine(t,e,n,r,o,a)<=i/2}function gy(t,e,n,r,i){var o=t.length;if(!(o<2)){for(var a=0;a<o-1;a++)if(yy(t[a][0],t[a][1],t[a+1][0],t[a+1][1],e,n,r))return!0;if(i){var i=t[0],s=t[o-1];if(yy(i[0],i[1],s[0],s[1],e,n,r))return!0}}return!1}var vy=1e-6;function my(t){return Math.abs(t)<vy?0:t<0?-1:1}function by(t,e,n){var r=!1,i=t.length;if(i<=2)return!1;for(var o,a,s,l=0;l<i;l++){var u=t[l],c=t[(l+1)%i];if(a=c,((s=[e,n])[0]-(o=u)[0])*(a[1]-o[1])==(a[0]-o[0])*(s[1]-o[1])&&Math.min(o[0],a[0])<=s[0]&&s[0]<=Math.max(o[0],a[0])&&Math.min(o[1],a[1])<=s[1]&&s[1]<=Math.max(o[1],a[1]))return!0;0<my(u[1]-n)!=0<my(c[1]-n)&&my(e-(n-u[1])*(u[0]-c[0])/(u[1]-c[1])-u[0])<0&&(r=!r)}return r}function xy(t,e,n){for(var r=!1,i=0;i<t.length&&!(r=by(t[i],e,n));i++);return r}function wy(t,e){var t=t.parsedStyle,n=t.r,r=t.fill,i=t.stroke,o=t.lineWidth,a=t.increasedLineWidthForHitTesting,t=t.clipPathTargets,n=n.value,o=(((null==o?void 0:o.value)||0)+((null==a?void 0:a.value)||0))/2,a=dy(n,n,e.x,e.y),e=!(null==t||!t.length),t=r&&!r.isNone,r=i&&!i.isNone;return t&&r||e?a<=n+o:t?a<=n:!!r&&(n-o<=a&&a<=n+o)}function ky(t,e,n,r){return t/(n*n)+e/(r*r)}function Ey(t,e){var n=e.x,e=e.y,t=t.parsedStyle,r=t.rx,i=t.ry,o=t.fill,a=t.stroke,s=t.lineWidth,l=t.increasedLineWidthForHitTesting,t=t.clipPathTargets,t=!(null==t||!t.length),o=o&&!o.isNone,a=a&&!a.isNone,r=r.value,i=i.value,s=(((null==s?void 0:s.value)||0)+((null==l?void 0:l.value)||0))/2,l=(n-r)*(n-r),n=(e-i)*(e-i);return o&&a||t?ky(l,n,r+s,i+s)<=1:o?ky(l,n,r,i)<=1:!!a&&(1<=ky(l,n,r-s,i-s)&&ky(l,n,r+s,i+s)<=1)}function _y(t,e){var t=t.parsedStyle,n=t.x1,r=t.y1,i=t.x2,o=t.y2,a=t.lineWidth,s=t.increasedLineWidthForHitTesting,l=t.defX,t=t.defY;return yy(n.value,r.value,i.value,o.value,((null==a?void 0:a.value)||0)+((null==s?void 0:s.value)||0),e.x+(void 0===l?0:l),e.y+(void 0===t?0:t))}function Sy(t,e,n){var r=t.parsedStyle,i=r.lineWidth,o=r.increasedLineWidthForHitTesting,a=r.stroke,s=r.fill,l=r.defX,l=void 0===l?0:l,u=r.defY,u=void 0===u?0:u,c=r.clipPathTargets,r=r.path,s=s&&!s.isNone,a=a&&!a.isNone,h=r.segments,d=r.hasArc,f=r.polylines,p=r.polygons,r=r.totalLength,c=!(null==c||!c.length),y=!1;return s||c?d?n(t,e):xy(p,e.x+l,e.y+u)||xy(f,e.x+l,e.y+u):a||c?function(t,e,n,r,i){for(var o=!1,a=0;a<t.length;a++){var s=t[a],l=s.currentPoint,u=s.params,c=s.prePoint;switch(s.command){case"L":case"Z":o=yy(c[0],c[1],l[0],l[1],e,n,r);break;case"C":o=hy.pointDistance(c[0],c[1],u[1],u[2],u[3],u[4],u[5],u[6],n,r,i)<=e/2}if(o)break}return o}(h,((null==i?void 0:i.value)||0)+((null==o?void 0:o.value)||0),e.x+l,e.y+u,r):y}function My(t,e){var t=t.parsedStyle,n=t.stroke,r=t.fill,i=t.lineWidth,o=t.increasedLineWidthForHitTesting,a=t.points,s=t.defX,s=void 0===s?0:s,l=t.defY,l=void 0===l?0:l,t=t.clipPathTargets,t=!(null==t||!t.length),r=r&&!r.isNone,u=!1;return u=(u=n&&!n.isNone||t?gy(a.points,((null==i?void 0:i.value)||0)+((null==o?void 0:o.value)||0),e.x+s,e.y+l,!0):u)||!r&&!t?u:by(a.points,e.x+s,e.y+l)}function Ty(t,e){var t=t.parsedStyle,n=t.stroke,r=t.lineWidth,i=t.increasedLineWidthForHitTesting,o=t.points,a=t.defX,s=t.defY,t=t.clipPathTargets,t=!(null==t||!t.length);return!(!(n&&!n.isNone||t)||!r)&&gy(o.points,((null==r?void 0:r.value)||0)+((null==i?void 0:i.value)||0),e.x+(void 0===a?0:a),e.y+(void 0===s?0:s),!1)}function Oy(t,e,n){var r=t.parsedStyle,i=r.radius,o=r.fill,a=r.stroke,s=r.lineWidth,l=r.increasedLineWidthForHitTesting,u=r.width,c=r.height,r=r.clipPathTargets,r=!(null==r||!r.length),o=o&&!o.isNone,a=a&&!a.isNone,h=i&&i.some(function(t){return 0!==t.value}),d=u.unit,u=u.value,f=c.unit,c=c.value,p=0,y=0,d=(d!==O.kNumber&&d!==O.kPixels||(p=u),f!==O.kNumber&&f!==O.kPixels||(y=c),((null==s?void 0:s.value)||0)+((null==l?void 0:l.value)||0));if(h)return u=!1,(a||r)&&(c=f=0,s=p,l=y,h=i.map(function(t){return zs(t.value,0,Math.min(Math.abs(p)/2,Math.abs(y)/2))}),i=d,g=e.x,v=e.y,b=h[0],x=h[1],m=h[2],h=h[3],u=yy(f+b,c,f+s-x,c,i,g,v)||yy(f+s,c+x,f+s,c+l-m,i,g,v)||yy(f+s-m,c+l,f+h,c+l,i,g,v)||yy(f,c+l-h,f,c+b,i,g,v)||py(f+s-x,c+x,x,1.5*Math.PI,2*Math.PI,i,g,v)||py(f+s-m,c+l-m,m,0,.5*Math.PI,i,g,v)||py(f+h,c+l-h,h,.5*Math.PI,Math.PI,i,g,v)||py(f+b,c+b,b,Math.PI,1.5*Math.PI,i,g,v)),u||!o&&!r?u:n(t,e);var g,v,m,b,x=d/2;return o&&a||r?fy(0-x,0-x,p+x,y+x,e.x,e.y):o?fy(0,0,p,y,e.x,e.y):!!a&&(m=s=0,l=p,h=y,f=d,c=e.x,b=e.y,fy(s-(i=f/2),m-i,l,f,c,b)||fy(s+l-i,m-i,f,h,c,b)||fy(s+i,m+h-i,l,f,c,b)||fy(s-i,m+i,f,h,c,b))}var Py=Hr(function(t){t({token:ty,useFactory:function(t){return function(t){return t===M.CIRCLE?wy:t===M.ELLIPSE?Ey:t===M.RECT?Oy:t===M.LINE?_y:t===M.POLYLINE?Ty:t===M.POLYGON?My:t===M.PATH?Sy:t===M.IMAGE||t===M.TEXT?function(){return!0}:null}}}),t(ey)}),Ay=function(i){var t;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).name="canvas-picker",t}t=i,(n=e).prototype=Object.create(t.prototype),Xp(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){this.container.load(Py,!0)},n.destroy=function(){this.container.unload(Py)},e}(uf);function Cy(){Cy=function(){return a};var a={},t=Object.prototype,l=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function o(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{o({},"")}catch(t){o=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,o,a,s,e=e&&e.prototype instanceof h?e:h,e=Object.create(e.prototype),r=new x(r||[]);return e._invoke=(i=t,o=n,a=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 k()}for(a.method=t,a.arg=e;;){var n=a.delegate;if(n){n=function t(e,n){var r=e.iterator[n.method];if(void 0===r){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method))return c;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}r=u(r,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,c;r=r.arg;return r?r.done?(n[e.resultName]=r.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,c):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,c)}(n,a);if(n){if(n===c)continue;return n}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===s)throw s="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s="executing";n=u(i,o,a);if("normal"===n.type){if(s=a.done?"completed":"suspendedYield",n.arg===c)continue;return{value:n.arg,done:a.done}}"throw"===n.type&&(s="completed",a.method="throw",a.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}}}a.wrap=s;var c={};function h(){}function d(){}function f(){}var e={},p=(o(e,r,function(){return this}),Object.getPrototypeOf),p=p&&p(p(w([]))),y=(p&&p!==t&&l.call(p,r)&&(e=p),f.prototype=h.prototype=Object.create(e));function g(t){["next","throw","return"].forEach(function(e){o(t,e,function(t){return this._invoke(e,t)})})}function v(a,s){var e;this._invoke=function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var o,t=u(a[t],a,n);if("throw"!==t.type)return(n=(o=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){o.value=t,r(o)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}}function m(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 b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(m,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:k}}function k(){return{value:void 0,done:!0}}return o(y,"constructor",d.prototype=f),o(f,"constructor",d),d.displayName=o(f,i,"GeneratorFunction"),a.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,o(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},a.awrap=function(t){return{__await:t}},g(v.prototype),o(v.prototype,n,function(){return this}),a.AsyncIterator=v,a.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var o=new v(s(t,e,n,r),i);return a.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},g(y),o(y,i,"Generator"),o(y,r,function(){return this}),o(y,"toString",function(){return"[object Generator]"}),a.keys=function(n){var t,r=[];for(t in n)r.push(t);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}},a.values=w,x.prototype={constructor:x,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(b),!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 o.type="throw",o.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],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(a&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){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 o=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,c):this.complete(o)},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),c},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),b(n),c}},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,b(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),c}},a}function Ny(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function Ly(s){return function(){var t=this,a=arguments;return new Promise(function(e,n){var r=s.apply(t,a);function i(t){Ny(r,e,n,i,o,"next",t)}function o(t){Ny(r,e,n,i,o,"throw",t)}i(void 0)})}}function Iy(t,e){return(Iy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var Ry,Dy=function(){function t(){this.imageCache={},this.gradientCache={},this.patternCache={},this.canvasConfig=void 0}var e=t.prototype;return e.getImageSync=function(t,e){return this.imageCache[t]?e&&e():this.getOrCreateImage(t).then(function(){e&&e()}),this.imageCache[t]},e.getOrCreateImage=function(r){var i=this;if(this.imageCache[r])return Promise.resolve(this.imageCache[r]);var o=this.canvasConfig.createImage;return new Promise(function(t,e){var n;o?n=o(r):As&&(n=new window.Image),n&&(n.onload=function(){t(n)},n.onerror=function(t){e(t)},n.crossOrigin="Anonymous",n.src=r,i.imageCache[r]=n)})},e.getOrCreatePatternSync=function(t,e,n){var r=this.generatePatternKey(t);if(r&&this.patternCache[r])return this.patternCache[r];var i=t.image,t=t.repetition,n=Jl(i)?this.getImageSync(i,n):i,i=n&&e.createPattern(n,t);return r&&i&&(this.patternCache[r]=i),i},e.getOrCreateGradient=function(t,e){var r,n,i,o,a,s=this.generateGradientKey(t),l=t.type,u=t.steps,c=t.width,h=t.height,d=t.angle,f=t.cx,t=t.cy;return this.gradientCache[s]||(r=null,l===sc.LinearGradient?(n=c,i=h,d=(d=d)*Math.PI/180,o=0+n/2,a=0+i/2,n=Math.abs(n*Math.cos(d))+Math.abs(i*Math.sin(d)),i={x1:o-Math.cos(d)*n/2,y1:a-Math.sin(d)*n/2,x2:o+Math.cos(d)*n/2,y2:a+Math.sin(d)*n/2},r=e.createLinearGradient(i.x1,i.y1,i.x2,i.y2)):l===sc.RadialGradient&&(o={x:f*c,y:t*h,r:Math.sqrt(c*c+h*h)/2},r=e.createRadialGradient(a=o.x,d=o.y,0,a,d,o.r)),r&&(u.forEach(function(t){var e,n=t[0],t=t[1];null!=(e=r)&&e.addColorStop(n,t)}),this.gradientCache[s]=r)),this.gradientCache[s]},e.generateGradientKey=function(t){var e=t.type,n=t.width,r=t.height,i=t.steps;return"gradient-"+e+"-"+(t.angle||0)+"-"+(t.cx||0)+"-"+(t.cy||0)+"-"+n+"-"+r+"-"+i.map(function(t){return t.join("")}).join("-")},e.generatePatternKey=function(t){var e=t.image,t=t.repetition;if(Jl(e))return"pattern-"+e+"-"+t},t}(),jy=(t([p(ou),e("design:type",Object)],Dy.prototype,"canvasConfig",void 0),Dy=t([f()],Dy),(h=function(){function t(){this.imagePool=void 0,this.renderingContext=void 0}return t.prototype.apply=function(r){function e(t){var e=t.target,t=e.nodeName,n=e.attributes;t===M.IMAGE&&Jl(t=n.img)&&i.imagePool.getImageSync(t,function(){e.renderable.dirty=!0,r.dirtify()})}function n(t){var e=t.target,n=t.attrName,t=t.newValue;e.nodeName===M.IMAGE&&"img"===n&&Jl(t)&&i.imagePool.getOrCreateImage(t).then(function(){e.renderable.dirty=!0,r.dirtify()})}var i=this;r.hooks.init.tapPromise(Ry.tag,Ly(Cy().mark(function t(){return Cy().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:i.renderingContext.root.addEventListener(m.MOUNTED,e),i.renderingContext.root.addEventListener(m.ATTR_MODIFIED,n);case 2:case"end":return t.stop()}},t)}))),r.hooks.destroy.tap(Ry.tag,function(){i.renderingContext.root.removeEventListener(m.MOUNTED,e),i.renderingContext.root.removeEventListener(m.ATTR_MODIFIED,n)})},t}()).tag="LoadImage",Ry=h),By=(t([p(Dy),e("design:type",Dy)],jy.prototype,"imagePool",void 0),t([p(Id),e("design:type",Object)],jy.prototype,"renderingContext",void 0),jy=Ry=t([f({contrib:zd})],jy),Hr(function(t){t(Dy),t(jy)})),Fy=function(i){var t;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).name="image-loader",t}t=i,(n=e).prototype=Object.create(t.prototype),Iy(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){this.container.load(By,!0)},n.destroy=function(){this.container.unload(By)},e}(uf);function zy(){zy=function(){return a};var a={},t=Object.prototype,l=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function o(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{o({},"")}catch(t){o=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,o,a,s,e=e&&e.prototype instanceof h?e:h,e=Object.create(e.prototype),r=new x(r||[]);return e._invoke=(i=t,o=n,a=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 k()}for(a.method=t,a.arg=e;;){var n=a.delegate;if(n){n=function t(e,n){var r=e.iterator[n.method];if(void 0===r){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method))return c;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}r=u(r,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,c;r=r.arg;return r?r.done?(n[e.resultName]=r.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,c):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,c)}(n,a);if(n){if(n===c)continue;return n}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===s)throw s="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s="executing";n=u(i,o,a);if("normal"===n.type){if(s=a.done?"completed":"suspendedYield",n.arg===c)continue;return{value:n.arg,done:a.done}}"throw"===n.type&&(s="completed",a.method="throw",a.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}}}a.wrap=s;var c={};function h(){}function d(){}function f(){}var e={},p=(o(e,r,function(){return this}),Object.getPrototypeOf),p=p&&p(p(w([]))),y=(p&&p!==t&&l.call(p,r)&&(e=p),f.prototype=h.prototype=Object.create(e));function g(t){["next","throw","return"].forEach(function(e){o(t,e,function(t){return this._invoke(e,t)})})}function v(a,s){var e;this._invoke=function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var o,t=u(a[t],a,n);if("throw"!==t.type)return(n=(o=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){o.value=t,r(o)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}}function m(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 b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(m,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:k}}function k(){return{value:void 0,done:!0}}return o(y,"constructor",d.prototype=f),o(f,"constructor",d),d.displayName=o(f,i,"GeneratorFunction"),a.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,o(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},a.awrap=function(t){return{__await:t}},g(v.prototype),o(v.prototype,n,function(){return this}),a.AsyncIterator=v,a.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var o=new v(s(t,e,n,r),i);return a.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},g(y),o(y,i,"Generator"),o(y,r,function(){return this}),o(y,"toString",function(){return"[object Generator]"}),a.keys=function(n){var t,r=[];for(t in n)r.push(t);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}},a.values=w,x.prototype={constructor:x,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(b),!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 o.type="throw",o.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],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(a&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){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 o=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,c):this.complete(o)},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),c},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),b(n),c}},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,b(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),c}},a}function Vy(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function Gy(s){return function(){var t=this,a=arguments;return new Promise(function(e,n){var r=s.apply(t,a);function i(t){Vy(r,e,n,i,o,"next",t)}function o(t){Vy(r,e,n,i,o,"throw",t)}i(void 0)})}}function Hy(){return(Hy=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 Wy(t,e){t.prototype=Object.create(e.prototype),Uy(t.prototype.constructor=t,e)}function Uy(t,e){return(Uy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var Yy="undefined"!=typeof Float32Array?Float32Array:Array;function qy(){var t=new Yy(16);return Yy!=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 Xy(t,e){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]}function Zy(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],h=e[8],d=e[9],f=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],w=n[3];t[0]=m*r+b*s+x*h+w*y,t[1]=m*i+b*l+x*d+w*g,t[2]=m*o+b*u+x*f+w*v,t[3]=m*a+b*c+x*p+w*e,m=n[4],b=n[5],x=n[6],w=n[7],t[4]=m*r+b*s+x*h+w*y,t[5]=m*i+b*l+x*d+w*g,t[6]=m*o+b*u+x*f+w*v,t[7]=m*a+b*c+x*p+w*e,m=n[8],b=n[9],x=n[10],w=n[11],t[8]=m*r+b*s+x*h+w*y,t[9]=m*i+b*l+x*d+w*g,t[10]=m*o+b*u+x*f+w*v,t[11]=m*a+b*c+x*p+w*e,m=n[12],b=n[13],x=n[14],w=n[15],t[12]=m*r+b*s+x*h+w*y,t[13]=m*i+b*l+x*d+w*g,t[14]=m*o+b*u+x*f+w*v,t[15]=m*a+b*c+x*p+w*e}function Ky(t,e,n){var r,i,o,a,s,l,u,c,h,d,f,p,y=n[0],g=n[1],n=n[2];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],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],h=e[8],d=e[9],f=e[10],p=e[11],t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t[6]=u,t[7]=c,t[8]=h,t[9]=d,t[10]=f,t[11]=p,t[12]=r*y+s*g+h*n+e[12],t[13]=i*y+l*g+d*n+e[13],t[14]=o*y+u*g+f*n+e[14],t[15]=a*y+c*g+p*n+e[15])}function $y(){var t=new Yy(3);return Yy!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function Jy(t,e,n){var r=new Yy(3);return r[0]=t,r[1]=e,r[2]=n,r}function Qy(t,e,n){var r=e[0],i=e[1],e=e[2],o=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])/(o=o||1),t[1]=(n[1]*r+n[5]*i+n[9]*e+n[13])/o,t[2]=(n[2]*r+n[6]*i+n[10]*e+n[14])/o,t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)}),$y();var t0=d.defineToken("StyleRendererFactory"),e0=d.defineToken("CircleRenderer",{multiple:!1}),n0=d.defineToken("EllipseRenderer",{multiple:!1}),r0=d.defineToken("RectRenderer",{multiple:!1}),i0=d.defineToken("LineRenderer",{multiple:!1}),o0=d.defineToken("PolylineRenderer",{multiple:!1}),a0=d.defineToken("PolygonRenderer",{multiple:!1}),s0=d.defineToken("PathRenderer",{multiple:!1}),l0=d.defineToken("TextRenderer",{multiple:!1}),u0=d.defineToken("ImageRenderer",{multiple:!1}),Z=function(){function t(){this.imagePool=void 0}var e=t.prototype;return e.render=function(t,e,n,r){var i=e.fill,o=e.opacity,a=e.fillOpacity,s=e.stroke,l=e.strokeOpacity,u=e.lineWidth,c=e.lineCap,h=e.lineJoin,d=e.shadowType,f=e.shadowColor,p=e.shadowBlur,y=e.filter,e=e.miterLimit,g=!T(i)&&!i.isNone,v=!T(s)&&!s.isNone&&u&&0<u.value,m=0===i.alpha,y=!T(y),f=!T(f)&&0<(null==p?void 0:p.value),p=n.nodeName,d="inner"===(null==d?void 0:d.value),p=v&&f&&(p===M.PATH||p===M.LINE||p===M.POLYLINE||m||d);g&&(t.globalAlpha=o.value*a.value,p||c0(n,t,f),this.fill(t,n,i,r),p||this.clearShadowAndFilter(t,y,f)),v&&(t.globalAlpha=o.value*l.value,t.lineWidth=u.value,T(e)||(t.miterLimit=e.value),T(c)||(t.lineCap=c.value),T(h)||(t.lineJoin=h.value),p&&(d&&(t.globalCompositeOperation="source-atop"),c0(n,t,!0),d&&(this.stroke(t,n,s,r),t.globalCompositeOperation="source-over",this.clearShadowAndFilter(t,y,!0))),this.stroke(t,n,s,r))},e.clearShadowAndFilter=function(t,e,n){n&&(t.shadowColor="transparent",t.shadowBlur=0),e&&!T(n=t.filter)&&-1<n.indexOf("drop-shadow")&&(t.filter=n.replace(/drop-shadow\([^)]*\)/,"").trim()||"none")},e.fill=function(e,n,t,r){var i=this;Array.isArray(t)?t.forEach(function(t){e.fillStyle=i.getColor(t,n,e),e.fill()}):(_c(t)&&(e.fillStyle=this.getPattern(t,n,e,r)),e.fill())},e.stroke=function(e,n,t,r){var i=this;Array.isArray(t)?t.forEach(function(t){e.strokeStyle=i.getColor(t,n,e),e.stroke()}):(_c(t)&&(e.strokeStyle=this.getPattern(t,n,e,r)),e.stroke())},e.getPattern=function(t,e,n,r){return this.imagePool.getOrCreatePatternSync(t,n,function(){e.renderable.dirty=!0,r.dirtify()})},e.getColor=function(t,e,n){var r;return t.type!==sc.LinearGradient&&t.type!==sc.RadialGradient||(r=(e=e.getGeometryBounds())&&2*e.halfExtents[0]||1,e=e&&2*e.halfExtents[1]||1,r=this.imagePool.getOrCreateGradient(Hy({type:t.type},t.value,{width:r,height:e}),n)),r},t}();function c0(t,e,n){var r=t.parsedStyle,i=r.filter,o=r.shadowColor,a=r.shadowBlur,s=r.shadowOffsetX,r=r.shadowOffsetY;T(i)||(e.filter=t.style.filter),n&&(e.shadowColor=o.toString(),e.shadowBlur=a&&a.value||0,e.shadowOffsetX=s&&s.value||0,e.shadowOffsetY=r&&r.value||0)}t([p(Dy),e("design:type",Dy)],Z.prototype,"imagePool",void 0);var h0,d0,Z=t([f()],Z),f0=function(){function t(){this.imagePool=void 0}return t.prototype.render=function(t,e,n){var r=e.width,i=e.height,o=e.img,a=e.shadowColor,e=e.shadowBlur,r=r.value,i=i.value,o=Jl(o)?this.imagePool.getImageSync(o):(r=r||o.width,i=i||o.height,o);if(o){c0(n,t,!T(a)&&0<(null==e?void 0:e.value));try{t.drawImage(o,0,0,r,i)}catch(t){}}},t}(),p0=(t([p(Dy),e("design:type",Dy)],f0.prototype,"imagePool",void 0),f0=t([f({token:u0})],f0),function(){function t(){}var e=t.prototype;return e.render=function(t,e,n){var r=e.lineWidth,i=e.textAlign,o=e.textBaseline,a=e.lineJoin,s=e.miterLimit,l=e.letterSpacing,u=e.stroke,c=e.fill,h=e.fillOpacity,d=e.strokeOpacity,f=e.opacity,p=e.metrics,y=e.dx,g=e.dy,v=e.shadowColor,e=e.shadowBlur,m=p.font,b=p.lines,x=p.height,w=p.lineHeight,k=p.lineMetrics,E=(t.font=m,t.lineWidth=r.value,t.textAlign=i.value,t.textBaseline=o.value,t.lineJoin=a.value,T(s)||(t.miterLimit=s.value),0),_=("middle"===o.value?E=-x/2-w/2:"bottom"===o.value||"alphabetic"===o.value||"ideographic"===o.value?E=-x:"top"!==o.value&&"hanging"!==o.value||(E=-w),0);y&&y.unit===O.kPixels&&(_+=y.value),g&&g.unit===O.kPixels&&(E+=g.value),c0(n,t,!T(v)&&0<(null==e?void 0:e.value));for(var S=0;S<b.length;S++){var M=r.value/2+_;E+=w,!T(u)&&!u.isNone&&r&&r.value&&this.drawLetterSpacing(t,b[S],k[S],i.value,M,E,l.value,h.value,d.value,f.value,!0),T(c)||this.drawLetterSpacing(t,b[S],k[S],i.value,M,E,l.value,h.value,d.value,f.value)}},e.drawLetterSpacing=function(t,e,n,r,i,o,a,s,l,u,c){if(void 0===c&&(c=!1),0===a)c?this.strokeText(t,e,i,o,l):this.fillText(t,e,i,o,s,u);else{for(var h=t.textAlign,d=(t.textAlign="left",i),f=("center"===r?d=i-n.width/2:"right"!==r&&"end"!==r||(d=i-n.width),Array.from(e)),p=t.measureText(e).width,y=0;y<f.length;++y){var g=f[y];c?this.strokeText(t,g,d,o,l):this.fillText(t,g,d,o,s,u),d+=p-(g=t.measureText(e.substring(y+1)).width)+a,p=g}t.textAlign=h}},e.fillText=function(t,e,n,r,i,o){var a,s=!T(i)&&1!==i;s&&(a=t.globalAlpha,t.globalAlpha=i*o),t.fillText(e,n,r),s&&(t.globalAlpha=a)},e.strokeText=function(t,e,n,r,i){var o,a=!T(i)&&1!==i;a&&(o=t.globalAlpha,t.globalAlpha=i),t.strokeText(e,n,r),a&&(t.globalAlpha=o)},t}()),p0=t([f({token:l0})],p0),y0=function(t){function e(){return t.apply(this,arguments)||this}return Wy(e,t),e}(Z),y0=t([f({token:r0})],y0),g0=function(t){function e(){return t.apply(this,arguments)||this}return Wy(e,t),e}(Z),g0=t([f({token:e0})],g0),v0=function(t){function e(){return t.apply(this,arguments)||this}return Wy(e,t),e}(Z),v0=t([f({token:n0})],v0),m0=function(t){function e(){return t.apply(this,arguments)||this}return Wy(e,t),e}(Z),m0=t([f({token:i0})],m0),b0=function(t){function e(){return t.apply(this,arguments)||this}return Wy(e,t),e}(Z),b0=t([f({token:o0})],b0),x0=function(t){function e(){return t.apply(this,arguments)||this}return Wy(e,t),e}(Z),x0=t([f({token:a0})],x0),w0=function(t){function e(){return t.apply(this,arguments)||this}return Wy(e,t),e}(Z),w0=t([f({token:s0})],w0),k0=d.defineToken("CanvasRendererPluginOptions"),E0=((at=function(){function t(){this.canvasConfig=void 0,this.camera=void 0,this.contextService=void 0,this.renderingContext=void 0,this.pathGeneratorFactory=void 0,this.pathGeneratorFactoryCache={},this.styleRendererFactory=void 0,this.styleRendererFactoryCache={},this.displayObjectPool=void 0,this.canvasRendererPluginOptions=void 0,this.rBush=void 0,this.removedRBushNodeAABBs=[],this.renderQueue=[],this.restoreStack=[],this.clearFullScreen=!1,this.vpMatrix=qy(),this.dprMatrix=qy(),this.tmpMat4=qy(),this.tmpVec3=$y()}var e=t.prototype;return e.apply=function(l){function s(t){(t=t.target.rBushNode).aabb&&h.removedRBushNodeAABBs.push(t.aabb)}function u(t){(t=t.target.rBushNode).aabb&&h.removedRBushNodeAABBs.push(t.aabb)}function c(t){t.isVisible()&&!t.isCulled()&&(h.renderDisplayObject(t,l),h.saveDirtyAABB(t)),t.sortable.sorted&&t.sortable.sorted.length&&t.sortable.sorted.forEach(function(t){c(t)})}var h=this,d=this.renderingContext.root.ownerDocument.defaultView;l.hooks.init.tapPromise(h0.tag,Gy(zy().mark(function t(){var r,i,o,a;return zy().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:h.renderingContext.root.addEventListener(m.UNMOUNTED,s),h.renderingContext.root.addEventListener(m.CULLED,u),r=h.contextService.getDPR(),o=h.canvasConfig,i=o.width,o=o.height,a=h.contextService.getContext(),h.clearRect(a,0,0,i*r,o*r),e=h.dprMatrix,n=Jy(r,r,1),e[0]=n[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=n[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1;case 7:case"end":return t.stop()}var e,n},t)}))),l.hooks.destroy.tap(h0.tag,function(){h.renderingContext.root.removeEventListener(m.UNMOUNTED,s),h.renderingContext.root.removeEventListener(m.CULLED,u)}),l.hooks.beginFrame.tap(h0.tag,function(){var t=h.contextService.getContext(),e=h.contextService.getDPR(),n=h.canvasConfig,r=n.width,n=n.height,i=h.canvasRendererPluginOptions,o=i.dirtyObjectNumThreshold,i=i.dirtyObjectRatioThreshold,a=l.getStats(),s=a.total,a=a.rendered,s=a/s;h.clearFullScreen=l.disableDirtyRectangleRendering()||o<a&&i<s,t&&(t.resetTransform(),h.clearFullScreen&&h.clearRect(t,0,0,r*e,n*e))});l.hooks.endFrame.tap(h0.tag,function(){var t=h.contextService.getContext();if(Zy(h.vpMatrix,h.dprMatrix,h.camera.getOrthoMatrix()),h.clearFullScreen)c(h.renderingContext.root);else{var e=h.safeMergeAABB.apply(h,[h.mergeDirtyAABBs(h.renderQueue)].concat(h.removedRBushNodeAABBs.map(function(t){var e=t.minX,n=t.minY,r=t.maxX,t=t.maxY,i=new Oc;return i.setMinMax(Jy(e,n,0),Jy(r,t,0)),i})));if(h.removedRBushNodeAABBs=[],Oc.isEmpty(e))return void(h.renderQueue=[]);var n=h.convertAABB2Rect(e),r=n.x,i=n.y,o=n.width,a=n.height,s=Qy(h.tmpVec3,Jy(r,i,0),h.vpMatrix),r=Qy($y(),Jy(r+o,i+a,0),h.vpMatrix),o=Math.floor(s[0]),i=Math.floor(s[1]),a=Math.ceil(r[0]-s[0]),r=Math.ceil(r[1]-s[1]);t.save(),h.clearRect(t,o,i,a,r),t.beginPath(),t.rect(o,i,a,r),t.clip(),t.setTransform(h.vpMatrix[0],h.vpMatrix[1],h.vpMatrix[4],h.vpMatrix[5],h.vpMatrix[12],h.vpMatrix[13]),h.canvasConfig.renderer.getConfig().enableDirtyRectangleRenderingDebug&&d.dispatchEvent(new Th(pf.DIRTY_RECTANGLE,{dirtyRect:n})),h.searchDirtyObjects(e).sort(function(t,e){return t.sortable.renderOrder-e.sortable.renderOrder}).forEach(function(t){t&&t.isVisible()&&!t.isCulled()&&h.renderDisplayObject(t,l)}),t.restore(),h.renderQueue.forEach(function(t){h.saveDirtyAABB(t)}),h.renderQueue=[]}h.restoreStack.forEach(function(){t.restore()}),h.restoreStack=[]}),l.hooks.render.tap(h0.tag,function(t){h.clearFullScreen||h.renderQueue.push(t)})},e.clearRect=function(t,e,n,r,i){t.clearRect(e,n,r,i);var o=this.canvasConfig.background;o&&(t.fillStyle=o,t.fillRect(e,n,r,i))},e.renderDisplayObject=function(t,e){var n,r=this.contextService.getContext(),i=t.nodeName,o=this.restoreStack[this.restoreStack.length-1],o=(!o||t.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_CONTAINS||(r.restore(),this.restoreStack.pop()),void 0===this.styleRendererFactoryCache[i]&&(this.styleRendererFactoryCache[i]=this.styleRendererFactory(i)),this.styleRendererFactoryCache[i]),i=(void 0===this.pathGeneratorFactoryCache[i]&&(this.pathGeneratorFactoryCache[i]=this.pathGeneratorFactory(i)),this.pathGeneratorFactoryCache[i]),a=t.parsedStyle.clipPath;a&&(this.applyWorldTransform(r,a,t.getWorldTransform()),void 0===this.pathGeneratorFactoryCache[a.nodeName]&&(this.pathGeneratorFactoryCache[a.nodeName]=this.pathGeneratorFactory(a.nodeName)),(n=this.pathGeneratorFactoryCache[a.nodeName])&&(r.save(),this.restoreStack.push(t),r.beginPath(),n(r,a.parsedStyle),r.closePath(),r.clip())),o&&(this.applyWorldTransform(r,t),r.save(),this.applyAttributesToContext(r,t)),i&&(r.beginPath(),i(r,t.parsedStyle),t.nodeName!==M.LINE&&t.nodeName!==M.PATH&&t.nodeName!==M.POLYLINE&&r.closePath()),o&&(o.render(r,t.parsedStyle,t,e),r.restore()),t.renderable.dirty=!1},e.convertAABB2Rect=function(t){var e=t.getMin(),t=t.getMax(),n=Math.floor(e[0]),e=Math.floor(e[1]);return{x:n,y:e,width:Math.ceil(t[0])-n,height:Math.ceil(t[1])-e}},e.mergeDirtyAABBs=function(t){var n=new Oc;return t.forEach(function(t){var e=t.getRenderBounds(),e=(n.add(e),t.renderable.dirtyRenderBounds);e&&n.add(e)}),n},e.searchDirtyObjects=function(t){var e=this,n=t.getMin(),r=n[0],n=n[1],t=t.getMax(),i=t[0],t=t[1];return this.rBush.search({minX:r,minY:n,maxX:i,maxY:t}).map(function(t){t=t.id;return e.displayObjectPool.getByEntity(t)})},e.saveDirtyAABB=function(t){var e=t.renderable,t=(e.dirtyRenderBounds||(e.dirtyRenderBounds=new Oc),t.getRenderBounds());t&&e.dirtyRenderBounds.update(t.center,t.halfExtents)},e.applyAttributesToContext=function(t,e){var n=e.parsedStyle,r=n.stroke,i=n.fill,o=n.opacity,a=n.lineDash,n=n.lineDashOffset;a&&Array.isArray(a)&&t.setLineDash(a.map(function(t){return t.value})),T(n)||(t.lineDashOffset=n.value),T(o)||(t.globalAlpha*=o.value),T(r)||Array.isArray(r)||r.isNone||(t.strokeStyle=e.attributes.stroke),T(i)||Array.isArray(i)||i.isNone||(t.fillStyle=e.attributes.fill)},e.applyWorldTransform=function(t,e,n){var r=0,i=0,o=(e.parsedStyle||{}).anchor,a=o&&o[0].value||0,o=o&&o[1].value||0;0===a&&0===o||(r=-a*((a=e.getGeometryBounds())&&2*a.halfExtents[0]||0),i=-o*(a&&2*a.halfExtents[1]||0)),n?(Xy(this.tmpMat4,e.getLocalTransform()),this.tmpVec3[0]=r,this.tmpVec3[1]=i,this.tmpVec3[2]=0,Ky(this.tmpMat4,this.tmpMat4,this.tmpVec3),Zy(this.tmpMat4,n,this.tmpMat4)):(Xy(this.tmpMat4,e.getWorldTransform()),this.tmpVec3[0]=r,this.tmpVec3[1]=i,this.tmpVec3[2]=0,Ky(this.tmpMat4,this.tmpMat4,this.tmpVec3)),Zy(this.tmpMat4,this.vpMatrix,this.tmpMat4),t.setTransform(this.tmpMat4[0],this.tmpMat4[1],this.tmpMat4[4],this.tmpMat4[5],this.tmpMat4[12],this.tmpMat4[13])},e.safeMergeAABB=function(){for(var e=new Oc,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach(function(t){e.add(t)}),e},t}()).tag="CanvasRenderer",h0=at),_0=(t([p(ou),e("design:type",Object)],E0.prototype,"canvasConfig",void 0),t([p(Rd),e("design:type",Fd)],E0.prototype,"camera",void 0),t([p(Ld),e("design:type",Object)],E0.prototype,"contextService",void 0),t([p(Id),e("design:type",Object)],E0.prototype,"renderingContext",void 0),t([p(Rp),e("design:type",Function)],E0.prototype,"pathGeneratorFactory",void 0),t([p(t0),e("design:type",Function)],E0.prototype,"styleRendererFactory",void 0),t([p(Ih),e("design:type",Ih)],E0.prototype,"displayObjectPool",void 0),t([p(k0),e("design:type",Object)],E0.prototype,"canvasRendererPluginOptions",void 0),t([p(Ah),e("design:type",Qr)],E0.prototype,"rBush",void 0),E0=h0=t([f({contrib:zd})],E0),Hr(function(t){t(g0),t(v0),t(y0),t(f0),t(p0),t(m0),t(b0),t(x0),t(w0),(e={})[M.CIRCLE]=e0,e[M.ELLIPSE]=n0,e[M.RECT]=r0,e[M.IMAGE]=u0,e[M.TEXT]=l0,e[M.LINE]=i0,e[M.POLYLINE]=o0,e[M.POLYGON]=a0,e[M.PATH]=s0;var e,n=e;t({token:t0,useFactory:function(e){return function(t){t=n[t];return t&&e.container.isBound(t)?e.container.get(t):null}}}),t(E0)})),S0=function(n){function t(t){var e;return void 0===t&&(t={}),(e=n.call(this)||this).options=void 0,e.name="canvas-renderer",e.options=t,e}Wy(t,n);var e=t.prototype;return e.init=function(){this.container.register(k0,{useValue:Hy({dirtyObjectNumThreshold:500,dirtyObjectRatioThreshold:.8},this.options)}),this.container.load(_0,!0)},e.destroy=function(){this.container.unload(_0),this.container.remove(k0)},t}(uf);function M0(){M0=function(){return a};var a={},t=Object.prototype,l=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function o(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{o({},"")}catch(t){o=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,o,a,s,e=e&&e.prototype instanceof h?e:h,e=Object.create(e.prototype),r=new x(r||[]);return e._invoke=(i=t,o=n,a=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 k()}for(a.method=t,a.arg=e;;){var n=a.delegate;if(n){n=function t(e,n){var r=e.iterator[n.method];if(void 0===r){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method))return c;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}r=u(r,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,c;r=r.arg;return r?r.done?(n[e.resultName]=r.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,c):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,c)}(n,a);if(n){if(n===c)continue;return n}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===s)throw s="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s="executing";n=u(i,o,a);if("normal"===n.type){if(s=a.done?"completed":"suspendedYield",n.arg===c)continue;return{value:n.arg,done:a.done}}"throw"===n.type&&(s="completed",a.method="throw",a.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}}}a.wrap=s;var c={};function h(){}function d(){}function f(){}var e={},p=(o(e,r,function(){return this}),Object.getPrototypeOf),p=p&&p(p(w([]))),y=(p&&p!==t&&l.call(p,r)&&(e=p),f.prototype=h.prototype=Object.create(e));function g(t){["next","throw","return"].forEach(function(e){o(t,e,function(t){return this._invoke(e,t)})})}function v(a,s){var e;this._invoke=function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var o,t=u(a[t],a,n);if("throw"!==t.type)return(n=(o=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){o.value=t,r(o)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}}function m(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 b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(m,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:k}}function k(){return{value:void 0,done:!0}}return o(y,"constructor",d.prototype=f),o(f,"constructor",d),d.displayName=o(f,i,"GeneratorFunction"),a.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,o(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},a.awrap=function(t){return{__await:t}},g(v.prototype),o(v.prototype,n,function(){return this}),a.AsyncIterator=v,a.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var o=new v(s(t,e,n,r),i);return a.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},g(y),o(y,i,"Generator"),o(y,r,function(){return this}),o(y,"toString",function(){return"[object Generator]"}),a.keys=function(n){var t,r=[];for(t in n)r.push(t);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}},a.values=w,x.prototype={constructor:x,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(b),!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 o.type="throw",o.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],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(a&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){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 o=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,c):this.complete(o)},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),c},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),b(n),c}},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,b(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),c}},a}function T0(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function O0(s){return function(){var t=this,a=arguments;return new Promise(function(e,n){var r=s.apply(t,a);function i(t){T0(r,e,n,i,o,"next",t)}function o(t){T0(r,e,n,i,o,"throw",t)}i(void 0)})}}function P0(t,e){return(P0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}(G=function(){function t(){this.contextService=void 0,this.renderingContext=void 0}return t.prototype.apply=function(e){function i(t){e.hooks.pointerWheel.call(t)}var o=this,a=this.renderingContext.root.ownerDocument.defaultView,s=function(t){e.hooks.pointerMove.call(t)},l=function(t){e.hooks.pointerUp.call(t)},u=function(t){e.hooks.pointerDown.call(t)},c=function(t){e.hooks.pointerOver.call(t)},h=function(t){e.hooks.pointerOut.call(t)},d=function(t){e.hooks.pointerCancel.call(t)};e.hooks.init.tapPromise(d0.tag,O0(M0().mark(function t(){var r;return M0().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:r=o.contextService.getDomElement(),globalThis.navigator.msPointerEnabled?(r.style.msContentZooming="none",r.style.msTouchAction="none"):a.supportsPointerEvents&&(r.style.touchAction="none"),a.supportsPointerEvents?(n=r,globalThis.document.addEventListener("pointermove",s,!0),n.addEventListener("pointerdown",u,!0),n.addEventListener("pointerleave",h,!0),n.addEventListener("pointerover",c,!0),globalThis.addEventListener("pointerup",l,!0)):(n=r,globalThis.document.addEventListener("mousemove",s,!0),n.addEventListener("mousedown",u,!0),n.addEventListener("mouseout",h,!0),n.addEventListener("mouseover",c,!0),globalThis.addEventListener("mouseup",l,!0)),a.supportsTouchEvents&&((e=r).addEventListener("touchstart",u,!0),e.addEventListener("touchend",l,!0),e.addEventListener("touchmove",s,!0),e.addEventListener("touchcancel",d,!0)),r.addEventListener("wheel",i,{passive:!0,capture:!0});case 5:case"end":return t.stop()}var e,n},t)}))),e.hooks.destroy.tap(d0.tag,function(){var t,e,n=o.contextService.getDomElement();globalThis.navigator.msPointerEnabled?(n.style.msContentZooming="",n.style.msTouchAction=""):a.supportsPointerEvents&&(n.style.touchAction=""),a.supportsPointerEvents?(t=n,globalThis.document.removeEventListener("pointermove",s,!0),t.removeEventListener("pointerdown",u,!0),t.removeEventListener("pointerleave",h,!0),t.removeEventListener("pointerover",c,!0),globalThis.removeEventListener("pointerup",l,!0)):(t=n,globalThis.document.removeEventListener("mousemove",s,!0),t.removeEventListener("mousedown",u,!0),t.removeEventListener("mouseout",h,!0),t.removeEventListener("mouseover",c,!0),globalThis.removeEventListener("mouseup",l,!0)),a.supportsTouchEvents&&((e=n).removeEventListener("touchstart",u,!0),e.removeEventListener("touchend",l,!0),e.removeEventListener("touchmove",s,!0),e.removeEventListener("touchcancel",d,!0)),n.removeEventListener("wheel",i,!0)})},t}()).tag="DOMInteraction";var A0,C0=d0=G,N0=(t([p(Ld),e("design:type",Object)],C0.prototype,"contextService",void 0),t([p(Id),e("design:type",Object)],C0.prototype,"renderingContext",void 0),C0=d0=t([f({contrib:zd})],C0),Hr(function(t){t(C0)})),L0=function(i){var t;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).name="dom-interaction",t}t=i,(n=e).prototype=Object.create(t.prototype),P0(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){this.container.load(N0,!0)},n.destroy=function(){this.container.unload(N0)},e}(uf);function I0(){I0=function(){return a};var a={},t=Object.prototype,l=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function o(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{o({},"")}catch(t){o=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,o,a,s,e=e&&e.prototype instanceof h?e:h,e=Object.create(e.prototype),r=new x(r||[]);return e._invoke=(i=t,o=n,a=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 k()}for(a.method=t,a.arg=e;;){var n=a.delegate;if(n){n=function t(e,n){var r=e.iterator[n.method];if(void 0===r){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method))return c;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}r=u(r,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,c;r=r.arg;return r?r.done?(n[e.resultName]=r.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,c):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,c)}(n,a);if(n){if(n===c)continue;return n}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===s)throw s="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s="executing";n=u(i,o,a);if("normal"===n.type){if(s=a.done?"completed":"suspendedYield",n.arg===c)continue;return{value:n.arg,done:a.done}}"throw"===n.type&&(s="completed",a.method="throw",a.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}}}a.wrap=s;var c={};function h(){}function d(){}function f(){}var e={},p=(o(e,r,function(){return this}),Object.getPrototypeOf),p=p&&p(p(w([]))),y=(p&&p!==t&&l.call(p,r)&&(e=p),f.prototype=h.prototype=Object.create(e));function g(t){["next","throw","return"].forEach(function(e){o(t,e,function(t){return this._invoke(e,t)})})}function v(a,s){var e;this._invoke=function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var o,t=u(a[t],a,n);if("throw"!==t.type)return(n=(o=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){o.value=t,r(o)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}}function m(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 b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(m,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:k}}function k(){return{value:void 0,done:!0}}return o(y,"constructor",d.prototype=f),o(f,"constructor",d),d.displayName=o(f,i,"GeneratorFunction"),a.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,o(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},a.awrap=function(t){return{__await:t}},g(v.prototype),o(v.prototype,n,function(){return this}),a.AsyncIterator=v,a.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var o=new v(s(t,e,n,r),i);return a.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},g(y),o(y,i,"Generator"),o(y,r,function(){return this}),o(y,"toString",function(){return"[object Generator]"}),a.keys=function(n){var t,r=[];for(t in n)r.push(t);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}},a.values=w,x.prototype={constructor:x,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(b),!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 o.type="throw",o.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],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(a&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){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 o=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,c):this.complete(o)},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),c},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),b(n),c}},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,b(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),c}},a}function R0(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function D0(s){return function(){var t=this,a=arguments;return new Promise(function(e,n){var r=s.apply(t,a);function i(t){R0(r,e,n,i,o,"next",t)}function o(t){R0(r,e,n,i,o,"throw",t)}i(void 0)})}}function j0(t,e){return(j0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}(W=function(){function t(){this.contextService=void 0,this.renderingContext=void 0,this.canvasConfig=void 0,this.$camera=void 0}var e=t.prototype;return e.apply=function(t){function i(t,e){t=t.getWorldTransform(),e.style.transform="matrix("+[t[0],t[1],t[4],t[5],t[12],t[13]].join(",")+")"}function e(t){var e,n,r=t.target;r.nodeName===M.HTML&&(e=a.getOrCreateEl(r),n=r.ownerDocument.documentElement.attributes,Object.keys(n).forEach(function(t){e.style[t]=n[t]}),Object.keys(r.attributes).forEach(function(t){a.updateAttribute(t,r)}),i(r,e))}function n(t){var e;(t=t.target).nodeName===M.HTML&&(t=a.getId(t),(e=a.contextService.getDomElement().parentNode)&&(t=e.querySelector("#"+t))&&e.removeChild(t))}function r(t){var e=t.target;e.nodeName===M.HTML&&(t=t.attrName,a.updateAttribute(t,e))}function o(t){var e;(t=t.target).nodeName===M.HTML&&(e=a.getOrCreateEl(t),i(t,e))}var a=this;t.hooks.init.tapPromise(A0.tag,D0(I0().mark(function t(){return I0().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:a.renderingContext.root.addEventListener(m.MOUNTED,e),a.renderingContext.root.addEventListener(m.UNMOUNTED,n),a.renderingContext.root.addEventListener(m.ATTR_MODIFIED,r),a.renderingContext.root.addEventListener(m.BOUNDS_CHANGED,o);case 4:case"end":return t.stop()}},t)}))),t.hooks.destroy.tap(A0.tag,function(){a.renderingContext.root.removeEventListener(m.MOUNTED,e),a.renderingContext.root.removeEventListener(m.UNMOUNTED,n),a.renderingContext.root.removeEventListener(m.ATTR_MODIFIED,r),a.renderingContext.root.removeEventListener(m.BOUNDS_CHANGED,o)})},e.getId=function(t){return t.id||"g-html-"+t.entity},e.getOrCreateEl=function(t){var e,n=this.canvasConfig.document,r=this.getId(t),i=this.contextService.getDomElement().parentNode;return i?((e=i.querySelector("#"+r))||(e=(n||document).createElement("div"),(t.parsedStyle.$el=e).id=r,t.name&&e.setAttribute("name",t.name),t.className&&(e.className=t.className),i.appendChild(e),e.style.position="absolute",e.style.left="0",e.style.top="0",e.style["will-change"]="transform",n=t.getWorldTransform(),e.style.transform="matrix("+[n[0],n[1],n[4],n[5],n[12],n[13]].join(",")+")"),e):null},e.updateAttribute=function(t,e){var n=this.getOrCreateEl(e);switch(t){case"innerHTML":var r=e.parsedStyle.innerHTML;Jl(r)?n.innerHTML=r:(n.innerHTML="",n.appendChild(r));break;case"transformOrigin":r=e.parsedStyle.transformOrigin;n.style["transform-origin"]=r[0].value+" "+r[1].value;break;case"width":r=e.computedStyleMap().get("width");n.style.width=r.toString();break;case"height":r=e.computedStyleMap().get("height");n.style.height=r.toString();break;case"zIndex":r=e.parsedStyle.zIndex;n.style["z-index"]=""+r.value;break;case"visibility":r=e.parsedStyle.visibility;n.style.visibility=r.value;break;case"pointerEvents":r=e.parsedStyle.pointerEvents;n.style.pointerEvents=r.value;break;case"opacity":r=e.parsedStyle.opacity;n.style.opacity=""+r.value;break;case"fill":var r=e.parsedStyle.fill,i="";r instanceof pc?i=r.isNone?"transparent":e.getAttribute("fill"):Array.isArray(r)?i=e.getAttribute("fill"):_c(r),n.style.background=i;break;case"stroke":r=e.parsedStyle.stroke,i="";r instanceof pc?i=r.isNone?"transparent":e.getAttribute("stroke"):Array.isArray(r)?i=e.getAttribute("stroke"):_c(r),n.style["border-color"]=i,n.style["border-style"]="solid";break;case"lineWidth":r=e.parsedStyle.lineWidth;n.style["border-width"]=(r.value||0)+"px";break;case"lineDash":n.style["border-style"]="dashed";break;case"filter":i=e.parsedStyle.filter;n.style.filter=i}},t}()).tag="HTMLRendering";var B0=A0=W,F0=(t([p(Ld),e("design:type",Object)],B0.prototype,"contextService",void 0),t([p(Id),e("design:type",Object)],B0.prototype,"renderingContext",void 0),t([p(ou),e("design:type",Object)],B0.prototype,"canvasConfig",void 0),B0=A0=t([f({contrib:zd})],B0),Hr(function(t){t(B0)})),z0=function(i){var t;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).name="html-renderer",t}t=i,(n=e).prototype=Object.create(t.prototype),j0(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){this.container.load(F0,!0)},n.destroy=function(){this.container.unload(F0)},e}(uf);function V0(){V0=function(){return a};var a={},t=Object.prototype,l=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function o(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{o({},"")}catch(t){o=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,o,a,s,e=e&&e.prototype instanceof h?e:h,e=Object.create(e.prototype),r=new x(r||[]);return e._invoke=(i=t,o=n,a=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 k()}for(a.method=t,a.arg=e;;){var n=a.delegate;if(n){n=function t(e,n){var r=e.iterator[n.method];if(void 0===r){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method))return c;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}r=u(r,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,c;r=r.arg;return r?r.done?(n[e.resultName]=r.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,c):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,c)}(n,a);if(n){if(n===c)continue;return n}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===s)throw s="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s="executing";n=u(i,o,a);if("normal"===n.type){if(s=a.done?"completed":"suspendedYield",n.arg===c)continue;return{value:n.arg,done:a.done}}"throw"===n.type&&(s="completed",a.method="throw",a.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}}}a.wrap=s;var c={};function h(){}function d(){}function f(){}var e={},p=(o(e,r,function(){return this}),Object.getPrototypeOf),p=p&&p(p(w([]))),y=(p&&p!==t&&l.call(p,r)&&(e=p),f.prototype=h.prototype=Object.create(e));function g(t){["next","throw","return"].forEach(function(e){o(t,e,function(t){return this._invoke(e,t)})})}function v(a,s){var e;this._invoke=function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var o,t=u(a[t],a,n);if("throw"!==t.type)return(n=(o=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){o.value=t,r(o)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}}function m(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 b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(m,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:k}}function k(){return{value:void 0,done:!0}}return o(y,"constructor",d.prototype=f),o(f,"constructor",d),d.displayName=o(f,i,"GeneratorFunction"),a.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,o(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},a.awrap=function(t){return{__await:t}},g(v.prototype),o(v.prototype,n,function(){return this}),a.AsyncIterator=v,a.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var o=new v(s(t,e,n,r),i);return a.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},g(y),o(y,i,"Generator"),o(y,r,function(){return this}),o(y,"toString",function(){return"[object Generator]"}),a.keys=function(n){var t,r=[];for(t in n)r.push(t);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}},a.values=w,x.prototype={constructor:x,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(b),!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 o.type="throw",o.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],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(a&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){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 o=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,c):this.complete(o)},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),c},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),b(n),c}},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,b(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),c}},a}function G0(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function H0(s){return function(){var t=this,a=arguments;return new Promise(function(e,n){var r=s.apply(t,a);function i(t){G0(r,e,n,i,o,"next",t)}function o(t){G0(r,e,n,i,o,"throw",t)}i(void 0)})}}function W0(t,e){t.prototype=Object.create(e.prototype),U0(t.prototype.constructor=t,e)}function U0(t,e){return(U0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var Y0=function(){function t(){this.$container=void 0,this.$canvas=void 0,this.dpr=void 0,this.context=void 0,this.canvasConfig=void 0}var e=t.prototype;return e.init=function(){var t=H0(V0().mark(function t(){var e,n,r;return V0().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:e=this.canvasConfig,r=e.container,n=e.canvas,e=e.devicePixelRatio,n?(this.$canvas=n,r&&n.parentElement!==r&&r.appendChild(n),this.$container=n.parentElement,this.canvasConfig.container=this.$container):r&&(this.$container=Jl(r)?document.getElementById(r):r,this.$container&&(n=document.createElement("canvas"),this.$container.appendChild(n),this.$container.style.position||(this.$container.style.position="relative"),this.$canvas=n)),this.context=this.$canvas.getContext("2d"),r=1<=(r=e||As&&window.devicePixelRatio||1)?Math.ceil(r):1,this.dpr=r,this.resize(this.canvasConfig.width,this.canvasConfig.height);case 7:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),e.getContext=function(){return this.context},e.getDomElement=function(){return this.$canvas},e.getDPR=function(){return this.dpr},e.getBoundingClientRect=function(){if(this.$canvas.getBoundingClientRect)return this.$canvas.getBoundingClientRect()},e.destroy=function(){this.$container&&this.$canvas&&this.$canvas.parentNode&&this.$container.removeChild(this.$canvas)},e.resize=function(t,e){var n;this.$canvas&&(this.$canvas.width=this.dpr*t,this.$canvas.height=this.dpr*e,n=this.$canvas,t=t,e=e,As&&n.style&&(n.style.width=t+"px",n.style.height=e+"px"))},e.applyCursorStyle=function(t){this.$container&&this.$container.style&&(this.$container.style.cursor=t)},e.toDataURL=function(){var e=H0(V0().mark(function t(e){var n,r;return V0().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=(r=e=void 0===e?{}:e).type,r=r.encoderOptions,t.abrupt("return",this.context.canvas.toDataURL(n,r));case 3:case"end":return t.stop()}},t,this)}));return function(t){return e.apply(this,arguments)}}(),t}(),q0=(t([p(ou),e("design:type",Object)],Y0.prototype,"canvasConfig",void 0),Y0=t([f({token:Ld})],Y0),Hr(function(t){t(Y0)})),X0=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).name="canvas-context-register",t}W0(t,i);var e=t.prototype;return e.init=function(){this.container.load(q0,!0)},e.destroy=function(){this.container.unload(q0)},t}(uf),Z0=function(e){function t(t){t=e.call(this,t)||this;return t.registerPlugin(new X0),t.registerPlugin(new Fy),t.registerPlugin(new Up),t.registerPlugin(new S0),t.registerPlugin(new L0),t.registerPlugin(new Ay),t.registerPlugin(new z0),t}return W0(t,e),t}(H);function K0(){K0=function(){return a};var a={},t=Object.prototype,l=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function o(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{o({},"")}catch(t){o=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,o,a,s,e=e&&e.prototype instanceof h?e:h,e=Object.create(e.prototype),r=new x(r||[]);return e._invoke=(i=t,o=n,a=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 k()}for(a.method=t,a.arg=e;;){var n=a.delegate;if(n){n=function t(e,n){var r=e.iterator[n.method];if(void 0===r){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method))return c;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}r=u(r,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,c;r=r.arg;return r?r.done?(n[e.resultName]=r.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,c):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,c)}(n,a);if(n){if(n===c)continue;return n}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===s)throw s="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s="executing";n=u(i,o,a);if("normal"===n.type){if(s=a.done?"completed":"suspendedYield",n.arg===c)continue;return{value:n.arg,done:a.done}}"throw"===n.type&&(s="completed",a.method="throw",a.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}}}a.wrap=s;var c={};function h(){}function d(){}function f(){}var e={},p=(o(e,r,function(){return this}),Object.getPrototypeOf),p=p&&p(p(w([]))),y=(p&&p!==t&&l.call(p,r)&&(e=p),f.prototype=h.prototype=Object.create(e));function g(t){["next","throw","return"].forEach(function(e){o(t,e,function(t){return this._invoke(e,t)})})}function v(a,s){var e;this._invoke=function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var o,t=u(a[t],a,n);if("throw"!==t.type)return(n=(o=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){o.value=t,r(o)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}}function m(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 b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(m,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:k}}function k(){return{value:void 0,done:!0}}return o(y,"constructor",d.prototype=f),o(f,"constructor",d),d.displayName=o(f,i,"GeneratorFunction"),a.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,o(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},a.awrap=function(t){return{__await:t}},g(v.prototype),o(v.prototype,n,function(){return this}),a.AsyncIterator=v,a.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var o=new v(s(t,e,n,r),i);return a.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},g(y),o(y,i,"Generator"),o(y,r,function(){return this}),o(y,"toString",function(){return"[object Generator]"}),a.keys=function(n){var t,r=[];for(t in n)r.push(t);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}},a.values=w,x.prototype={constructor:x,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(b),!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 o.type="throw",o.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],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(a&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){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 o=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,c):this.complete(o)},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),c},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),b(n),c}},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,b(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),c}},a}function $0(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function J0(s){return function(){var t=this,a=arguments;return new Promise(function(e,n){var r=s.apply(t,a);function i(t){$0(r,e,n,i,o,"next",t)}function o(t){$0(r,e,n,i,o,"throw",t)}i(void 0)})}}function Q0(){return(Q0=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 tg(t,e){return(tg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var eg,ng=d.defineToken("DragndropPluginOptions"),rg=((pt=function(){function t(){this.sceneGraphService=void 0,this.renderingContext=void 0,this.dragndropPluginOptions=void 0}var e=t.prototype;return e.findClosestDraggable=function(t){for(var e=t.composedPath(),n=0;n<e.length;n++){var r=e[n];if(Lh.isElement(r)&&r.getAttribute("draggable"))return r}return null},e.apply=function(t){function e(t){var e,a,s,l,u,c,n,h=t.target,d=h===p,f=d&&o?p:r.findClosestDraggable(t);f&&(e=function(){var e=J0(K0().mark(function t(e){var n,r,i,o;return K0().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(a){t.next=8;break}if(r=e.timeStamp-s,i=ya([e.clientX,e.clientY],l),r<=m||i<=v)return t.abrupt("return");t.next=5;break;case 5:e.type="dragstart",f.dispatchEvent(e),a=!0;case 8:if(e.type="drag",e.dx=e.clientX-c[0],e.dy=e.clientY-c[1],f.dispatchEvent(e),c=[e.clientX,e.clientY],d){t.next=23;break}return n=h.style.pointerEvents,h.style.pointerEvents="none",r="pointer"===y?[e.canvasX,e.canvasY]:h.getBounds().center,t.next=19,p.elementFromPoint(r[0],r[1]);case 19:i=t.sent,h.style.pointerEvents=n,o=(null==i?void 0:i.closest("[droppable=true]"))||(g?p:null),u!==o&&(u&&(e.type="dragleave",(e.target=u).dispatchEvent(e)),o&&(e.type="dragenter",(e.target=o).dispatchEvent(e)),(u=o)&&(e.type="dragover",(e.target=u).dispatchEvent(e)));case 23:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),a=!1,s=t.timeStamp,l=[t.clientX,t.clientY],u=null,c=[t.clientX,t.clientY],i.addEventListener("pointermove",e),h.addEventListener("pointerup",n=function(){a&&(u&&(t.type="drop",(t.target=u).dispatchEvent(t)),t.type="dragend",t.detail={preventClick:!0},f.dispatchEvent(t),a=!1),i.removeEventListener("pointermove",e)},{once:!0}),h.addEventListener("pointerupoutside",n,{once:!0}))}var r=this,p=this.renderingContext.root.ownerDocument,i=p.defaultView,n=this.dragndropPluginOptions,y=n.overlap,o=n.isDocumentDraggable,g=n.isDocumentDroppable,v=n.dragstartDistanceThreshold,m=n.dragstartTimeThreshold;t.hooks.init.tapPromise(eg.tag,J0(K0().mark(function t(){return K0().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:i.addEventListener("pointerdown",e);case 1:case"end":return t.stop()}},t)}))),t.hooks.destroy.tap(eg.tag,function(){i.removeEventListener("pointerdown",e)})},t}()).tag="Dragndrop",eg=pt),ig=(t([p(Cd),e("design:type",Object)],rg.prototype,"sceneGraphService",void 0),t([p(Id),e("design:type",Object)],rg.prototype,"renderingContext",void 0),t([p(ng),e("design:type",Object)],rg.prototype,"dragndropPluginOptions",void 0),rg=eg=t([f({contrib:zd})],rg),Hr(function(t){t(rg)})),og=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),tg(r.prototype.constructor=r,t);var r=e.prototype;return r.init=function(){this.container.register(ng,{useValue:Q0({overlap:"pointer",isDocumentDraggable:!1,isDocumentDroppable:!1,dragstartDistanceThreshold:0,dragstartTimeThreshold:0},this.options)}),this.container.load(ig,!0)},r.destroy=function(){this.container.remove(ng),this.container.unload(ig)},e}(uf);const ag=({width:t,height:e,container:n})=>{const r=new Z0;return r.registerPlugin(new og),new Gf({container:n,width:t,height:e,renderer:r})},sg=(ag.props={},()=>[["cartesian"]]),lg=(sg.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]]),ug=(lg.props={},()=>[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]]),cg=(ug.props={},()=>[["parallel",0,1,0,1]]),hg=(cg.props={},({focusX:t=0,focusY:e=0,distortionX:n=2,distortionY:r=2})=>[["fisheye",t,e,n,r]]),dg=(hg.props={},({value:e})=>t=>t.map(()=>e)),fg=(dg.props={},({value:e})=>t=>t.map(e)),pg=(fg.props={},({value:e})=>t=>t.map(t=>t[e])),yg=(pg.props={},({value:t})=>()=>t);function gg(){return[{name:"color"},{name:"shape"},{name:"enterType"},{name:"enterDelay",scaleName:"enter"},{name:"enterDuration",scaleName:"enter"},{name:"enterEasing"},{name:"key",scale:"identity"},{name:"groupKey",scale:"identity"},{name:"label",scale:"identity"}]}function vg(){return[...gg(),{name:"title",scale:"identity"},{name:"tooltip",scale:"identity",independent:!0}]}function mg(){return[{type:"maybeArrayField"}]}function bg(){return[{type:"maybeKey"}]}yg.props={};const xg=()=>(t,e,n,l)=>{const{x:u,y:c,y1:h,series:d}=n,f=e.x,p=e.series;return[t,Array.from(t,t=>{var e=f.getBandWidth(f.invert(+u[t])),n=e*(p?p.getBandWidth(p.invert(+(null===d||void 0===d?void 0:d[t]))):1),e=(+(null===d||void 0===d?void 0:d[t])||0)*e,e=+u[t]+e,n=e+n,r=+c[t],t=+h[t];const i=[e,r],o=[n,r],a=[n,t],s=[e,t];return[i,o,a,s].map(t=>l.map(t))})]};function wg(t,e){return null==t||null==e?NaN:t<e?-1:e<t?1:e<=t?0:NaN}function kg(t,e){t=function(e,n){let r=0,i,o=0,a=0;if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(i=t-o,o+=i/++r,a+=i*(t-o));else{let t=-1;for(var s of e)null!=(s=n(s,++t,e))&&(s=+s)>=s&&(i=s-o,o+=i/++r,a+=i*(s-o))}if(1<r)return a/(r-1)}(t,e);return t&&Math.sqrt(t)}function Eg(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 o of e)null!=(o=n(o,++t,e))&&(void 0===r?o>=o&&(r=i=o):(r>o&&(r=o),i<o&&(i=o)))}return[r,i]}xg.props={defaultShape:"rect",defaultLabelShape:"label",channels:[...vg(),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"}],preInference:[...mg(),{type:"maybeZeroY1"},{type:"maybeZeroX"},{type:"maybeStackY",series:!0}],postInference:[...bg(),{type:"maybeTitleX"},{type:"maybeTooltipY"}],shapes:["rect","hollowRect","funnel","pyramid"]};class _g 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(Sg(this,t))}has(t){return super.has(Sg(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 Sg({_intern:t,_key:e},n){e=e(n);return t.has(e)?t.get(e):n}function Mg(t){return t}function Tg(t,...e){return h=c=Mg,d=e,function t(e,n){if(n>=d.length)return h(e);const r=new _g,i=d[n++];let o=-1;for(const s of e){var a=i(s,++o,e);const l=r.get(a);l?l.push(s):r.set(a,[s])}for(const[u,e]of r)r.set(u,t(e,n));return c(r)}(t,0);var c,h,d}function Og(t,e){return(null==t||!(t<=t))-(null==e||!(e<=e))||(t<e?-1:e<t?1:0)}function Pg(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 Ag(t,e){let n,r=-1,i=-1;if(void 0===e)for(const a of t)++i,null!=a&&(n<a||void 0===n&&a>=a)&&(n=a,r=i);else for(var o of t)null!=(o=e(o,++i,t))&&(n<o||void 0===n&&o>=o)&&(n=o,r=i);return r}function Cg(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 Ng(n,r,i=0,o=n.length-1,a){for(a=void 0===a?Og:function(r=wg){if(r===wg)return Og;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))}}(a);i<o;){600<o-i&&(s=o-i+1,l=r-i+1,c=Math.log(s),u=.5*Math.exp(2*c/3),c=.5*Math.sqrt(c*u*(s-u)/s)*(l-s/2<0?-1:1),Ng(n,r,Math.max(i,Math.floor(r-l*u/s+c)),Math.min(o,Math.floor(r+(s-l)*u/s+c)),a));var s,l,u,c,h=n[r];let t=i,e=o;for(Lg(n,i,r),0<a(n[o],h)&&Lg(n,i,o);t<e;){for(Lg(n,t,e),++t,--e;a(n[t],h)<0;)++t;for(;0<a(n[e],h);)--e}0===a(n[i],h)?Lg(n,i,e):Lg(n,++e,o),e<=r&&(i=e+1),r<=e&&(o=e-1)}return n}function Lg(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function Ig(t,e,n){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){if((e=+e)<=0||n<2)return Cg(t);if(1<=e)return Pg(t);var n=(n-1)*e,e=Math.floor(n),r=Pg(Ng(t,e).subarray(0,e+1));return r+(Cg(t.subarray(e+1))-r)*(n-e)}}function Rg(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 o of e)null!=(o=n(o,++t,e))&&(o=+o)>=o&&(++r,i+=o)}if(r)return i/r}function Dg(t,e){return Ig(t,.5,e)}function jg(e,n=wg){let r,i=!1;if(1===n.length){let t;for(const a of e){var o=n(a);(i?wg(o,t)<0:0===wg(o,o))&&(r=a,t=o,i=!0)}}else for(const t of e)(i?n(t,r)<0:0===n(t,t))&&(r=t,i=!0);return r}function Bg(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 Fg(t){const e=t.getOptions()["transformations"];return e.map(([t])=>t).filter(t=>"transpose"===t).length%2!=0}function zg(t){const e=t.getOptions()["transformations"];return e.some(([t])=>"polar"===t)}function Vg(t){const e=t.getOptions()["transformations"];return e.some(([t])=>"parallel"===t)}const Gg=(t,e,n,r)=>{const{series:i,x:o,y:a}=n;if(void 0===o||void 0===a)throw new Error("Missing encode for x or y channel.");const s=i?Array.from(Tg(t,t=>i[t]).values()):[t];return[s.map(t=>t[0]),Array.from(s,t=>t.map(t=>r.map([+o[t],+a[t]]))),s]},Hg=(t,e,n,i)=>{const o=Object.entries(n).filter(([t])=>t.startsWith("position")).map(([,t])=>t);if(0===o.length)throw new Error("Missing encode for position channel.");return[t,Array.from(t,e=>{var t=o.map(t=>+t[e]),n=i.map(t);const r=[];for(let t=0;t<n.length;t+=2)r.push([n[t],n[t+1]]);return r})]},Wg=()=>(t,e,n,r)=>{const i=Vg(r)?Hg:Gg;return i(t,e,n,r)},Ug=(Wg.props={defaultShape:"line",defaultLabelShape:"label",channels:[...vg(),{name:"x"},{name:"y"},{name:"position",independent:!0},{name:"size"},{name:"series",scale:"identity"}],preInference:[...mg(),{type:"maybeSeries"}],postInference:[...bg(),{type:"maybeTitleX"},{type:"maybeTooltipY"},{type:"maybeTooltipPosition"}],shapes:["line","smooth"]},()=>(t,e,n,o)=>{const{x:a,y:s,size:l,dx:u,dy:c}=n,[h,d]=o.getSize();return[t,Array.from(t,t=>{var e=+((null===u||void 0===u?void 0:u[t])||0),n=+((null===c||void 0===c?void 0:c[t])||0),e=+a[t]+e,n=+s[t]+n,t=+l[t],r=t/h,t=t/d,i=[e+r,n+t];return[o.map([e-r,n-t]),o.map(i)]})]}),Yg=(Ug.props={defaultShape:"point",defaultLabelShape:"label",channels:[...vg(),{name:"x",required:!0},{name:"y",required:!0},{name:"size",required:!0},{name:"dx",scale:"identity"},{name:"dy",scale:"identity"}],preInference:[...mg(),{type:"maybeZeroY"},{type:"maybeZeroX"},{type:"maybeSize"}],postInference:[...bg(),{type:"maybeTitleX"},{type:"maybeTooltipY"}],shapes:["bowtie","cross","diamond","hexagon","hollowBowtie","hollowDiamond","hollowHexagon","hollowPoint","hollowSquare","hollowTriangle","hollowTriangleDown","hyphen","linePoint","plus","point","square","tick","triangle","triangleDown"]},()=>(t,e,n,r)=>{const{x:i,y:o}=n,a=e["x"];return[t,Array.from(t,t=>{var e=+i[t],t=+o[t],n=(null==(n=null===a||void 0===a?void 0:a.getBandWidth)?void 0:n.call(a))||0;return[r.map([e+n/2,t])]})]}),qg=(Yg.props={defaultShape:"text",defaultLabelShape:"label",channels:[...vg(),{name:"x",required:!0},{name:"y",required:!0},{name:"text",required:!0,scale:"identity"},{name:"fontSize"},{name:"rotate"}],preInference:[...mg()],postInference:[...bg(),{type:"maybeTitleX"},{type:"maybeTooltipY"}],shapes:["text"]},()=>(t,e,n,l)=>{const{x:u,y:c}=n,h=e.x,d=e.y;return[t,Array.from(t,t=>{var e=h.getBandWidth(h.invert(+u[t])),n=d.getBandWidth(d.invert(+c[t])),r=+u[t],t=+c[t];const i=[r,t],o=[r+e,t],a=[r+e,t+n],s=[r,t+n];return[i,o,a,s].map(t=>l.map(t))})]}),Xg=(qg.props={defaultShape:"rect",defaultLabelShape:"label",channels:[...vg(),{name:"x",required:!0,scale:"band"},{name:"y",required:!0,scale:"band"}],preInference:[...mg(),{type:"maybeZeroX"},{type:"maybeZeroY"}],postInference:[...bg(),{type:"maybeTitleX"},{type:"maybeTooltipY"}],shapes:["rect","hollowRect"]},()=>(t,e,n,o)=>{const{x:a,y:s,y1:l,series:r}=n,i=r?Array.from(Tg(t,t=>r[t]).values()):[t];return[i.map(t=>t[0]),Array.from(i,e=>{var n=e.length;const r=new Array(2*n);for(let t=0;t<e.length;t++){var i=e[t];r[t]=o.map([+a[i],+s[i]]),r[n+t]=o.map([+a[i],+l[i]])}return r}),i]}),Zg=(Xg.props={defaultShape:"area",defaultLabelShape:"label",channels:[...vg(),{name:"x",required:!0},{name:"y",required:!0},{name:"size"},{name:"series",scale:"identity"}],preInference:[...mg(),{type:"maybeSeries"},{type:"maybeZeroY1"}],postInference:[...bg(),{type:"maybeTitleX"},{type:"maybeTooltipY"}],shapes:["area","smooth"]},()=>(t,e,n,o)=>{const a=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=>{const n=[];for(let t=0;t<a.length;t++){var r=a[t][e];if(void 0===r)break;var i=s[t][e];n.push(o.map([+r,+i]))}return n});return[t,n]}),Kg=(Zg.props={defaultShape:"polygon",defaultLabelShape:"label",channels:[...vg(),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...mg()],postInference:[...bg(),{type:"maybeTitleX"},{type:"maybeTooltipY"}],shapes:["polygon"]},(...t)=>Zg(...t)),$g=(Kg.props={defaultShape:"edge",defaultLabelShape:"label",channels:[...vg(),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...mg()],postInference:[...bg(),{type:"maybeTitleX"},{type:"maybeTooltipY"}],shapes:["edge","arc","vhv","smoothEdge","ribbon"]},(...t)=>Zg(...t)),Jg=($g.props={defaultShape:"pointNode",defaultLabelShape:"label",channels:[...vg(),{name:"x",required:!0},{name:"y",required:!0},{name:"size",required:!0}],preInference:[...mg()],postInference:[...bg(),{type:"maybeTitleX"},{type:"maybeTooltipY"}],shapes:["pointNode","polygonNode"]},()=>(t,e,n,r)=>{const{x:i,y:o,x1:a,y1:s}=n,l=(null==(e=null==(n=e.x)?void 0:n.getBandWidth)?void 0:e.call(n))||0;e=t.map(t=>[r.map([+i[t]+l/2,+o[t]]),r.map([+a[t]+l/2,+s[t]])]);return[t,e]}),Qg=(Jg.props={defaultShape:"link",defaultLabelShape:"label",channels:[...vg(),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...mg()],postInference:[...bg(),{type:"maybeTitleX"},{type:"maybeTooltipY"}],shapes:["link"]},()=>(t,e,n,r)=>{const{x:i,y:o}=n,a=e["x"];return[t,Array.from(t,t=>{var e=+i[t],t=+o[t],n=(null==(n=null===a||void 0===a?void 0:a.getBandWidth)?void 0:n.call(a))||0;return[r.map([e+n/2,t])]})]}),tv=(Qg.props={defaultShape:"image",defaultLabelShape:"label",channels:[...vg(),{name:"x",required:!0},{name:"y",required:!0},{name:"src",required:!0,scale:"identity"},{name:"size"}],preInference:[...mg()],postInference:[...bg(),{type:"maybeTitleX"},{type:"maybeTooltipY"}],shapes:["image"]},()=>(t,e,n,l)=>{const{x:u,y:c,y1:h,y2:d,y3:f,y4:p,series:y}=n,g=e.x,v=e.series;return[t,Array.from(t,t=>{var e=g.getBandWidth(g.invert(+u[t])),n=e*(v?v.getBandWidth(v.invert(+(null===y||void 0===y?void 0:y[t]))):1),e=(+(null===y||void 0===y?void 0:y[t])||0)*e,e=+u[t]+e+n/2,[t,r,i,o,a]=[+c[t],+h[t],+d[t],+f[t],+p[t]];const s=[[e-n/2,a],[e+n/2,a],[e,a],[e,o],[e-n/2,o],[e+n/2,o],[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]];return s.map(t=>l.map(t))})]}),ev=(tv.props={defaultShape:"box",defaultLabelShape:"label",channels:[...vg(),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"}],preInference:[...mg()],postInference:[...bg(),{type:"maybeTitleX"},{type:"maybeTooltipY"}],shapes:["box"]},()=>(t,e,n,i)=>{const{x:o,y:a,size:s,rotate:l}=n,[u,c]=i.getSize();n=t.map(t=>{var e=+l[t]/180*Math.PI,n=+s[t],r=n/u,n=n/c,r=r*Math.cos(e),n=-n*Math.sin(e);return[i.map([+o[t]-r/2,+a[t]-n/2]),i.map([+o[t]+r/2,+a[t]+n/2])]});return[t,n]}),nv=(ev.props={defaultShape:"vector",defaultLabelShape:"label",channels:[...vg(),{name:"x",required:!0},{name:"y",required:!0},{name:"rotate",required:!0,scale:"identity"},{name:"size",required:!0}],preInference:[...mg()],postInference:[...bg(),{type:"maybeTitleX"},{type:"maybeTooltipY"}],shapes:["vector"]},()=>Yg()),rv=(nv.props={defaultShape:"annotation.text",defaultLabelShape:"label",channels:[...gg(),{name:"x",required:!0},{name:"y",required:!0},{name:"text",required:!0,scale:"identity"},{name:"fontSize"},{name:"rotate"}],preInference:[...mg()],postInference:[...bg()],shapes:["annotation.text","annotation.badge"]},()=>(t,e,n,r)=>{const i=n["y"];return[t,Array.from(t,t=>{const e=[0,i[t]],n=[1,i[t]];return[e,n].map(t=>r.map(t))})]}),iv=(rv.props={defaultShape:"annotation.line",defaultLabelShape:"label",channels:[...gg(),{name:"y",required:!0}],preInference:[...mg()],postInference:[...bg()],shapes:["annotation.line"]},()=>(t,e,n,r)=>{const i=n["x"];return[t,Array.from(t,t=>{const e=[i[t],1],n=[i[t],0];return[e,n].map(t=>r.map(t))})]}),ov=(iv.props={defaultShape:"annotation.line",defaultLabelShape:"label",channels:[...gg(),{name:"x",required:!0}],preInference:[...mg()],postInference:[...bg()],shapes:["annotation.line"]},(...t)=>Jg(...t));function av(t,e,n,r){if(e)return()=>[0,1];const{[t]:i,[t+"1"]:o}=n;return t=>{var e=(null==(e=r.getBandWidth)?void 0:e.call(r,r.invert(+o[t])))||0;return[i[t],o[t]+e]}}function sv(t={}){const{extendX:r=!1,extendY:i=!1}=t;return(t,e,n,l)=>{const u=av("x",r,n,e.x),c=av("y",i,n,e.y);return[t,Array.from(t,t=>{var[e,n]=u(t),[t,r]=c(t);const i=[e,t],o=[n,t],a=[n,r],s=[e,r];return[i,o,a,s].map(t=>l.map(t))})]}}ov.props={defaultShape:"annotation.connector",defaultLabelShape:"label",channels:[...gg(),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...mg()],postInference:[...bg()],shapes:["annotation.connector"]};const lv=()=>sv(),uv=(lv.props={defaultShape:"annotation.range",defaultLabelShape:"label",channels:[...gg(),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...mg()],postInference:[...bg()],shapes:["annotation.range"]},()=>sv({extendY:!0})),cv=(uv.props={defaultShape:"annotation.range",defaultLabelShape:"label",channels:[...gg(),{name:"x",required:!0}],preInference:[...mg()],postInference:[...bg()],shapes:["annotation.range"]},()=>sv({extendX:!0})),hv=(cv.props={defaultShape:"annotation.range",defaultLabelShape:"label",channels:[...gg(),{name:"y",required:!0}],preInference:[...mg()],postInference:[...bg()],shapes:["annotation.range"]},()=>["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"]),dv=(hv.props={},()=>["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"]);dv.props={};class fv{constructor(t){this.options=C({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=C({},this.options,t),this.rescale(t)}rescale(t){}}function pv(e,n,r){for(let t=0;t<n.length;t+=1)e.has(n[t])||e.set(r(n[t]),t)}function yv(t){const{value:e,from:n,to:r,mapper:i,notFoundReturn:o}=t;let a=i.get(e);if(void 0===a){if(o)return o;a=n.push(e)-1,i.set(e,a)}return r[a%r.length]}function gv(t){return t instanceof Date?t=>""+t:"object"==typeof t?t=>JSON.stringify(t):t=>t}class vv extends fv{constructor(t){super(t)}getDefaultOptions(){return{domain:[],range:[]}}map(t){return 0===this.domainIndexMap.size&&pv(this.domainIndexMap,this.getDomain(),this.domainKey),yv({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&pv(this.rangeIndexMap,this.getRange(),this.rangeKey),yv({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=gv(e),this.rangeKey=gv(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 vv(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 mv(t){const e=t["domain"];var n=e.length;if(0===n)return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};const{range:r,paddingOuter:i,paddingInner:o,flex:a=[],round:s,align:l}=t;t=a,c=e.length;var u=0<(u=c-t.length)?[...t,...new Array(u).fill(1)]:u<0?t.slice(0,c):t,[c,t]=r,t=t-c,h=t/(2/n*i+1-1/n*o);const d=h*o/n;h-=n*d;const f=function(t){const e=Math.min(...t);return t.map(t=>t/e)}(u),p=h/f.reduce((t,e)=>t+e);u=new Map(e.map((t,e)=>{e=f[e]*p;return[t,s?Math.floor(e):e]}));const y=new Map(e.map((t,e)=>{e=f[e]*p+d;return[t,s?Math.floor(e):e]}));h=Array.from(y.values()).reduce((t,e)=>t+e),c+=(t-(h-h/n*o))*l;let g=s?Math.round(c):c;const v=new Array(n);for(let t=0;t<n;t+=1){v[t]=(m=g,Math.round(1e12*m)/1e12);var m=e[t];g+=y.get(m)}return{valueBandWidth:u,valueStep:y,adjustedRange:v}}class bv extends vv{constructor(t){super(t)}getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:void 0,flex:[]}}clone(){return new bv(this.options)}getStep(t){return void 0===this.valueStep?1:void 0===t?Array.from(this.valueStep.values())[0]:this.valueStep.get(t)}getBandWidth(t){return void 0===this.valueBandWidth?1: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}=mv({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}}function xv(t,...e){return e.reduce((e,n)=>t=>e(n(t)),t)}function wv(e,n){return n-e?t=>(t-e)/(n-e):t=>.5}function kv(t,e,n,r,i){let o=n||0,a=r||t.length;const s=i||(t=>t);for(;o<a;){var l=Math.floor((o+a)/2);s(t[l])>e?a=l:o=l+1}return o}const Ev=Math.sqrt(50),_v=Math.sqrt(10),Sv=Math.sqrt(2);function Mv(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>=Ev?10:n>=_v?5:n>=Sv?2:1)*10**t:-(10**-t)/(n>=Ev?10:n>=_v?5:n>=Sv?2:1)}function Tv(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>=Ev?r*=10:n>=_v?r*=5:n>=Sv&&(r*=2),e<t?-r:r}const Ov=(t,e,n=5)=>{const r=[t,e];let i=0,o=r.length-1,a=r[i],s=r[o],l;return s<a&&([a,s]=[s,a],[i,o]=[o,i]),0<(l=Mv(a,s,n))?(a=Math.floor(a/l)*l,s=Math.ceil(s/l)*l,l=Mv(a,s,n)):l<0&&(a=Math.ceil(a*l)/l,s=Math.floor(s*l)/l,l=Mv(a,s,n)),0<l?(r[i]=Math.floor(a/l)*l,r[o]=Math.ceil(s/l)*l):l<0&&(r[i]=Math.ceil(a*l)/l,r[o]=Math.floor(s*l)/l),r},Pv=36e5,Av=864e5,Cv=7*Av;Av,Av;function Nv(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 u=(t,e)=>{t=new Date(+t-1);return l(t,e),s(t,e),l(t),t};return{ceil:u,floor:(t,e)=>{t=new Date(+t);return l(t,e),t},range:(t,e,n,r)=>{const i=[];for(var o=Math.floor(n),a=r?u(t,n):u(t);+a<+e;s(a,o),l(a))i.push(new Date(+a));return i},duration:t}}Q=Nv(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),s=Nv(1e3,t=>{t.setMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getSeconds()),c=Nv(6e4,t=>{t.setSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getMinutes()),a=Nv(Pv,t=>{t.setMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+Pv*e)},t=>t.getHours()),l=Nv(Av,t=>{t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Av*e)},t=>t.getDate()-1);const Lv=Nv(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());var r=Nv(Cv,t=>{t.setDate(t.getDate()-t.getDay()%7),t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Cv*e)},t=>{var e=Lv.floor(t),t=new Date(+t);return Math.floor((+t-+e)/Cv)}),b=Nv(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 Iv={millisecond:Q,second:s,minute:c,hour:a,day:l,week:r,month:Lv,year:b};tt=Nv(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),u=Nv(1e3,t=>{t.setUTCMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getUTCSeconds()),dt=Nv(6e4,t=>{t.setUTCSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getUTCMinutes()),_t=Nv(Pv,t=>{t.setUTCMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+Pv*e)},t=>t.getUTCHours()),ft=Nv(Av,t=>{t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Av*e)},t=>t.getUTCDate()-1);const Rv=Nv(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());ge=Nv(Cv,t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7)%7),t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Cv*e)},t=>{var e=Rv.floor(t),t=new Date(+t);return Math.floor((+t-+e)/Cv)}),o=Nv(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 Dv={millisecond:tt,second:u,minute:dt,hour:_t,day:ft,week:ge,month:Rv,year:o};function jv(t,e,n,r,i){var t=+t,e=+e,{tickIntervals:i,year:o,millisecond:a}=function(t){var{year:t,month:e,week:n,day:r,hour:i,minute:o,second:a,millisecond:s}=t?Dv:Iv;return{tickIntervals:[[a,1],[a,5],[a,15],[a,30],[o,1],[o,5],[o,15],[o,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,u=i.length,c=kv(i,l,0,u,s);let h;return h=c===u?[o,Tv(t/o.duration,e/o.duration,n)]:c?([u,o]=l/s(i[c-1])<s(i[c])/l?i[c-1]:i[c],[u,r?Math.ceil(r/u.duration):o]):[a,Math.max(Tv(t,e,n),1)]}const Bv=(t,e,n,r,i)=>{var o=e<t,a=o?e:t,t=o?t:e;const[s,l]=jv(a,t,n,r,i),u=[s.floor(a,l),s.ceil(t,l)];return o?u.reverse():u};function Fv(t){return!pp(t)&&!fp(t)&&!Number.isNaN(t)}const zv=e=>t=>-e(-t),Vv=(t,e)=>{const n=Math.log(t);t=t===Math.E?Math.log:t=>Math.log(t)/n;return e?zv(t):t},Gv=(e,t)=>{var n=e===Math.E?Math.exp:t=>e**t;return t?zv(n):n},Hv=(t,e,n,r)=>{var i=t<0;const o=Vv(r,i),a=Gv(r,i);r=e<t,i=r?t:e;const s=[a(Math.floor(o(r?e:t))),a(Math.ceil(o(i)))];return r?s.reverse():s};var Wv,n={exports:{}},J={exports:{}},Uv=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))},Yv=Array.prototype.concat,qv=Array.prototype.slice,Xv=J.exports=function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];Uv(i)?e=Yv.call(e,qv.call(i)):e.push(i)}return e},Zv=(Xv.wrap=function(t){return function(){return t(Xv(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]}),Kv=J.exports,$v=Object.hasOwnProperty,Jv=Object.create(null);for(Wv in Zv)$v.call(Zv,Wv)&&(Jv[Zv[Wv]]=Wv);var Qv=n.exports={to:{},get:{}};function tm(t,e,n){return Math.min(Math.max(e,t),n)}function em(t){t=Math.round(t).toString(16).toUpperCase();return t.length<2?"0"+t:t}Qv.get=function(t){var e,n;switch(t.substring(0,3).toLowerCase()){case"hsl":e=Qv.get.hsl(t),n="hsl";break;case"hwb":e=Qv.get.hwb(t),n="hwb";break;default:e=Qv.get.rgb(t),n="rgb"}return e?{model:n,value:e}:null},Qv.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 o=2*n;i[n]=parseInt(e.slice(o,2+o),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]:$v.call(Zv,e[1])?((i=Zv[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]=tm(i[n],0,255);return i[3]=tm(i[3],0,1),i},Qv.get.hsl=function(t){if(!t)return null;var e,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*)?\)$/);return t?(e=parseFloat(t[4]),[(parseFloat(t[1])%360+360)%360,tm(parseFloat(t[2]),0,100),tm(parseFloat(t[3]),0,100),tm(isNaN(e)?1:e,0,1)]):null},Qv.get.hwb=function(t){if(!t)return null;var e,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*)?\)$/);return t?(e=parseFloat(t[4]),[(parseFloat(t[1])%360+360)%360,tm(parseFloat(t[2]),0,100),tm(parseFloat(t[3]),0,100),tm(isNaN(e)?1:e,0,1)]):null},Qv.to.hex=function(){var t=Kv(arguments);return"#"+em(t[0])+em(t[1])+em(t[2])+(t[3]<1?em(Math.round(255*t[3])):"")},Qv.to.rgb=function(){var t=Kv(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]+")"},Qv.to.rgb.percent=function(){var t=Kv(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]+")"},Qv.to.hsl=function(){var t=Kv(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},Qv.to.hwb=function(){var t=Kv(arguments),e="";return 4<=t.length&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},Qv.to.keyword=function(t){return Jv[t.slice(0,3)]};var nm=n.exports;function rm(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 im(t){t=nm.get(t);if(!t)return null;var e,n,{model:t,value:r}=t;return"rgb"===t?r:"hsl"===t?(r=(t=r)[0]/360,e=t[1]/100,n=t[2]/100,t=t[3],0==e?[255*n,255*n,255*n,t]:[255*rm(n=2*n-(e=n<.5?n*(1+e):n+e-n*e),e,r+1/3),255*rm(n,e,r),255*rm(n,e,r-1/3),t]):null}const om=(e,n)=>t=>e*(1-t)+n*t,am=(t,e)=>{{if("number"==typeof t&&"number"==typeof e)return om(t,e);if("string"!=typeof t||"string"!=typeof e)return()=>t;{var n=t,r=e;const l=im(n),u=im(r);return null===l||null===u?l?()=>n:()=>r:e=>{const n=new Array(4);for(let t=0;t<4;t+=1){var r=l[t],i=u[t];n[t]=r*(1-e)+i*e}var[t,o,a,s]=n;return`rgba(${Math.round(t)}, ${Math.round(o)}, ${Math.round(a)}, ${s})`}}}},sm=(t,e)=>{const n=om(t,e);return t=>Math.round(n(t))};const lm=(t,e,n)=>{let r,i,o=t,a=e;if(o===a&&0<n)return[o];let s=Mv(o,a,n);if(0===s||!Number.isFinite(s))return[];if(0<s){o=Math.ceil(o/s),a=Math.floor(a/s),i=new Array(r=Math.ceil(a-o+1));for(let t=0;t<r;t+=1)i[t]=(o+t)*s}else{s=-s,o=Math.ceil(o*s),a=Math.floor(a*s),i=new Array(r=Math.ceil(a-o+1));for(let t=0;t<r;t+=1)i[t]=(o+t)/s}return i};function um(t){return Math.abs(t)<1e-15?t:parseFloat(t.toFixed(15))}const cm=[1,5,2,2.5,4,3],hm=100*Number.EPSILON;const dm=(n,r,t=5,i=!0,o=cm,a=[.25,.2,.5,.05])=>{var s,l,u,c,h,d,f,p=t<0?0:Math.round(t);if(Number.isNaN(n)||Number.isNaN(r)||"number"!=typeof n||"number"!=typeof r||!p)return[];if(r-n<1e-15||1===p)return[n];const y={score:-2,lmin:0,lmax:0,lstep:0};let g=1;for(;g<1/0;){for(let t=0;t<o.length;t+=1){var v=o[t],m=(c=v,h=o,d=g,f=void 0,f=Np(h),1-Pp(h,c)/(f-1)-d+1);if(a[0]*m+a[1]+a[2]+a[3]<y.score){g=1/0;break}let e=2;for(;e<1/0;){x=e;var b=(u=p)<=x?2-(x-1)/(u-1):1;if(a[0]*m+a[1]+a[2]*b+a[3]<y.score)break;var x=(r-n)/(e+1)/g/v;let t=Math.ceil(Math.log10(x));for(;t<1/0;){var w=g*v*10**t,k=(_=r,k=w*(e-1),(_-=n)<k?1-((k-_)/2)**2/(.1*_)**2:1);if(a[0]*m+a[1]*k+a[2]*b+a[3]<y.score)break;var E=Math.floor(r/w)*g-(e-1)*g,_=Math.ceil(n/w)*g;if(E<=_){var S=_-E;for(let t=0;t<=S;t+=1){var M=(E+t)*(w/g),T=M+w*(e-1),O=w,P=function(t,e,n,r,i,o){var a=Np(e),e=Pp(e,t);let s=0;return t=(r%o+o)%o,1-e/(a-1)-n+(s=(t<hm||o-t<hm)&&r<=0&&0<=i?1:s)}(v,o,g,M,T,O),A=1-.5*((r-T)**2+(n-M)**2)/(.1*(r-n))**2,C=(s=e,C=n,s=(s-1)/(T-(N=M)),l=((l=p)-1)/(Math.max(T,r)-Math.min(C,N)),2-Math.max(s/l,l/s)),N=a[0]*P+a[1]*A+a[2]*C+ +a[3];N>y.score&&(!i||M<=n&&r<=T)&&(y.lmin=M,y.lmax=T,y.lstep=O,y.score=N)}}t+=1}e+=1}}g+=1}var t=um(y.lmax),e=um(y.lmin),L=um(y.lstep),I=Math.floor((t=(t-e)/L,Math.round(1e12*t)/1e12))+1;const R=new Array(I);R[0]=um(e);for(let t=1;t<I;t+=1)R[t]=um(R[t-1]+L);return R};class fm extends fv{getDefaultOptions(){return{domain:[0,1],range:[0,1],tickCount:5,unknown:void 0,tickMethod:dm}}map(t){return Fv(t)?t:this.options.unknown}invert(t){return this.map(t)}clone(){return new fm(this.options)}getTicks(){const{domain:t,tickCount:e,tickMethod:n}=this.options;var[r,i]=t;return ap(r)&&ap(i)?n(r,i,e):[]}}const pm=(t,e,n)=>{var[t,r]=t,[e,i]=e;let o,a;return xv(a=t<r?(o=wv(t,r),n(e,i)):(o=wv(r,t),n(i,e)),o)},ym=(r,t,e)=>{const i=Math.min(r.length,t.length)-1,o=new Array(i),a=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)o[t]=wv(s[t],s[t+1]),a[t]=e(l[t],l[t+1]);return t=>{var e=kv(r,t,1,i)-1,n=o[e];return xv(a[e],n)(t)}},gm=(t,e,n,r)=>{const i=2<Math.min(t.length,e.length)?ym:pm;r=r?sm:n;return i(t,e,r)};class vm extends fv{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:om,tickCount:5}}map(t){return Fv(t)?this.output(t):this.options.unknown}invert(t){return Fv(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(){const t=this.options["tickMethod"];var[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 Ov}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 Tp}composeOutput(t,e){const{domain:n,range:r,round:i,interpolate:o}=this.options;var a=gm(n.map(t),r,o,i);this.output=xv(a,e,t)}composeInput(t,e,n){const{domain:r,range:i}=this.options;t=gm(i,r.map(t),om);this.input=xv(e,n,t)}}class mm extends vm{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:am,tickMethod:lm,tickCount:5}}chooseTransforms(){return[Tp,Tp]}clone(){return new mm(this.options)}}class bm extends bv{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:void 0,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new bm(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}}const xm=t=>t<0?-Math.sqrt(-t):Math.sqrt(t);class wm extends vm{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,exponent:2,interpolate:am,tickMethod:lm,tickCount:5}}constructor(t){super(t)}chooseTransforms(){var t=this.options["exponent"];if(1===t)return[Tp,Tp];var e,n,r=.5===t?xm:(e=t,t=>t<0?-((-t)**e):t**e);return n=t,[r,t=>t<0?-((-t)**(1/n)):t**(1/n)]}clone(){return new wm(this.options)}}class km extends fv{constructor(t){super(t)}getDefaultOptions(){return{domain:[.5],range:[0,1]}}map(t){if(!Fv(t))return this.options.unknown;t=kv(this.thresholds,t,0,this.n);return this.options.range[t]}invert(t){const e=this.options["range"];var t=e.indexOf(t),n=this.thresholds;return[n[t-1],n[t]]}clone(){return new km(this.options)}rescale(){var{domain:t,range:e}=this.options;this.n=Math.min(t.length,e.length-1),this.thresholds=t}}const Em=(t,e,n,r=10)=>{var i=t<0;const o=Gv(r,i),a=Vv(r,i);var s=e<t,l=s?e:t,u=s?t:e;let c=a(l),h=a(u),d=[];if(!(r%1)&&h-c<n){if(c=Math.floor(c),h=Math.ceil(h),i)for(;c<=h;c+=1){var f=o(c);for(let t=r-1;1<=t;--t){var p=f*t;if(u<p)break;l<=p&&d.push(p)}}else for(;c<=h;c+=1){var y=o(c);for(let t=1;t<r;t+=1){var g=y*t;if(u<g)break;l<=g&&d.push(g)}}2*d.length<n&&(d=lm(l,u,n))}else d=lm(c,h,Math.min(h-c,n)).map(o);return s?d.reverse():d};class _m extends vm{getDefaultOptions(){return{domain:[1,10],range:[0,1],base:10,interpolate:am,tickMethod:Em,tickCount:5}}chooseNice(){return Hv}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[Vv(t,e),Gv(t,e)]}clone(){return new _m(this.options)}}class Sm extends km{getDefaultOptions(){return{domain:[0,1],range:[.5],nice:!1,tickCount:5,tickMethod:dm}}constructor(t){super(t)}nice(){var t,e,n=this.options["nice"];n&&([n,t,e]=this.getTickMethodOptions(),this.options.domain=Ov(n,t,e))}getTicks(){const t=this.options["tickMethod"];var[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 Sm(this.options)}}function Mm(t,e,n=!1){const r=t,i=(n||r.sort((t,e)=>t-e),[]);for(let t=1;t<e;t+=1)i.push(function(t,e){if(n=t.length){if(n<2)return t[n-1];var n=(n-1)*e,e=Math.floor(n),r=t[e];return r+(t[e+1]-r)*(n-e)}}(r,t/e));return i}class Tm extends km{getDefaultOptions(){return{domain:[],range:[],tickCount:5,unknown:void 0,tickMethod:dm}}constructor(t){super(t)}rescale(){var{domain:t,range:e}=this.options;this.n=e.length-1,this.thresholds=Mm(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 Tm(this.options)}getTicks(){const{tickCount:t,domain:e,tickMethod:n}=this.options;var r=e.length-1,i=e[0],r=e[r];return n(i,r,t)}}var Om=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,Pm=/\[([^]*?)\]/gm;function Am(t,e){for(var n=[],r=0,i=t.length;r<i;r++)n.push(t[r].substr(0,e));return n}function Cm(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 o,a=i[r];for(o in a)t[o]=a[o]}return t}function Nm(t,e){for(void 0===e&&(e=2),t=String(t);t.length<e;)t="0"+t;return t}var h=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Z=["January","February","March","April","May","June","July","August","September","October","November","December"],at=Am(Z,3),Lm=Cm({},{dayNamesShort:Am(h,3),dayNames:h,monthNamesShort:at,monthNames:Z,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][3<t%10?0:(t-t%10!=10?1:0)*t%10]}}),Im={D:function(t){return String(t.getDate())},DD:function(t){return Nm(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return Nm(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 Nm(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 Nm(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return Nm(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return Nm(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return Nm(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return Nm(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return Nm(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return Nm(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return Nm(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?"-":"+")+Nm(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4)},Z:function(t){t=t.getTimezoneOffset();return(0<t?"-":"+")+Nm(Math.floor(Math.abs(t)/60),2)+":"+Nm(Math.abs(t)%60,2)}},Rm={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 Dm=(t,e,n,r,i)=>{var o=e<t,a=o?e:t,t=o?t:e;const[s,l]=jv(a,t,n,r,i),u=s.range(a,new Date(+t+1),l,!0);return o?u.reverse():u};function jm(t){var e=t.getTimezoneOffset();const n=new Date(t);return n.setMinutes(n.getMinutes()+e,n.getSeconds(),n.getMilliseconds()),n}class Bm extends vm{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:Dm,interpolate:om,mask:void 0,utc:!1}}chooseTransforms(){return[t=>+t,t=>new Date(t)]}chooseNice(){return Bv}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:o,utc:t}=this.options,a=t?Dv:Iv,s=t?jm:Tp;return t=>{var e=s(t),t=o||function(t,e){const{second:n,minute:r,hour:i,day:o,week:a,month:s,year:l}=e;return n.floor(t)<t?".SSS":r.floor(t)<t?":ss":i.floor(t)<t?"hh:mm":o.floor(t)<t?"hh A":s.floor(t)<t?a.floor(t)<t?"MMM DD":"ddd DD":l.floor(t)<t?"MMMM":"YYYY"}(t,a),n=void 0;if(void 0===t&&(t=Rm.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=Rm[t]||t).replace(Pm,function(t,e){return r.push(e),"@@@"}),Cm(Cm({},Lm),n));return(t=t.replace(Om,function(t){return Im[t](e,i)})).replace(/@@@/g,function(){return r.shift()})}}clone(){return new Bm(this.options)}}const Fm=t=>new bv(t),zm=(Fm.props={},t=>new mm(t)),Vm=(zm.props={},t=>new vv(t)),Gm=(Vm.props={},t=>new fm(t)),Hm=(Gm.props={},t=>new bm(t)),Wm=(Hm.props={},t=>new Bm(t)),Um=(Wm.props={},t=>new _m(t)),Ym=(Um.props={},t=>new wm(t)),qm=(Ym.props={},t=>new km(t)),Xm=(qm.props={},t=>new Tm(t)),Zm=(Xm.props={},t=>new Sm(t)),Km=(Zm.props={},Math.PI),$m=2*Km,Jm=1e-6,Qm=$m-Jm;function t1(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function e1(){return new t1}function n1(t){return function(){return t}}t1.prototype=e1.prototype={constructor:t1,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,o){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(t,e,n,r,i){var o,a,s=this._x1,l=this._y1,u=(n=+n)-(t=+t),c=(r=+r)-(e=+e),h=s-t,d=l-e,f=h*h+d*d;if((i=+i)<0)throw new Error("negative radius: "+i);null===this._x1?this._+="M"+(this._x1=t)+","+(this._y1=e):f>Jm&&(Math.abs(d*u-c*h)>Jm&&i?(a=u*u+c*c,r=(n=n-s)*n+(s=r-l)*s,l=Math.sqrt(a),o=Math.sqrt(f),f=(a=i*Math.tan((Km-Math.acos((a+f-r)/(2*l*o)))/2))/o,r=a/l,Math.abs(f-1)>Jm&&(this._+="L"+(t+f*h)+","+(e+f*d)),this._+="A"+i+","+i+",0,0,"+ +(h*s<d*n)+","+(this._x1=t+r*u)+","+(this._y1=e+r*c)):this._+="L"+(this._x1=t)+","+(this._y1=e))},arc:function(t,e,n,r,i,o){t=+t,e=+e,o=!!o;var a=(n=+n)*Math.cos(r),s=n*Math.sin(r),l=t+a,u=e+s,c=1^o,o=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+u:(Math.abs(this._x1-l)>Jm||Math.abs(this._y1-u)>Jm)&&(this._+="L"+l+","+u),n&&((o=o<0?o%$m+$m:o)>Qm?this._+="A"+n+","+n+",0,1,"+c+","+(t-a)+","+(e-s)+"A"+n+","+n+",0,1,"+c+","+(this._x1=l)+","+(this._y1=u):o>Jm&&(this._+="A"+n+","+n+",0,"+ +(o>=Km)+","+c+","+(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 r1=Math.abs,i1=Math.atan2,o1=Math.cos,a1=Math.max,s1=Math.min,l1=Math.sin,u1=Math.sqrt,c1=1e-12,h1=Math.PI,d1=h1/2,f1=2*h1;function p1(t){return 1<=t?d1:t<=-1?-d1:Math.asin(t)}function y1(t){return t.innerRadius}function g1(t){return t.outerRadius}function v1(t){return t.startAngle}function m1(t){return t.endAngle}function b1(t){return t&&t.padAngle}function x1(t,e,n,r,i,o,a){var s=t-n,l=e-r,a=(a?o:-o)/u1(s*s+l*l),l=a*l,a=-a*s,s=t+l,t=e+a,e=n+l,n=r+a,r=(s+e)/2,u=(t+n)/2,c=e-s,h=n-t,d=c*c+h*h,o=i-o,s=s*n-e*t,n=(h<0?-1:1)*u1(a1(0,o*o*d-s*s)),e=(s*h-c*n)/d,t=(-s*c-h*n)/d,f=(s*h+c*n)/d,s=(-s*c+h*n)/d,c=e-r,h=t-u,n=f-r,d=s-u;return n*n+d*d<c*c+h*h&&(e=f,t=s),{cx:e,cy:t,x01:-l,y01:-a,x11:e*(i/o-1),y11:t*(i/o-1)}}function w1(){var O=y1,P=g1,A=n1(0),C=null,N=v1,L=m1,I=b1,R=null;function e(){var t,e,n,r,i,o,a,s,l,u,c,h,d,f,p,y,g,v,m,b,x,w,k=+O.apply(this,arguments),E=+P.apply(this,arguments),_=N.apply(this,arguments)-d1,S=L.apply(this,arguments)-d1,M=r1(S-_),T=_<S;if(R=R||(t=e1()),E<k&&(e=E,E=k,k=e),E>c1?M>f1-c1?(R.moveTo(E*o1(_),E*l1(_)),R.arc(0,0,E,_,S,!T),k>c1&&(R.moveTo(k*o1(S),k*l1(S)),R.arc(0,0,k,S,_,T))):(r=e=_,i=n=S,a=o=M,d=(c=I.apply(this,arguments)/2)>c1&&(C?+C.apply(this,arguments):u1(k*k+E*E)),w=x=s=s1(r1(E-k)/2,+A.apply(this,arguments)),d>c1&&(h=p1(d/k*l1(c)),d=p1(d/E*l1(c)),(o-=2*h)>c1?(r+=h*=T?1:-1,i-=h):(o=0,r=i=(_+S)/2),(a-=2*d)>c1?(e+=d*=T?1:-1,n-=d):(a=0,e=n=(_+S)/2)),c=E*o1(e),h=E*l1(e),d=k*o1(i),_=k*l1(i),s>c1&&(f=E*o1(n),p=E*l1(n),y=k*o1(r),g=k*l1(r),M<h1&&(S=function(t,e,n,r,i,o,a,s){var l=(s=s-o)*(n=n-t)-(a=a-i)*(r=r-e);if(!(l*l<c1))return[t+(l=(a*(e-o)-s*(t-i))/l)*n,e+l*r]}(c,h,y,g,f,p,d,_))&&(M=c-S[0],m=h-S[1],b=f-S[0],v=p-S[1],m=1/l1((1<(M=(M*b+m*v)/(u1(M*M+m*m)*u1(b*b+v*v)))?0:M<-1?h1:Math.acos(M))/2),b=u1(S[0]*S[0]+S[1]*S[1]),x=s1(s,(k-b)/(m-1)),w=s1(s,(E-b)/(1+m)))),a>c1?w>c1?(l=x1(y,g,c,h,E,w,T),u=x1(f,p,d,_,E,w,T),R.moveTo(l.cx+l.x01,l.cy+l.y01),w<s?R.arc(l.cx,l.cy,w,i1(l.y01,l.x01),i1(u.y01,u.x01),!T):(R.arc(l.cx,l.cy,w,i1(l.y01,l.x01),i1(l.y11,l.x11),!T),R.arc(0,0,E,i1(l.cy+l.y11,l.cx+l.x11),i1(u.cy+u.y11,u.cx+u.x11),!T),R.arc(u.cx,u.cy,w,i1(u.y11,u.x11),i1(u.y01,u.x01),!T))):(R.moveTo(c,h),R.arc(0,0,E,e,n,!T)):R.moveTo(c,h),k>c1&&o>c1?x>c1?(l=x1(d,_,f,p,k,-x,T),u=x1(c,h,y,g,k,-x,T),R.lineTo(l.cx+l.x01,l.cy+l.y01),x<s?R.arc(l.cx,l.cy,x,i1(l.y01,l.x01),i1(u.y01,u.x01),!T):(R.arc(l.cx,l.cy,x,i1(l.y01,l.x01),i1(l.y11,l.x11),!T),R.arc(0,0,k,i1(l.cy+l.y11,l.cx+l.x11),i1(u.cy+u.y11,u.cx+u.x11),T),R.arc(u.cx,u.cy,x,i1(u.y11,u.x11),i1(u.y01,u.x01),!T))):R.arc(0,0,k,i,r,T):R.lineTo(d,_)):R.moveTo(0,0),R.closePath(),t)return R=null,t+""||null}return e.centroid=function(){var t=(+O.apply(this,arguments)+ +P.apply(this,arguments))/2,e=(+N.apply(this,arguments)+ +L.apply(this,arguments))/2-h1/2;return[o1(e)*t,l1(e)*t]},e.innerRadius=function(t){return arguments.length?(O="function"==typeof t?t:n1(+t),e):O},e.outerRadius=function(t){return arguments.length?(P="function"==typeof t?t:n1(+t),e):P},e.cornerRadius=function(t){return arguments.length?(A="function"==typeof t?t:n1(+t),e):A},e.padRadius=function(t){return arguments.length?(C=null==t?null:"function"==typeof t?t:n1(+t),e):C},e.startAngle=function(t){return arguments.length?(N="function"==typeof t?t:n1(+t),e):N},e.endAngle=function(t){return arguments.length?(L="function"==typeof t?t:n1(+t),e):L},e.padAngle=function(t){return arguments.length?(I="function"==typeof t?t:n1(+t),e):I},e.context=function(t){return arguments.length?(R=null==t?null:t,e):R},e}function k1(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function E1(t){this._context=t}function _1(t){return new E1(t)}function S1(t){return t[0]}function M1(t){return t[1]}function T1(a,s){var l=n1(!0),u=null,c=_1,h=null;function e(t){var e,n,r,i=(t=k1(t)).length,o=!1;for(null==u&&(h=c(r=e1())),e=0;e<=i;++e)!(e<i&&l(n=t[e],e,t))===o&&((o=!o)?h.lineStart():h.lineEnd()),o&&h.point(+a(n,e,t),+s(n,e,t));if(r)return h=null,r+""||null}return a="function"==typeof a?a:void 0===a?S1:n1(a),s="function"==typeof s?s:void 0===s?M1:n1(s),e.x=function(t){return arguments.length?(a="function"==typeof t?t:n1(+t),e):a},e.y=function(t){return arguments.length?(s="function"==typeof t?t:n1(+t),e):s},e.defined=function(t){return arguments.length?(l="function"==typeof t?t:n1(!!t),e):l},e.curve=function(t){return arguments.length?(c=t,null!=u&&(h=c(u)),e):c},e.context=function(t){return arguments.length?(null==t?u=h=null:h=c(u=t),e):u},e}function O1(c,h,d){var f=null,p=n1(!0),y=null,g=_1,v=null;function e(t){var e,n,r,i,o,a=(t=k1(t)).length,s=!1,l=new Array(a),u=new Array(a);for(null==y&&(v=g(o=e1())),e=0;e<=a;++e){if(!(e<a&&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],u[r]);v.lineEnd(),v.areaEnd()}s&&(l[e]=+c(i,e,t),u[e]=+h(i,e,t),v.point(f?+f(i,e,t):l[e],d?+d(i,e,t):u[e]))}if(o)return v=null,o+""||null}function t(){return T1().defined(p).curve(g).context(y)}return c="function"==typeof c?c:void 0===c?S1:n1(+c),h="function"==typeof h?h:n1(void 0===h?0:+h),d="function"==typeof d?d:void 0===d?M1:n1(+d),e.x=function(t){return arguments.length?(c="function"==typeof t?t:n1(+t),f=null,e):c},e.x0=function(t){return arguments.length?(c="function"==typeof t?t:n1(+t),e):c},e.x1=function(t){return arguments.length?(f=null==t?null:"function"==typeof t?t:n1(+t),e):f},e.y=function(t){return arguments.length?(h="function"==typeof t?t:n1(+t),d=null,e):h},e.y0=function(t){return arguments.length?(h="function"==typeof t?t:n1(+t),e):h},e.y1=function(t){return arguments.length?(d=null==t?null:"function"==typeof t?t:n1(+t),e):d},e.lineX0=e.lineY0=function(){return t().x(c).y(h)},e.lineY1=function(){return t().x(c).y(d)},e.lineX1=function(){return t().x(f).y(h)},e.defined=function(t){return arguments.length?(p="function"==typeof t?t:n1(!!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}E1.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 P1=C1(_1);function A1(t){this._curve=t}function C1(e){function t(t){return new A1(e(t))}return t._curve=e,t}function N1(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(C1(t)):e()._curve},t}function L1(){}function I1(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 R1(t,e){this._context=t,this._k=(1-e)/6}function D1(t,e){this._context=t,this._k=(1-e)/6}function j1(t,e,n){var r,i,o=t._x1,a=t._y1,s=t._x2,l=t._y2;t._l01_a>c1&&(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),o=(o*r-t._x0*t._l12_2a+t._x2*t._l01_2a)/i,a=(a*r-t._y0*t._l12_2a+t._y2*t._l01_2a)/i),t._l23_a>c1&&(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(o,a,s,l,t._x2,t._y2)}function B1(t,e){this._context=t,this._alpha=e}A1.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))}},R1.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:I1(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:I1(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 R1(t,n)}return t.tension=function(t){return e(+t)},t}(0),D1.prototype={areaStart:L1,areaEnd:L1,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:I1(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 D1(t,n)}return t.tension=function(t){return e(+t)},t}(0),B1.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:j1(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 F1=function e(n){function t(t){return n?new B1(t,n):new R1(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function z1(t,e){this._context=t,this._alpha=e}z1.prototype={areaStart:L1,areaEnd:L1,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:j1(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 V1=function e(n){function t(t){return n?new z1(t,n):new D1(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function G1(t){this._context=t}function H1(t){return new G1(t)}function W1(t,e){this._context=t,this._t=e}function U1(t){return new W1(t,.5)}function Y1(t){return new W1(t,0)}function q1(t){return new W1(t,1)}function X1([t,e],[n,r]){return[t-n,e-r]}function Z1([t,e],[n,r]){return Math.sqrt(Math.pow(t-n,2)+Math.pow(e-r,2))}function K1([t,e]){return Math.atan2(e,t)+Math.PI/2}function $1(t){let e=1/0,n=-1/0,r=1/0,i=-1/0;for(var[o,a]of t)e=Math.min(o,e),n=Math.max(o,n),r=Math.min(a,r),i=Math.max(a,i);var t=n-e,s=i-r;return[e,r,t,s]}function J1(t){return t}function Q1(t){return t.reduce((n,r)=>e=>F(this,void 0,void 0,function*(){var t=yield n(e);return r(t)}),J1)}function tb(t=""){throw new Error(t)}function eb(t,e){var n,r,e=e["attributes"];const i=new Set(["id","className"]);for([n,r]of Object.entries(e))i.has(n)||t.attr(n,r)}function nb(t){return null!=t&&!Number.isNaN(t)}function rb(t,e){return t+(e-t)*Math.random()}function ib(t){return new ob([t],null,t,t.ownerDocument)}G1.prototype={areaStart:L1,areaEnd:L1,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))}},W1.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 ob{constructor(t=null,e=null,n=null,r=null,i=[null,null,null,null,null],o=[],a=[]){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=o,this._facetElements=a}selectAll(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new ob(t,null,this._elements[0],this._document)}selectFacetAll(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new ob(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 ob([t],null,t,this._document)}append(t){const e=t=>{if(this._document)return this._document.createElement(t,{});const e=ob.registry[t];return e?new e:tb("Unknown node type: "+t)},n="function"==typeof t?t:()=>e(t),r=[];if(null!==this._data){for(let t=0;t<this._data.length;t++){var i=this._data[t],[i,o]=Array.isArray(i)?i:[i,null];const s=n(i,t);s.__data__=i,null!==o&&(s.__fromElements__=o),this._parent.appendChild(s),r.push(s)}return new ob(r,null,this._parent,this._document)}for(let t=0;t<this._elements.length;t++){const l=this._elements[t];var a=l.__data__,a=n(a,t);l.appendChild(a),r.push(a)}return new ob(r,null,r[0],this._document)}data(e,n=t=>t,r=()=>null){const i=[],o=[],a=new Set(this._elements),s=[],l=new Set,u=new Map(this._elements.map((t,e)=>[n(t.__data__,e),t])),c=new Map(this._facetElements.map((t,e)=>[n(t.__data__,e),t])),h=Tg(this._elements,t=>r(t.__data__));for(let t=0;t<e.length;t++){var d=e[t],f=n(d,t),p=r(d,t);if(u.has(f)){const y=u.get(f);y.__data__=d,y.__facet__=!1,o.push(y),a.delete(y),u.delete(f)}else if(c.has(f)){const g=c.get(f);g.__data__=d,g.__facet__=!0,o.push(g),c.delete(f)}else if(h.has(f)){const Tg=h.get(f);s.push([d,Tg]);for(const v of Tg)a.delete(v);h.delete(f)}else if(u.has(p)){const m=u.get(p);m.__toData__?m.__toData__.push(d):m.__toData__=[d],l.add(m),a.delete(m)}else i.push(d)}var t=[new ob([],i,this._parent,this._document),new ob(o,null,this._parent,this._document),new ob(a,null,this._parent,this._document),new ob([],s,this._parent,this._document),new ob(l,null,this._parent,this._document)];return new ob(this._elements,null,this._parent,this._document,t)}merge(t){var e=[...this._elements,...t._elements],t=[...this._transitions,...t._transitions];return new ob(e,null,this._parent,this._document,void 0,t)}join(t=t=>t,e=t=>t,n=t=>t.remove(),r=t=>t,i=t=>t.remove()){t=t(this._enter);const o=e(this._update);e=n(this._exit),n=r(this._merge),r=i(this._split);return o.merge(t).merge(e).merge(n).merge(r)}remove(){for(let t=0;t<this._elements.length;t++){const e=this._elements[t],n=this._transitions[t];n?n.then(()=>e.remove()):e.remove()}return new ob([],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 ab(t,e){for(var[n,r]of Object.entries(e))t.style(n,r)}function sb(n,t){return t.forEach((t,e)=>0===e?n.moveTo(t[0],t[1]):n.lineTo(t[0],t[1])),n.closePath(),n}function lb(t,e,n){var n=Object.assign({size:8},n)["size"],n="string"==typeof n?+parseFloat(n)/100*Z1(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 ub(t,e,n,r,i){e=K1(X1(r,e))+Math.PI/2,n=K1(X1(r,n))+Math.PI/2;t.arc(r[0],r[1],i,e,n,n-e<0)}function cb(t,n){const r=new mm({domain:[n[0],n[n.length-1]],range:[0,100]});return`linear-gradient(${t.map((t,e)=>`${t} ${r.map(n[e])}%`).join(",")})`}ob.registry={g:Hh,rect:ed,circle:Fh,path:Zh,text:rd,ellipse:Vh,image:Uh,line:qh,polygon:$h,polyline:Qh,html:od};const hb=t=>{const c=t["colorAttribute"],h=I(t,["colorAttribute"]),d="stroke"===c?1:0;return(t,e,n,r)=>{var{radius:i=0}=h,r=r["defaultColor"],{color:r=r}=e,[o,a,,s]=Fg(n)?function(t){var[t,e,n,r]=t;return[r,t,e,n]}(t):t;if(!zg(n))return ib(new Zh).style("lineWidth",d).style("d",sb(e1(),t).toString()).style("stroke",r).style(c,r).call(ab,h).node();var{y:t,y1:e}=e,n=n.getCenter(),l=K1(X1(o,n)),a=K1(X1(a,n)),t=a===l&&t!==e?a+2*Math.PI:a,e={startAngle:l,endAngle:0<=t-l?t:2*Math.PI+t,innerRadius:Z1(s,n),outerRadius:Z1(o,n)};const u=w1().cornerRadius(i);return ib(new Zh({})).style("path",u(e)).style("transform",`translate(${n[0]}, ${n[1]})`).style("stroke",r).style(c,r).call(ab,h).node()}},db=(hb.props={defaultEnterAnimation:"scaleInY"},t=>hb(Object.assign({colorAttribute:"fill"},t))),fb=(db.props=Object.assign({},hb.props),t=>hb(Object.assign({colorAttribute:"stroke"},t)));fb.props=Object.assign({},hb.props);const pb=t=>{const{adjustPoints:s=function(t,e,n){var[t,r,i,o]=t;if(Fg(n)){const a=[(e?e[0]:r)[0],r[1]],s=[(e?e[3]:i)[0],i[1]];return[t,a,s,o]}const a=[r[0],(e?e[0]:r)[1]],s=[i[0],(e?e[3]:i)[1]];return[t,a,s,o]}}=t,l=I(t,["adjustPoints"]);return(t,e,n,r,i,...o)=>{var a=e["index"],a=i[a+1],t=s(t,a,n);return hb(Object.assign({colorAttribute:"fill"},l))(t,e,n,r,i,...o)}};function yb(t,e,n){var[t,r,i,o]=t;if(Fg(n)){const a=[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,a,s,o]}const a=[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,a,s,o]}pb.props={defaultEnterAnimation:"fadeIn"};const gb=t=>pb(Object.assign({adjustPoints:yb},t)),vb=(gb.props={defaultEnterAnimation:"fadeIn"},t=>{const{curve:l,gradient:u=!1}=t,c=I(t,["curve","gradient"]);return(t,e,n,r)=>{var{defaultColor:r,defaultSize:i}=r,{color:e=r,size:r=i,transform:i,seriesColor:o,seriesX:a}=e,n=zg(n)?[...t,t[0]]:t;const s=T1().x(t=>t[0]).y(t=>t[1]).curve(l);t=u&&o?cb(o,a):e;return ib(new Zh({})).style("d",s(n)).style("stroke",t).style("lineWidth",r).style("transform",i).call(ab,c).node()}}),mb=(vb.props={defaultEnterAnimation:"fadeIn"},t=>vb(Object.assign({curve:_1},t))),bb=(mb.props=Object.assign({},vb.props),t=>{var{alpha:e=.5}=t,t=I(t,["alpha"]);return vb(Object.assign({curve:F1.alpha(e)},t))}),xb=(bb.props=Object.assign({},vb.props),t=>vb(Object.assign({curve:q1},t))),wb=(xb.props=Object.assign({},vb.props),t=>vb(Object.assign({curve:Y1},t))),kb=(wb.props=Object.assign({},vb.props),t=>vb(Object.assign({curve:U1},t)));function Eb(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"]]}kb.props=Object.assign({},vb.props);var _b=Object.freeze({__proto__:null,point:Eb,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){return[["M",t-n,e],["L",t,e-n],["L",t+n,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]]}});function Sb(t,e,n,r){var i,n=n["size"];return"fixed"!==t&&("normal"===t||function(t){const e=t.getOptions()["transformations"];return e.some(([t])=>"fisheye"===t)}(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}const x=t=>{const{colorAttribute:s,symbol:e,mode:l="auto"}=t,u=I(t,["colorAttribute","symbol","mode"]),c="stroke"===s?1:0,h=_b[e]||Eb;return(t,e,n,r)=>{var r=r["defaultColor"],{color:r=r,transform:i}=e,[o,a]=function(t){var[[t,e],[n,r]]=t;return[(t+n)/2,(e+r)/2]}(t),t=Sb(l,t,e,n);return ib(new Zh).style("d",h(o,a,t)).style("lineWidth",c).style("stroke",r).style("transform",i).style(s,r).call(ab,u).node()}},Mb=(x.props={defaultEnterAnimation:"fadeIn"},t=>x(Object.assign({colorAttribute:"fill",symbol:"bowtie"},t))),Tb=(Mb.props=Object.assign({},x.props),t=>x(Object.assign({colorAttribute:"stroke",symbol:"cross"},t))),Ob=(Tb.props=Object.assign({},x.props),t=>x(Object.assign({colorAttribute:"fill",symbol:"diamond"},t))),Pb=(Ob.props=Object.assign({},x.props),t=>x(Object.assign({colorAttribute:"fill",symbol:"hexagon"},t))),Ab=(Pb.props=Object.assign({},x.props),t=>x(Object.assign({colorAttribute:"stroke",symbol:"bowtie"},t))),Cb=(Ab.props=Object.assign({},x.props),t=>x(Object.assign({colorAttribute:"stroke",symbol:"diamond"},t))),Nb=(Cb.props=Object.assign({},x.props),t=>x(Object.assign({colorAttribute:"stroke",symbol:"hexagon"},t))),Lb=(Nb.props=Object.assign({},x.props),t=>x(Object.assign({colorAttribute:"stroke",symbol:"point"},t))),Ib=(Lb.props=Object.assign({},x.props),t=>x(Object.assign({colorAttribute:"stroke",symbol:"square"},t))),Rb=(Ib.props=Object.assign({},x.props),t=>x(Object.assign({colorAttribute:"stroke",symbol:"triangle"},t))),Db=(Rb.props=Object.assign({},x.props),t=>x(Object.assign({colorAttribute:"stroke",symbol:"triangle-down"},t))),jb=(Db.props=Object.assign({},x.props),t=>x(Object.assign({colorAttribute:"stroke",symbol:"hyphen"},t))),Bb=(jb.props=Object.assign({},x.props),t=>x(Object.assign({colorAttribute:"stroke",symbol:"line"},t))),Fb=(Bb.props=Object.assign({},x.props),t=>x(Object.assign({colorAttribute:"stroke",symbol:"plus"},t))),zb=(Fb.props=Object.assign({},x.props),t=>x(Object.assign({colorAttribute:"fill",symbol:"point"},t))),Vb=(zb.props=Object.assign({},x.props),t=>x(Object.assign({colorAttribute:"fill",symbol:"square"},t))),Gb=(Vb.props=Object.assign({},x.props),t=>x(Object.assign({colorAttribute:"stroke",symbol:"tick"},t))),Hb=(Gb.props=Object.assign({},x.props),t=>x(Object.assign({colorAttribute:"fill",symbol:"triangle"},t))),Wb=(Hb.props=Object.assign({},x.props),t=>x(Object.assign({colorAttribute:"fill",symbol:"triangle-down"},t))),Ub=(Wb.props=Object.assign({},x.props),t=>{const l=t["arrow"],u=I(t,["arrow"]);return(t,e,n,r)=>{var r=r["defaultColor"],{color:e=r,transform:r}=e,[t,i]=t,[o,a]=lb(t,i,l);const s=e1();return s.moveTo(...t),s.lineTo(...i),s.moveTo(...i),s.lineTo(...o),s.moveTo(...i),s.lineTo(...a),ib(new Zh).style("d",s.toString()).style("stroke",e).style("fill",e).style("transform",r).call(ab,u).node()}}),Yb=(Ub.props={defaultEnterAnimation:"fadeIn"},t=>{const l=I(t,[]);return(t,e,n,r)=>{var r=r["defaultColor"],{color:e=r,text:r="",fontSize:i=14,rotate:o=0,transform:a=""}=e,[[t,s]]=t;return ib(new rd).style("x",t).style("y",s).style("text",String(r)).style("stroke",e).style("fill",e).style("fontSize",i).style("transform",a+`rotate(${+o}deg)`).style("lineWidth",0).call(ab,l).node()}});Yb.props={defaultEnterAnimation:"fadeIn"};i(Zb,qb=jh),Zb.prototype.connectedCallback=function(){var t=this.style,e=t.x,t=t.y;this.setLocalPosition([e||0,t||0]),this.update(),this.bindEvents(this.attributes,this)},Zb.prototype.update=function(t){this.attr(C({},this.attributes,t=void 0===t?{}:t)),null!=(t=this.render)&&t.call(this,this.attributes,this)},Zb.prototype.clear=function(){this.removeChildren(!0)},Zb.prototype.destroy=function(){this.removeAllEventListeners(),this.removeChildren(!0),this.remove()},Zb.prototype.bindEvents=function(t,e){};var qb,Xb,G=Zb;function Zb(t){return qb.call(this,t)||this}function Kb(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,Kb)}function $b(){this.constructor=Xb}Xb=Kb,W=Error,$b.prototype=W.prototype,Xb.prototype=new $b,Kb.buildMessage=function(t,e){var o={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],o[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 Jb,H=function(s,t){function D(){return R("Z")}function j(t,e){return R(t,e.map(function(t){return{x:t}}))}function B(t,e){return R(t,e.map(function(t){return{y:t}}))}function F(t,e,n){return{x1:t.x,y1:t.y,x2:e.x,y2:e.y,x:n.x,y:n.y}}function z(t,e){return{x2:t.x,y2:t.y,x:e.x,y:e.y}}function V(t,e){return{x1:t.x,y1:t.y,x:e.x,y:e.y}}function G(t,e,n,r,i,o){return{rx:t,ry:e,xAxisRotation:n,largeArc:r,sweep:i,x:o.x,y:o.y}}var l={},e={svg_path:Mt},n=Mt,H=function(t){if(!t)return[];for(var e=[],n=0;n<t.length;n++)e=e.concat.apply(e,t[n]);var r=e[0];return r&&"m"==r.code&&(delete r.relative,r.code="M"),e},a=function(t,e){var n=e;if(!n)return[t];for(var r=[t],i=0,o=n.length;i<o;i++)r[i+1]=n[i][1];return r},W=/^[Mm]/,U=m(["M","m"],!1,!1),Y=function(t,e,n){e=R(t,[e]);return e=n?e.concat(R("M"==t?"L":"l",n[1])):e},q=/^[Zz]/,X=m(["Z","z"],!1,!1),Z=/^[Ll]/,K=m(["L","l"],!1,!1),i=R,$=/^[Hh]/,J=m(["H","h"],!1,!1),Q=/^[Vv]/,tt=m(["V","v"],!1,!1),et=/^[Cc]/,nt=m(["C","c"],!1,!1),rt=/^[Ss]/,it=m(["S","s"],!1,!1),ot=/^[Qq]/,at=m(["Q","q"],!1,!1),st=/^[Tt]/,lt=m(["T","t"],!1,!1),ut=/^[Aa]/,ct=m(["A","a"],!1,!1),ht=function(t,e){return{x:t,y:e}},dt=function(t){return+t},ft=function(t){return+t.join("")},pt=/^[01]/,yt=m(["0","1"],!1,!1),gt=function(t){return"1"==t},o=function(){return""},vt=",",mt=v(",",!1),u=function(t){return t.join("")},c=".",h=v(".",!1),bt=/^[eE]/,xt=m(["e","E"],!1,!1),wt=/^[+\-]/,kt=m(["+","-"],!1,!1),r=/^[0-9]/,d=m([["0","9"]],!1,!1),Et=function(t){return t.join("")},_t=/^[ \t\n\r]/,St=m([" ","\t","\n","\r"],!1,!1),f=0,p=[{line:1,column:1}],y=0,g=[];if("startRule"in(t=void 0!==t?t:{})){if(!(t.startRule in e))throw new Error("Can't start parsing from rule \""+t.startRule+'".');n=e[t.startRule]}function v(t,e){return{type:"literal",text:t,ignoreCase:e}}function m(t,e,n){return{type:"class",parts:t,inverted:e,ignoreCase:n}}function b(t){var e,n=p[t];if(n)return n;for(e=t-1;!p[e];)e--;for(n={line:(n=p[e]).line,column:n.column};e<t;)10===s.charCodeAt(e)?(n.line++,n.column=1):n.column++,e++;return p[t]=n}function x(t,e){var n=b(t),r=b(e);return{start:{offset:t,line:n.line,column:n.column},end:{offset:e,line:r.line,column:r.column}}}function w(t){f<y||(y<f&&(y=f,g=[]),g.push(t))}function Mt(){for(var t,e,n=f,r=[],i=N();i!==l;)r.push(i),i=N();if(r!==l)if((i=(i=function(){var t,e,n,r,i,o;if(t=f,(e=k())!==l){for(n=[],r=f,i=[],o=N();o!==l;)i.push(o),o=N();for(r=i!==l?(o=k())!==l?i=[i,o]:(f=r,l):(f=r,l);r!==l;){for(n.push(r),r=f,i=[],o=N();o!==l;)i.push(o),o=N();r=i!==l?(o=k())!==l?i=[i,o]:(f=r,l):(f=r,l)}t=n!==l?e=a(e,n):(f=t,l)}else f=t,t=l;return t}())===l?null:i)!==l){for(t=[],e=N();e!==l;)t.push(e),e=N();n=t!==l?r=H(i):(f=n,l)}else f=n,n=l;else f=n,n=l;return n}function k(){var t,e,n,r,i=f,o=function(){var t,e,n,r,i,o,a;t=f,W.test(s.charAt(f))?(e=s.charAt(f),f++):(e=l,w(U));if(e!==l){for(n=[],r=N();r!==l;)n.push(r),r=N();t=n!==l?(r=T())!==l?(i=f,o=P(),(i=(i=(o=o===l?null:o)!==l?(a=Ot())!==l?o=[o,a]:(f=i,l):(f=i,l))===l?null:i)!==l?e=Y(e,r,i):(f=t,l)):(f=t,l):(f=t,l)}else f=t,t=l;return t}();if(o!==l){for(t=[],e=f,n=[],r=N();r!==l;)n.push(r),r=N();for(e=n!==l&&(r=Tt())!==l?n=[n,r]:(f=e,l);e!==l;){for(t.push(e),e=f,n=[],r=N();r!==l;)n.push(r),r=N();e=n!==l&&(r=Tt())!==l?n=[n,r]:(f=e,l)}i=t!==l?a(o,t):(f=i,l)}else f=i,i=l;return i}function Tt(){var t=function(){var t;q.test(s.charAt(f))?(t=s.charAt(f),f++):(t=l,w(X));t!==l&&(t=D());return t}();return t=t===l&&(t=function(){var t,e,n,r;t=f,Z.test(s.charAt(f))?(e=s.charAt(f),f++):(e=l,w(K));if(e!==l){for(n=[],r=N();r!==l;)n.push(r),r=N();t=n!==l?(r=Ot())!==l?e=i(e,r):(f=t,l):(f=t,l)}else f=t,t=l;return t}())===l&&(t=function(){var t,e,n,r;t=f,$.test(s.charAt(f))?(e=s.charAt(f),f++):(e=l,w(J));if(e!==l){for(n=[],r=N();r!==l;)n.push(r),r=N();t=n!==l?(r=Pt())!==l?e=j(e,r):(f=t,l):(f=t,l)}else f=t,t=l;return t}())===l&&(t=function(){var t,e,n,r;t=f,Q.test(s.charAt(f))?(e=s.charAt(f),f++):(e=l,w(tt));if(e!==l){for(n=[],r=N();r!==l;)n.push(r),r=N();t=n!==l?(r=Pt())!==l?e=B(e,r):(f=t,l):(f=t,l)}else f=t,t=l;return t}())===l&&(t=function(){var t,e,n,r;t=f,et.test(s.charAt(f))?(e=s.charAt(f),f++):(e=l,w(nt));if(e!==l){for(n=[],r=N();r!==l;)n.push(r),r=N();t=n!==l?(r=function(){var t,e,n,r,i,o;if(t=f,(e=E())!==l){for(n=[],r=f,i=P(),r=(i=i===l?null:i)!==l?(o=E())!==l?i=[i,o]:(f=r,l):(f=r,l);r!==l;)n.push(r),r=f,i=P(),r=(i=i===l?null:i)!==l?(o=E())!==l?i=[i,o]:(f=r,l):(f=r,l);t=n!==l?e=a(e,n):(f=t,l)}else f=t,t=l;return t}())!==l?e=i(e,r):(f=t,l):(f=t,l)}else f=t,t=l;return t}())===l&&(t=function(){var t,e,n,r;t=f,rt.test(s.charAt(f))?(e=s.charAt(f),f++):(e=l,w(it));if(e!==l){for(n=[],r=N();r!==l;)n.push(r),r=N();t=n!==l?(r=function(){var t,e,n,r,i,o;if(t=f,(e=_())!==l){for(n=[],r=f,i=P(),r=(i=i===l?null:i)!==l?(o=_())!==l?i=[i,o]:(f=r,l):(f=r,l);r!==l;)n.push(r),r=f,i=P(),r=(i=i===l?null:i)!==l?(o=_())!==l?i=[i,o]:(f=r,l):(f=r,l);t=n!==l?e=a(e,n):(f=t,l)}else f=t,t=l;return t}())!==l?e=i(e,r):(f=t,l):(f=t,l)}else f=t,t=l;return t}())===l&&(t=function(){var t,e,n,r;t=f,ot.test(s.charAt(f))?(e=s.charAt(f),f++):(e=l,w(at));if(e!==l){for(n=[],r=N();r!==l;)n.push(r),r=N();t=n!==l?(r=function(){var t,e,n,r,i,o;if(t=f,(e=S())!==l){for(n=[],r=f,i=P(),r=(i=i===l?null:i)!==l?(o=S())!==l?i=[i,o]:(f=r,l):(f=r,l);r!==l;)n.push(r),r=f,i=P(),r=(i=i===l?null:i)!==l?(o=S())!==l?i=[i,o]:(f=r,l):(f=r,l);t=n!==l?e=a(e,n):(f=t,l)}else f=t,t=l;return t}())!==l?e=i(e,r):(f=t,l):(f=t,l)}else f=t,t=l;return t}())===l&&(t=function(){var t,e,n,r;t=f,st.test(s.charAt(f))?(e=s.charAt(f),f++):(e=l,w(lt));if(e!==l){for(n=[],r=N();r!==l;)n.push(r),r=N();t=n!==l?(r=function(){var t,e,n,r,i,o;if(t=f,(e=T())!==l){for(n=[],r=f,i=P(),r=(i=i===l?null:i)!==l?(o=T())!==l?i=[i,o]:(f=r,l):(f=r,l);r!==l;)n.push(r),r=f,i=P(),r=(i=i===l?null:i)!==l?(o=T())!==l?i=[i,o]:(f=r,l):(f=r,l);t=n!==l?e=a(e,n):(f=t,l)}else f=t,t=l;return t}())!==l?e=i(e,r):(f=t,l):(f=t,l)}else f=t,t=l;return t}())===l?function(){var t,e,n,r;t=f,ut.test(s.charAt(f))?(e=s.charAt(f),f++):(e=l,w(ct));if(e!==l){for(n=[],r=N();r!==l;)n.push(r),r=N();t=n!==l?(r=function(){var t,e,n,r,i,o;if(t=f,(e=M())!==l){for(n=[],r=f,i=P(),r=(i=i===l?null:i)!==l?(o=M())!==l?i=[i,o]:(f=r,l):(f=r,l);r!==l;)n.push(r),r=f,i=P(),r=(i=i===l?null:i)!==l?(o=M())!==l?i=[i,o]:(f=r,l):(f=r,l);t=n!==l?e=a(e,n):(f=t,l)}else f=t,t=l;return t}())!==l?e=i(e,r):(f=t,l):(f=t,l)}else f=t,t=l;return t}():t}function Ot(){var t,e,n,r,i=f,o=T();if(o!==l){for(t=[],e=f,e=(n=(n=P())===l?null:n)!==l&&(r=T())!==l?n=[n,r]:(f=e,l);e!==l;)t.push(e),e=f,e=(n=(n=P())===l?null:n)!==l&&(r=T())!==l?n=[n,r]:(f=e,l);i=t!==l?a(o,t):(f=i,l)}else f=i,i=l;return i}function Pt(){var t,e,n,r,i=f,o=O();if(o!==l){for(t=[],e=f,e=(n=(n=P())===l?null:n)!==l&&(r=O())!==l?n=[n,r]:(f=e,l);e!==l;)t.push(e),e=f,e=(n=(n=P())===l?null:n)!==l&&(r=O())!==l?n=[n,r]:(f=e,l);i=t!==l?a(o,t):(f=i,l)}else f=i,i=l;return i}function E(){var t,e,n=f,r=T();return n=r!==l&&(t=(t=P())===l?null:t)!==l&&(t=T())!==l&&(e=(e=P())===l?null:e)!==l&&(e=T())!==l?F(r,t,e):(f=n,l)}function _(){var t,e=f,n=T();return e=n!==l&&(t=(t=P())===l?null:t)!==l&&(t=T())!==l?z(n,t):(f=e,l)}function S(){var t,e=f,n=T();return e=n!==l&&(t=(t=P())===l?null:t)!==l&&(t=T())!==l?V(n,t):(f=e,l)}function M(){var t,e,n,r,i,o=f,a=At();return o=a!==l&&(t=(t=P())===l?null:t)!==l&&(t=At())!==l&&(e=(e=P())===l?null:e)!==l&&(e=O())!==l&&P()!==l&&(n=Ct())!==l&&(r=(r=P())===l?null:r)!==l&&(r=Ct())!==l&&(i=(i=P())===l?null:i)!==l&&(i=T())!==l?G(a,t,e,n,r,i):(f=o,l)}function T(){var t,e=f,n=O();return e=n!==l&&(t=(t=P())===l?null:t)!==l&&(t=O())!==l?ht(n,t):(f=e,l)}function At(){var t=Lt();return t=(t=t===l?C():t)!==l?dt(t):t}function O(){var t,e=f,n=A();return(e=(n=n===l?null:n)!==l&&(t=Lt())!==l?n=[n,t]:(f=e,l))===l&&(e=f,e=(n=(n=A())===l?null:n)!==l&&(t=C())!==l?n=[n,t]:(f=e,l)),e=e!==l?ft(e):e}function Ct(){var t;return pt.test(s.charAt(f))?(t=s.charAt(f),f++):(t=l,w(yt)),t=t!==l?gt(t):t}function P(){var t,e,n=f,r=[],i=N();if(i!==l)for(;i!==l;)r.push(i),i=N();else r=l;if(r!==l)if((i=(i=Nt())===l?null:i)!==l){for(t=[],e=N();e!==l;)t.push(e),e=N();n=t!==l?r=[r,i,t]:(f=n,l)}else f=n,n=l;else f=n,n=l;if(n===l){if(r=n=f,(i=Nt())!==l){for(t=[],e=N();e!==l;)t.push(e),e=N();r=t!==l?i=[i,t]:(f=r,l)}else f=r,r=l;n=r=r!==l?o():r}return n}function Nt(){var t;return 44===s.charCodeAt(f)?(t=vt,f++):(t=l,w(mt)),t}function Lt(){var t,e=f,n=function(){var t,e,n,r;t=f,(e=C())===l&&(e=null);t=e!==l?(46===s.charCodeAt(f)?(n=c,f++):(n=l,w(h)),n!==l?(r=C())!==l?e=[e,n,r]:(f=t,l):(f=t,l)):(f=t,l);t===l&&(t=f,e=C(),t=e!==l?(46===s.charCodeAt(f)?(n=c,f++):(n=l,w(h)),n!==l?e=[e,n]:(f=t,l)):(f=t,l));t!==l&&(t=u(t));return t}();return(e=n!==l&&(t=(t=It())===l?null:t)!==l?n=[n,t]:(f=e,l))===l&&(e=f,e=(n=C())!==l&&(t=It())!==l?n=[n,t]:(f=e,l)),e=e!==l?u(e):e}function It(){var t,e,n,r=f;return bt.test(s.charAt(f))?(t=s.charAt(f),f++):(t=l,w(xt)),r=(r=t!==l&&(e=(e=A())===l?null:e)!==l&&(n=C())!==l?t=[t,e,n]:(f=r,l))!==l?u(r):r}function A(){var t;return wt.test(s.charAt(f))?(t=s.charAt(f),f++):(t=l,w(kt)),t}function C(){var t,e=[];if(r.test(s.charAt(f))?(t=s.charAt(f),f++):(t=l,w(d)),t!==l)for(;t!==l;)e.push(t),r.test(s.charAt(f))?(t=s.charAt(f),f++):(t=l,w(d));else e=l;return e=e!==l?Et(e):e}function N(){var t;return _t.test(s.charAt(f))?(t=s.charAt(f),f++):(t=l,w(St)),t=t!==l?o():t}var L,I={m:"moveto",l:"lineto",h:"horizontal lineto",v:"vertical lineto",c:"curveto",s:"smooth curveto",q:"quadratic curveto",t:"smooth quadratic curveto",a:"elliptical arc",z:"closepath"};for(L in I)I[L.toUpperCase()]=I[L];function R(t,e){for(var n=(e=e||[{}]).length;n--;){var r,i={code:t,command:I[t]};for(r in t==t.toLowerCase()&&(i.relative=!0),e[n])i[r]=e[n][r];e[n]=i}return e}if((e=n())!==l&&f===s.length)return e;throw e!==l&&f<s.length&&w({type:"end"}),t=g,n=y<s.length?s.charAt(y):null,e=y<s.length?x(y,y+1):x(y,y),new Kb(Kb.buildMessage(t,n),t,n,e)};(H.parseSVG=H).makeAbsolute=function(t){var n,r={x:0,y:0},i={x:"x0",y:"y0",x1:"x0",y1:"y0",x2:"x0",y2:"y0"};return t.forEach(function(t){for(var e in"moveto"===t.command&&(n=t),t.x0=r.x,t.y0=r.y,i)e in t&&(t[e]+=t.relative?t[i[e]]:0);"x"in t||(t.x=r.x),"y"in t||(t.y=r.y),t.relative=!1,t.code=t.code.toUpperCase(),"closepath"==t.command&&(t.x=n.x,t.y=n.y),r=t}),t};function Qb(t,e,n,r){var i,o,a=tx(r=void 0===r?"...":r,n),s=np(t)?t:dp(t),l=e,u=[];if(tx(t,n)<=e)return t;for(;;){if(i=s.substr(0,16),l<(o=tx(i,n))+a)break;if(u.push(i),l-=o,!(s=s.substr(16)))return u.join("")}for(;;){if(i=s.substr(0,1),l<(o=tx(i,n))+a)break;if(u.push(i),l-=o,!(s=s.substr(1)))return u.join("")}return"".concat(u.join("")).concat(r)}var tx=bp(function(t,e){var n=(e=void 0===e?{}:e).fontSize,r=e.fontFamily,i=e.fontWeight,o=e.fontStyle,e=e.fontVariant;return(Jb=Jb||document.createElement("canvas").getContext("2d")).font=[o,e,i,"".concat(n,"px"),r].join(" "),Jb.measureText(np(t)?t:"").width},function(t,e){return z([t],j(hp(e=void 0===e?{}:e)),!1).join("")});function ex(t,e){return"string"==typeof t?tx(t,e):t}var nx=function(t){var e=t.style.fontFamily||"sans-serif",n=t.style.fontWeight||"normal",r=t.style.fontStyle||"normal",i=t.style.fontVariant,t=t.style.fontSize;return{fontSize:t="object"==typeof t?t.value:t,fontFamily:e,fontWeight:n,fontStyle:r,fontVariant:i}};function rx(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 ix(t,e){e=Math.pow(10,e);return~~(t*e)/e}function ox(t){return t.toLocaleString()}function ax(t,e){return void 0===e&&(e=0),Math.abs(t)<1e3?String(t):"".concat(ix(t/1e3,e).toLocaleString(),"K")}var sx=function(t,e,n){return t<0&&Number.isFinite(t)?e:n},lx=function(t,e,n){return 0<t&&Number.isFinite(t)?e:n},ux=function(t,e){return t*e},cx=Math.PI/180;function hx(t){if(ap(t))return[t,t,t,t];if(Zf(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 dx=["default","active","selected","disabled","inactive"],fx={fontSize:"16px",fontFamily:"sans-serif",fontWeight:"normal",fontVariant:"normal",fontStyle:"normal",textAlign:"start",textBaseline:"alphabetic"};function px(t){if(t)return null==t?void 0:t.default;var e=xp(t)||{};return dx.forEach(function(t){t in e&&delete e[t]}),e}function yx(t,e,n){if(void 0===n&&(n=!1),!e)return px(t)||{};e=kp(t,e);return n?C({},px(t),e):e}function gx(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]}mx.prototype.selectAll=function(t){return new mx("string"==typeof t?this.__parent__.querySelectorAll(t):t,null,this.__elements__[0],this.__document__)},mx.prototype.select=function(t){t="string"==typeof t?this.__parent__.querySelectorAll(t)[0]||null:t;return new mx([t],null,t,this.__document__)},mx.prototype.append=function(n){var r=this,t="function"==typeof n?n:function(){var t=n;if(r.__document__)return r.__document__.createElement(t,{});var e=mx.registry[t];return e?new e:new Error("Unknown node type: ".concat(t))},e=[];if(null!==this.__data__){for(var i=0;i<this.__data__.length;i++)(s=t(o=this.__data__[i],i)).__data__=o,this.__parent__.appendChild(s),e.push(s);return new mx(e,null,this.__parent__,this.__document__)}for(i=0;i<this.__elements__.length;i++){var o,a=this.__elements__[i],s=t(o=a.__data__,i);a.appendChild(s),e.push(s)}return new mx(e,null,e[0],this.__document__)},mx.prototype.data=function(t,n){void 0===n&&(n=function(t){return t});for(var e=[],r=[],i=new Map(this.__elements__.map(function(t,e){return[n(t.__data__,e),t]})),o=0;o<t.length;o++){var a,s=t[o],l=n(s,o);i.has(l)?((a=i.get(l)).__data__=s,r.push(a),i.delete(l)):e.push(s)}var u=Array.from(i.values()),u=[new mx([],e,this.__parent__,this.__document__),new mx(r,null,this.__parent__,this.__document__),new mx(u,null,this.__parent__,this.__document__)];return new mx(this.__elements__,null,this.__parent__,this.__document__,u)},mx.prototype.merge=function(t){return new mx(z(z([],j(this.__elements__),!1),j(t.__elements__),!1),null,this.__parent__,this.__document__)},mx.prototype.join=function(t,e,n){void 0===e&&(e=function(t){return t}),void 0===n&&(n=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__);return e.merge(t).merge(n)},mx.prototype.remove=function(){var n=z([],j(this.__elements__),!1);return this.__elements__.forEach(function(t){var e;t.parentNode&&(t.parentNode.removeChild(t),e=n.indexOf(t),n.splice(e,1),null!=(e=t.parentNode)&&e.removeChild(t),t.remove())}),new mx(n,null,this.__parent__,this.__document__)},mx.prototype.each=function(t){for(var e=0;e<this.__elements__.length;e++){var n,r=this.__elements__[e];r&&(n=r.__data__,t.call(r,n,e))}return this},mx.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))}),this},mx.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))}),this},mx.prototype.on=function(t,e){return this.each(function(){this.addEventListener(t,e)}),this},mx.prototype.call=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t.call.apply(t,z([this.__parent__,this],j(e),!1)),this},mx.prototype.node=function(){return this.__elements__[0]},mx.prototype.nodes=function(){return this.__elements__},mx.registry={g:Hh,rect:ed,circle:Fh,path:Zh,text:rd,ellipse:Vh,image:Uh,line:qh,polygon:$h,polyline:Qh,html:od};var vx=mx;function mx(t,e,n,r,i){void 0===e&&(e=null),void 0===n&&(n=null),void 0===r&&(r=null),void 0===i&&(i=[null,null,null]),this.__elements__=t=void 0===t?null:t,this.__data__=e,this.__parent__=n,this.__document__=r,this.__enter__=i[0],this.__update__=i[1],this.__exit__=i[2]}function A(t){return new vx([t],null,t,t.ownerDocument)}function N(t,e){var n,r;if(e)try{for(var i=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.")}(Object.entries(e)),o=i.next();!o.done;o=i.next()){var a=j(o.value,2),s=a[0],l=a[1];t.style(s,l)}}catch(t){n={error:t}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}function B(t,e,n){return t.querySelector(e)?A(t).select(e):A(t).append(n)}function bx(t){t=t&&t.getRenderBounds();if(!t)return{width:0,height:0};var e=t.getMax(),t=t.getMin();return{width:e[0]-t[0],height:e[1]-t[1]}}function xx(t){var t=t.getLocalBounds(),t=j([t.min,t.max],2),e=j(t[0],2),n=e[0],e=e[1],t=j(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 wx(t){return"string"==typeof t?(e=t,(n=document.createElement("div")).innerHTML=e,n.firstChild):t;var e,n}var kx=["year","month","day","hour","minute","second"],Ex=["YYYY","MM","DD","hh","mm","ss"];function _x(t){return t instanceof Date?t:new Date(t)}function Sx(t){for(var e,t=j(t,2),n=t[0],t=t[1],n=kx.indexOf(n),r=kx.indexOf(t),i="",o=n;o<=r;o+=1)i+=Ex[o],o<r&&(e="-",2===o?e=" ":2<o&&(e=":"),i+=e);return i}function Mx(t,e){var n={YYYY:t.getFullYear(),MM:t.getMonth()+1,DD:t.getDate(),hh:t.getHours(),mm:t.getMinutes(),ss:t.getSeconds()},r=e;return Object.keys(n).forEach(function(t){var e=n[t];r=r.replace(t,"YYYY"===t?"".concat(e):"0".concat(e).slice(-2))}),r}function Tx(t,e){t=new Date(t);return{year:function(t){t.setMonth(0),t.setHours(0,0,0,0)},month:function(t){t.setDate(1),t.setHours(0,0,0,0)},day:function(t){return t.setHours(0,0,0,0)},hour:function(t){return t.setMinutes(0,0,0)},minute:function(t){return t.setSeconds(0,0)},second:function(t){return t.setMilliseconds(0)}}[e](t),Mx(t,Sx(["year",e]))}function Ox(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)Px(t,e[r]);return t}var Px=function(r,i,o,a){void 0===o&&(o=0),void 0===a&&(a=5),Object.entries(i).forEach(function(t){var t=j(t,2),e=t[0],t=t[1],n=r;Object.prototype.hasOwnProperty.call(i,e)&&(t?ep(t)?(ep(r[e])||(n[e]={}),o<a?Px(r[e],t,o+1,a):n[e]=i[e]):Zf(t)?(n[e]=[],n[e]=n[e].concat(t)):n[e]=t:n[e]=t)})};function Ax(t,e,n,r,i,o){return(t===e||Math.min(t,e)<=i&&i<=Math.max(t,e))&&(n===r||Math.min(n,r)<=o&&o<=Math.max(n,r))}function Cx(t,e,n){var r=t;(!t.length||e<t[0]||e===t[0]&&n<t[1])&&(r[0]=e,r[1]=n)}function Nx(t,e){var t=j(t,2),n=t[0],t=t[1],e=j(e,2),r=e[0],e=e[1];return Math.pow(Math.pow(n-r,2)+Math.pow(t-e,2),.5)}function Lx(o){return void 0===o&&(o=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},o))})}}var Ix=function(t){return void 0!==t&&null!=t&&!Number.isNaN(t)};function Rx(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"]]}pt=Rx;function Dx(t,e,n){return[["M",t,e+n],["L",t,e-n]]}function jx(t,e,n){return[["M",t-n,e],["L",t+n,e]]}Q=jx;function Bx(t){n="default",Kf(e=t)&&e instanceof Image?n="image":qf(e)?n="symbol":np(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}i(zx,Fx=G),zx.prototype.render=function(t,e){t.x,t.y;var r=t.symbol,n=t.size,i=void 0===n?16:n,o=I(t,["x","y","symbol","size"]),a=Bx(r);a?B(e,".".concat(a,"-marker"),a).attr("className","marker ".concat(a,"-marker")).call(function(t){var e,n;"image"===a?(e=2*i,t.style("img",r).style("width",e).style("height",e).style("x",-i).style("y",-i)):(e=i/2,n=qf(r)?r:zx.getSymbol(r),t.style("path",null==n?void 0:n(0,0,e)).call(N,o))}):(null!=(n=this.querySelector(".marker"))&&n.remove(),this.removeChildren())},zx.MARKER_SYMBOL_MAP=new Map,zx.registerSymbol=function(t,e){zx.MARKER_SYMBOL_MAP.set(t,e)},zx.getSymbol=function(t){return zx.MARKER_SYMBOL_MAP.get(t)};var Fx,L=zx;function zx(){return null!==Fx&&Fx.apply(this,arguments)||this}L.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]]}),L.registerSymbol("hyphen",function(t,e,n){return[["M",t-n,e],["L",t+n,e]]}),L.registerSymbol("line",Dx),L.registerSymbol("plus",function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]}),L.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]]}),L.registerSymbol("circle",Rx),L.registerSymbol("point",pt),L.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"]]}),L.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"]]}),L.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"]]}),L.registerSymbol("diamond",function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]}),L.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"]]}),L.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"]]}),L.registerSymbol("line",Dx),L.registerSymbol("dot",jx),L.registerSymbol("dash",Q),L.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]]}),L.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]]}),L.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]]}),L.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]]}),L.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]]});i(Hx,Vx=G),Hx.prototype.render=function(t,e){var n,r,i=t.padding,o=t.marker,a=t.text,s=t.textStyle,l=t.radius,u=t.backgroundStyle,c=t.spacing,h=t.align,t=t.verticalAlign,i=j(hx(i),4),d=i[0],f=i[1],p=i[2],i=i[3],y=B(e,".tag-content","g").attr("className","tag-content").node(),g=B(y,".tag-marker",function(){return new L({})}).attr("className","tag-marker").call(function(t){t.node().clear(),t.node().update(o||{symbol:"triangle",size:0,x:0})}).node(),c=(c=c,{x:(v=(g=g).getLocalBounds()).halfExtents[0]?v.max[0]+(c||0):g.style.x,y:v.halfExtents[1]?(v.min[1]+v.max[1])/2:g.style.y}),v=c.x,g=c.y,g=(B(y,".tag-text","text").attr("className","tag-text").style("fontFamily","sans-serif").style("fontSize",12).style("x",v).style("y",g).style("text",T(a)?"":"".concat(a)).call(N,s).style("textBaseline","middle").call(function(t){a||t.remove()}),c=i,v=d,g=h||"start",s=t||"top",t=(h=y).getLocalBounds(),r=n=0,"start"===g&&(n=c),"center"===g&&(n=-t.halfExtents[0]),"end"===g&&(n=-c-2*t.halfExtents[0]),"top"===s&&(r=v+t.halfExtents[1]),"middle"===s&&(r=0),"bottom"===s&&(r=v-2*t.halfExtents[1]),h.setLocalPosition([n,r]),y.getLocalBounds());B(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]-d).style("width",null!==u?i+f+2*g.halfExtents[0]:0).style("height",null!==u?d+p+2*g.halfExtents[1]:0).style("radius",null!=l?l:2).style("fill","#fafafa").style("stroke","#d9d9d9").style("lineWidth",1).call(N,u)},Hx.defaultOptions={type:Hx.tag="tag",style:{padding:4,spacing:4}};var Vx,Gx=Hx;function Hx(t){return Vx.call(this,C({},Hx.defaultOptions,t))||this}var Wx,Ux,Yx={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}}},qx={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"}}}},Xx={strict:{textStyle:{fill:"#b8b8b8"},buttonStyle:{},markerStyle:{}},textStyle:{},buttonStyle:{stroke:"#d9d9d9",fill:"#f5f5f5"},markerStyle:{stroke:"#d9d9d9"}},Zx=(i(Kx,Wx=G),Object.defineProperty(Kx.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(Kx.prototype,"text",{get:function(){var t=this.attributes.text;if(""===t)return t;var e=this.textAvailableWidth;return Qb(t,e)},enumerable:!1,configurable:!0}),Object.defineProperty(Kx.prototype,"textAvailableWidth",{get:function(){var t=this.attributes,e=t.marker,n=t.padding,r=t.ellipsis,i=t.width,t=t.markerSpacing;if(!r)return 1/0;r=pp(i)?this.getStyle("buttonStyle").width:i;return e?r-2*n-t-this.markerSize:r-2*n},enumerable:!1,configurable:!0}),Object.defineProperty(Kx.prototype,"buttonHeight",{get:function(){var t=this.attributes.height;return t||this.getStyle("buttonStyle").height},enumerable:!1,configurable:!0}),Kx.prototype.getStyle=function(e){var t=this.attributes,n=t.size,t=t.type,r=this.state,i=C({},kp(Yx,[n,e]),yx(kp(qx,[t,e]),r),yx(kp(this.attributes,e),r,!0));return"disabled"===r&&(Object.keys(i).forEach(function(t){t in Xx[e]&&(i[t]=kp(Xx,[e,t]))}),Object.keys(Xx.strict[e]).forEach(function(t){i[t]=kp(Xx,["strict",e,t])}),C(i,yx(kp(this.attributes,e),"disabled"))),i},Kx.prototype.render=function(t,e){var n=t.padding,r=t.marker,t=t.markerSpacing,t=void 0===t?0:t,n=(e.attr("cursor","disabled"===this.state?"not-allowed":"pointer"),j(hx(n),4)),i=(n[0],n[1]),o=(n[2],n[3]),a=this.buttonHeight,s=this.getStyle("markerStyle"),l=this.markerSize,n=B(e,".marker",function(){return new L({className:"marker",style:{symbol:"circle"}})}).call(function(t){t.node().update(S(S({},s),{symbol:r,x:o+l/2,y:a/2,size:l}))}).node().getLocalBounds(),u=this.text,u=void 0===u?"":u,c=this.getStyle("textStyle"),n=(this.textShape=B(e,".text","text").attr("className","text").style("x",l?n.max[0]+t:o).style("y",a/2).style("text",u).style("textAlign","left").style("textBaseline","middle").call(N,c).node(),this.textShape.getLocalBounds()),u=this.getStyle("buttonStyle");B(e,".background","rect").attr("className","background").style("zIndex",-1).call(N,u).style("height",a).style("width",o+(l?l+t:0)+2*n.halfExtents[0]+i).node()},Kx.prototype.update=function(t){this.attr(C({},this.attributes,t=void 0===t?{}:t));t=this.attributes.state;this.state=void 0===t?"default":t,this.render(this.attributes,this)},Kx.prototype.setState=function(t){this.update({state:t})},Kx.prototype.hide=function(){this.style.visibility="hidden"},Kx.prototype.show=function(){this.style.visibility="visible"},Kx.prototype.bindEvents=function(){this.addEventListener("click",this.clickEvents),this.addEventListener("mouseenter",this.mouseenterEvent),this.addEventListener("mouseleave",this.mouseleaveEvent)},Kx.defaultOptions={type:Kx.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:{}}}},Kx);function Kx(t){var n=Wx.call(this,Ox({},Kx.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 $x(t){return Ux.call(this,C({},$x.defaultOptions,t))||this}i($x,Ux=G),$x.prototype.render=function(t,e){for(var n=t.x,r=t.y,s=t.items,l=t.textStyle,i=t.padding,u=t.width,c=t.separator,t=j(hx(i),3),i=t[0],h=t[1],t=t[2],d=B(e,".container","g").attr("className","container").style("x",n+t).style("y",r+i),f=0,p=0,y=(d.node().removeChildren(!0),this),o=0;o<s.length;o++)!function(t){var e,n=s[t],r=new Gx({className:"breadcrumb-item",style:S(S({x:f,y:p,text:Xf(n.text)?n.id:n.text,textStyle:l},Ep(n,["marker"])),{padding:0,backgroundStyle:null})}),i=(d.append(function(){return r}),r.getLocalBounds()),o=2*i.halfExtents[0],i=2*i.halfExtents[1],o=(f+=o,Xf(u)||u-h<f&&(r.attr({x:0,y:p+i}),f=o,p+=i),y.bindInnerEvents(r,n),c||{}),n=o.spacing,n=void 0===n?0:n,a=o.text,a=void 0===a?"/":a,o=o.style;t!==s.length-1&&(e=new rd({className:"".concat($x.tag,"-separator"),id:"".concat($x.tag,"-separator-").concat(t),style:S(S(S(S({},fx),{x:f+n,y:p+i/2}),o),{text:a,textAlign:"end",textBaseline:"middle"})}),d.append(function(){return e}),t=e.getLocalBounds(),f+=2*t.halfExtents[0]+n)}(o)},$x.prototype.update=function(t){this.attr(C({},this.attributes,t)),this.render(this.attributes,this)},$x.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)})},$x.defaultOptions={type:$x.tag="breadcrumb",style:{separator:{text:"/",style:{fontSize:14,fill:"rgba(0, 0, 0, 0.45)"},spacing:8},textStyle:{default:S(S({},fx),{fontSize:14,fill:"rgba(0, 0, 0, 0.45)"}),active:{fill:"#5468ff",cursor:"pointer"}},padding:[8,8,8,8]}};i(tw,Jx=k),tw.prototype.render=function(){var t=this.attributes,e=t.lines,t=t.areas;e&&this.createLines(e),t&&this.createAreas(t)},tw.prototype.clear=function(){this.linesGroup.removeChildren(!0),this.areasGroup.removeChildren(!0)},tw.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()},tw.prototype.createLines=function(t){var e=this;t.forEach(function(t){e.linesGroup.appendChild(new Zh({name:"line",style:t}))})},tw.prototype.createAreas=function(t){var e=this;t.forEach(function(t){e.areasGroup.appendChild(new Zh({name:"area",style:t}))})};var Jx,Qx=tw;function tw(t){var e=this,n=t.style,t=I(t,["style"]);return(e=Jx.call(this,C({},{type:"lines",style:{width:0,height:0}},S({style:n},t)))||this).linesGroup=new Hh({name:"lines"}),e.appendChild(e.linesGroup),e.areasGroup=new Hh({name:"areas"}),e.appendChild(e.areasGroup),e.render(),e}i(rw,ew=k),rw.prototype.render=function(){var e=this;this.attributes.columns.forEach(function(t){t.forEach(function(t){e.columnsGroup.appendChild(new ed({name:"column",style:t}))})})},rw.prototype.update=function(t){this.attr(C({},this.attributes,t)),t.columns&&(this.clear(),this.render())},rw.prototype.clear=function(){this.removeChildren(!0)};var ew,nw=rw;function rw(t){var e=this,n=t.style,t=I(t,["style"]);return(e=ew.call(this,C({},{type:"column",style:{width:0,height:0}},S({style:n},t)))||this).columnsGroup=new Hh({name:"columns"}),e.appendChild(e.columnsGroup),e.render(),e}function iw(t){return 0===t.length?[0,0]:[tp(cp(t,function(t){return tp(t)||0})),Qf(up(t,function(t){return Qf(t)||0}))]}function ow(t){for(var e=xp(t),n=e[0].length,t=j([Array(n).fill(0),Array(n).fill(0)],2),r=t[0],i=t[1],o=0;o<e.length;o+=1)for(var a=e[o],s=0;s<n;s+=1)0<=a[s]?(a[s]+=r[s],r[s]=a[s]):(a[s]+=i[s],i[s]=a[s]);return e}function aw(t,e,n){void 0===n&&(n=[[0,0],[1,1]]);for(var e=!!(e=void 0===e?!1:e),r=[],i=0,o=t.length;i<o;i+=2)r.push([t[i],t[i+1]]);for(var a,s,l,u=function(t,e,n,r){var i,o=[],a=!!r;if(a){u=r[0],c=r[1];for(var s=0,l=t.length;s<l;s+=1)var u=yo([0,0],u,x=t[s]),c=go([0,0],c,x)}for(var s=0,h=t.length;s<h;s+=1){var d,f,p,y,g,v,m,b,x=t[s];0!==s||n?s!==h-1||n?(d=t[[s?s-1:h-1,s-1][n?0:1]],f=t[n?(s+1)%h:s+1],v=vo(v=ko([0,0],f,d),v,e),0!==(g=(p=mo(x,d))+(y=mo(x,f)))&&(p/=g,y/=g),g=vo([0,0],v,-p),v=vo([0,0],v,y),m=po([0,0],x,g),b=yo([0,0],b=po([0,0],x,v),go([0,0],f,x)),b=go([0,0],b,yo([0,0],f,x)),m=yo([0,0],m=po([0,0],x,g=vo([0,0],g=ko([0,0],b,x),-p/y)),go([0,0],d,x)),m=go([0,0],m,yo([0,0],d,x)),b=po([0,0],x,v=vo([0,0],v=ko([0,0],x,m),y/p)),a&&(m=yo([0,0],m=go([0,0],m,u),c),b=yo([0,0],b=go([0,0],b,u),c)),o.push(i),o.push(m),i=b):(m=x,o.push(i),o.push(m)):i=x}return n&&o.push(o.shift()),o}(r,.4,e,n),c=r.length,h=[],i=0;i<c-1;i+=1)a=u[2*i],s=u[2*i+1],l=r[i+1],h.push(["C",a[0],a[1],s[0],s[1],l[0],l[1]]);return e&&(a=u[c],s=u[c+1],l=r[0],h.push(["C",a[0],a[1],s[0],s[1],l[0],l[1]])),h}function sw(t,e,n){return e<=t&&t<=n}function lw(t){return Math.abs(t)<1e-6?0:t<0?-1:1}function uw(t,e,n){var r=!1,i=t.length;if(!(i<=2)){for(var o,a,s,l=0;l<i;l++){var u=t[l],c=t[(l+1)%i];if(a=c,((s=[e,n])[0]-(o=u)[0])*(a[1]-o[1])==(a[0]-o[0])*(s[1]-o[1])&&Math.min(o[0],a[0])<=s[0]&&s[0]<=Math.max(o[0],a[0])&&Math.min(o[1],a[1])<=s[1]&&s[1]<=Math.max(o[1],a[1]))return 1;0<lw(u[1]-n)!=0<lw(c[1]-n)&&lw(e-(n-u[1])*(u[0]-c[0])/(u[1]-c[1])-u[0])<0&&(r=!r)}return r}}function cw(t){for(var e,n,r=[],i=t.length,o=0;o<i-1;o++){var a=t[o],s=t[o+1];r.push({from:{x:a[0],y:a[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 hw(t,u){var c=!1;return $f(t,function(t){if(e=t.from,t=t.to,n=u.from,r=u.to,i=n.x-e.x,o=n.y-e.y,a=t.x-e.x,t=t.y-e.y,s=r.x-n.x,r=r.y-n.y,l=null,.001*(a*a+t*t)*(s*s+r*r)<(n=a*r-t*s)*n&&(sw(r=(i*r-o*s)/n,0,1)&&sw((i*t-o*a)/n,0,1)&&(l={x:e.x+r*a,y:e.y+r*t})),l)return!(c=!0);var e,n,r,i,o,a,s,l}),c}function dw(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 fw(t,e){var n=(e=void 0===e?!1:e)?t.length-1:0,t=t.map(function(t,e){return z([e===n?"M":"L"],j(t),!1)});return e?t.reverse():t}function pw(t,e){if(void 0===e&&(e=!1),t.length<=2)return fw(t);for(var n=[],r=t.length,i=0;i<r;i+=1){var o=e?t[r-i-1]:t[i];Ap(o,n.slice(-2))||n.push.apply(n,z([],j(o),!1))}var a=aw(n,!1);return e?a.unshift(z(["M"],j(t[r-1]),!1)):a.unshift(z(["M"],j(t[0]),!1)),a}function yw(t,e,n){t=xp(t);return t.push(["L",e,n],["L",0,n],["Z"]),t}i(bw,gw=G),Object.defineProperty(bw.prototype,"rawData",{get:function(){var t=this.attributes.data;if(!t||0===(null==t?void 0:t.length))return[[]];t=xp(t);return t=ap(t[0])?[t]:t},enumerable:!1,configurable:!0}),Object.defineProperty(bw.prototype,"data",{get:function(){return this.attributes.isStack?ow(this.rawData):this.rawData},enumerable:!1,configurable:!0}),Object.defineProperty(bw.prototype,"scales",{get:function(){return this.createScales(this.data)},enumerable:!1,configurable:!0}),Object.defineProperty(bw.prototype,"baseline",{get:function(){var t=this.scales.y,e=j(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(bw.prototype,"containerCfg",{get:function(){var t=this.attributes;return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),Object.defineProperty(bw.prototype,"linesCfg",{get:function(){var n=this,t=this.attributes,r=t.areaStyle,e=t.isStack,i=t.lineStyle,o=t.smooth,t=this.containerCfg.width,a=this.data;if(0===a[0].length)return{lines:[],areas:[]};var s,l,u,c,h,d,f,p=this.scales,y=p.x,p=p.y,p=(a=a,s=(y={type:"line",x:y,y:p}).x,l=y.y,u=(y=j(l.getOptions().range||[0,0],2))[0],c=y[1],u<c&&(y=j([u,c],2),c=y[0],u=y[1]),a.map(function(t){return t.map(function(t,e){return[s.map(e),op(l.map(t),c,u)]})})),y=[];return r&&(a=this.baseline,y=e?(o?function(t,e,n){for(var r=[],i=t.length-1;0<=i;--i){var o,a=t[i],s=pw(a),l=void 0,l=0===i?yw(s,e,n):(o=pw(t[i-1],!0),a=a[0],o[0][0]="L",z(z(z([],j(s),!1),j(o),!1),[z(["M"],j(a),!1),["Z"]],!1));r.push(l)}return r}:function(t,e,n){for(var r=[],i=t.length-1;0<=i;--i){var o,a=fw(t[i]),s=void 0,s=0===i?yw(a,e,n):((o=fw(t[i-1],!0))[0][0]="L",z(z(z([],j(a),!1),j(o),!1),[["Z"]],!1));r.push(s)}return r})(p,t,a):(h=o,d=t,f=a,p.map(function(t){return yw((h?pw:fw)(t),d,f)}))),{lines:p.map(function(t,e){return S({stroke:n.getColor(e),path:(o?pw:fw)(t)},i)}),areas:y.map(function(t,e){return S({path:t,fill:n.getColor(e)},r)})}},enumerable:!1,configurable:!0}),Object.defineProperty(bw.prototype,"columnsCfg",{get:function(){var i=this,t=this.attributes,o=t.isStack,a=t.columnStyle,t=this.containerCfg.height,s=this.rawData;if(!s)return{columns:[]};o&&(s=ow(s));var e=this.createScales(s),l=e.x,u=e.y,e=j(iw(s),2),n=e[0],e=e[1],c=new mm({domain:[0,e-(0<n?0:n)],range:[0,t]}),h=l.getBandWidth(),d=this.rawData;return{columns:s.map(function(t,r){return t.map(function(t,e){var n=h/s.length;return S(S({fill:i.getColor(r)},a),o?{x:l.map(e),y:u.map(t),width:h,height:c.map(d[r][e])}:{x:l.map(e)+n*r,y:0<=t?u.map(t):u.map(0),width:n,height:c.map(Math.abs(t))})})})}},enumerable:!1,configurable:!0}),bw.prototype.render=function(t,e){this.containerShape=B(e,".container","rect").attr("className","container").node();var n=this.attributes.type,r="spark".concat(n),i="line"===n?this.linesCfg:this.columnsCfg;this.sparkShape=B(e,".".concat(r),function(){return new("line"===n?Qx:nw)({className:r,style:i})}).call(N,i).node()},bw.prototype.update=function(t){this.attr(C({},this.attributes,t)),this.render(this.attributes,this)},bw.prototype.clear=function(){this.removeChild(this.sparkShape),this.sparkShape.clear(),this.sparkShape.destroy()},bw.prototype.getColor=function(t){var e=this.attributes.color;return Zf(e)?e[t%e.length]:qf(e)?e.call(null,t):e},bw.prototype.createScales=function(t){var e=this.attributes,n=e.type,r=e.isGroup,i=e.barPadding,o=e.nice,o=void 0===o||o,a=e.minValue,e=e.maxValue,s=this.containerCfg,l=s.width,s=s.height,u=j(iw(t),2),c=u[0],u=u[1];return{type:n,x:"line"===n?new mm({domain:[0,t[0].length-1],range:[0,l]}):new bv({domain:t[0].map(function(t,e){return e}),range:[0,l],paddingInner:r?i:0}),y:new mm({domain:[null!=a?a:c,null!=e?e:u],range:[s,0],nice:o})}},bw.tag="sparkline",bw.defaultOptions={style:{type:"line",width:200,height:20,isStack:!1,color:["#83daad","#edbf45","#d2cef9","#e290b3","#6f63f4"],smooth:!0,lineStyle:{lineWidth:1},isGroup:!1,columnStyle:{lineWidth:1,stroke:"#fff",padding:.1}}};var gw,vw,mw=bw;function bw(t){return gw.call(this,C({},bw.defaultOptions,t))||this}function xw(){return null!==vw&&vw.apply(this,arguments)||this}function ww(e,n){return i(t,r=jh),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(C({},this.attributes,t=void 0===t?{}:t)),null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)},t;function t(t){t=r.call(this,Ox({},{style:n},t))||this;return t.descriptor=e,t}var r}i(xw,vw=jh);var kw=ww({render:function(t,e){function n(t,e,n,r,i){B(h,"line-".concat(t),"line").attr("className","line-".concat(t)).style("x1",e).style("y1",n).style("x2",r).style("y2",i).style("stroke",h.style.stroke).style("strokeOpacity",h.style.strokeOpacity).style("lineWidth",h.style.lineWidth)}var r=t.size,i=t.radius,o=t.stroke,a=t.fill,s=t.lineWidth,l=t.orient,u=t.fillOpacity,t=t.strokeOpacity,r=void 0===r?10:r,c=2.4*r,h=B(e,".rect","rect").attr("className","rect").style("x",-r/2).style("y",-c/2).style("width",r).style("height",c).style("fill",a||"#fff").style("fillOpacity",u||1).style("stroke",o||"#bfbfbf").style("lineWidth","number"!=typeof s?1:s).style("strokeOpacity",t).style("radius","number"!=typeof i?r/4:null!=i?i:2).node(),a=1/3*r,u=2/3*r,o=.25*c,s=.75*c;n(0,a,o,a,s),n(0,u,o,u,s),h.setOrigin(r/2,c/2),"vertical"===l?e.setLocalEulerAngles(90):e.setLocalEulerAngles(0)}});i(Tw,Ew=G),Tw.prototype.render=function(t,e){var n,r,i,o=t.iconCfg,t=t.textCfg;i=e,o=((n=o)||{}).type,r="handle-icon ".concat(o,"-handle"),A(i).selectAll(".handle-icon").data(o?[o]:[],function(t){return t}).join(function(t){return t.append(function(t){return"symbol"===t?new L({className:r,name:"icon",style:n}):new kw({name:"icon",className:r,style:n})})},function(t){return t.each(function(){this.update(n)})},function(t){return t.remove()}),void 0===(i=t)&&(i={}),B(e,".".concat(o="handle-text"),"text").attr("className",o).style("fontSize",12).style("fill","#000").style("fillOpacity",.45).style("textAlign","center").style("textBaseline","middle").call(N,i)};var Ew,_w,Sw,Mw=Tw;function Tw(){return null!==Ew&&Ew.apply(this,arguments)||this}function Ow(t){var o=_w.call(this,C({},Ow.defaultOptions,t))||this;return o.onSelectionMouseenter=function(){o.selectionShape.attr(o.getStyle("selectionStyle"))},o.onSelectionMouseleave=function(){o.selectionShape.attr(o.getStyle("selectionStyle"))},o.onDragStart=function(i){return function(t){t.stopPropagation(),o.target=i,o.prevPos=o.getOrientVal(gx(t));var t=o.availableSpace,e=t.x,t=t.y,n=o.attributes,r=n.x,n=n.y;o.selectionStartPos=o.getRatio(o.prevPos-o.getOrientVal([e,t])-o.getOrientVal([r,n])),o.selectionWidth=0,o.addEventListener("mousemove",o.onDragging),o.addEventListener("touchmove",o.onDragging),document.addEventListener("mouseup",o.onDragEnd),document.addEventListener("touchend",o.onDragEnd)}},o.onDragging=function(t){t.stopPropagation();var t=o.getOrientVal(gx(t)),e=t-o.prevPos;if(e){var n=o.getRatio(e);switch(o.target){case"start":o.setValuesOffset(n);break;case"end":o.setValuesOffset(0,n);break;case"selection":o.setValuesOffset(n,n);break;case"background":o.selectionWidth+=n,o.setValues([o.selectionStartPos,o.selectionStartPos+o.selectionWidth].sort())}o.prevPos=t}},o.onDragEnd=function(){o.removeEventListener("mousemove",o.onDragging),o.removeEventListener("mousemove",o.onDragging),document.removeEventListener("mouseup",o.onDragEnd),document.removeEventListener("touchend",o.onDragEnd)},o.onValueChanged=function(t){t=new Th("valueChanged",{detail:{oldValue:t,value:o.getValues()}});o.dispatchEvent(t)},o.selectionStartPos=0,o.selectionWidth=0,o.prevPos=0,o.target="",o}function Pw(t){var a=Sw.call(this,C({},Pw.defaultOptions,t))||this;return a.onValueChanged=function(t){var e=a.style.value;t!==e&&(e=new Th("scroll",t={detail:{oldValue:t,value:e}}),a.dispatchEvent(e),e=new Th("valueChanged",t),a.dispatchEvent(e))},a.onTrackClick=function(t){var e=a.attributes.thumbLen,n=j(a.getLocalPosition(),2),r=n[0],n=n[1],i=j(a.padding,4),o=i[0],i=i[3],r=a.getOrientVal([r+i,n+o]),i=a.getOrientVal(gx(t))-e/2,n=a.valueOffset(i-r,!0);a.setValue(n)},a.onThumbMouseenter=function(){a.thumbShape.attr(a.getStyle("thumbStyle","active"))},a.onTrackMouseenter=function(){a.trackShape.attr(a.getStyle("trackStyle","active"))},a.onThumbMouseleave=function(){a.thumbShape.attr(a.getStyle("thumbStyle"))},a.onTrackMouseleave=function(){a.trackShape.attr(a.getStyle("trackStyle"))},a.onDragStart=function(t){t.stopPropagation(),a.prevPos=a.getOrientVal(gx(t)),document.addEventListener("mousemove",a.onDragging),document.addEventListener("mouseup",a.onDragEnd),document.addEventListener("touchmove",a.onDragging),document.addEventListener("touchcancel",a.onDragEnd)},a.onDragging=function(t){t.stopPropagation();var t=a.getOrientVal(gx(t)),e=t-a.prevPos;a.setOffset(e),a.prevPos=t},a.onDragEnd=function(t){t.preventDefault(),document.removeEventListener("mousemove",a.onDragging),document.removeEventListener("mouseup",a.onDragEnd),document.removeEventListener("touchmove",a.onDragging),document.removeEventListener("touchcancel",a.onDragEnd)},a}i(Ow,_w=G),Object.defineProperty(Ow.prototype,"values",{get:function(){return this.getAttribute("values")},set:function(t){this.setAttribute("values",this.getSafetyValues(t))},enumerable:!1,configurable:!0}),Object.defineProperty(Ow.prototype,"names",{get:function(){return this.getAttribute("names")},set:function(t){this.setAttribute("names",t)},enumerable:!1,configurable:!0}),Object.defineProperty(Ow.prototype,"backgroundShapeCfg",{get:function(){return S(S({cursor:"crosshair",zIndex:0},this.availableSpace),this.getStyle("backgroundStyle"))},enumerable:!1,configurable:!0}),Object.defineProperty(Ow.prototype,"sparklineShapeCfg",{get:function(){var t=this.attributes,t=(t.orient,t.sparkline),e=t.padding,t=I(t,["padding"]),e=j(hx(e),4),n=e[0],r=e[1],i=e[2],e=e[3],o=this.availableSpace,a=o.width,o=o.height,s=this.getStyle("backgroundStyle").lineWidth,s=void 0===s?0:s;return S(S({x:s/2+e,y:s/2+n},t),{zIndex:0,width:a-s-e-r,height:o-s-n-i})},enumerable:!1,configurable:!0}),Object.defineProperty(Ow.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.padding,n=t.width,t=t.height,e=j(hx(e),4),r=e[0],i=e[1],o=e[2],e=e[3];return{x:e,y:r,width:n-(e+i),height:t-(r+o)}},enumerable:!1,configurable:!0}),Ow.prototype.getValues=function(){return this.values},Ow.prototype.setValues=function(t){this.values=t,this.update({values:t})},Ow.prototype.getNames=function(){return this.names},Ow.prototype.setNames=function(t){this.names=t},Ow.prototype.render=function(t,e){function n(e){var t="slider-".concat(e,"-handle");return B(o,".".concat(t),function(){return new Mw({className:t})}).call(function(t){t.node().update(r.getHandleShapeCfg(e))}).node()}var r=this,i=t.backgroundStyle,t=t.selectionStyle,e=B(e,".slider-background","rect").attr("className","slider-background").style("cursor","crosshair").style("fill","#416180").style("fillOpacity",.05).call(N,this.availableSpace).call(N,yx(i)).node(),o=(B(this.backgroundShape=e,".slider-sparkline",function(){return new mw({})}).attr("className","slider-sparkline").call(function(t){t.node().update(r.sparklineShapeCfg)}),B(e,".slider-foreground","g").attr("className","slider-foreground").node());this.selectionShape=B(o,".slider-selection","rect").attr("className","slider-selection").style("cursor","move").style("zIndex",2).style("fill","#5B8FF9").style("fillOpacity",.15).call(N,this.calcMask()).call(N,yx(t)||{}).node();this.startHandle=n("start"),this.endHandle=n("end")},Ow.prototype.getSafetyValues=function(t,e){void 0===t&&(t=this.getValues()),void 0===e&&(e=4);var n,r=this.attributes,i=r.min,r=r.max,o=j(this.getValues(),2),a=o[0],o=o[1],t=j(t||[a,o],2),s=t[0],t=t[1],l=t-s;return t<s&&(s=(n=j([t,s],2))[0],t=n[1]),r-i<l?[i,r]:s<i?a===i&&o===t?[i,t]:[i,l+i]:r<t?o===r&&a===s?[s,r]:[r-l,r]:[ix(s,e),ix(t,e)]},Ow.prototype.getStyle=function(t,e,n){return void 0===e&&(e="default"),n?this.getHandleCfg(n):yx(kp(this.attributes,t),e,!0)},Ow.prototype.calcMask=function(t){var t=j(this.getSafetyValues(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}])},Ow.prototype.calcHandlePosition=function(t){var e=this.availableSpace,n=e.width,e=e.height,r=j(this.getSafetyValues(),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])}},Ow.prototype.calcHandleText=function(t){var e,n,r=this.attributes,i=r.orient,r=r.names,o=this.getHandleCfg(t),a=o.spacing,s=o.formatter,o=o.textStyle,l=this.getHandleSize(t),u=this.getSafetyValues(),c=this.availableSpace,h=c.width,c=c.height,d=this.calcMask(),f=d.x,p=d.y,y=d.width,d=d.height,r=j("start"===t?[r[0],u[0]]:[r[1],u[1]],2),u=s(r[0],r[1]),s=new rd({style:S(S({},o),{text:u})}),r=bx(s),o=r.width,r=r.height,s=(s.destroy(),0),g=0,l=l/2,v="center";return"horizontal"===i?(e=(i=a+l)+o/2,v="start"===t?(s=0<(n=f-i-o)?-e:e,0<n?"end":"start"):(s=(n=o<h-f-y-i)?e:-e,n?"start":"end")):(o=a+l,g="start"===t?r<p-l?-o:o:r<c-p-d-l?o:-o),{x:s,y:g,text:u,textAlign:v}},Ow.prototype.getHandleTextShapeCfg=function(t){var e=this.getHandleCfg(t).textStyle;return S(S({},e),this.calcHandleText(t))},Ow.prototype.getHandleIconShapeCfg=function(t){var e,n=this.attributes.orient,r=this.getHandleCfg(t),i=r.handleIcon,r=r.handleStyle,o=this.getOrientVal(["ew-resize","ns-resize"]),t=this.getHandleSize(t),i=i?(e="symbol",S(S({},r),{cursor:o,size:t,symbol:i})):(e="default",S(S({},r),{cursor:o,size:t}));return S({orient:n,type:e},i)},Ow.prototype.getHandleShapeCfg=function(t){var e=this.getHandleCfg(t),n=this.calcHandlePosition(t),r=n.x,n=n.y,i=this.calcHandleText(t);return{x:r,y:n,handleType:t,zIndex:3,visibility:null!=e&&e.show?"visible":"hidden",iconCfg:this.getHandleIconShapeCfg(t),textCfg:S(S({},this.getHandleTextShapeCfg(t)),i)}},Ow.prototype.getHandleCfg=function(t){var e=kp(this.attributes,"handle"),n=e.start,r=e.end,e=I(e,["start","end"]),i={};return"start"===t?i=n:"end"===t&&(i=r),C({},e,i)},Ow.prototype.getHandleSize=function(t){t=this.getHandleCfg(t).size;if(t)return t;var t=this.attributes,e=t.width,t=t.height;return Math.floor((this.getOrientVal([t,e])+4)/2.4)},Ow.prototype.getOrientVal=function(t){var t=j(t,2),e=t[0],t=t[1];return"horizontal"===this.attributes.orient?e:t},Ow.prototype.setValuesOffset=function(t,e){void 0===e&&(e=0);var n=j(this.getValues(),2),r=n[0],n=n[1],t=[r+t,n+e].sort();this.setValues(t),this.onValueChanged([r,n])},Ow.prototype.getRatio=function(t){var e=this.availableSpace,n=e.width,e=e.height;return t/this.getOrientVal([n,e])},Ow.prototype.bindEvents=function(){function r(t){return t&&".handle-text"!==t.className}var i=this,t=this.selectionShape;t.addEventListener("mousedown",this.onDragStart("selection")),t.addEventListener("touchstart",this.onDragStart("selection")),t.addEventListener("mouseenter",this.onSelectionMouseenter),t.addEventListener("mouseleave",this.onSelectionMouseleave);[this.startHandle,this.endHandle].forEach(function(t){var n=t.style.handleType;t.addEventListener("mousedown",function(t){var e=t.target;r(e)&&i.onDragStart(n)(t)}),t.addEventListener("touchstart",function(t){var e=t.target;r(e)&&i.onDragStart(n)(t)})}),this.backgroundShape.addEventListener("mousedown",this.onDragStart("background")),this.backgroundShape.addEventListener("touchstart",this.onDragStart("background"))},Ow.defaultOptions={type:Ow.tag="slider",style:{orient:"horizontal",values:[0,1],names:["",""],min:0,max:1,width:200,height:20,sparkline:{padding:[1,1,1,1]},padding:[0,0,0,0],selectionStyle:{active:{fill:"#ccdaf5"}},handle:{show:!0,formatter:function(t,e){return t},spacing:10}}},i(Pw,Sw=G),Object.defineProperty(Pw.prototype,"padding",{get:function(){return hx(this.attributes.padding)},enumerable:!1,configurable:!0}),Object.defineProperty(Pw.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.width,t=t.height,n=j(this.padding,4),r=n[0],i=n[1],o=n[2],n=n[3];return{x:n,y:r,width:e-(n+i),height:t-(r+o)}},enumerable:!1,configurable:!0}),Object.defineProperty(Pw.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(Pw.prototype,"thumbRadius",{get:function(){var t=this.attributes.isRound,e=this.availableSpace,n=e.width,e=e.height,r=kp(this.attributes,["thumbStyle","default","radius"]);return t?r||this.getOrientVal([e,n])/2:0},enumerable:!1,configurable:!0}),Pw.prototype.render=function(t,e){var n=t.width,r=t.height,i=t.trackStyle,o=t.thumbStyle,a=t.value,s=t.thumbLen,t=t.orient,e=B(e,".track","rect").attr("className","track").style("width",null!=n?n:10).style("height",null!=r?r:200).call(N,yx(i)).node(),n=this.valueOffset(a||0),r=this.availableSpace;this.thumbShape=B(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(N,yx(o)).node(),this.trackShape=e},Pw.prototype.getValue=function(){return this.style.value},Pw.prototype.setValue=function(t){var e=this.style,n=e.value,r=e.min,e=e.max;this.update({value:op(t,r,e)}),this.onValueChanged(n)},Pw.prototype.setOffset=function(t){var e=this.getValue();this.setValue(this.valueOffset(t,!0)+e)},Pw.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*op(t,i,n)},Pw.prototype.getStyle=function(t,e){return void 0===e&&(e="default"),yx(kp(this.attributes,t),e)},Pw.prototype.bindEvents=function(){this.trackShape.addEventListener("click",this.onTrackClick),this.thumbShape.addEventListener("mousedown",this.onDragStart),this.thumbShape.addEventListener("touchstart",this.onDragStart),this.onHover()},Pw.prototype.getOrientVal=function(t){return"horizontal"===this.attributes.orient?t[0]:t[1]},Pw.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)},Pw.defaultOptions={type:Pw.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}}}};Object.defineProperty(Cw.prototype,"left",{get:function(){return this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(Cw.prototype,"top",{get:function(){return this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(Cw.prototype,"right",{get:function(){return this.x2},enumerable:!1,configurable:!0}),Object.defineProperty(Cw.prototype,"bottom",{get:function(){return this.y2},enumerable:!1,configurable:!0}),Object.defineProperty(Cw.prototype,"width",{get:function(){return this.defined("x2")&&this.defined("x1")?this.x2-this.x1:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(Cw.prototype,"height",{get:function(){return this.defined("y2")&&this.defined("y1")?this.y2-this.y1:void 0},enumerable:!1,configurable:!0}),Cw.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},Cw.prototype.empty=function(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE},Cw.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},Cw.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])},Cw.prototype.rotatedPoints=function(t,e,n){var r=this.x1,i=this.y1,o=this.x2,a=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*a+l,t*r+s*a+e],[s*o-t*a+l,t*o+s*a+e],[s*o-t*i+l,t*o+s*i+e]].flat(1)},Cw.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},Cw.prototype.intersects=function(t){return t&&!(this.x2<t.x1||this.x1>t.x2||this.y2<t.y1||this.y1>t.y2)},Cw.prototype.defined=function(t){return this[t]!==Number.MAX_VALUE&&this[t]!==-Number.MAX_VALUE};var Aw=Cw;function Cw(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 Nw(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){var e=(i=j(i=c,4))[0],n=i[1],r=i[2],i=i[3],o=(t=j(t,4))[0],a=t[1],r=r-e,i=i-n,s=t[2]-o,t=t[3]-a,l=r*t-s*i;if(0==l)return!1;var u=0<l,e=e-o;return(n=r*(o=n-a)-i*e)<0!=u&&((a=s*o-t*e)<0!=u&&(l<n!=u&&l<a!=u))})}function Lw(t,e,n){void 0===n&&(n=[0,0,0,0]);var r=e.getEulerAngles()||0,i=(e.setEulerAngles(0),e.getLocalBounds()),o=i.min,a=i.max,i=i.halfExtents,s=o[0],l=2*i[0],i=2*i[1],o=o[1],u=a[0],a=a[1],c=0,h=0,d=s,f=o,p=("text"===e.tagName&&(i-=1.5,p=e.style.textAlign,y=e.style.textBaseline,c=+e.style.dx,h=+e.style.dy,"center"===p?d=(s+u)/2:"right"!==p&&"end"!==p||(d=u),"middle"===y?f=(o+a)/2:"bottom"!==y&&"baseline"!==y||(f=a)),j(n,4)),u=p[0],y=void 0===u?0:u,a=p[1],n=void 0===a?0:a,u=p[2],a=p[3];return t.set((c+=s)-(void 0===a?n:a),(h+=o)-y,c+l+n,h+i+(void 0===u?y:u)),e.setEulerAngles(r),t.rotatedPoints(r*cx,d,f)}function Iw(t,e,n){var r,t=Lw(new Aw,t,n),e=Lw(new Aw,e,n),n=Nw(e,[t[0],t[1],t[2],t[3]])||Nw(e,[t[0],t[1],t[4],t[5]])||Nw(e,[t[4],t[5],t[6],t[7]])||Nw(e,[t[2],t[3],t[6],t[7]]);return localStorage.getItem("__debug__")&&window.canvas&&((r=function(t,e){return void 0===e&&(e="red"),window.canvas.appendChild(new Zh({style:{lineWidth:1,stroke:e,path:[["M",t[0],t[1]],["L",t[2],t[3]],["L",t[4],t[5]],["L",t[6],t[7]],["Z"]]}}))})(t),r(e,"blue")),n}function Rw(t,e,n){return"top"===t||"bottom"===t?e:n}function Dw(t,e,n){return"left"===t||"right"===t?e:n}function jw(t,e,n){return"outside"===t?e:n}var Bw=function(t,e,n){return"left"===t?e:n},Fw=function(t,e,n){return"right"===t?e:n},zw=function(t,e,n){return"left"===t||"top"===t||"inside"===t?e:n};function Vw(t,r){var i;return z([],j(t.reduce(function(t,e,n){return n&&i&&Iw(i,e,r)?(t.add(i),t.add(e)):i=e,t},new Set)),!1)}var s={style:{title:{content:"",rotate:void 0,maxLength:260},ticks:[],ticksThreshold:100,tickLine:{len:6},subTickLine:{len:4,count:0},label:{type:"text",alignTick:!0,tickPadding:2,margin:[0,0,0,0],overlapOrder:["autoRotate","autoEllipsis","autoHide"],autoRotate:!1,autoEllipsis:!1,autoHide:!1,autoHideTickLine:!0,showLast:!0,showFirst:!0,optionalAngles:[0,45,90],minLabel:0,minLength:14,maxLength:160,ellipsisStep:" "},verticalFactor:1}},Gw=(C({},s,{style:{type:"arc"}}),C({},s,{style:{}}),{year:[["year","second"],["year","day"],["month","day"],["day","day"]],month:[["month","day"],["day","day"]],day:[["month","day"],["day","day"]],hour:[["hour","second"],["hour","minute"],["hour","hour"]],minute:[["minute","second"],["second","second"]],second:[["second","second"]]});function Hw(t,r){for(var i,o=t.map(function(t,e){return[t.id,{text:t.style.text,value:t.style.tip||t.style.text,idx:e}]}),a=new Map(o),e=cp(o,function(t){t=j(t,2),t[0],t=t[1].value;return new Date(t).getTime()}).text,n=up(o,function(t){t=j(t,2),t[0],t=t[1].value;return new Date(t).getTime()}).text,s=(n=n,e=j([_x(e=e),_x(n)],2),n=e[0],e=e[1],n.getFullYear()!==e.getFullYear()?"year":n.getMonth()!==e.getMonth()?"month":n.getDay()!==e.getDay()?"day":n.getHours()!==e.getHours()?"hour":n.getMinutes()!==e.getMinutes()?"minute":"second"),l=new Date("1970-01-01 00:00:00"),u=nx(t[0]),c=0;c<Gw[s].length;c+=1){var h=Gw[s][c];if(Lp(Mx(l,Sx(h)),u)<r){i=h;break}i=h}return function(t,e){var e=a.get(e.id).idx;if(0===e)return t;var e=null==(e=o[e-1])?void 0:e[1].text,t=new Date(t),n=i;return Tx(new Date(e),s)!==Tx(t,s)&&(n=function(t,e,n,r){for(var i=[],o=j(t,2)[1],a=kx.indexOf(o),s=0;s<=a;s+=1){var l=[kx[s],o];if(Lp(Mx(e,Sx(l)),r)<n){i=l;break}}return i}(i,t,r,u)),Mx(t,Sx(n))}}function Ww(a,s,t){if(!(s.length<=1))for(var e=t.ellipsisStep,n=t.minLength,r=t.maxLength,i=t.margin,l=void 0===i?[]:i,u=t.labelType,c=nx(s[0]),o=ex(e,c)||1,h=ex(n,c)||1,i=ex(r,c),d=(!Xf(i)&&i!==1/0||(i=Math.max.apply(null,s.map(function(t){return t.getBBox().width}))),Date.now()),f=s.slice(),t=j(l,4),e=(t[0],t[1]),p=void 0===e?0:e,n=(t[2],t[3]),y=void 0===n?p:n,g=function(e){if((f=Vw(s,l)).length<1)return{value:void 0};if(300<Date.now()-d)return{value:void 0};var t,n,r,i=function(t,e){return""},o=Rw(a,e-y-p,e),i="time"===u?Hw(s,o):"number"===u?(o=o,n=(t=s).map(function(t,e){return{text:t.style.text,value:Number(t.style.tip||t.style.text)}}),n=Number(up(n,function(t){t=t.text;return(null==t?void 0:t.length)||0}).value),t=nx(t[0]),r=ox(n),Lp(r,t)<=o?function(t,e){return ox(Number(t))}:(r=ax(n),Lp(r,t)<=o?function(t,e){return ax(Number(t),1)}:function(t,e){return Number(t).toExponential()})):function(t){return Qb(t,e,c)};f.forEach(function(t,e){var n=t.style.tip||t.style.text,n=(t.style.tip=n,i.call(null,n,t));t.attr("text",n)})},v=i;h+o<v;v-=o){var m=g(v);if("object"==typeof m)return m.value}}var Uw=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")})};function Yw(t,e,n){var r=e.length;if(!(r<=1||2===r&&null!=n&&n.showFirst&&null!=n&&n.showLast)){var i,o,a,s=Uw,l=2,u=e.slice(),c=e.slice(),h=Date.now(),d=Math.min.apply(null,e.map(function(t){return t.getBBox().width}))||1;for("top"!==t&&"bottom"!==t||(t=xx(e[0]).left,e=xx(e[r-1]).right,e=Math.abs(e-t)||1,l=Math.max(Math.floor(r*d/e),l)),null!=n&&n.showFirst&&(i=u.splice(0,1)[0]),null!=n&&n.showLast&&(o=u.splice(-1,1)[0],u.reverse());Vw((o?z(z([o],j(c),!1),[i],!1):z([i],j(c),!1)).filter(function(t){return Ix(t)}),null==n?void 0:n.margin).length;)if(o&&!i&&l%2==0?u.splice(0,1).forEach(function(t){return t.style.visibility="hidden"}):o&&i&&u.splice(0,1).forEach(function(t){return t.style.visibility="hidden"}),c=s(((a=u).forEach(function(t){return t.style.visibility="visible"}),a),{seq:l}),l++,200<Date.now()-h)return}}function qw(o,t,e){for(var n=e.optionalAngles,a=void 0===n?[0,45,90]:n,r=e.margin,i=function(i){if(t.forEach(function(t){return e=o,t=t,n=a[i],t.setEulerAngles(n),void(n&&(r=zw(e,-1,1),e=Bw(e,"end",Fw(e,"start",lx(ux(r,n),"left",sx(ux(r,n),"right")))),t.style.textAlign=e));var e,n,r}),Vw(t,r).length<1)return"break"},s=0;s<a.length&&"break"!==i(s);s++);}var Xw=new Map([["autoHide",{getDefault:function(){return Yw},equidistance:Yw,greedy:function(t,e,n){var r,i=e.length;i<=1||2===i&&null!=n&&n.showFirst&&null!=n&&n.showLast||e.slice().forEach(function(t,e){e&&r&&Iw(r,t,null==n?void 0:n.margin)?e===i-1&&null!=n&&n.showLast?r.style.visibility="hidden":t.style.visibility="hidden":r=t})}}],["autoRotate",{getDefault:function(){return qw}}],["autoEllipsis",{getDefault:function(){return Ww},ellipsis:Ww}]]);function Zw(t,e,n){var r,t=Array.from(t||[]).map(function(t,e){return S({id:"".concat(e)},t)}),i=t.length,o=t;return"number"==typeof e&&e<i&&(r=Math.ceil(i/e),o=t.filter(function(t,e){return e%r==0||e===i-1})),n&&1!==o[o.length-1].value&&o.push({value:1,id:"append"}),o}function Kw(a,s){return function(i){var t,o;a&&(t=void 0===(t=a.overlapOrder)?[]:t,o=S({labelType:a.type},Ep(a,["optionalAngles","minLength","maxLength","ellipsisStep","showFirst","showLast","margin"])),t.forEach(function(t){var e,n=Xw.get(t),r=a[t];n&&r&&(t=t,(e=a)&&("autoRotate"!==t||Xf(e.rotate)))&&(t=n.getDefault(),"function"==typeof r?t=r:"object"==typeof r?(t=n[r.type]||Mp,o=S(S({},o),r.cfg)):"string"==typeof r&&(t=n[r]||Mp),t(s,i,o))}))}}function $w(t,n,e){e&&t.forEach(function(t,e){e=n[e];e&&(e.style.visibility=t.style.visibility)})}function Jw(t,e,n,r,i,o){B(t,".axis-title","text").attr("className","axis-title").style("text",(null==o?void 0:o.content)||"").style("x",e).style("y",n).style("fill","black").style("fontSize",12).style("fontWeight","lighter").style("textAlign",r).style("textBaseline",i).style("transform","rotate(".concat((null==o?void 0:o.rotate)||0,"deg)")).style("visibility",o?"visible":"hidden").call(N,(null==o?void 0:o.style)||{})}function Qw(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 t2(t,n,r,e){void 0===e&&(e=""),A(t).selectAll(".axis-".concat(e,"tick")).data(r?n:[],function(t){return t.id}).join(function(t){return t.append(function(t){return new qh({className:"axis-".concat(e,"tick"),style:t})}).style("stroke","#416180").style("lineWidth",.5).style("strokeOpacity","sub"===e?.45:.65).style("visibility","visible").each(function(t,e){this.attr(t),Qw(this,e,n,null==r?void 0:r.style)})},function(t){return t.each(function(t,e){this.attr(t),Qw(this,e,n,null==r?void 0:r.style)}).style("visibility","visible")},function(t){return t.remove()})}function e2(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 n2(t,e){var n=nx(t),e=ex(e,n);t.attr("tip",null),Ix(e)&&e<2*t.getBounds().halfExtents[0]&&(e=Qb(t.style.text||"",e,n,"..."),t.attr("tip",t.style.text),t.attr("text",e))}function r2(t,e,n,r,i){A(t).selectAll(".".concat(e)).data(n,function(t){return t.id}).join(function(t){return t.append("text").attr("className",e).style("fontFamily","sans-serif").style("fontSize",12).style("fontWeight","normal").call(N,i||{}).each(function(t,e){this.attr(t),n2(this,(null==r?void 0:r.maxLength)||Number.MAX_SAFE_INTEGER),e2(this,e,n,null==r?void 0:r.style)})},function(t){return t.each(function(t,e){this.attr(t),n2(this,(null==r?void 0:r.maxLength)||Number.MAX_SAFE_INTEGER),e2(this,e,n,null==r?void 0:r.style)})},function(t){return t.remove()})}function i2(t,e,n){r2(t,"axis-label",(n=void 0===n?{}:n)?e:[],n,{fill:"#000",fontWeight:"lighter"})}function o2(t,e,n,r,i,o){B(t,".axis-".concat(e,"-arrow"),function(){return new L({})}).attr("className","axis-arrow$$ axis-".concat(e,"-arrow")).style("visibility",o?"visible":"hidden").style("symbol","axis-arrow").style("x",n).style("y",r).style("size",8).style("lineWidth",.5).style("fill","grey").style("stroke","grey").style("fillOpacity",.85).style("strokeOpacity",.85).style("transformOrigin","left").style("transform","rotate(".concat(i,"deg)")).call(N,o||{})}function a2(t,e,n,r){var i,o,a,s;void 0===r&&(r={}),B(t,".axis-line","path").attr("className","axis-line").style("visibility",r?"visible":"hidden").style("stroke","grey").style("lineWidth",.5).style("strokeOpacity",.85).style("path",e).call(N,(null==r?void 0:r.style)||{}),n&&(r=(e=(null==r?void 0:r.arrow)||{}).start,e=e.end,n=j(n,2),i=(o=j(n[0],2))[0],o=o[1],a=(n=j(n[1],2))[0],n=n[1],s=Math.atan((n-o)/(a-i))/Math.PI*180/2,i===a?s=n<o?45:-45:o===n&&(s=a<i?0:90),o2(t,"start",i,o,s,r),o2(t,"end",a,n,s+90,e))}function s2(t,e,n,r){if(!e)return"";i=t[0],o=e,a=(i=j(i,2))[0],i=i[1],a=(o=j(o,2))[0]-a,o=o[1]-i;var i,o,a,s=Math.sqrt(a*a+o*o),l=r?0:1;return n?"M".concat(e[0],",").concat(e[1]-s," A").concat(s,",").concat(s,",0,0,").concat(l,",").concat(e[0],",").concat(e[1]+s," A").concat(s,",").concat(s,",0,0,").concat(l,",").concat(e[0],",").concat(e[1]-s," Z"):t.reduce(function(t,e,n){return(0===n?"M":"".concat(t,"A").concat(s,",").concat(s,",0,0,").concat(l,",")).concat(e[0],",").concat(e[1])},"")}function l2(t,e,n,r,i){if("circle"===e)return s2(t,n,r,i);e=t.reduce(function(t,e,n){return"".concat(t).concat(0===n?"M":" L").concat(e[0],",").concat(e[1])},"");return"".concat(e).concat(r?"Z":"")}i(h2,u2=G),h2.prototype.render=function(t,e){var n,r,i,o,a=t.items,s=void 0===a?[]:a,l=t.type,u=t.center,a=t.lineStyle,c=t.alternateColor,h=t.closed,t=s.map(function(t,e){return{id:t.id||"grid-line-".concat(e),path:l2(t.points,l,u,h)}}),d=(n=t,r={style:a},A(e).selectAll(".grid-line").data(n,function(t){return t.id}).join(function(t){return t.append("path").attr("className","grid-line").style("stroke","#D9D9D9").style("lineWidth",1).style("lineDash",[4,4]).each(function(t,e){this.attr(t),Qw(this,e,n,null==r?void 0:r.style)})},function(t){return t.each(function(t,e){this.attr(t),Qw(this,e,n,null==r?void 0:r.style)})},function(t){return t.remove()}),[]);if(c)for(var f=Array.isArray(c)?c:[c,"transparent"],p=0;p<s.length-1;p++){0===p&&2<s[0].points.length&&(y=l2(s[0].points,l,u),d.push({path:y,fill:f[d.length%2]}));var y=l2(s[p].points,l,u,h),g=l2(s[p+1].points.slice().reverse(),l,u,h,!0),v=void 0,v=h?"".concat(y," ").concat(g):"".concat(y," L").concat(g.slice(1)," Z");d.push({path:v,fill:f[d.length%2]})}i=d,A(e).selectAll(".grid-region").data(i,function(t,e){return e}).join(function(t){return t.append("path").attr("className","grid-region").each(function(t,e){this.attr(t),Qw(this,e,i,null==o?void 0:o.style)})},function(t){return t.each(function(t,e){this.attr(t),Qw(this,e,i,null==o?void 0:o.style)})},function(t){return t.remove()})};var u2,c2=h2;function h2(){return null!==u2&&u2.apply(this,arguments)||this}function d2(t,e){e?B(t,".axis-grid",function(){return new c2({})}).attr("className","axis-grid").call(function(t){return t.node().update(e)}):(t=t.querySelector(".axis-grid"))&&t.remove()}function f2(t,e,n,r){void 0===r&&(r=0);var t=j(t,2),i=j(t[0],2),o=i[0],i=i[1],t=j(t[1],2),a=t[0],t=t[1],e=j([e*(a-o)+o,e*(t-i)+i],2),s=e[0],e=e[1],a=bo([0,0],[Math.abs(a-o),-Math.abs(t-i)]),o=zw(n,-1,1),n=j(vo([0,0],(t=a,!(i=[])?(i[0]=t[1],i[1]=-1*t[0]):(i[0]=-1*t[1],i[1]=t[0]),i),r),2),a=n[0],t=n[1];return[[s,e],[s+ux(o,a),e+ux(o,t)]]}function p2(a,s,t,e,n){var l=(null==n?void 0:n.len)||0,u=t,n=e||{},c=n.formatter,t=n.tickPadding,h=void 0===t?0:t,e=n.offset,d=void 0===e?0:e,t=n.alignTick,f=void 0===t||t,e=n.rotate,p=void 0===e?0:e,y=zw(u,-1,1);return Array.from(a).map(function(t,e){var n=t.value,r=(f||(n=((e===a.length-1?1:null==(r=a[e+1])?void 0:r.value)+n)/2+(i||0)/2),j(f2(s,n,u,l+h),2)),i=j(r[1],2),n=i[0],i=i[1],e=c?c(t,e):t.text,o=Rw(u,"center",Bw(u,"end","start"));return p&&(o=Bw(u,"end",Fw(u,"start",lx(ux(y,p),"left",sx(ux(y,p),"right"))))),{id:"label-".concat(t.id),data:t,x:n+Rw(u,d,0),y:i+Dw(u,d,0),text:e,textAlign:o,textBaseline:Dw(u,"middle","top"===u?"bottom":"top"),transform:"rotate(".concat(p||0,"deg)")}})}L.registerSymbol("axis-arrow",function(t,e,n){var r=t+2*n;return[["M",t,e],["L",r,e],["L",r-n,e-n],["L",r+n,e],["L",r-n,e+n],["L",r,e]]});var y2=ww({render:function(t,e){var n=t.startPos,r=t.endPos,i=t.verticalFactor,o=t.ticksThreshold,a=t.appendTick,s=t.axisLine,l=t.ticks,l=void 0===l?[]:l,u=t.label,u=void 0===u?{}:u,c=t.tickLine,h=t.subTickLine,d=t.title,t=t.grid,n=[n||[0,0],r||[0,0]],r=j(n,2),f=j(r[0],2),p=f[0],f=f[1],r=j(r[1],2),y=r[0],r=r[1],g=bo([0,0],[y-p,r-f]),g=(void 0===(g=g)&&(g=[0,0]),void 0===(i=i||1)&&(i=1),Math.abs(g[0])>Math.abs(g[1])?1===i?"bottom":"top":-1===i?"left":"right"),i=Zw(l,o,a);d2(e,t);a2(B(e,".axis-line-group","g").attr("className","axis-line-group").node(),"M".concat(p,",").concat(f," L").concat(y,",").concat(r),n,s);l=B(e,".axis-tick-group","g").attr("className","axis-tick-group").node();v=n,m=g,b=(null==c?void 0:c.len)||0;t2(l,Array.from(i).map(function(t){var e=j(f2(v,t.value,m,b),2),n=j(e[0],2),r=n[0],n=n[1],e=j(e[1],2);return{x1:r,y1:n,x2:e[0],y2:e[1],id:"tick-".concat(t.id),data:t}}),c);var v,m,b,o="axis-subtick-group",a=B(e,".".concat(o),"g").attr("className",o).node();x=i,w=n,k=g,E=null==h?void 0:h.count,_=null==h?void 0:h.len,void 0===E&&(E=0),void 0===_&&(_=0);t2(a,Array.from(x).map(function(a,s){return s===x.length-1?[]:Array(E).fill(null).map(function(t,e){var n=(((null==(n=x[s+1])?void 0:n.value)||1)-a.value)/(E+1),n=a.value+n*(e+1),n=j(f2(w,n,k,_),2),r=j(n[0],2),i=r[0],r=r[1],n=j(n[1],2),o=n[0],n=n[1];return{id:"sub-".concat(a.id,"-").concat(e),x1:i,y1:r,x2:o,y2:n}})}).flat(),h,"sub");var x,w,k,E,_,S,M,T,t="axis-label-group",p=B(e,".".concat(t),"g").attr("className",t).node(),f=(i2(p,p2(i,n,g,u,c),u),p.querySelectorAll(".axis-label")),y=p.querySelectorAll(".axis-tick"),r=(Kw(u,g)(f),$w(f,y,null==u?void 0:u.autoHideTickLine),j(l.getBounds().halfExtents,2)),o=r[0],a=r[1],h=j(p.getBounds().halfExtents,2),t=h[0],i=h[1],f=+((null==(c=null==s?void 0:s.style)?void 0:c.lineWidth)||0),u=(y=g,u=2*(o+t)+f,l=2*(a+i)+f,r=d,h=(p=j(p=n,2))[0],p=p[1],s=(h=j(h,2))[0],h=h[1],c=(p=j(p,2))[0],p=p[1],g=Math.min(s,c),o=Math.max(s,c),t=Math.min(h,p),a=Math.max(h,p),i=g,f=t,S=n=0,M="bottom",T="start","left"===y||"right"===y?(n=u+((null==r?void 0:r.titlePadding)||0),"center"===(null==r?void 0:r.titleAnchor)&&(f=(h+p)/2),"end"===(null==r?void 0:r.titleAnchor)&&(f=a,M="top"),"left"===y&&(T="end",n*=-1)):(S=l+((null==r?void 0:r.titlePadding)||0),"center"===(null==r?void 0:r.titleAnchor)&&(i=(s+c)/2,T="center"),"end"===(null==r?void 0:r.titleAnchor)&&(i=o,T="end"),"top"===y&&(S*=-1),"bottom"===y&&(M="top")),void 0!==(null==r?void 0:r.positionX)&&(i=g+r.positionX,T="start"),void 0!==(null==r?void 0:r.positionY)&&(f=t+r.positionY,M="bottom"),{x:i+n,y:f+S,textAlign:T,textBaseline:M});Jw(e,u.x,u.y,u.textAlign,u.textBaseline,d)}},s.style),g2=Math.PI,v2=Math.abs,m2=Math.cos,b2=Math.sin,x2=j([2*g2],1)[0];function w2(t,e,n,r,i){void 0===i&&(i=0);var t=j(t,2),o=t[0],t=t[1],n=n*cx,a=e*m2(n),s=e*b2(n),r=zw(r,-1,1);return[[o+a,t+s],[o+(e+ux(r,i))*m2(n),t+(e+ux(r,i))*b2(n)]]}function k2(t){var e;return lp(t[0],0)?e="center":0<t[0]?e="start":t[0]<0&&(e="end"),e}function E2(t,d,f,p,y,e,g,v){void 0===v&&(v=0);var m=e,b=zw(m,-1,1),e=g.tickPadding,x=void 0===e?0:e,w=g.formatter,k=g.align,E=g.rotate;return Array.from(t).map(function(t,e){var n,r=(f-d)*t.value+d,i=v+x,o=270<=(o=r)?(o-360)%360:o,a=j(w2(y,p,r,m,i),2),a=j(a[1],2),s=a[0],a=a[1],l=w?w(t,e):t.text,u="center",c="baseline",h=[ux(b,s-y[0]),ux(b,a-y[1])];return"radial"===k?(c="middle",(90<=o||o<-90)&&(o+=180),u=k2(h),lp(o,-90)&&(u=jw(m,"start","end")),lp(o,270)&&(u=jw(m,"end","start"))):"tangential"===k?(u="center",c="bottom",0<=o&&o<180?(o+=270,e="function"==typeof(null==g?void 0:g.style)?g.style(t,e):null!=(e=null==(e=null==g?void 0:g.style)?void 0:e.fontSize)?e:14,r=j(w2(y,p,r,m,i+e),2),s=(i=j(r[1],2))[0],a=i[1]):o+=90):(o=null!=E?E:0,u=k2(h),lp((e=h)[1],0)?n="middle":0<e[1]?n="top":e[1]<0&&(n="bottom"),c=n),{id:"label-".concat(t.id),x:s,y:a,text:l,textAlign:u,textBaseline:c,transform:"rotate(".concat((o||0).toFixed(0),"deg)"),data:t}})}var _2,S2=ww({render:function(t,e){var n=t.startAngle,n=void 0===n?0:n,r=t.endAngle,r=void 0===r?0:r,i=t.center,o=t.radius,a=t.axisLine,s=t.tickLine,l=t.subTickLine,u=t.label,u=void 0===u?{}:u,c=t.ticks,D=t.title,h=t.grid,d=t.ticksThreshold,f=t.appendTick,t=t.verticalFactor,c=Zw(void 0===c?[]:c,d,f),d=-1===t?"inside":"outside",f=(d2(e,h),B(e,".axis-line-group","g").attr("className","axis-line-group").node());t=i,h=o,g=n/180*Math.PI,R=r/180*Math.PI,void 0===h&&(h=0),void 0===g&&(g=0),void 0===R&&(R=0),p=(t=j(t=void 0===t?[0,0]:t,2))[0],t=t[1],L=(I=j([h,h],2))[0],I=I[1],E=(_=j([p+h*m2(g),t+h*b2(g)],2))[0],_=_[1],y=(h=j([p+h*m2(R),t+h*b2(R)],2))[0],h=h[1];a2(f,(f=v2(R-g))===x2?"M".concat(p,",").concat(t-I,", A").concat(L,",").concat(I,",0,1,1,").concat(p,",").concat(t+I,", A").concat(L,",").concat(I,",0,1,1,").concat(p,",").concat(t-I):(f=g2<f?1:0,R=R<g?0:1,"M".concat(p,",").concat(t,",L").concat(E,",").concat(_,",A").concat(L,",").concat(I,",0,").concat(f,",").concat(R,",").concat(y,",").concat(h,",L").concat(p,",").concat(t)),void 0,a);var p,y,g=B(e,".axis-tick-group","g").attr("className","axis-tick-group").node();v=n,m=r,b=o,x=i,w=d,void 0===(k=null==s?void 0:s.len)&&(k=0);t2(g,Array.from(c).map(function(t){var e=(m-v)*t.value+v,e=j(w2(x,b,e,w,k),2),n=j(e[0],2),r=n[0],n=n[1],e=j(e[1],2);return{x1:r,y1:n,x2:e[0],y2:e[1],id:"tick-".concat(t.id),data:t}}),s);var v,m,b,x,w,k,E="axis-subtick-group",_=B(e,".".concat(E),"g").attr("className",E).node();S=c,M=n,T=r,O=o,P=i,A=d,C=null==l?void 0:l.count,N=null==l?void 0:l.len,void 0===C&&(C=0),void 0===N&&(N=0);t2(_,Array.from(S).map(function(a,s){return Array(C).fill(null).map(function(t,e){var n=(((null==(n=S[s+1])?void 0:n.value)||1+S[0].value)-a.value)/(C+1),n=a.value+n*(e+1),n=j(w2(P,O,(T-M)*n+M,A,N),2),r=j(n[0],2),i=r[0],r=r[1],n=j(n[1],2),o=n[0],n=n[1];return{id:"sub-".concat(a.id,"-").concat(e),x1:i,y1:r,x2:o,y2:n}})}).flat(),l,"sub");var S,M,T,O,P,A,C,N,L="axis-label-group",I=B(e,".".concat(L),"g").attr("className",L).node(),f=(i2(I,E2(c,n,r,o,i,d,u,null==s?void 0:s.len),u),I.querySelectorAll(".axis-label")),R=I.querySelectorAll(".axis-tick");Kw(u,d)(f),$w(f,R,null==u?void 0:u.autoHideTickLine),Jw(e,i[0],i[1],"center","middle",D)}},Ox({startAngle:-90,endAngle:270,center:[0,0],label:{tickPadding:2,style:{},align:"normal"}},s.style||{})),M2=(i(T2,_2=jh),T2.prototype.connectedCallback=function(){this.render(),this.bindEvents()},T2.prototype.update=function(t){this.attr(C({},this.attributes,t=void 0===t?{}:t)),t.disabled&&(this.active=!1,this.disabled=!0),this.render()},T2.prototype.setState=function(t){"disabled"===t?(this.active=!1,this.disabled=!0):this.disabled=!1,this.render()},T2.prototype.render=function(){var t=this.style,e=t.size,e=void 0===e?8:e,n=t.symbol,r=t.markerStyle,t=t.backgroundStyle,i=j(hx(this.style.margin),4),o=i[0],a=i[1],s=i[2],i=i[3],l=j(hx(this.style.padding),4),u=l[0],c=l[1],h=l[2],l=l[3],c=(e-c-l)/2,h=(e-u-h)/2,a=(B(this,".container","rect").attr("className","container").style("x",-(c+l+i)).style("y",-(h+u+o)).style("width",e+a+i).style("height",e+o+s).style("fill","transparent").style("cursor",this.disabled?"not-allowed":"pointer").style("zIndex",1),t||{}),i=a.active,o=a.disabled,s=I(a,["active","disabled"]),t=(B(this,".background","rect").attr("className","background").style("x",-(c+l)).style("y",-(h+u)).style("width",e).style("height",e).call(N,s).call(N,this.active?i:{}).call(N,this.disabled?o:{}),"function"==typeof n?n:T2.getSymbol(n||"")),a=r||{},l=a.active,u=a.disabled,e=I(a,["active","disabled"]);B(this,".marker","path").attr("className","marker").style("x",0).style("y",0).style("path",null==t?void 0:t(0,0,Math.min(c,h))).call(N,e).call(N,this.active?l:{}).call(N,this.disabled?u:{})},T2.prototype.bindEvents=function(){var e=this,n=A(this).select(".marker"),r=A(this).select(".background");A(this).on("pointerup",function(){e.disabled||(e.active=!0)}),A(this).on("pointermove",function(){var t;e.disabled||(e.active=!0,N(n,null==(t=e.style.markerStyle)?void 0:t.active),N(r,null==(t=e.style.backgroundStyle)?void 0:t.active))}),A(this).on("pointerout",function(){e.disabled||(e.active=!1,N(n,_p(e.style.markerStyle||{},["active"])),N(r,_p(e.style.backgroundStyle||{},["active"])))})},T2.MARKER_SYMBOL_MAP=new Map,T2.registerSymbol=function(t,e){T2.MARKER_SYMBOL_MAP.set(t,e)},T2.getSymbol=function(t){return T2.MARKER_SYMBOL_MAP.get(t)},T2);function T2(t){t=_2.call(this,t)||this;return t.active=!1,t.disabled=!1,t.disabled=t.style.disabled||!1,t}M2.registerSymbol("timeline-prev-button",function(t,e,n){return[["M",t+n,e+n],["L",t,e],["L",t+n,e-n],["M",t,e+n],["L",t-n,e],["L",t,e-n]]}),M2.registerSymbol("timeline-next-button",function(t,e,n){return[["M",t,e+n],["L",t+n,e],["L",t,e-n],["M",t-n,e+n],["L",t,e],["L",t-n,e-n]]}),M2.registerSymbol("timeline-play-button",function(t,e,n){return[["M",t+2,e+3],["L",t+2,e-3],["M",t-2,e+3],["L",t-2,e-3]]}),M2.registerSymbol("timeline-stop-button",function(t,e,n){return[["M",t+3,e],["L",t-1.5,e-1.5*Math.sqrt(3)],["L",t-1.5,e+1.5*Math.sqrt(3)],["Z"]]});var c={margin:[2,4],markerStyle:{stroke:"#bfbfbf",active:{stroke:"#3471F9"}},backgroundStyle:{fill:"transparent"}},O2={x:0,y:0,data:[],width:500,height:40,selection:[0,0],orient:"horizontal",singleModeControl:{width:56,size:12,labelStyle:{text:"单一时间",fontSize:10,dx:4}},speedControl:{width:32,markerSize:4,speeds:[1,2,3,4,5],labelStyle:{fontFamily:"sans-serif",fill:"rgba(0,0,0,0.45)",fontStyle:"normal",fontWeight:500,fontSize:10,textBaseline:"top"},formatter:function(t){return"".concat(t.toFixed(1),"x")}},controlPosition:"bottom",controlButton:{spacing:14,prevBtn:S(S({},c),{symbol:"timeline-prev-btn",padding:0,size:8}),nextBtn:S(S({},c),{symbol:"timeline-next-btn",padding:0,size:8}),playBtn:{margin:4,padding:0,size:20,symbol:"",markerStyle:{stroke:"#bfbfbf",fill:"#bfbfbf",active:{stroke:"#3471F9",fill:"#3471F9"}},backgroundStyle:{stroke:"#bfbfbf",lineWidth:1,fill:"#F7F7F7",active:{fill:"rgba(52, 113, 249, 0.1)",stroke:"#3471F9"}}}},padding:[0,8],playAxis:{appendPadding:[4,0],handleStyle:{r:3,lineWidth:1},label:{position:1,tickPadding:2,tickLine:{len:4,style:{stroke:"rgba(0,0,0,0.25)",lineWidth:1}},style:{fontSize:10,fillOpacity:1,fill:"rgba(0,0,0,0.45)"}},loop:!1},playInterval:2e3,autoPlay:!1},P2=C({},{x:0,y:0,data:[],length:120,orient:"horizontal",selection:0,selectionStyle:{fill:"#5B8FF9",fillOpacity:.15},loop:!1,playInterval:1e3},O2.playAxis),A2={axisLine:null,label:{autoRotate:!1,rotate:0,autoHide:!0,autoHideTickLine:!1,autoEllipsis:!0,minLength:50,alignTick:!0}};function C2(t,e){void 0===t&&(t=[]);var t=j(Array.of(t).flat(),2),n=t[0],n=void 0===n?0:n,t=t[1];return e?[n,n]:[n,void 0===t?n:t]}i(L2,N2=jh),L2.prototype.update=function(t){var e=C({},this.attributes,t=void 0===t?{}:t),t=(t.selection&&(this.selection=C2(t.selection,e.singleMode)),t.singleMode&&(this.selection=C2(e.selection,t.singleMode)),this.playTimer);t&&this.stop(),this.attr(e),this.render(),t&&this.play()},L2.prototype.play=function(){var r=this,t=this.style,e=t.data,i=t.loop,o=t.singleMode,a=t.playMode,s=e.length,t=this.style.playInterval;Xf(t)&&(t=P2.playInterval),this.playTimer&&clearInterval(this.playTimer),this.playTimer=setInterval(function(){var t,e,n;!i&&r.selection[1]>=s-1?r.stop(!0):o?(t=(r.selection[0]+1)%s,r.setSelection({start:t,end:t})):(t=r.selection[0],n=r.selection[1],e=r.selection[1]-r.selection[0],n=s-1<=n?"increase"===a?t:(t=0,e):("increase"!==a&&(t=(t+1)%s),(n+1)%s),r.setSelection({start:t,end:n}))},t)},L2.prototype.stop=function(t){clearInterval(this.playTimer),this.playTimer=void 0,t&&this.dispatchEvent(new Th("timelineStopped",{selection:this.selection}))},L2.prototype.prev=function(){var t,e=j(this.selection,2),n=e[0],e=e[1],r=this.style.data.length,r=r&&this.style.singleMode?t=(n-1+r)%r:0===n?(t=r-(e-n)-1,r-1):(t=n-1,e-1);this.setSelection({start:null!=t?t:this.selection[0],end:null!=r?r:this.selection[1]})},L2.prototype.next=function(){var t,e=j(this.selection,2),n=e[0],e=e[1],r=this.style.data.length,r=r&&this.style.singleMode?t=(n+1)%r:e===r-1?(t=0,e-n):(t=n+1,e+1);this.setSelection({start:null!=t?t:this.selection[0],end:null!=r?r:this.selection[1]})},L2.prototype.getSelection=function(){return this.selection},Object.defineProperty(L2.prototype,"orient",{get:function(){return this.style.orient||"horizontal"},enumerable:!1,configurable:!0}),L2.prototype.ifH=function(t,e){return"horizontal"===this.orient?"function"==typeof t?t():t:"function"==typeof e?e():e},L2.prototype.destroy=function(){N2.prototype.destroy.call(this),this.playTimer&&clearInterval(this.playTimer),this.playTimer=void 0};var N2,a=L2;function L2(){var t=null!==N2&&N2.apply(this,arguments)||this;return t.selection=[0,0],t}function I2(t,e){return new bm({domain:t.map(function(t,e){return e}),range:e,padding:.1})}function R2(t,e,n){n=I2(n,[0,e]).getStep(),e=0<t?Math.ceil:Math.floor;return 0<n?e(t/n):0}function D2(t,e,n){return I2(n,[0,e]).map(t)}i(F2,j2=a),F2.prototype.connectedCallback=function(){this.render(),this.bindEvents()},Object.defineProperty(F2.prototype,"styles",{get:function(){return C({},F2.defaultOptions.style,this.attributes)},enumerable:!1,configurable:!0}),F2.prototype.setSelection=function(t){var e,n,r=t.start,t=t.end,i=this.styles,o=i.data,o=void 0===o?[]:o,i={duration:i.playInterval/2,easing:"cubic-bezier(0.250, 0.460, 0.450, 0.940)",fill:"both"},a=this.ifH("cx","cy"),s=A(this).select(".slider-start-handle").node();void 0!==r&&(n=D2(r,this.style.length,o),this.startHandleAnimation=s.animate([((e={})[a]=s.style[a],e),((s={})[a]=n,s)],i)),void 0!==t&&(e=A(this).select(".slider-end-handle").node(),n=D2(t,this.style.length,o),this.endHandleAnimation=e.animate([((s={})[a]=e.style[a],s),((o={})[a]=n,o)],i)),this.selection=[null!=r?r:this.selection[0],null!=t?t:this.selection[1]],this.dispatchEvent(new Th("selectionChanged",{detail:{selection:this.selection}}))},F2.prototype.render=function(){var e=this,n=this.styles,t=j(this.ifH([n.length,n.size],[n.size,n.length]),2),r=t[0],i=t[1],t=B(this,".slider-background","line").attr("className","slider-background").style("x1",0).style("y1",0).style("x2",this.ifH(r,0)).style("y2",this.ifH(0,i)).style("lineWidth",n.size).style("lineCap","round").style("stroke",null==(t=n.backgroundStyle)?void 0:t.fill).style("strokeOpacity",null==(t=n.backgroundStyle)?void 0:t.fillOpacity).node(),o=I2(n.data,[0,1]),a=j(this.selection.map(function(t){return o.map(t)}),2),s=a[0],s=void 0===s?0:s,a=a[1],a=void 0===a?s:a,l=this.ifH(s*r,0),u=this.ifH(a*r,0),s=this.ifH(0,s*i),a=this.ifH(0,a*i),c=(B(t,".slider-selection","line").attr("className","slider-selection").style("x1",l).style("y1",s).style("x2",u).style("y2",a).style("lineWidth",n.size).style("lineCap","round").style("stroke",null==(h=n.selectionStyle)?void 0:h.fill).style("strokeOpacity",null==(h=n.selectionStyle)?void 0:h.fillOpacity).style("visibility",n.singleMode?"hidden":"visible").call(N,n.selectionStyle),"running"===(null==(h=this.startHandleAnimation)?void 0:h.playState)&&this.startHandleAnimation.pause(),B(t,".slider-start-handle","circle").attr("className","slider-start-handle").style("cx",l).style("cy",s).call(N,n.handleStyle),"paused"===(null==(h=this.startHandleAnimation)?void 0:h.playState)&&this.startHandleAnimation.play(),"running"===(null==(l=this.endHandleAnimation)?void 0:l.playState)&&this.endHandleAnimation.pause(),B(t,".slider-end-handle","circle").attr("className","slider-end-handle").style("cx",u).style("cy",a).style("visibility",n.singleMode?"hidden":"visible").call(N,n.handleStyle),"paused"===(null==(s=this.endHandleAnimation)?void 0:s.playState)&&this.endHandleAnimation.play(),n.data.map(function(t,e){return{value:o.map(e),text:t.date}})),h=n.label||{},l=h.position,d=void 0===l?-1:l,f=h.tickLine,p=I(h,["position","tickLine"]);B(t,".slider-axis",function(){return new y2({className:"slider-axis"})}).call(function(t){return t.node().update(C({},A2,{startPos:[d*e.ifH(0,r+2),d*e.ifH(i+2,0)],endPos:[e.ifH(r,0)+d*e.ifH(0,r+2),e.ifH(0,i)+d*e.ifH(i+2,0)],ticks:c,verticalFactor:d,tickLine:null===n.label?null:f,label:null===n.label?null:p}))})},F2.prototype.bindEvents=function(){var t=A(this).select(".slider-background"),r=(this.dragHandle(t,"start"),this.dragHandle(t,"end"),this.dragSelection(t),t.select(".slider-selection").node()),e=t.select(".slider-start-handle").node(),t=t.select(".slider-end-handle").node();e.addEventListener(m.ATTR_MODIFIED,function(t){var e=t.attrName,n=t.newValue;t.prevValue,"cx"!==e&&"cy"!==e||(t=parseFloat(n)||0,r.style["cx"===e?"x1":"y1"]=t)}),t.addEventListener(m.ATTR_MODIFIED,function(t){var e=t.attrName,n=t.newValue;t.prevValue,"cx"!==e&&"cy"!==e||(t=parseFloat(n)||0,r.style["cx"===e?"x2":"y2"]=t)})},F2.prototype.dragHandle=function(n,o){function t(t){var e,n,r,i;u&&(u=!1,t=R2(s?l.ifH(t.x-s[0],t.y-s[1]):0,l.style.length,l.style.data),s=void 0,e=(n=j(l.selection,2))[0],n=n[1],r=l.style.data.length-1,"start"===o?e===n&&0<t?(i=op(0,e+t,r),l.setSelection({start:i,end:i})):l.setSelection({start:op(e+t,0,n)}):e===n&&t<0?(i=op(0,n+t,r),l.setSelection({start:i,end:i})):l.setSelection({end:op(n+t,e,r)}),l.playTimer&&l.play())}var a,s,l=this,u=!1;n.on("pointerdown",function(t){l.playTimer&&clearInterval(l.playTimer);var e=n.select(".slider-".concat(o,"-handle")).node();t.target===e&&(u=!0,s=[t.x,t.y],a=[t.x,t.y])}.bind(this)).on("pointerup",t).on("mouseupoutside",t).on("touchendoutside",t).on("pointermove",function(t){var e,n,r,i;u&&(e=l.styles.length,n=A(l).select(".slider-".concat(o,"-handle")).node(),r=l.ifH(t.x-a[0],t.y-a[1]),i=n.getLocalPosition(),"vertical"===l.orient?n.style.cy=op(i[1]+r,0,e):n.style.cx=op(i[0]+r,0,e),a=[t.x,t.y])})},F2.prototype.dragSelection=function(t){function e(t){l.playTimer&&clearInterval(l.playTimer),t.target===o&&(h=!0,i=[t.x,t.y],s=[t.x,t.y])}function n(t){var e;h&&(h=!1,t=R2(i?l.ifH(t.x-i[0],t.y-i[1]):0,l.style.length,l.style.data),i=void 0,e=l.selection[1]-l.selection[0],t=op(l.selection[1]+t,e,l.style.data.length-1),l.setSelection({start:t-e,end:t}),l.playTimer&&l.play())}function r(t){var e,n,r,i,o,a;h&&(e=l.styles.length,n=l.ifH(t.x-s[0],t.y-s[1]),r=(a=j(u.getLocalPosition(),2))[0],a=a[1],i=(o=j(c.getLocalPosition(),2))[0],o=o[1],"vertical"===l.orient?(u.style.cy=op(a+n,0,e-(o=o-a)),c.style.cy=u.style.cy+o):(a=i-r,u.style.cx=op(r+n,0,e),c.style.cx=u.style.cx+a),s=[t.x,t.y])}var s,i,l=this,o=t.select(".slider-selection").node(),u=t.select(".slider-start-handle").node(),c=t.select(".slider-end-handle").node(),h=!1;t.on("mousedown",e.bind(this)).on("touchstart",e.bind(this)).on("mouseup",n.bind(this)).on("mouseupoutside",n.bind(this)).on("touchend",n.bind(this)).on("touchendoutside",n.bind(this)).on("mousemove",r.bind(this)).on("touchmove",r.bind(this))},F2.defaultOptions={style:C({},P2,{tag:"slider-axis",size:3,handleStyle:{r:3,stroke:"#8AADF3",strokeOpacity:.75,lineWidth:1,fill:"#fff",fillOpacity:1},backgroundStyle:{fill:"#416180",fillOpacity:.1},selectionStyle:{cursor:"grabbing"}})};var j2,B2=F2;function F2(t){t=j2.call(this,C({},F2.defaultOptions,t))||this;return t.startHandleAnimation=null,t.endHandleAnimation=null,t.selection=C2(t.style.selection,t.style.singleMode),t}function z2(t,e){return new bv({domain:t.map(function(t,e){return e}),range:e,paddingOuter:0,paddingInner:0})}i(H2,V2=a),H2.prototype.connectedCallback=function(){this.render(),this.bindEvents()},Object.defineProperty(H2.prototype,"styles",{get:function(){return C({},H2.defaultOptions.style,this.attributes)},enumerable:!1,configurable:!0}),H2.prototype.setSelection=function(t){var e,n=j(this.selection,2),r=n[0],n=n[1];this.selection=C2([null!=(e=t.start)?e:r,null!=(e=t.end)?e:n],this.style.singleMode),this.dispatchEvent(new Th("selectionChanged",{detail:{selection:this.selection}})),this.render()},H2.prototype.render=function(){var i=this,r=this.styles,o=r.size,a=r.spacing,t=j(this.ifH(["x","y","width","height"],["y","x","height","width"]),4),s=t[0],l=t[1],u=t[2],c=t[3],t=B(this,".slider-background","rect").attr("className","slider-background").style("x",0).style("y",0).style(u,r.length).style(c,o+a).call(N,r.backgroundStyle).node(),h=this.getCellScale(),d=h.getBandWidth(),e=r.data.map(function(t,e){var n;return S(((n={})[s]=h.map(e),n[l]=a/2,n[u]=d-r.cellGap,n[c]=o,n),r.cellStyle)}),e=(A(t).selectAll(".cell").data(e).join(function(t){return t.append("rect").attr("className","cell").each(function(t){this.attr(t)})},function(t){return t.each(function(t){this.attr(t)})},function(t){return t.remove()}),e.filter(function(t,e){var n=j(i.selection,2),r=n[0],n=n[1];return r<=e&&e<=n}).map(function(t){return S(S({},t),r.selectionStyle)})),n={duration:this.style.playInterval/2,easing:"cubic-bezier(0.250, 0.460, 0.450, 0.940)",fill:"both"},f=(A(t).selectAll(".selected-cell").data(e).join(function(t){return t.append("rect").attr("className","selected-cell").each(function(t){this.attr(t)})},function(t){return t.each(function(t){this.animate([t],n)})},function(t){return t.remove()}),r.length-2*r.spacing+r.cellGap),p=z2(r.data,[0,f]),y=r.data.map(function(t,e){return{value:(p.map(e)+(d-r.cellGap)/2)/f,text:t.date}}),e=r.label||{},g=e.position,v=void 0===g?-1:g,m=e.tickLine,b=I(e,["position","tickLine"]),g=-1===v?-2:r.spacing+o+2,x=[r.spacing,g],w=[a+f,g];"vertical"===this.orient&&(x=[x[1],x[0]],w=[w[1],w[0]]),B(t,".slider-axis",function(){return new y2({className:"slider-axis",style:A2})}).call(function(t){return t.node().update({startPos:x,endPos:w,ticks:y,verticalFactor:v,tickLine:null===r.label?null:m,label:null===r.label?null:b})})},H2.prototype.bindEvents=function(){this.dragSelection()},H2.prototype.getCellScale=function(){var t=this.styles.cellGap,e=this.styles.length,n=this.styles.spacing;return z2(this.style.data,[n,e-n+t])},H2.prototype.dragSelection=function(){function t(){r=!1,i.playTimer&&i.play()}var n,i=this,o=A(this).select(".slider-background"),r=!1,a=this.styles.spacing,s=function(t){var e=j(o.node().getPosition(),2),n=e[0],e=e[1],n=i.ifH(n+4,e+a),e=i.styles.cellGap,r=i.getCellScale().getStep();return Math.floor((t-n+e)/r)};o.on("pointerdown",function(t){i.playTimer&&clearInterval(i.playTimer),r=!0,n=i.ifH(t.x,t.y);t=s(n);i.setSelection({start:t,end:t})}).on("pointerup",t).on("mouseupoutside",t).on("touchendoutside",t).on("pointermove",function(t){var e;r&&(t=s(i.ifH(t.x,t.y)),e=(t=j((e=n?s(n):t)<t?[e,t]:[t,e],2))[0],t=t[1],i.setSelection({start:e,end:t}))})},H2.defaultOptions={style:C({},P2,{tag:"cell-axis",backgroundStyle:{fill:"#416180",fillOpacity:.05},size:16,spacing:4,cellGap:2,cellStyle:{fill:"#416180",fillOpacity:.1},selectionStyle:{fillOpacity:.45},label:{autoHideTickLine:!0}})};var V2,G2=H2;function H2(t){t=V2.call(this,C({},H2.defaultOptions,t))||this;return t.selection=C2(t.style.selection,t.style.singleMode),t}function W2(t,e){return[1.43,2.79,4.89,7.57,11.66][t]/11.66*e}var U2,l=C({},O2.speedControl,{markerFill:"#8c8c8c",spacing:1,lineStyle:{stroke:"#bfbfbf",lineWidth:1}}),Y2=(i(q2,U2=jh),q2.prototype.connectedCallback=function(){this.render(),this.bindEvents()},q2.prototype.update=function(t){this.attr(C({},this.attributes,t=void 0===t?{}:t)),this.render()},Object.defineProperty(q2.prototype,"styles",{get:function(){return C({},q2.defaultOptions.style,this.attributes)},enumerable:!1,configurable:!0}),q2.prototype.render=function(){var t=this.styles,e=t.initialSpeed,n=t.markerSize,r=t.markerFill,i=t.lineStyle,o=t.speeds,a=t.labelStyle,s=t.spacing,t=t.formatter,t=void 0===t?function(t){return"".concat(t)}:t,e=o.indexOf(e),l=2*n,u=W2(e=-1===e?0:e,2*l),c=n*Math.tan(Math.PI/6)*2,r=(B(this,".speed-marker","path").attr("className","speed-marker").style("fill",r).style("path",[["M",0,u-c/2],["L",n,u],["L",0,u+c/2],["Z"]]),n-.5),u=B(this,".line-group","rect").attr("className","line-group").style("x",r).style("y",0).style("width",l).style("height",2*l).style("cursor","pointer").style("fill","transparent").node(),c=o.reduce(function(t,e,n){n=W2(n,2*l);return t.push(["M",0,n],["L",l,n]),t},[]);B(u,".speed-path","path").attr("className","speed-path").style("path",c).call(N,i),B(this,".speed-label","text").attr("className","speed-label").style("x",r+l+s).style("y",2).style("text",t(o[e])).call(N,a)},q2.prototype.bindEvents=function(){var e=this,t=this.querySelector(".line-group");t.addEventListener("pointerdown",function(t){return e.onClick(t)}),t.addEventListener("touchmove",function(t){return e.onClick(t)})},q2.prototype.onClick=function(t){var o,e=this.styles,a=e.speeds,n=e.markerSize,e=e.formatter,e=void 0===e?function(t){return"".concat(t)}:e,s=2*n*2,n=this.querySelector(".line-group"),r=A(this).select(".speed-label").node(),i=A(this).select(".speed-marker").node();t.currentTarget===n&&(o=t.y-n.getBBox().y,-1!==(t=a.findIndex(function(t,e){var n=W2(e,s),r=W2(e-1,s),i=W2(e+1,s);if(0===e)return o<n+(W2(1,s)-n)/2;if(e===a.length-1)return n-(n-r)/2<o;e=[n-(n-r)/2,n+(i-n)/2];return e[0]<=o&&o<e[1]}))&&(r.setAttribute("text",e(a[t])),i.setLocalPosition(0,W2(t,s)-s/8),this.dispatchEvent(new Th("speedChanged",{detail:{speed:a[t]}}))))},q2.tag="speed-control",q2.defaultOptions={style:l},q2);function q2(t){return U2.call(this,C({},q2.defaultOptions,t))||this}i($2,X2=jh),$2.prototype.connectedCallback=function(){this.render(),this.bindEvents()},Object.defineProperty($2.prototype,"styles",{get:function(){return C({},$2.defaultOptions.style,this.attributes)},enumerable:!1,configurable:!0}),$2.prototype.update=function(t){this.attr(C({},this.attributes,t=void 0===t?{}:t)),Xf(t.active)||(this.active=t.active),this.render()},$2.prototype.render=function(){var t,e=this.styles,n=e.size,r=e.buttonStyle,i=e.labelStyle,e=e.symbol,o=r.active,r=I(r,["active"]),r=B(this,".button","rect").attr("className","button").style("x",0).style("y",0).style("width",n).style("height",n).call(N,r).call(N,this.active?o:{}).node();B(r,".symbol","path").attr("className","symbol").style("x",n/2).style("y",n/2).style("path",[["M",(o=n/2)-(t=r=n/2)/7*4,r-t/14],["L",o-t/7,r+t/7*3],["L",o+t/7*4,r-t/7*3]]).style("lineWidth",1).style("lineCap","round").style("stroke","transparent").style("cursor","pointer").call(N,this.active?null==e?void 0:e.active:{}),B(this,".label","text").attr("className","label").style("x",n).style("y",n/2).call(N,i)},$2.prototype.bindEvents=function(){var t=this;A(this).select(".button").on("pointerdown",function(){t.dispatchEvent(new Th("singleModeChanged",{detail:{active:!t.active}}))})},$2.defaultOptions={style:{size:12,buttonStyle:{fill:"transparent",stroke:"#000",strokeOpacity:.15,cursor:"pointer",lineWidth:1,radius:2,active:{stroke:"#3471F9",fill:"#3471F9",strokeOpacity:1}},symbol:{active:{stroke:"#fff"}},labelStyle:{text:"",textAlign:"left",textBaseline:"middle",fill:"#000",fillOpacity:.65},cursor:"pointer"}};var X2,Z2,K2=$2;function $2(t){t=X2.call(this,C({},$2.defaultOptions,t))||this;return t.active=!1,t.active=t.style.active||!1,t}function J2(t,e,n){var n=C({},O2,n),r=n.type,i=n.playAxis,o=n.controlButton,a=n.speedControl,s=n.singleModeControl,l=(null==(l=null==i?void 0:i.label)?void 0:l.position)||-1,u=null!=(u=null==i?void 0:i.spacing)?u:(null==(u=null==(u=G2.defaultOptions)?void 0:u.style)?void 0:u.spacing)||0,c=(null==i?void 0:i.size)||("cell"===r?null==(c=null==(c=G2.defaultOptions)?void 0:c.style)?void 0:c.size:null==(c=null==(c=B2.defaultOptions)?void 0:c.style)?void 0:c.size)||4,u=(c+="cell"===r?u:0,j(hx(null==i?void 0:i.appendPadding),4)),h=u[0],d=u[1],f=u[2],u=u[3],p=(null==o?void 0:o.spacing)||0,y=fp(o)||fp(null==o?void 0:o.playBtn)?0:null==(y=null==o?void 0:o.playBtn)?void 0:y.size,g=fp(o)||fp(null==o?void 0:o.prevBtn)?0:null==(g=null==o?void 0:o.prevBtn)?void 0:g.size,o=fp(o)||fp(null==o?void 0:o.nextBtn)?0:null==(o=null==o?void 0:o.nextBtn)?void 0:o.size,v=y/2+g/2+p,m=y/2+o/2+p,b=null===a?0:null==a?void 0:a.markerSize,x=2*b,a=null===a?0:null==a?void 0:a.width,w=2*x+b/2,k=null===s?0:null==s?void 0:s.width,s=null===s?0:(null==s?void 0:s.size)+2;if("vertical"===n.orient)return{axis:{x:(n=u+(-1===l?30:0))+("cell"===r?0:c/2),y:S=(_=g+p+y/2)+y/2+p+h,length:(E=(M=(T=e-s)-4-w)-p-o/2)-p-o/2-f-S},prevBtn:{x:S=n+c/2,y:g/2,size:g},playBtn:{x:S,y:_,size:y},nextBtn:{x:S,y:E,size:o},speedControl:{x:n-a/2,y:M,size:a},singleModeControl:{x:0,y:T}};var E,_=e-k,S=_-8-a,M=(E=i,(E=C({},O2.playAxis,E).label)?((null==(n=E.tickLine)?void 0:n.len)||0)+(E.tickPadding||0)+(Number(E.style.fontSize)||0)+2:0),T=(-1===l?M:0)+("cell"===r?0:c/2)+h;if("bottom"===t)return{axis:{x:u,y:T,length:e-(u+d)},playBtn:{x:k=e/2,y:i=T+(1===l?M:0)+c+y/2+f,size:y},prevBtn:{x:k-v,y:i,size:g},nextBtn:{x:k+m,y:i,size:o},speedControl:{x:S,y:n=T+(1===l?M:0)+c+f,size:a},singleModeControl:{x:_,y:n+x-s/2}};h="cell"===r?T+c/2:T,e="cell"===r&&-1===l?M+c-w:1===l?T+b/2:T-w;if("left"===t)return{axis:{x:n=(f=(i=(k=g/2)+v)+m)+o/2+u,y:T,length:S-d-n},prevBtn:{x:k,y:h,size:g},playBtn:{x:i,y:h,size:y},nextBtn:{x:f,y:h,size:o},speedControl:{x:S,y:e,size:a},singleModeControl:{x:_,y:e+x-s/2}};r=S-(o/2+p),M=r-m,c=M-v;return{axis:{x:u,y:T,length:c-g/2-d-u},playBtn:{x:M,y:h,size:y},prevBtn:{x:c,y:h,size:g},nextBtn:{x:r,y:h,size:o},speedControl:{x:S,y:e,size:a},singleModeControl:{x:_,y:e+x-s/2}}}function Q2(t){t=Z2.call(this,C({},{style:O2},t))||this;return t.speed=1,t.singleMode=!1,t.playing=!1,t.selection=[0,0],t.singleMode=t.style.singleMode||!1,t.selection=C2(t.style.selection,t.singleMode),t}function tk(t){var e,n={left:0,top:0,width:0,height:0};return"html"===(null==t?void 0:t.tagName)?n={left:0,top:0,width:(e=t.style).width,height:e.height}:t&&(t=(e=t.getLocalBounds()).min,e=e.halfExtents,n={left:t[0],top:t[1],width:2*e[0],height:2*e[1]}),{left:0,top:0,right:n.width,bottom:n.height}}function ek(t,n){var e;if(!n)return(e=t.querySelector(".legend-title"))&&e.remove(),null;var r=n.useHTML,i=n.style,o="legend-title ".concat(r?"html":"text","-title"),a="<span>".concat((null==n?void 0:n.content)||"","</span>");return B(t,".".concat(o),function(){return r?new od({className:o,style:{innerHTML:a}}):new rd({className:o,style:i})}).call(function(t){var e;r?t.style("width",null!=(e=n.width)?e:80).style("height",null!=(e=n.height)?e:20).style("innerHTML",a):t.style("fontSize",12).style("textBaseline","top").style("text",n.content||"")}).call(N,i).node()}function nk(t,e,n,r){return B(t,".".concat(e),"g").attr("className",e).style("x",n).style("y",r).node()}function rk(t,e,n,r,i){B(t,".".concat(e),"rect").attr("className",e).style("zIndex",-1).style("width",n).style("height",r).call(N,i||{}).node()}i(Q2,Z2=jh),Q2.prototype.connectedCallback=function(){this.render(),this.bindEvents()},Q2.prototype.update=function(t){this.attr(C({},this.attributes,t=void 0===t?{}:t)),void 0!==t.singleMode&&(this.singleMode=t.singleMode),t.selection&&(this.selection=C2(t.selection,this.singleMode)),this.render()},Object.defineProperty(Q2.prototype,"styles",{get:function(){return C({},O2,this.attributes)},enumerable:!1,configurable:!0}),Q2.prototype.render=function(){var e=this,t=this.styles,n=t.width,r=t.height,i=t.controlPosition,o=t.speedControl,a=t.singleModeControl,t=j(hx(this.styles.padding),4),s=t[0],s=void 0===s?0:s,l=t[1],l=void 0===l?0:l,u=t[2],t=t[3],t=void 0===t?l:t,c=B(this,".container","g").attr("className","container").style("x",t).style("y",s).node(),h=J2(i,"vertical"===this.style.orient?r-(s+u):n-(t+l),this.styles);this.renderAxis(c,h),this.renderControlButton(c,h),B(c,".timeline-speed-control",function(){return new Y2({})}).attr("className","timeline-speed-control").call(function(t){null===o?t.remove():t.node().update(S(S({x:h.speedControl.x,y:h.speedControl.y},o),{initialSpeed:e.speed}))}),B(c,".timeline-single-control",function(){return new K2({})}).attr("className","timeline-single-control").call(function(t){null===a?t.remove():t.node().update(S(S({x:h.singleModeControl.x,y:h.singleModeControl.y},a),{active:e.singleMode}))})},Q2.prototype.renderAxis=function(t,e){var n=this,r=this.styles.data,i=this.styles.type||"slider",o=A(t).select(".timeline-axis").node(),a="cell"===i?G2:B2;o&&o.style.tag!=="".concat(i,"-axis")&&(o.remove(),this.removeChild(o)),B(t,".timeline-axis",function(){return new a({})}).attr("className","timeline-axis").call(function(t){t.node().update(S({x:e.axis.x,y:e.axis.y,length:e.axis.length,data:r,selection:n.selection,orient:n.style.orient,playInterval:n.style.playInterval/n.speed,singleMode:n.singleMode},n.style.playAxis||{})),t.node().update({handleStyle:{cursor:"vertical"===n.style.orient?"ns-resize":"ew-resize"}})}).node()},Q2.prototype.renderControlButton=function(t,n){var e,r=this,i=n.playBtn.size||0,o=n.prevBtn.size||0,a=(null==(e=n.nextBtn)?void 0:e.size)||0;B(t,".timeline-prev-btn",function(){return new M2({})}).attr("className","timeline-prev-btn").call(function(t){var e;o?(t.node().update(S(S({},(null==(e=r.style.controlButton)?void 0:e.prevBtn)||{}),{x:n.prevBtn.x,y:n.prevBtn.y,size:o,symbol:"timeline-prev-button"})),t.node().update({markerStyle:{transformOrigin:"center",transform:"vertical"===r.style.orient?"rotate(90deg)":""}})):t.remove()}),B(t,".timeline-play-btn",function(){return new M2({})}).attr("className","timeline-play-btn").call(function(t){var e;i?(t.node().update({backgroundStyle:{radius:(n.playBtn.size||0)/2}}),t.node().update(S(S({},(null==(e=r.style.controlButton)?void 0:e.playBtn)||{}),{x:n.playBtn.x,y:n.playBtn.y,size:i,symbol:r.playing?"timeline-play-button":"timeline-stop-button"}))):t.remove()}),B(t,".timeline-next-btn",function(){return new M2({})}).attr("className","timeline-next-btn").call(function(t){var e;a?(t.node().update(S(S({},(null==(e=r.style.controlButton)?void 0:e.nextBtn)||{}),{x:n.nextBtn.x,y:n.nextBtn.y,size:a,symbol:"timeline-next-button"})),t.node().update({markerStyle:{transformOrigin:"center",transform:"vertical"===r.style.orient?"rotate(90deg)":""}})):t.remove()}),this.style.autoPlay&&!this.playing&&(this.playing=!0,A(this).select(".timeline-axis").call(function(t){return null==(t=t.node())?void 0:t.play()}),A(this).select(".timeline-play-btn").call(function(t){return null==(t=t.node())?void 0:t.update({symbol:"timeline-play-button"})})),!this.style.autoPlay&&this.playing&&(this.playing=!1,A(this).select(".timeline-axis").call(function(t){return null==(t=t.node())?void 0:t.stop()}),A(this).select(".timeline-play-btn").call(function(t){return null==(t=t.node())?void 0:t.update({symbol:"timeline-stop-button"})}))};var r={style:{x:0,y:0,padding:0,orient:"horizontal",backgroundStyle:{fill:"transparent",lineWidth:0},title:{content:"",spacing:4,align:"left",style:{fontWeight:"bold",fontFamily:"sans-serif",fontSize:12,textAlign:"top",textBaseline:"top",fill:"#2C3542"}},label:{style:{fill:"#2C3542",fillOpacity:.65,fontSize:12}}}},ik={symbol:"circle",size:8},ok={style:{inactive:{fill:"#d3d2d3",opacity:.5}}},ak={style:{inactive:{fill:"#d3d2d3",opacity:.5}}},sk=C({},r,{style:{type:"category",items:[],maxWidth:void 0,maxHeight:void 0,maxCols:void 0,maxRows:void 0,spacing:[8,2],itemBackground:{padding:0,style:{fill:"transparent",active:{cursor:"pointer"}}},reverse:!(Q2.prototype.bindEvents=function(){var e=this,n=A(this).select(".timeline-axis").node(),r=A(this).select(".timeline-play-btn").node();r&&A(r).on("pointerdown",function(t){e.playing?(e.playing=!1,n.stop(),r.update({symbol:"timeline-stop-button"})):(e.playing=!0,n.play(),r.update({symbol:"timeline-play-button"}))}),A(this).on("timelineStopped",function(){e.playing=!1,null!=r&&r.update({symbol:"timeline-stop-button"})}),A(this).on("speedChanged",function(t){e.speed=t.detail.speed,n.update({playInterval:e.style.playInterval/e.speed})}),A(this).select(".timeline-prev-btn").on("pointerdown",function(){return n.prev()}),A(this).select(".timeline-next-btn").on("pointerdown",function(){return n.next()}),A(this).on("singleModeChanged",function(t){e.singleMode=t.detail.active,e.selection=C2(e.selection,e.singleMode),e.render()}),A(this).on("selectionChanged",function(t){e.selection=t.detail.selection})}),pageNavigator:{loop:!1}}}),lk={width:100,height:20,type:"color",chunked:!1,ticks:[],isGradient:"auto",backgroundColor:"#c5c5c5"},uk={spacing:4,formatter:function(t){return String(t)},align:"rail",flush:!0,maxLength:30},ck={size:25,stroke:"#c5c5c5",fill:"#fff",lineWidth:1},hk=C({},r,{style:{type:"continuous",color:["#d0e3fa","#acc7f6","#8daaf2","#6d8eea","#4d73cd","#325bb1","#5a3e75","#8c3c79","#e23455","#e7655b"],label:uk,rail:lk,slidable:!0,indicator:{size:8,spacing:10,padding:5,backgroundStyle:{fill:"#262626","background-color":"#262626","border-radius":"5px"},text:{style:{color:"white","font-size":"12px"}}}}}),dk="legend-item-";function fk(t,e){t&&(t.setAttribute("tip",t.style.text),null!=t&&t.attr("text",e||""))}function pk(n,t){return void 0===n&&(n={}),(t=void 0===t?"":t).split("-").reduce(function(t,e){return S(S({},t),kp(n,e,{}))},{})}i(vk,yk=G),vk.prototype.setState=function(t,e){void 0===t&&(t=""),void 0===e&&(e=!0);var n=new Set((this.state||"").split("-"));e?n.add(t):n.delete(t),this.state=z([],j(n),!1).join("-"),this.update()},vk.prototype.getState=function(){return this.state},vk.prototype.update=function(t){yk.prototype.update.call(this,t=void 0===t?{}:t),t.state&&(this.state=t.state)},Object.defineProperty(vk.prototype,"styles",{get:function(){return C({},vk.defaultOptions.style,this.attributes)},enumerable:!1,configurable:!0}),vk.prototype.render=function(t,e){var n,r,i,o,a,s,l=this,u=this.styles,c=u.backgroundStyle,h=u.itemMarker,d=u.padding,f=u.itemName,p=u.itemValue,u=u.maxItemWidth,y=this.styles.itemHeight,d=j(hx(d),4),g=d[0],v=d[1],m=d[2],d=d[3],b=Number((null==h?void 0:h.size)||0),x=(Xf(y)&&(y=Math.max.call(null,b,Number((null==(x=null==f?void 0:f.style)?void 0:x.fontSize)||0),Number((null==(x=null==p?void 0:p.style)?void 0:x.fontSize)||0))+(g+m)),B(this,".".concat(dk,"container"),"g").attr("className","".concat(dk,"container")).style("x",d).style("y",y/2).node()),w=(B(x,".".concat(dk,"marker"),function(){return new L({})}).attr("className","".concat(dk,"marker")).call(function(t){h?t.node().update(S(S({x:b/2,y:0,size:b,symbol:h.symbol},h.style||{}),pk(h.style,l.state))):t.remove()}),b?b+((null==f?void 0:f.spacing)||0):0),g=B(x,".".concat(dk,"name"),"text").attr("className","".concat(dk,"name")).call(function(t){f?t.node().attr(S(S({x:w,y:0,tip:"",text:(null==f?void 0:f.content)||"",textBaseline:"middle",textAlign:"left"},f.style||{}),pk(f.style,l.state))):t.remove()}).node(),k=w,m=(g&&!g.destroyed&&(k=g.getLocalBounds().max[0]),B(x,".".concat(dk,"value"),"text").attr("className","".concat(dk,"value")).call(function(t){p?t.node().attr(S(S(S({x:k+(p.spacing||0),y:0,tip:"",text:(null==p?void 0:p.content)||"",textAlign:"left"},p.style||{}),pk(p.style,l.state)),{textBaseline:"middle"})):t.remove()}).node()),E=(Xf(u)||(g=null!=g&&g.destroyed?null:g,m=null!=m&&m.destroyed?null:m,n=u-w-(d+v),(g||m)&&"number"==typeof n&&(Number(n)<=0?(fk(g,""),fk(m,"")):g&&m?(a=g.getLocalBounds(),i=m.getLocalBounds(),n<(r=2*a.halfExtents[0])+(E=2*i.halfExtents[0])+(i=r&&E?i.min[0]-a.max[0]:0)&&(o=(a=j([.5*n,.5*n],2))[0],a=a[1],s=_=!0,r<=o?(a=n-(r+i),_=!1):E<=a&&(o=n-(E+i),s=!1),_&&(fk(g,Qb(g.style.text,o,nx(g))),m.attr("x",Number(g.style.x)+o+i)),s&&fk(m,Qb(m.style.text,a,nx(m))))):n<2*(r=g||m).getLocalBounds().halfExtents[0]&&fk(r,Qb(r.style.text,n,nx(r))))),x.getLocalBounds()),_=Math.max(2*E.halfExtents[0]+v+d,this.styles.itemWidth||0);Xf(u)||(_=Math.min(u,_)),B(this,".".concat(dk,"background"),"rect").attr("className","".concat(dk,"background")).style("x",E.min[0]-d).style("y",0).style("width",_).style("height",y).style("zIndex",-1).call(N,c).call(N,pk(c,this.state))},vk.defaultOptions={style:{id:"",value:{},itemMarker:{size:8,symbol:"circle",style:{fill:"#d3d2d3",fillOpacity:1,lineWidth:0,active:{cursor:"pointer"}}},itemName:{spacing:4,style:{fontFamily:"sans-serif",fill:"#646464",fontSize:12,opacity:1,active:{cursor:"pointer"}}},itemValue:{spacing:4,style:{fontFamily:"sans-serif",fill:"#646464",opacity:1,fontSize:12,active:{cursor:"pointer"}}}}};var yk,gk=vk;function vk(t){t=yk.call(this,C({},vk.defaultOptions,t))||this;return t.state="default",t.state=t.style.state||"selected",t}function mk(t,o,a){void 0===a&&(a=0);var s=0,l=0,u=0;return t.reduce(function(t,e){var n=j(e.getLocalBounds().halfExtents,2),r=n[0],n=n[1],i="horizontal"===o?[t,0]:[0,t];return e.setLocalPosition(i[0],i[1]),l=Math.max(l,2*n),u=Math.max(u,2*r),(s="horizontal"===o?t+2*r:t+2*n)+a},0),{totalSize:s,maxItemWidth:u,maxItemHeight:l}}M2.registerSymbol("left",function(t,e,n){return[["M",t-n*Math.sin(Math.PI/3),e],["L",t+n,e-n],["L",t+n,e+n],["Z"]]}),M2.registerSymbol("right",function(t,e,n){return[["M",t-n,e-n],["L",t+n*Math.sin(Math.PI/3),e],["L",t-n,e+n],["Z"]]}),M2.registerSymbol("up",function(t,e,n){return[["M",t-n,e+n],["L",t,e-n*Math.sin(Math.PI/3)],["L",t+n,e+n],["Z"]]}),M2.registerSymbol("down",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t,e+n*Math.sin(Math.PI/3)],["Z"]]});i(wk,bk=jh),wk.prototype.connectedCallback=function(){this.container=this.appendChild(new Hh),this.clipView=new Zh({style:{path:[]}}),this.render(),this.bindEvents()},wk.prototype.update=function(t){this.attr(C({},this.attributes,t=void 0===t?{}:t)),this.render()},Object.defineProperty(wk.prototype,"styles",{get:function(){return C({},wk.defaultOptions.style,this.attributes)},enumerable:!1,configurable:!0}),wk.prototype.render=function(){this.renderButtonGroup();var t=this.style.items,t=void 0===t?[]:t;this.items=A(this.container).selectAll(".legend-item").data(t||[],function(t,e){return t.id||e}).join(function(t){return t.append(function(t){return new gk({id:t.id,className:"legend-item",style:t})})},function(t){return t.each(function(t){this.update(t)})},function(t){return t.remove()}).nodes(),this.adjustLayout()},wk.prototype.bindEvents=function(){this.prevButton.addEventListener("pointerdown",this.prev.bind(this)),this.nextButton.addEventListener("pointerdown",this.next.bind(this))},wk.prototype.ifHorizontal=function(t,e){return"vertical"===this.style.orient?"function"==typeof e?e():e:"function"==typeof t?t():t},wk.prototype.renderButtonGroup=function(){var t=this.styles,e=t.pageButtonStyle,n=void 0===e?{}:e,e=t.pageTextStyle,t=B(this,".page-button-group",function(){return new Hh({className:"page-button-group"})}).node(),r="page-prev-button",i="page-next-button";this.prevButton=B(t,"#".concat(r),function(){return new M2({})}).attr("id",r).attr("className","page-button").attr("zIndex",2).call(function(t){t.node().update(n)}).node(),B(t,".page-info","text").attr("className","page-info").call(N,e),this.nextButton=B(t,"#".concat(i),function(){return new M2({})}).attr("id",i).attr("className","page-button").attr("zIndex",2).call(function(t){t.node().update(n)}).node(),this.updatePageButtonSymbol()},Object.defineProperty(wk.prototype,"pageInfoBounds",{get:function(){var t=this.querySelector(".page-info");if(!t)return{width:0,height:0};var e=this.styles,n=e.pageFormatter,e=e.pageInfoSpacing,r=t.style.visibility,n=(t.style.visibility="hidden",t.style.text=n(1,this.styles.items.length),j(t.getLocalBounds().halfExtents,2)),i=n[0],n=n[1];return t.style.visibility=r,{width:2*(i+e),height:2*(n+e)}},enumerable:!1,configurable:!0}),wk.prototype.layoutButton=function(t){var e,n=this.style.pageInfoSpacing,r=this.pageInfoBounds.height,n=this.pageInfoBounds.width+2*(void 0===n?0:n),i=j(this.querySelector(".page-button-group").childNodes,3),o=i[0],a=i[1],i=i[2];"horizontal"===t?(t=2*o.getLocalBounds().halfExtents[0],e=2*i.getLocalBounds().halfExtents[0],o.style.x=t/2,i.style.x=t+n+e/2,a.style.x=(Number(o.style.x)+Number(i.style.x))/2,o.style.y=0,i.style.y=0,a.style.y=0):(t=2*o.getLocalBounds().halfExtents[1],n=2*i.getLocalBounds().halfExtents[1],o.style.y=-(r+t)/2,i.style.y=(r+n)/2,a.style.y=0,e=this.pageInfoBounds.width/2,o.style.x=e,i.style.x=e,a.style.x=e)},wk.prototype.showButtonGroup=function(){this.querySelector(".page-button-group").style.visibility="visible"},wk.prototype.resetPageCfg=function(){this.querySelector(".page-button-group").style.visibility="hidden",this.container.style.clipPath=null,this.currPage=void 0,this.maxPages=void 0,this.pageOffsets=[],this.container.style.transform="translate(0,0)",this.clipView&&(this.clipView.style.transform="translate(0,0)")},wk.prototype.adjustLayout=function(){var t,e,n,r;this.resetPageCfg(),this.items.length<=1||(t=(n=j(hx(this.style.spacing),2))[0],n=n[1],t=this.ifHorizontal(t,n),t=(n=mk(this.items,this.style.orient||"horizontal",t)).totalSize,e=n.maxItemWidth,n=n.maxItemHeight,r=this.ifHorizontal(this.style.maxWidth,this.style.maxHeight),!Xf(r)&&r!==1/0&&r<t&&(this.style.autoWrap&&"vertical"!==this.style.orient?(this.layoutButton("vertical"),this.adjustHorizontalWrap(e,n,r)):(this.layoutButton("horizontal"),this.adjustFlip(e,n,r))))},wk.prototype.adjustFlip=function(t,e,n){this.showButtonGroup();var r=this.querySelector(".page-button-group"),i=this.style.pageSpacing,o=this.prevButton.style.size||wk.defaultOptions.style.pageButtonSize,a=r.getLocalBounds(),s=2*a.halfExtents[0],a=2*a.halfExtents[1],e=j(this.ifHorizontal([n-(s+i),e],[t,n-(a+i)]),2),l=e[0],u=e[1];this.clipView.style.path="M-1,0 L".concat(l,",0 L").concat(l,",").concat(u," L-1,").concat(u," Z"),this.container.style.clipPath=this.clipView,r.style.x=this.ifHorizontal(n-s,0),r.style.y=this.ifHorizontal(u/2-1,u+o+i);for(var c="x"===this.ifHorizontal("x","y")?0:1,h=[0],d=1,f=0;f<this.items.length;f++){var p=this.items[f].getLocalBounds(),y=p.min;p.max[c]-ip(h)>this.ifHorizontal(l,u)+4&&(0!==y[c]&&h.push(y[c]),d+=1)}this.maxPages=d,this.currPage=1,this.pageOffsets=h,this.updatePageNavigatorState()},wk.prototype.adjustHorizontalWrap=function(t,u,e){this.showButtonGroup();var n,r=this.querySelector(".page-button-group"),i=this.style,o=i.pageSpacing,o=void 0===o?0:o,a=i.cols,i=this.pageInfoBounds.width,c=this.style.maxRows||2,s=r.getLocalBounds(),s=Math.max(2*s.halfExtents[0],i),i=e-(s+o),l=u*c;function h(t,e){for(var n=1,r=0,i=[0],o=0;o<e.length;o++){var a=e[o],s=a.getLocalBounds(),l=s.min;s.max[0]-r>t&&(n+=1,r=l[0],n%c==1&&i.push((n-1)*u)),a.setLocalPosition(l[0]-r,(n-1)*u)}return i}a&&c&&(a*c<=this.items.length&&(i=e),n=e/a),this.clipView.style.path="M-1,0 L".concat(i,",0 L").concat(i,",").concat(l," L-1,").concat(l," Z"),this.container.style.clipPath=this.clipView;var d=[];if(a&&n)for(var f=j(hx(this.style.spacing),1)[0],p=0,y=0,g=0;g<this.items.length;g+=a){y=0,(p+=1)%c==1&&d.push(Math.floor(p/c)*l);for(var v=0;v<a&&g+v<this.items.length;v++)this.items[g+v].update({x:y,y:(p-1)*u,maxItemWidth:n-f}),y+=n}else 1===(d=h(i,this.items)).length&&(f=(o=j(hx(this.style.spacing),2))[0],i=o[1],y=this.ifHorizontal(f,i),mk(this.items,this.style.orient||"horizontal",y),h(e,this.items));this.maxPages=d.length,this.currPage=1,this.pageOffsets=d,this.maxPages<=1?this.resetPageCfg():(r.style.x=e-s,r.style.y=l/2-2,this.updatePageNavigatorState())},wk.prototype.updatePageNavigatorState=function(){this.updatePageInfo(),this.currPage===this.maxPages?this.nextButton.setState("disabled"):this.nextButton.setState("default"),1===this.currPage?this.prevButton.setState("disabled"):this.prevButton.setState("default")},wk.prototype.updatePageButtonSymbol=function(){var t=this.style.autoWrap,t=this.ifHorizontal(t?1:0,1);this.prevButton.update({symbol:["left","up"][t]}),this.nextButton.update({symbol:["right","down"][t]})},wk.prototype.updatePageInfo=function(){var t=this.styles.pageFormatter;A(this).select(".page-info").style("text",this.currPage&&this.maxPages?t(this.currPage,this.maxPages):"")},wk.prototype.finished=function(){var e=this;return this.finishedPromise||(this.finishedPromise=new Promise(function(t){e.resolveFinishedPromise=function(){e.finishedPromise=null,t(e.currPage)}})),"idle"===this.playState&&this.resolveFinishedPromise(),this.finishedPromise},wk.prototype.prev=function(){var t,e;this.maxPages&&this.currPage&&(t=this.style.loop,(e=this.currPage-1)<1&&(e=t?this.maxPages:1),this.goTo(e))},wk.prototype.next=function(){var t,e,n;this.maxPages&&this.currPage&&(t=this.style.loop,e=this.maxPages,n=this.currPage+1,this.goTo(n=e<n?t?1:e:n))},wk.prototype.goTo=function(t){var e,n,r,i,o=this;t!==this.currPage&&"idle"===this.playState&&(e=(i=this.style).effect,n=i.duration,i=i.autoWrap,r=(i=j(this.ifHorizontal(i?[0,-this.pageOffsets[t-1]]:[-this.pageOffsets[t-1],0],[0,-this.pageOffsets[t-1]]),2))[0],i=i[1],this.playState="running",this.clipView.animate([{transform:this.clipView.style.transform},{transform:"translate(".concat(-r,"px,").concat(-i,"px)")}],{duration:n,easing:e,fill:"both"}),this.container.animate([{transform:this.container.style.transform},{transform:"translate(".concat(r,"px,").concat(i,"px)")}],{duration:n,easing:e,fill:"both"}),Promise.all(this.clipView.getAnimations().map(function(t){return t.finished})).then(function(){o.currPage=t,o.updatePageNavigatorState(),o.resolveFinishedPromise(),o.playState="idle"}),this.finished())},wk.defaultOptions={style:{spacing:[4,0],effect:"easeQuadInOut",duration:320,maxRows:2,maxCols:2,pageButtonSize:10,pageInfoSpacing:2,pageFormatter:function(t,e){return"".concat(t,"/").concat(e)},pageButtonStyle:{size:10,margin:0,padding:0,markerStyle:{fill:"black",cursor:"pointer",disabled:{fill:"#d9d9d9",cursor:"not-allowed"}},backgroundStyle:{cursor:"pointer",fill:"transparent",disabled:{cursor:"not-allowed"}}},pageTextStyle:{fontSize:12,textBaseline:"middle",textAlign:"center"}}};var bk,xk=wk;function wk(t){t=bk.call(this,C({},wk.defaultOptions,t))||this;return t.items=[],t.maxPages=void 0,t.currPage=void 0,t.pageOffsets=[],t.playState="idle",t}function kk(t){var e=t.items,i=t.maxWidth,o=t.maxItemWidth,a=t.itemMarker,s=t.itemName,l=t.itemValue,n=t.reverse,u=t.itemWidth,c=t.itemHeight,h=t.itemPadding,d=t.itemBackgroundStyle,f=e.slice();return n&&f.reverse(),f.map(function(t,e){return{id:t.id||"legend-item-".concat(e),state:t.state||"default",value:t,maxItemWidth:tp([null!=o?o:Number.MAX_VALUE,null!=i?i:Number.MAX_VALUE]),itemMarker:(r=qf(a)?a(t,e,f):a,C({},ik,{symbol:t.marker,style:{fill:t.color,stroke:t.color}},r)),itemName:(r=C({},{formatter:function(){return t.name}},s),n=r.formatter,r=I(r,["formatter"]),C({},ok,{content:n(t,e,f)},r)),itemValue:(n=C({},{formatter:function(){return t.value}},l),r=n.formatter,n=I(n,["formatter"]),C({},ak,{content:r(t,e,f)},n)),itemWidth:u,itemHeight:c,padding:h,backgroundStyle:d};var n,r})}i(Sk,Ek=G),Sk.prototype.render=function(e,t){var n=e.padding,r=e.title,i=e.inset,o=e.orient,a=void 0===o?"horizontal":o,s=e.spacing,l=e.autoWrap,u=e.maxRows,c=e.maxWidth,h=e.maxHeight,d=e.cols,f=e.pageNavigator,o=e.backgroundStyle,o=void 0===o?{}:o,n=j(hx(n),4),p=n[0],y=n[1],g=n[2],n=n[3],v=nk(t,"legend-container",n,p),m=ek(v,r),r=(null==r?void 0:r.spacing)||0,i=j(hx(i),4),b=i[0],i=i[3],m=tk(m),i=(B(nk(v,"legend-inner-group",m.left+i,m.bottom+b+r),".category-items",function(){return new xk({})}).attr("className","category-items").call(function(t){t.node().update(S({orient:a,items:kk(e),spacing:s,autoWrap:l,maxRows:u,maxWidth:c,maxHeight:h,cols:d},f||{}))}).node(),v.getLocalBounds()),m=i.min,b=i.max,r=b[0]-m[0],v=b[1]-m[1];rk(t,"legend-background",Math.min(r+y+n,c||Number.MAX_VALUE),Math.min(v+p+g,h||Number.MAX_VALUE),o)},Sk.prototype.getItem=function(t){return this.querySelector("[id=".concat(t,"]"))},Sk.prototype.setItemState=function(t,e,n){void 0===n&&(n=!0),null!=(t=this.getItem(t))&&t.setState(e,n)},Sk.prototype.getItemsStates=function(){return this.querySelectorAll(".legend-item").map(function(t){return{id:t.id,state:t.getState()}})};var Ek,_k=Sk;function Sk(t){return Ek.call(this,C({},sk,t))||this}function Mk(t,e,n){return"horizontal"===(t=void 0===t?"horizontal":t)?e:n}L.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"]]}),L.registerSymbol("verticalHandle",function(t,e,n){var r=1.4*n,i=n/2,o=t+.4*r;return[["M",t,e],["L",o,e+i],["L",t+r,e+i],["L",t+r,e-i],["L",o,e-i],["Z"],["M",o,e+(n=n/6)],["L",t+r-2,e+n],["M",o,e-n],["L",t+r-2,e-n]]}),L.registerSymbol("horizontalHandle",function(t,e,n){var r=1.4*n,i=n/2,o=e+.4*r;return[["M",t,e],["L",t-i,o],["L",t-i,e+r],["L",t+i,e+r],["L",t+i,o],["Z"],["M",t-(n=n/6),o],["L",t-n,e+r-2],["M",t+n,o],["L",t+n,e+r-2]]});i(Pk,Tk=jh),Pk.prototype.connectedCallback=function(){this.draw()},Pk.prototype.attributeChangedCallback=function(){this.draw()},Pk.prototype.draw=function(){this.updateBackground(),this.updateTrack()},Pk.prototype.updateBackground=function(){var t=this.style.backgroundColor;this.path.style.path=this.getRailPath(),this.path.attr({fill:t,fillOpacity:.45})},Pk.prototype.updateTrack=function(){var t=this.style.fill;this.track.style.path=this.getRailPath(),this.track.style.clipPath=this.getClipPath(),this.track.style.fill=t},Object.defineProperty(Pk.prototype,"box",{get:function(){var t=this.style,e=t.orient,n=t.size,t=t.length;return Mk(e,[t,n],[n,t])},enumerable:!1,configurable:!0}),Pk.prototype.getRailPath=function(){var t=this.style.type,e=j(this.box,2),n=e[0],e=e[1];return"size"===t?[["M",0,e],["L",0+n,0],["L",0+n,e]]:[["M",0,e],["L",0,0],["L",0+n,0],["L",0+n,e]]},Pk.prototype.getClipPath=function(){var t=this.style,e=t.orient,t=t.selection;if(!t)return null;var n=j(this.box,2),r=n[0],n=n[1],t=j(t,2),i=t[0],t=t[1],o=Mk(e,i*r,0),i=Mk(e,0,i*n),r=Mk(e,t*r,r),e=Mk(e,n,t*n);return new Zh({style:{path:[["M",o,i],["L",o,e],["L",r,e],["L",r,i]]}})};var Tk,Ok=Pk;function Pk(t){t=Tk.call(this,Ox({},{style:lk},t=void 0===t?{}:t))||this;return t.path=t.appendChild(new Zh({className:"rail-path"})),t.track=t.appendChild(new Zh({className:"rail-path"})),t}i(Nk,Ak=G),Nk.prototype.render=function(t,e){var n=t.textStyle,r=t.visibility,i=t.symbol,o=t.size,a=t.fill,s=t.stroke,l=t.lineWidth;i&&"hidden"!==r?(B(e,".handle",function(){return new L({})}).attr("className","handle").call(function(t){t.node().update({symbol:i,size:o,fill:a,stroke:s,lineWidth:l})}),B(e,".handle-text","text").attr("className","handle-text").call(N,n)):(null!=(t=e.querySelector(".handle"))&&t.remove(),null!=(r=e.querySelector(".handle-text"))&&r.remove())};var Ak,Ck=Nk;function Nk(){return null!==Ak&&Ak.apply(this,arguments)||this}i(Rk,Lk=jh),Rk.prototype.connectedCallback=function(){this.init(),this.bindEvents()},Rk.prototype.attributeChangedCallback=function(t,e,n){"textStyle"!==t&&"padding"!==t&&"position"!==t||this.init()},Rk.prototype.hide=function(){this.style.visibility="hidden"},Rk.prototype.show=function(){this.style.visibility="visible"},Rk.prototype.init=function(){var t=this.style,e=t.textStyle;"top"===t.position?this.text.attr(S({textAlign:"center"},e)):this.text.attr(S({textAlign:"left"},e))},Rk.prototype.updateBackground=function(){var t=this.text.getLocalBounds(),e=t.min,t=t.max,n=Math.min(t[0]-e[0],40),e=[e[0]-4,e[1]-2,e[0]+n+4,t[1]+2],n=function(t,e){var n=(e=j(e,4))[0],r=e[1],i=e[2],e=e[3];if("top"===t)return[["M",n,e],["L",n,r],["L",i,r],["L",i,e],["L",n+(t=i-n)/2+(o=op(10,t/3,t/2))/2,e],["L",n+t/2,e+4],["L",n+t/2-o/2,e],["L",n,e]];var o=op(6,(t=e-r)/3,t/2);return[["M",n,r],["L",i,r],["L",i,e],["L",n,e],["L",n,r+t/2+o/2],["L",n-4,r+t/2],["L",n,r+t/2-o/2],["L",n,r]]}(this.style.position,e);this.background.style.path=n},Rk.prototype.bindEvents=function(){var t=this;this.text.addEventListener(m.BOUNDS_CHANGED,function(){t.updateBackground()})};var Lk,Ik=Rk;function Rk(t){t=Lk.call(this,Ox({},{style:{visibility:"hidden"}},t=void 0===t?{}:t))||this;return t.background=t.appendChild(new Zh({style:{lineCap:"round",fill:"#262626",lineWidth:1,stroke:"#333"}})),t.text=t.appendChild(new rd({style:{text:"",fill:"#fff",fontSize:10,textBaseline:"middle"}})),t}function Dk(t,e){var t=j(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]}}function jk(t,e,n,r,i){var o=j(Mk(t,["dx","dy"],["dy","dx"]),2),a=o[0],o=o[1],s={};return s[a]=e,s[o]="start"===n?-i:r+i,s.textAlign=Mk(t,"center","start"===n?"right":"left"),s.textBaseline=Mk(t,"start"===n?"bottom":"top","middle"),s}function Bk(t,e){var n,s=t.min,l=t.max,r=t.handle,i=t.orient,u=void 0===i?"horizontal":i;if(null===t.label||r)return[];var o,a,c,h=Ox({size:24,length:200},lk,t.rail||{}),i=Ox({},uk,t.label||{}),d=i.align,f=i.spacing;return"rail"===d?(t=(r=j(Mk(u,["dx","dy"],["dy","dx"]),2))[0],i=r[1],o=(r=j(Mk(u,["right","left"],["center","center"]),2))[0],r=r[1],a=(c=j(Mk(u,["middle","middle"],["bottom","top"]),2))[0],c=c[1],[((n={id:"legend-label-0",text:"".concat(s)})[t]=-f,n[i]=h.size/2,n.textAlign=o,n.textBaseline=a,n),((o={id:"legend-label-1",text:"".concat(l)})[t]=h.length+f,o[i]=h.size/2,o.textAlign=r,o.textBaseline=c,o)]):e.map(function(t,e){a=t,n=s,r=l,i=h;var n,r,i,o=(o=void 0!==o&&o)?a*(r-n)/i.length:ix((a-n)*(n<r?i.length/(r-n):0),2),a=jk(u,o,d,h.size,f);return S({id:"legend-label-".concat(e),text:"".concat(t)},a)})}var Fk=bp(function(t){return t.sort(function(t,e){return t-e})},function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return JSON.stringify(t)});i(Uk,zk=G),Uk.prototype.render=function(t,e){var n=t.padding,r=t.title,i=t.inset,o=(t.orient,t.backgroundStyle),o=void 0===o?{}:o,a=t.maxWidth,s=t.maxHeight,l=t.label,n=j(hx(n),4),u=n[0],c=n[1],h=n[2],n=n[3],d=nk(e,"legend-container",n,u),f=ek(d,r),r=(null==r?void 0:r.spacing)||0,i=j(hx(i),4),p=i[0],i=i[3],f=tk(f),i=nk(d,"legend-inner-group",f.left+i,f.bottom+p+r),f=Bk(t,this.ticks),p=(r2(i,"legend-label",f,l,{fill:"#2C3542",fillOpacity:.65,fontWeight:"normal"}),this.drawInner(),d.getLocalBounds()),r=p.min,t=p.max,i=t[0]-r[0],f=t[1]-r[1];rk(e,"legend-background",Math.min(i+c+n,a||Number.MAX_VALUE),Math.min(f+u+h,s||Number.MAX_VALUE),o)},Uk.prototype.drawInner=function(){this.drawRail(),this.drawHandles(),this.createIndicator()},Object.defineProperty(Uk.prototype,"orient",{get:function(){return this.style.orient||"horizontal"},enumerable:!1,configurable:!0}),Object.defineProperty(Uk.prototype,"selection",{get:function(){var t=this.style,e=t.min,n=t.max;return[t.start||e,t.end||n]},enumerable:!1,configurable:!0}),Object.defineProperty(Uk.prototype,"labelsCfg",{get:function(){var t=this.style.label;return Ox({},uk,t||{})},enumerable:!1,configurable:!0}),Object.defineProperty(Uk.prototype,"railCfg",{get:function(){var t=this.style.rail;return Ox({size:24,length:200},lk,t||{})},enumerable:!1,configurable:!0}),Object.defineProperty(Uk.prototype,"handleCfg",{get:function(){var t=this.style,e=t.handle,t=t.label;return Ox({},ck,e||{},{textStyle:this.labelsCfg.style,spacing:this.labelsCfg.spacing,visibility:e&&null!==t?"visible":"hidden"})},enumerable:!1,configurable:!0}),Uk.prototype.ifHorizontal=function(t,e){return Mk(this.orient,"function"==typeof t?t():t,"function"==typeof e?e():e)},Object.defineProperty(Uk.prototype,"color",{get:function(){var t,e,i,o,a,n=this.style.color,n=Array.from(void 0===n?[]:n),r=n.length;return r?this.railCfg.chunked?(t=this.ticks,e=this.orient,i=Array.from(n),o=i.length,a=t.length,t.reduce(function(t,e,n){var r=i[n%o];return t+" ".concat(n/(a-1),":").concat(r).concat(n<a-1?" ".concat((n+1)/(a-1),":").concat(r):"")},"l(".concat("horizontal"===e?"0":"270",")"))):n.reduce(function(t,e,n){return t+" ".concat(n/(r-1),":").concat(e)},"l(".concat(this.ifHorizontal("0","270"),")")):""},enumerable:!1,configurable:!0}),Object.defineProperty(Uk.prototype,"slidable",{get:function(){return!!this.style.handle},enumerable:!1,configurable:!0}),Object.defineProperty(Uk.prototype,"ticks",{get:function(){var t=this.style,e=t.min,t=t.max;return Fk(z(z([e],j(this.railCfg.ticks||[]),!1),[t],!1))},enumerable:!1,configurable:!0}),Uk.prototype.drawRail=function(){var t=this.style,e=t.orient,n=t.min,t=t.max,r=j(this.selection,2),i=r[0],r=r[1],o=this.querySelector(".legend-inner-group");this.rail=A(this.rail||o.appendChild(new Ok)).attr("className","legend-rail").call(N,S(S({},this.railCfg),{fill:this.color,orient:e})).style("selection",this.slidable?[(i-n)/(t-n),(r-n)/(t-n)]:void 0).node()},Uk.prototype.drawHandles=function(){var t=j(this.selection,2),e=t[0],t=t[1];this.startHandle=this.drawHandle("start",e),this.endHandle=this.drawHandle("end",t)},Uk.prototype.drawHandle=function(t,e){var n=this,r=this.labelsCfg,i=r.align,r=r.spacing,o=this.railCfg.size,a=this.handleCfg.size,s=this.getOffset(e),l=jk(this.orient,s,i,o,-a/3),u=l.dx,c=l.dy,h=jk(this.orient,s,i,o,"start"===i?r:a/3+r),l="start"===t?this.startHandle:this.endHandle,s=this.querySelector(".legend-inner-group");return A(l||s.appendChild(new Ck({}))).attr("className","legend-handle-".concat(t)).call(function(t){return t.node().update(S(S({},n.handleCfg),{x:u,y:c,symbol:n.ifHorizontal("horizontalHandle","verticalHandle"),textStyle:S({text:"".concat(null!=e?e:""),x:+h.dx-+u,y:+h.dy-+c,textAlign:h.textAlign,textBaseline:h.textBaseline},n.handleCfg.textStyle)}))}).node()},Uk.prototype.createIndicator=function(){this.indicator=this.appendChild(new Ik({zIndex:2,className:"legend-indicator",style:{position:this.ifHorizontal("top","right")}}))},Uk.prototype.bindEvents=function(){var n=this,t=new Map;t.set("rail",this.rail),t.set("start",this.startHandle),t.set("end",this.endHandle),t.forEach(function(t,e){t.addEventListener("mousedown",n.onDragStart(e)),t.addEventListener("touchstart",n.onDragStart(e))}),this.startHandle.addEventListener("mouseover",function(){return n.updateMouse()}),this.endHandle.addEventListener("mouseover",function(){return n.updateMouse()}),this.rail.addEventListener("mousemove",this.onHovering),this.addEventListener("mouseout",this.hideIndicator)},Uk.prototype.showIndicator=function(t,e){var n,r,i,o,a,s,l;void 0===e&&(e="".concat(t)),"number"!=typeof t?this.hideIndicator():(this.indicator.show(),l=this.querySelector(".legend-container"),t=zs(t,(t=this.style).min,t.max),n=this.ifHorizontal(this.getOffset(t),this.railCfg.size+12),t=this.ifHorizontal(-14,this.getOffset(t)),r=(i=this.rail.getBBox()).x,i=i.y,o=(a=l.getBBox()).x,a=a.y,s=(l=j(l.getLocalPosition(),2))[0],l=l[1],this.indicator.style.x=r-o+s+n,this.indicator.style.y=i-a+l+t,this.indicator.style.textStyle={text:e})},Uk.prototype.hideIndicator=function(){var t;null!=(t=this.indicator)&&t.hide()},Uk.prototype.onDragEnd=function(){this.style.cursor="default",this.removeEventListener("mousemove",this.onDragging),this.removeEventListener("touchmove",this.onDragging),document.removeEventListener("mouseup",this.onDragEnd),document.removeEventListener("touchend",this.onDragEnd)},Uk.prototype.updateMouse=function(){this.style.slidable&&(this.style.cursor="grabbing")},Uk.prototype.setSelection=function(t,e){this.updateSelection(t,e)},Uk.prototype.updateSelection=function(t,e,n){void 0===n&&(n=!1);var r,i,o,a,s,l=j(this.selection,2),u=l[0],l=l[1],t=j([t,e],2),e=t[0],t=t[1],n=(n&&(e+=u,t+=l),this.style),u=n.min,l=n.max,c=j((n=[u,l],u=[e,t],l=this.selection,void 0===r&&(r=4),i=(n=j(n,2))[0],n=n[1],o=(u=j(u,2))[0],u=u[1],a=(l=j(l,2))[0],l=l[1],u=(o=j([o,u],2))[0],s=(o=o[1])-u,o<u&&(u=(c=j([o,u],2))[0],o=c[1]),n-i<s?[i,n]:u<i?a===i&&l===o?[i,o]:[i,s+i]:n<o?l===n&&a===u?[u,n]:[n-s,n]:[ix(u,r),ix(o,r)]),2),e=c[0],t=c[1];this.update({start:e,end:t}),this.dispatchSelection()},Object.defineProperty(Uk.prototype,"step",{get:function(){var t=this.attributes,e=t.step,n=t.min,t=t.max;return pp(e)?ix(.01*(t-n),0):e},enumerable:!1,configurable:!0}),Uk.prototype.getTickValue=function(t){return this.railCfg.chunked?Dk(this.ticks,t).tick:(e=this.step,(n=this.style.min)+Math.round((t-n)/e)*e);var e,n},Uk.prototype.getValueByCanvasPoint=function(t,e){var n=this.style,r=n.min,n=n.max,i=j(this.rail.getPosition(),2),o=i[0],i=i[1],o=this.ifHorizontal(o,i),i=this.ifHorizontal.apply(this,z([],j(gx(t)),!1));return zs(this.getOffset(i-o,!0)+r,r,n)},Uk.prototype.getOffset=function(t,e){var n=this.style,r=n.min,n=n.max;return(e=void 0!==e&&e)?t*(n-r)/this.railCfg.length:ix((t-r)*(r<n?this.railCfg.length/(n-r):0),2)},Uk.prototype.dispatchSelection=function(){var t=new Th("valueChanged",{detail:{value:this.selection}});this.dispatchEvent(t)},Uk.prototype.dispatchIndicated=function(t,e){t=new Th("onIndicated",{detail:{value:t,range:e}});this.dispatchEvent(t)},t([Lx(20)],Uk.prototype,"dispatchSelection",null),t([Lx(20)],Uk.prototype,"dispatchIndicated",null);var zk,Vk,Gk,Hk,Wk=Uk;function Uk(t){var o=zk.call(this,Ox({type:"continuous-legend"},hk,t))||this;return o.onHovering=function(t){t.stopPropagation();var e,t=o.getValueByCanvasPoint(t);kp(o.attributes,["rail","chunked"])?(e=Dk(o.ticks,t).range,o.showIndicator((e[0]+e[1])/2,"".concat(e[0],"-").concat(e[1])),o.dispatchIndicated(t,e)):(e=o.getTickValue(t),o.showIndicator(e),o.dispatchIndicated(e))},o.onDragStart=function(e){return function(t){t.stopPropagation(),o.slidable&&(o.target=e,o.prevValue=o.getTickValue(o.getValueByCanvasPoint(t)),o.addEventListener("mousemove",o.onDragging),o.addEventListener("touchmove",o.onDragging),o.addEventListener("mouseleave",o.onDragEnd),o.addEventListener("mouseup",o.onDragEnd),document.addEventListener("mouseup",o.onDragEnd),document.addEventListener("touchend",o.onDragEnd))}},o.onDragging=function(t){var e=o.target,n=(o.updateMouse(),j(o.selection,2)),r=n[0],n=n[1],t=o.getTickValue(o.getValueByCanvasPoint(t)),i=t-o.prevValue;"start"===e?r!==t&&o.updateSelection(t,n):"end"===e?n!==t&&o.updateSelection(r,t):"rail"===e&&0!=i&&(o.prevValue=t,o.updateSelection(i,i,!0))},o}function Yk(t){Vk||(Vk=document.createElement("table"),Hk=document.createElement("tr"),Gk=/^\s*<(\w+|!)[^>]*>/,Hk={tr:document.createElement("tbody"),tbody:Vk,thead:Vk,tfoot:Vk,td:Hk,th:Hk,"*":document.createElement("div")});var e=Gk.test(t)&&RegExp.$1,e=(e&&e in Hk||(e="*"),Hk[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 qk,b="tooltip",Xk="tooltip-title",Zk="tooltip-list",tt="tooltip-list-item",u="tooltip-list-item-name",dt="tooltip-list-item-marker",_t="tooltip-list-item-name-label",ft="tooltip-list-item-value",ge="tooltip-crosshair-x",o="tooltip-crosshair-y",J={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"},h=((n={})[".".concat(b)]={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(Xk)]={color:"rgba(0, 0, 0, 0.45)"},n[".".concat(Zk)]={margin:"0px","list-style-type":"none",padding:"0px"},n[".".concat(tt)]={"list-style-type":"none","margin-top":"12px",display:"flex","line-height":"1em","align-items":"center","justify-content":"space-between","white-space":"nowrap"},n[".".concat(dt)]={width:"8px",height:"8px","border-radius":"50%",display:"inline-block","margin-right":"4px"},n[".".concat(u)]={display:"flex","align-items":"center","max-width":"216px"},n[".".concat(_t)]=S({flex:1},J),n[".".concat(ft)]=S({display:"inline-block",float:"right",flex:1,"text-align":"right","min-width":"28px","margin-left":"30px",color:"rgba(0, 0, 0, 0.85)"},J),n[".".concat(ge)]={position:"absolute",width:"1px","background-color":"rgba(0, 0, 0, 0.25)"},n[".".concat(o)]={position:"absolute",height:"1px","background-color":"rgba(0, 0, 0, 0.25)"},n),Kk=(i($k,qk=G),Object.defineProperty($k.prototype,"HTMLTooltipElement",{get:function(){return this.element},enumerable:!1,configurable:!0}),Object.defineProperty($k.prototype,"position",{set:function(t){var t=j(t,2),e=t[0],t=t[1];this.attr({x:e,y:t}),this.updatePosition()},enumerable:!1,configurable:!0}),Object.defineProperty($k.prototype,"elementSize",{get:function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},enumerable:!1,configurable:!0}),Object.defineProperty($k.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,o=t.index,t=I(t,["name","value","color","index"]);return S({name:n,value:r,color:i,index:void 0===o?e:o},t)})))},enumerable:!1,configurable:!0}),Object.defineProperty($k.prototype,"HTMLTooltipItemsElements",{get:function(){var e=this.attributes.template.item,r=[];return this.items.forEach(function(t){var n;r.push(Yk((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($k.prototype,"customContent",{get:function(){var t=this.attributes.customContent;return np(t)?wx(t):yp(t)?t:qf(t)?wx(t(this.attributes.items)):void 0},enumerable:!1,configurable:!0}),$k.prototype.render=function(t,e){this.updateHTMLTooltipElement(),this.updatePosition()},$k.prototype.update=function(t){this.attr(C({},this.attributes,t)),this.render(this.attributes,this)},$k.prototype.clear=function(){this.element.innerHTML=""},$k.prototype.destroy=function(){var t;null!=(t=this.element)&&t.remove(),null!=(t=this.customContent)&&t.remove()},$k.prototype.show=function(){this.visibility="visible",this.element.style.visibility="visible"},$k.prototype.hide=function(){this.visibility="hidden",this.element.style.visibility="hidden"},$k.prototype.initShape=function(){var t=this.attributes.template.container;this.element=Yk(t),!this.id&&""===this.id||this.element.setAttribute("id",this.id)},$k.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(Xk)[0].innerHTML=t,i=this.HTMLTooltipItemsElements,(e=document.createElement("ul")).className=Zk,i.forEach(function(t){e.appendChild(t)}),this.element.appendChild(e)),this.attributes.style);r=n,Object.entries(t).forEach(function(t){var t=j(t,2),e=t[0],n=t[1];z([r],j(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},$k.prototype.getRelativeOffsetFromCursor=function(t){var e=this.attributes,n=e.position,e=j(e.offset,2),i=e[0],o=e[1],e=(t||n).split("-"),a={left:[-1,0],right:[1,0],top:[0,-1],bottom:[0,1]},t=this.elementSize,s=t.width,l=t.height,u=[-s/2,-l/2];return e.forEach(function(t){var e=j(u,2),n=e[0],e=e[1],t=j(a[t],2),r=t[0],t=t[1];u=[n+(s/2+i)*r,e+(l/2+o)*t]}),u},$k.prototype.setOffsetPosition=function(t){var t=j(t,2),e=t[0],t=t[1],n=this.attributes,r=n.x,i=n.y,n=n.container,o=n.x,n=n.y;this.element.style.left="".concat(r+o+e,"px"),this.element.style.top="".concat(i+n+t,"px")},$k.prototype.updatePosition=function(){this.throttleUpdatePosition()},$k.prototype.autoPosition=function(t){var t=j(t,2),e=t[0],t=t[1],n=this.attributes,r=n.x,i=n.y,o=n.autoPosition,n=n.bounding;if(!o)return[e,t];var o=this.element,a=o.offsetWidth,o=o.offsetHeight,r=j([r+e,i+t],2),e=r[0],i=r[1],t=this.attributes.position,s={left:"right",right:"left",top:"bottom",bottom:"top"},r=n.x,l=n.y,u={left:e<r,right:r+n.width<e+a,top:i<l,bottom:l+n.height<i+o},c=[],r=(t.split("-").forEach(function(t){u[t]?c.push(s[t]):c.push(t)}),c.join("-"));return this.getRelativeOffsetFromCursor(r)},$k.prototype.filter=function(t){var e=this.attributes.filterBy;return e?t.filter(e):t},$k.prototype.sort=function(t){var e=this.attributes.sortBy;return e?t.sort(e):t},$k.tag="tooltip",$k.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(b,'"></div>'),title:'<div class="'.concat(Xk,'"></div>'),item:'<li class="'.concat(tt,'" data-index={index}>\n <span class="').concat(u,'">\n <span class="').concat(dt,'" style="background:{color}"></span>\n <span class="').concat(_t,'" title="{name}">{name}</span>\n </span>\n <span class="').concat(ft,'" title="{value}">{value}</span>\n </li>')},style:h}},$k);function $k(t){var e=qk.call(this,C({},$k.defaultOptions,t))||this;return e.visibility="visible",e.throttleUpdatePosition=Sp(function(){e.setOffsetPosition(e.autoPosition(e.getRelativeOffsetFromCursor()))},e.attributes.throttleFrequency,{}),e.visibility=e.attributes.visibility,e.initShape(),e.render(e.attributes,e),e}var Jk,Qk={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 tE(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 eE(t){return Jk.call(this,C({},eE.defaultOptions,t))||this}i(eE,Jk=G),eE.prototype.render=function(t,e){var i=this,n=t.size,n=void 0===n?"default":n,o=t.spacing,r=t.disabled,a=t.checked,s=t.unCheckedChildren,t=t.checkedChildren,e=B(e,".switch-content","g").attr("className","switch-content").node(),l=e.getLocalBounds(),n=kp(Qk,n,Qk.default),u=n.sizeStyle,c=n.tagStyle,h=r?"no-drop":"pointer",n=a?"#1890FF":"#00000040",d=u,f=a?t:s,p=((t||s)&&B(e,".switch-tag",function(){return new Gx({})}).attr("className","switch-tag").call(function(t){var e,t=t.node(),n=(t.update(C({cursor:h,backgroundStyle:null,text:!1,marker:!1},c,f)),null==t?void 0:t.getLocalBounds()),r=n.max,n=n.min,i=r[0]-n[0]+u.radius,r=r[1]-n[1],n=Math.max(i+u.height+2,u.width);d=S(S({},u),{width:n}),t.update((t={x:l.min[0],y:l.min[1],width:n,height:d.height},n={width:i,height:r},i=d.radius,r=a,e=n.width,n=n.height,void 0===i&&(i=0),{x:(r=void 0===a?!0:r)?Number(t.x)+i:Number(t.width)+Number(t.x)-e,y:Number(t.y)+(Number(t.height)-n)/2}))}),B(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",h).style("fillOpacity",r?.4:1).call(N,d).node()),y=B(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(N,d).node();B(e,".switch-handle","rect").attr("className","switch-handle").style("fill","#fff").style("cursor",h).call(function(t){var e,t=t.node(),n=tE(p,o,a),r=tE(p,o,!a);t.attr("x")&&!Ap(n,r)&&i.checked!==a?(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=!!a},eE.defaultOptions={type:eE.tag="switch",style:{x:0,y:0,spacing:2,checked:!0,disabled:!1}};var nE,at={text:"",type:"primary",height:20,width:20,buttonStyle:{default:{lineWidth:0,fill:"#fff"},active:{fill:"#fff"},disabled:{fill:"#fff"}},markerStyle:{default:{fill:"black",size:10},disabled:{fill:"#8c8c8c"}}};function rE(t){var t=nE.call(this,C({},rE.defaultOptions,t))||this,e=(t.playState="idle",t.attributes),n=e.view,e=e.initPageNum;return t.currPage=e,t.view=n,t.init(),t}i(rE,nE=G),Object.defineProperty(rE.prototype,"finished",{get:function(){var e=this;return this.finishedPromise||(this.finishedPromise=new Promise(function(t){e.resolveFinishedPromise=function(){e.finishedPromise=null,t(e.currPage)}})),"idle"===this.playState&&this.resolveFinishedPromise(),this.finishedPromise},enumerable:!1,configurable:!0}),Object.defineProperty(rE.prototype,"maxPages",{get:function(){var t=this.attributes,e=t.pageWidth,n=t.pageHeight,r=t.orient,i=t.pageLimit;if(t.pageCallback||i!==1/0)return i;return"horizontal"===r?Math.ceil(this.width/e):Math.ceil(this.height/n)},enumerable:!1,configurable:!0}),Object.defineProperty(rE.prototype,"view",{get:function(){return this.fullView},set:function(t){var e=this.attributes,n=e.width,e=e.height;t.setLocalPosition(0,0),this.fullView=t,n&&e||(e=(n=bx(t)).width,t=n.height,this.width=e,this.height=t)},enumerable:!1,configurable:!0}),Object.defineProperty(rE.prototype,"width",{get:function(){var t=this.attributes.width;return t||this.viewWidth},set:function(t){this.viewWidth=t},enumerable:!1,configurable:!0}),Object.defineProperty(rE.prototype,"height",{get:function(){var t=this.attributes.height;return t||this.viewHeight},set:function(t){this.viewHeight=t},enumerable:!1,configurable:!0}),Object.defineProperty(rE.prototype,"btnPosition",{get:function(){var t;return null!=(t=this.style.button)&&t.position?this.style.button.position:"horizontal"===this.style.orient?"right":"bottom"},enumerable:!1,configurable:!0}),Object.defineProperty(rE.prototype,"defaultShape",{get:function(){return["left","right","left-right"].includes(this.btnPosition)?["left","right"]:["up","down"]},enumerable:!1,configurable:!0}),Object.defineProperty(rE.prototype,"buttonCfg",{get:function(){var t=j(this.defaultShape,2),e=t[0],t=t[1],n=this.attributes.button,r=n.prev,n=n.next;return{prev:S({marker:e},r),next:S({marker:t},n)}},enumerable:!1,configurable:!0}),rE.prototype.render=function(t,e){},rE.prototype.init=function(){this.initShape(),this.updateView(),this.updateButton(),this.updateButtonState(),this.adjustLayout()},rE.prototype.update=function(t){var e=t.view;e&&(this.view&&(this.view.style.clipPath=null,this.removeChild(this.view,!1)),this.currPage=this.attributes.initPageNum,this.view=e,this.view.style.clipPath=this.clipView,this.appendChild(this.view),this.view.toBack()),this.attr(C({},this.attributes,t)),this.updateView(),this.updateButton(),this.updateButtonState(),this.adjustLayout()},rE.prototype.clear=function(){this.view&&(this.view.style.clipPath=null,this.removeChild(this.view,!1)),this.fullView=void 0,this.removeChildren(!0)},rE.prototype.destroy=function(){this.removeChildren(!0),nE.prototype.destroy.call(this)},rE.prototype.goTo=function(t){var e,n,r,i,o,a,s,l,u,c,h=this;return"idle"===this.playState&&(e=(n=this.attributes).effect,n=n.duration,r=(u=this.calcRelativePagingOffset(t)).viewFromX,i=u.viewFromY,o=u.viewToX,a=u.viewToY,c=u.clipFromX,s=u.clipFromY,l=u.clipToX,u=u.clipToY,this.playState="running",this.clipView.animate([{transform:"translate(".concat(c,"px, ").concat(s,"px)")},{transform:"translate(".concat(l,"px, ").concat(u,"px)")}],{duration:n,easing:e,fill:"both"}),null!=(c=this.view.animate([{transform:"translate(".concat(r,"px, ").concat(i,"px)")},{transform:"translate(".concat(o,"px, ").concat(a,"px)")}],{duration:n,easing:e,fill:"both"}))&&c.finished.then(function(){h.currPage=t,h.updateButtonState(),h.resolveFinishedPromise(),h.playState="idle"})),this.finished},rE.prototype.prev=function(){var t=this.attributes.loop,e=this.currPage-1;return e<1&&(e=t?this.maxPages:1),this.goTo(e)},rE.prototype.next=function(){var t=this.attributes.loop,e=this.maxPages,n=this.currPage+1;return this.goTo(n=e<n?t?1:e:n)},rE.prototype.initShape=function(){this.clipView=new ed({name:"clipView",style:{x:0,y:0,width:0,height:0}}),this.view.style.clipPath=this.clipView,this.appendChild(this.view),this.view.toBack();var t=j(this.defaultShape,2),e=t[0],t=t[1];this.prevButton=new Zx({name:"prevButton",style:S(S({},rE.defaultOptions.style.button.prev),{marker:e,onClick:this.prev.bind(this)})}),this.appendChild(this.prevButton),this.nextButton=new Zx({name:"nextButton",style:S(S({},rE.defaultOptions.style.button.next),{marker:t,onClick:this.next.bind(this)})}),this.appendChild(this.nextButton),this.paginationGroup=new Hh({name:"paginationGroup"}),this.appendChild(this.paginationGroup)},rE.prototype.updateView=function(){var t=this.getClipViewSpace(this.currPage),e=t.width,t=t.height;this.clipView.attr({width:e,height:t}),this.view.setLocalPosition(0,0),this.clipView.setLocalPosition(0,0)},rE.prototype.updateButton=function(){var t=this.buttonCfg,e=t.prev,t=t.next;e&&this.prevButton.update(e),t&&this.nextButton.update(t)},rE.prototype.updateButtonState=function(){this.attributes.loop?(this.nextButton.setState("default"),this.prevButton.setState("default")):(this.nextButton.setState(this.currPage===this.maxPages?"disabled":"default"),this.prevButton.setState(1===this.currPage?"disabled":"default"))},rE.prototype.getClipViewSpace=function(t){var e=this.attributes,n=e.orient,r=e.pageWidth,i=e.pageHeight,e=e.pageCallback,o={x:0,y:0,width:r,height:i},a=this.maxPages;return e?S(S({},o),e(t)):(a<t||t<1||("vertical"===n?o.y=(t-1)*i:"horizontal"===n&&(o.x=(t-1)*r)),o)},rE.prototype.absolute2Relative=function(t,e){var n=this.currPage,n=this.getClipViewSpace(n);return[t+n.x,e+n.y]},rE.prototype.getViewPosition=function(t){var e=this.getClipViewSpace(1),n=e.x,e=e.y,t=this.getClipViewSpace(t),n=j([-t.x+n,-t.y+e],2);return{x:n[0],y:n[1]}},rE.prototype.getRelativeViewPosition=function(t){var t=this.getViewPosition(t),e=t.x,t=t.y,e=j(this.absolute2Relative(e,t),2);return{x:e[0],y:e[1]}},rE.prototype.calcRelativePagingOffset=function(t){var e=j(this.absolute2Relative.apply(this,z([],j(this.view.getLocalPosition().slice(0,2)),!1)),2),n=e[0],e=e[1],t=this.getRelativeViewPosition(t),r=t.x,t=t.y,i=j([-n,-e],2),o=i[0],i=i[1],a=j([-r,-t],2);return{viewFromX:n,viewFromY:e,viewToX:r,viewToY:t,clipFromX:o,clipFromY:i,clipToX:a[0],clipToY:a[1]}},rE.prototype.adjustLayout=function(){this.adjustButton()},rE.prototype.adjustButton=function(){var t,e=this.attributes,n=e.button,r=e.pageWidth,e=e.pageHeight,i=this.btnPosition,n=(null==n?void 0:n.spacing)||0,o=bx(this.prevButton),a=o.width,o=o.height,s=bx(this.nextButton),l=s.width,s=s.height,u=0,c=0,h=0,d=0;"left-right"===i?(u=-(n+a),c=(e-o)/2,h=n+r,d=(e-s)/2):"top-bottom"===i?(u=(r-a)/2,c=-(n+o),h=(r-l)/2,d=n+e):"top"===i?(u=(r-n)/2-a,c=-(n+(t=Qf([o,s]))),h=(r+n)/2,d=-(n+t)):"bottom"===i?(u=(r-n)/2-a,h=(r+n)/2,d=c=n+e):"left"===i?(u=(h=-(n+l))-(n+a),d=c=(e-(t=Qf([o,s])))/2):"right"===i&&(h=(u=n+r)+a,d=c=(e-(t=Qf([o,s])))/2),this.prevButton.setLocalPosition(u,c),this.nextButton.setLocalPosition(h,d)},rE.defaultOptions={type:rE.tag="page-navigator",style:{x:0,y:0,effect:"linear",duration:200,orient:"horizontal",initPageNum:1,pageLimit:1/0,loop:!1,button:{prev:S({spacing:0},at),next:S({spacing:0},at),style:{default:{},active:{},disabled:{}},spacing:5},pagination:{type:"currTotal",style:{default:{},active:{}},separator:"/",spacing:5}}},L.registerSymbol("left",function(t,e,n){return[["M",t-n,e],["L",t+n,e-n],["L",t+n,e+n],["Z"]]}),L.registerSymbol("right",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e],["L",t-n,e+n],["Z"]]}),L.registerSymbol("up",function(t,e,n){return[["M",t-n,e+n],["L",t,e-n],["L",t+n,e+n],["Z"]]}),L.registerSymbol("down",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t,e+n],["Z"]]});var iE,Z={text:{text:""},lineStyle:{stroke:"#416180",strokeOpacity:.45,lineWidth:1,lineDash:[5,5]}},W=Ox({},Z,{type:"line",text:{position:"start",align:"center",verticalAlign:"bottom"}}),H=Ox({},Z,{type:"circle",defaultRadius:0}),pt=Ox({},Z,{type:"polygon",defaultRadius:0,startAngle:0}),Q=(i(oE,iE=G),Object.defineProperty(oE.prototype,"localPointer",{get:function(){var t=j(this.getPosition(),2),e=t[0],t=t[1],n=j(this.pointer,2);return[n[0]-e,n[1]-t]},enumerable:!1,configurable:!0}),Object.defineProperty(oE.prototype,"tagCfg",{get:function(){var t=this.attributes.text;return t.position,I(t,["position"])},enumerable:!1,configurable:!0}),Object.defineProperty(oE.prototype,"crosshairCfg",{get:function(){var t=this.attributes.lineStyle;return S(S({},t),{path:this.crosshairPath})},enumerable:!1,configurable:!0}),oE.prototype.render=function(t,e){var n=this,e=B(e,".crosshair-group","g").attr("className","crosshair-group").node();this.shapesGroup=e,this.tagShape=B(e,".crosshair-tag",function(){return new Gx({className:"crosshair-tag",style:n.tagCfg})}).node(),this.crosshairShape=B(e,".crosshair-path","path").attr("className","crosshair-path").call(N,this.crosshairCfg).node(),this.adjustLayout()},oE.prototype.update=function(t){this.attr(C({},this.attributes,t=void 0===t?{}:t)),this.render(this.attributes,this)},oE.prototype.setPointer=function(t){this.pointer=t},oE.defaultOptions={type:oE.tag="crosshair-base",style:Z},oE);function oE(t){return iE.call(this,C({},oE.defaultOptions,t))||this}i(lE,aE=Q),Object.defineProperty(lE.prototype,"crosshairPath",{get:function(){var t=this.attributes,e=j(t.startPos,2),n=e[0],e=e[1],t=j(t.endPos,2);return[["M",0,0],["L",t[0]-n,t[1]-e],["Z"]]},enumerable:!1,configurable:!0}),Object.defineProperty(lE.prototype,"localPointer",{get:function(){if(!this.pointer)return this.attributes.startPos;var t=j(this.getPosition(),2),e=t[0],t=t[1],n=j(this.pointer,2);return[n[0]-e,n[1]-t]},enumerable:!1,configurable:!0}),Object.defineProperty(lE.prototype,"isVertical",{get:function(){var t=this.attributes,e=j(t.startPos,2),n=e[0],e=e[1],t=j(t.endPos,2),r=t[0],t=t[1];return n===r&&e!==t},enumerable:!1,configurable:!0}),Object.defineProperty(lE.prototype,"tagShapeSpace",{get:function(){var t=bx(this.tagShape);return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),lE.prototype.update=function(t){aE.prototype.update.call(this,t)},lE.prototype.setPointer=function(t){aE.prototype.setPointer.call(this,t),this.adjustPosition()},lE.prototype.setText=function(t){this.tagShape.update({text:t}),this.adjustTag()},lE.prototype.adjustLayout=function(){this.adjustPosition(),this.adjustTag()},lE.prototype.adjustPosition=function(){var t=j(this.localPointer,2),e=t[0],t=t[1],n=j(this.attributes.startPos,2),r=n[0],n=n[1],r=this.getOrientVal([r,t],[e,n]);this.shapesGroup.setLocalPosition(r)},lE.prototype.adjustTag=function(){var t,e,n=this.attributes,r=n.text,i=j(n.startPos,2),o=i[0],i=i[1],n=j(n.endPos,2),a=n[0],n=n[1];r&&""!==r?(this.tagShape.show(),r=r.position,e=(t=this.tagShapeSpace).width,t=t.height,o=(a=j(this.getOrientVal({start:[-e/2,t/2],end:[a-o+e/2,t/2]},{start:[0,0],end:[0,n-i+t]})[r],2))[0],e=a[1],this.tagShape.setLocalPosition(o,e)):this.tagShape.hide()},lE.prototype.getOrientVal=function(t,e){return this.isVertical?e:t},lE.defaultOptions={type:lE.tag="line-crosshair",style:W},t([Lx(20)],lE.prototype,"setPointer",null);var aE,sE=lE;function lE(t){return aE.call(this,Ox({},lE.defaultOptions,t))||this}i(dE,uE=Q),Object.defineProperty(dE.prototype,"crosshairPath",{get:function(){return this.createCirclePath()},enumerable:!1,configurable:!0}),dE.prototype.update=function(t){uE.prototype.update.call(this,t)},dE.prototype.setPointer=function(t){var t=j(t,2),e=t[0],t=t[1],e=(uE.prototype.setPointer.call(this,[e,t]),j(this.localPointer,2)),t=e[0],e=e[1],n=j(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})},dE.prototype.adjustLayout=function(){this.tagShape.hide()},dE.prototype.createCirclePath=function(t){var e=this.attributes,n=j(e.center,2),r=n[0],n=n[1],e=e.defaultRadius;return Rx(r,n,t||e)},dE.defaultOptions={type:dE.tag="circle-crosshair",style:H},t([Lx(20)],dE.prototype,"setPointer",null);var uE,cE,hE=dE;function dE(t){return uE.call(this,Ox({},dE.defaultOptions,t))||this}function fE(t){return cE.call(this,Ox({},fE.defaultOptions,t))||this}i(fE,cE=Q),Object.defineProperty(fE.prototype,"crosshairPath",{get:function(){return this.createPolygonPath()},enumerable:!1,configurable:!0}),fE.prototype.update=function(t){cE.prototype.update.call(this,t)},Object.defineProperty(fE.prototype,"points",{get:function(){for(var t,e,n,r,i,o,a=this.attributes,s=a.startAngle,l=a.sides,u=2*Math.PI/l,c=[1,0],h=[],d=0;d<l;d+=1)h.push((t=[0,0],e=c,n=[0,0],r=s/180*Math.PI+u*d,o=i=void 0,i=e[0]-n[0],e=e[1]-n[1],o=Math.sin(r),r=Math.cos(r),t[0]=i*r-e*o+n[0],t[1]=i*o+e*r+n[1],t));return h},enumerable:!1,configurable:!0}),fE.prototype.setPointer=function(t){var t=j(t,2),e=t[0],t=t[1],e=(cE.prototype.setPointer.call(this,[e,t]),j(this.localPointer,2)),t=e[0],e=e[1],n=this.attributes.center,r=j(this.intersection([t,e]),2),i=r[0],r=r[1];i&&r&&(t=Nx(n,[t,e])/Nx(n,[i,r]),e=this.createPolygonPath(t),this.crosshairShape.attr({path:e}))},fE.prototype.adjustLayout=function(){this.tagShape.hide()},fE.prototype.createPolygonPath=function(r){var t=this.attributes,i=t.defaultRadius,t=j(t.center,2),o=t[0],a=t[1],t=this.points.map(function(t,e){var t=j(t,2),t=j(vo([0,0],[t[0],t[1]],r||i),2),n=t[0],t=t[1];return[0===e?"M":"L",o+n,a+t]});return t.push(["Z"]),t},fE.prototype.intersection=function(t){for(var e,n,r,i,o,a,s,l,t=j(t,2),u=t[0],c=t[1],h=this.points,t=j(this.attributes.center,2),d=t[0],f=t[1],p=1;p<=h.length;p+=1){var y=j(h[p-1],2),g=y[0],y=y[1],v=j(h[p%h.length],2),m=v[0],v=v[1],g=(i=[d,f],g=[g+d,y+f],y=[m+d,v+f],l=s=a=o=v=m=void 0,v=(r=j(r=[u,c],2))[0],r=r[1],o=(i=j(i,2))[0],i=i[1],a=(g=j(g,2))[0],g=g[1],s=(y=j(y,2))[0],y=y[1],l=[],(y-g)*(o-v)==(i-r)*(s-a)?(i-r)*(a-v)==(g-r)*(o-v)&&(Ax(v,o,r,i,a,g)&&Cx(l,a,g),Ax(v,o,r,i,s,y)&&Cx(l,s,y),Ax(a,s,g,y,v,r)&&Cx(l,v,r),Ax(a,s,g,y,o,i)&&Cx(l,o,i)):(m=(v*(i-r)+g*(o-v)-r*(o-v)-a*(i-r))/((s-a)*(i-r)-(o-v)*(y-g)),0<=(y=(a*(y-g)+r*(s-a)-g*(s-a)-v*(y-g))/((o-v)*(y-g)-(s-a)*(i-r)))&&y<=1&&0<=m&&m<=1&&(l[0]=v+y*(o-v),l[1]=r+y*(i-r))),l);0!==g.length&&(e=(s=j(g,2))[0],n=s[1])}return[e,n]},fE.defaultOptions={type:fE.tag="polygon-crosshair",style:pt},t([Lx(20)],fE.prototype,"setPointer",null);i(vE,pE=k),Object.defineProperty(vE.prototype,"decorationType",{get:function(){var t=this.attributes.type;return t&&"none"!==t&&Zf(t)?t.map(function(t){return Zf(t)?t:[t,"solid"]}):"none"},enumerable:!1,configurable:!0}),Object.defineProperty(vE.prototype,"doubleSpacing",{get:function(){return 2*this.attributes.style.lineWidth},enumerable:!1,configurable:!0}),Object.defineProperty(vE.prototype,"hangingRate",{get:function(){return this.attributes.hangingRate},enumerable:!1,configurable:!0}),Object.defineProperty(vE.prototype,"dashedCfg",{get:function(){var t=this.attributes.style.lineWidth;return{lineDash:[2*t,t]}},enumerable:!1,configurable:!0}),Object.defineProperty(vE.prototype,"dottedCfg",{get:function(){var t=this.attributes.style.lineWidth;return{lineDash:[t,t]}},enumerable:!1,configurable:!0}),Object.defineProperty(vE.prototype,"solidCfg",{get:function(){return{lineDash:[0,0]}},enumerable:!1,configurable:!0}),Object.defineProperty(vE.prototype,"decorationCfg",{get:function(){var r=this,i=this.attributes.style,t=this.decorationType;return"none"===t?[]:t.map(function(t){var t=j(t,2),e=t[0],t=t[1];if("wavy"===t)return S({path:r.getWavyPath(e)},i);if("double"===t)return S({path:r.getDoubleLinePath(e)},i);var n={solid:r.solidCfg,dashed:r.dashedCfg,dotted:r.dottedCfg};return S(S({path:r.getLinePath(e)},i),n[t])})},enumerable:!1,configurable:!0}),vE.prototype.update=function(t){var e=this;this.attr(Ox({},this.attributes,t)),this.clear(),this.decorationCfg.forEach(function(t){e.appendChild(new Zh({style:t}))})},vE.prototype.clear=function(){this.removeChildren(!0)},vE.prototype.getLinePos=function(t){var e=j(this.hangingRate,3),n=e[0],r=e[1],e=e[2],i=this.attributes,o=i.height,i=i.fontSize,a=j([0,0],2),s=a[0],a=a[1],a="overline"===t?(s=(n=j([0,o*n-i/2],2))[0],n[1]):"line-through"===t?(s=(n=j([0,o*r],2))[0],n[1]):(s=(t=j([0,o*e+i/2],2))[0],t[1]);return[s,a]},vE.prototype.getLinePath=function(t){var e=this.attributes.width,t=j(this.getLinePos(t),2),n=t[0],t=t[1];return[["M",n,t],["L",n+e,t]]},vE.prototype.getDoubleLinePath=function(t){var e,n=this.doubleSpacing,r=this.attributes.width,i=j(this.getLinePos(t),2),o=i[0],i=i[1],a=j([0,0],2),s=a[0],a=a[1];return"line-through"===t&&(s=(e=j([-.5,.5],2))[0],a=e[1]),"underline"===t?(s=(e=j([0,1],2))[0],a=e[1]):"overline"===t&&(s=(e=j([1,0],2))[0],a=e[1]),[["M",o,i+n*s],["L",o+r,i+n*s],["M",o,i+n*a],["L",o+r,i+n*a]]},vE.prototype.getWavyPath=function(t){return[]},vE.tag="decoration",vE.defaultOptions={style:{width:0,height:0,type:"none",hangingRate:[.5,.55,.5],style:{lineWidth:1,stroke:"#000"}}};var pE,yE,gE=vE;function vE(t){t=pE.call(this,Ox({},vE.defaultOptions,t))||this;return t.update({}),t}function mE(t){t=yE.call(this,Ox({},mE.defaultOptions,t))||this;return t.init(),t}i(mE,yE=G),Object.defineProperty(mE.prototype,"textWidth",{get:function(){var e=this;return Qf(this.renderText.split("\n").map(function(t){return tx(t,e.font)}))||0},enumerable:!1,configurable:!0}),Object.defineProperty(mE.prototype,"textHeight",{get:function(){return bx(this.textShape).height},enumerable:!1,configurable:!0}),Object.defineProperty(mE.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(mE.prototype,"height",{get:function(){var t=this.attributes.height;return ap(t)&&0!==t?t:bx(this.textShape).height},enumerable:!1,configurable:!0}),Object.defineProperty(mE.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(mE.prototype,"capitalizeWord",{get:function(){return this.attributes.text.split("\n").map(function(t){return t.split(" ").map(function(t){return rx(t,"capitalize")}).join(" ")}).join("\n")},enumerable:!1,configurable:!0}),Object.defineProperty(mE.prototype,"text",{get:function(){var t=this.attributes,e=t.transform,t=t.text;return"capitalize"===e?this.capitalizeWord:rx(t,e)},enumerable:!1,configurable:!0}),Object.defineProperty(mE.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 Qb(t,ap(r)?r:1/0,e.font,i)}).join("\n")},enumerable:!1,configurable:!0}),Object.defineProperty(mE.prototype,"renderText",{get:function(){var t=this.attributes.width,e=this.attributes.overflow;return e&&!["none","clip","wrap"].includes(e)&&ap(t)?this.ellipsisText:this.text},enumerable:!1,configurable:!0}),Object.defineProperty(mE.prototype,"verticalAlign",{get:function(){return this.attributes.verticalAlign},enumerable:!1,configurable:!0}),Object.defineProperty(mE.prototype,"font",{get:function(){return Ep(this.attributes,["fontSize","fontFamily","fontWeight","fontStyle","fontVariant","letterSpacing","leading"])},enumerable:!1,configurable:!0}),Object.defineProperty(mE.prototype,"fontColor",{get:function(){return this.attributes.fontColor},enumerable:!1,configurable:!0}),Object.defineProperty(mE.prototype,"wordWrap",{get:function(){return"wrap"===this.attributes.overflow},enumerable:!1,configurable:!0}),Object.defineProperty(mE.prototype,"wordWrapWidth",{get:function(){var t=this.width;return this.wordWrap?t:1/0},enumerable:!1,configurable:!0}),Object.defineProperty(mE.prototype,"textCfg",{get:function(){var t=this.renderText,e=this.lineHeight,n=this.wordWrap,r=this.wordWrapWidth,i=this.fontColor;return S(S(S({},fx),this.font),{fill:i,wordWrap:n,lineHeight:e,wordWrapWidth:r,text:t,textAlign:"start",textBaseline:"middle"})},enumerable:!1,configurable:!0}),Object.defineProperty(mE.prototype,"backgroundCfg",{get:function(){var t=this.width,e=this.height,n=this.attributes.backgroundStyle;return S({x:0,y:0,width:t,height:e},n)},enumerable:!1,configurable:!0}),Object.defineProperty(mE.prototype,"decorationLineWidth",{get:function(){var t=this.attributes.fontSize;return Math.floor(2*Math.log10(t))},enumerable:!1,configurable:!0}),Object.defineProperty(mE.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 Ox({},{fontSize:n,style:{stroke:i,lineWidth:r}},e,t)})},enumerable:!1,configurable:!0}),Object.defineProperty(mE.prototype,"clipRectCfg",{get:function(){var t=this.height;return{width:this.attributes.width,height:t}},enumerable:!1,configurable:!0}),mE.prototype.init=function(){this.initShape(),this.update({})},mE.prototype.update=function(t){this.attr(Ox({},this.attributes,t)),this.render()},mE.prototype.render=function(){var e=this;this.clear(),this.backgroundShape.attr(this.backgroundCfg),this.textShape.attr(this.textCfg),this.layout(),this.decorationGroup.removeChildren(!0),this.decorationCfg.forEach(function(t){e.decorationGroup.appendChild(new gE({style:t}))})},mE.prototype.clear=function(){var t;(this.backgroundShape.style.clipPath=null)!=(t=this.clipRect)&&t.destroy()},mE.prototype.initShape=function(){this.backgroundShape=new ed({name:"background",style:{width:0,height:0}}),this.decorationGroup=new Hh({name:"decoration-group"}),this.textShape=new rd({name:"text",style:this.textCfg}),this.textShape.appendChild(this.decorationGroup),this.backgroundShape.appendChild(this.textShape),this.appendChild(this.backgroundShape)},mE.prototype.overflow=function(){var t=this.wordWrap,e=this.attributes,n=e.width,e=e.overflow;e&&"none"!==e&&!t&&ap(n)&&"clip"===e&&(this.clipRect=new ed({name:"clip-rect",style:this.clipRectCfg}),this.backgroundShape.style.clipPath=this.clipRect)},mE.prototype.adjustTextAlign=function(){var t=this.textWidth,e=this.attributes,n=e.width,e=e.textAlign;ap(n)&&(n=0,n="start"===e?0:"center"===e?(this.width-t)/2:this.width-t,this.textShape.attr({x:n}))},mE.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})},mE.prototype.layout=function(){this.adjustTextAlign(),this.adjustVerticalAlign(),this.overflow()},mE.defaultOptions={type:mE.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 bE,s=S(S({},fx),{fill:"rgba(0,0,0,0.45)",fontSize:10,textAlign:"start",textBaseline:"middle",overflow:"clip"}),xE={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"}},wE={path:[["M",3,6],["L","5","8.5"],["L","8.5","4"]],lineWidth:1,cursor:"pointer"};function kE(t){return bE.call(this,C({},kE.defaultOptions,t))||this}i(kE,bE=G),kE.prototype.render=function(t,e){var n=t.label,r=t.boxStyle,i=t.checkedStyle,o=t.checked,t=t.spacing,o=(this.checked=!!o,B(e,".checkbox-content","g").attr("className","checkbox-content").node()),e=mp({},this.checked?xE.selected:xE.default,r),r=mp({},wE,i),t=(this.checkboxBoxShape=B(o,".checkbox-box","rect").attr("className","checkbox-box").style("zIndex",(o.style.zIndex||0)-1).call(N,e).node(),B(this.checkboxBoxShape,".checkbox-checked","path").attr("className","checkbox-box-checked").style("stroke","#ffffff").call(N,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;B(o,".checkbox-label","text").attr("className","checkbox-label").style("x",e).style("y",r).call(N,n)},kE.defaultOptions={type:kE.tag="checkbox",style:{x:0,y:0,label:S({text:""},s),spacing:4,checked:!1}};var EE="gui-poptip",_E="gui-poptip-arrow",SE="gui-poptip-text",ME=((c={})[".".concat(EE)]={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"},c[".".concat(SE)]={"text-align":"center"},c[".".concat(EE,"[data-position='top']")]={transform:"translate(-50%, -100%)"},c[".".concat(EE,"[data-position='left']")]={transform:"translate(-100%, -50%)"},c[".".concat(EE,"[data-position='right']")]={transform:"translate(0, -50%)"},c[".".concat(EE,"[data-position='bottom']")]={transform:"translate(-50%, 0)"},c[".".concat(EE,"[data-position='top-left']")]={transform:"translate(0,-100%)"},c[".".concat(EE,"[data-position='top-right']")]={transform:"translate(-100%,-100%)"},c[".".concat(EE,"[data-position='left-top']")]={transform:"translate(-100%, 0)"},c[".".concat(EE,"[data-position='left-bottom']")]={transform:"translate(-100%, -100%)"},c[".".concat(EE,"[data-position='right-top']")]={transform:"translate(0, 0)"},c[".".concat(EE,"[data-position='right-bottom']")]={transform:"translate(0, -100%)"},c[".".concat(EE,"[data-position='bottom-left']")]={transform:"translate(0, 0)"},c[".".concat(EE,"[data-position='bottom-right']")]={transform:"translate(-100%, 0)"},c[".".concat(_E)]={width:"4px",height:"4px",transform:"rotate(45deg)","background-color":"rgba(0, 0, 0)",position:"absolute","z-index":-1},c[".".concat(EE,"[data-position='top']")]={transform:"translate(-50%, calc(-100% - 5px))"},c["[data-position='top'] .".concat(_E)]={bottom:"-2px"},c[".".concat(EE,"[data-position='left']")]={transform:"translate(calc(-100% - 5px), -50%)"},c["[data-position='left'] .".concat(_E)]={right:"-2px"},c[".".concat(EE,"[data-position='right']")]={transform:"translate(5px, -50%)"},c["[data-position='right'] .".concat(_E)]={left:"-2px"},c[".".concat(EE,"[data-position='bottom']")]={transform:"translate(-50%, 5px)"},c["[data-position='bottom'] .".concat(_E)]={top:"-2px"},c[".".concat(EE,"[data-position='top-left']")]={transform:"translate(0, calc(-100% - 5px))"},c["[data-position='top-left'] .".concat(_E)]={left:"10px",bottom:"-2px"},c[".".concat(EE,"[data-position='top-right']")]={transform:"translate(-100%, calc(-100% - 5px))"},c["[data-position='top-right'] .".concat(_E)]={right:"10px",bottom:"-2px"},c[".".concat(EE,"[data-position='left-top']")]={transform:"translate(calc(-100% - 5px), 0)"},c["[data-position='left-top'] .".concat(_E)]={right:"-2px",top:"8px"},c[".".concat(EE,"[data-position='left-bottom']")]={transform:"translate(calc(-100% - 5px), -100%)"},c["[data-position='left-bottom'] .".concat(_E)]={right:"-2px",bottom:"8px"},c[".".concat(EE,"[data-position='right-top']")]={transform:"translate(5px, 0)"},c["[data-position='right-top'] .".concat(_E)]={left:"-2px",top:"8px"},c[".".concat(EE,"[data-position='right-bottom']")]={transform:"translate(5px, -100%)"},c["[data-position='right-bottom'] .".concat(_E)]={left:"-2px",bottom:"8px"},c[".".concat(EE,"[data-position='bottom-left']")]={transform:"translate(0, 5px)"},c["[data-position='bottom-left'] .".concat(_E)]={top:"-2px",left:"8px"},c[".".concat(EE,"[data-position='bottom-right']")]={transform:"translate(-100%, 5px)"},c["[data-position='bottom-right'] .".concat(_E)]={top:"-2px",right:"8px"},c),TE=void 0;var OE;function PE(t){var e=t&&document.getElementById(t);return e||((e=document.createElement("div")).setAttribute("id",t),document.body.appendChild(e)),e}function AE(t){var n,r;return n=PE,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r=r||n.apply(TE,t)}(t)}function CE(t){t=OE.call(this,C({style:{id:"gui-poptip"}},CE.defaultOptions,t))||this;return t.visibility="visible",t.map=new Map,t.domStyles="",t.initShape(),t.render(t.attributes,t),t}i(CE,OE=G),Object.defineProperty(CE.prototype,"visible",{get:function(){return"visible"===this.visibility},enumerable:!1,configurable:!0}),CE.prototype.render=function(t,e){this.visibility=this.style.visibility,this.updatePoptipElement()},CE.prototype.update=function(t){this.attr(C({},this.style,t)),this.render(this.attributes,this)},CE.prototype.bind=function(s,l){var u,t,e,c=this;s&&(u=this.style.text,e=function(){c.hideTip()},s.addEventListener("mousemove",t=function(t){var e=s,n=c.style,r=u,i=(l&&(a=(i="function"==typeof l?l.call(null,t):l).html,o=i.target,i=I(i,["html","target"]),n=mp({},c.style,i),!o&&!1!==o||(e=o),"string"==typeof a&&(r=a)),n.position),o=n.arrowPointAtCenter,a=n.follow,n=n.offset;e?(e=(t=j(function(t,e,n,r,i,o){if(void 0===i&&(i=!1),o=void 0===o?!1:o)return[t,e];var a=(o=n.getBoundingClientRect()).x,s=o.y,l=o.width,u=o.height;switch(r){case"top":return i?[a+l/2,s]:[t,s];case"left":return i?[a,s+u/2]:[a,e];case"bottom":return i?[a+l/2,s+u]:[t,s+u];case"right":return i?[a+l,s+u/2]:[a+l,e];case"top-right":case"right-top":return[a+l,s];case"left-bottom":case"bottom-left":return[a,s+u];case"right-bottom":case"bottom-right":return[a+l,s+u];default:return[a,s]}}(t.clientX,t.clientY,e,i,o,a),2))[0],o=t[1],c.showTip(e,o,{text:r,position:i,offset:n})):c.hideTip()}),s.addEventListener("mouseleave",e),this.map.set(s,[t,e]))},CE.prototype.unbind=function(t){var e,n;this.map.has(t)&&(e=(n=j(this.map.get(t)||[],2))[0],n=n[1],e&&t.removeEventListener("mousemove",e),n&&t.removeEventListener("mouseleave",n),this.map.delete(t))},CE.prototype.clear=function(){this.container.innerHTML=""},CE.prototype.destroy=function(){var t,e=this;z([],j(this.map.keys()),!1).forEach(function(t){return e.unbind(t)}),null!=(t=this.container)&&t.remove()},CE.prototype.showTip=function(t,e,n){var r,i=kp(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(SE)))&&(n.innerHTML=i),this.visibility="visible",this.container.style.visibility="visible"))},CE.prototype.hideTip=function(){this.visibility="hidden",this.container.style.visibility="hidden"},CE.prototype.getContainer=function(){return this.container},CE.prototype.getClassName=function(){var t=this.style.containerClassName;return"".concat(EE).concat(t?" ".concat(t):"")},CE.prototype.initShape=function(){var t=this,e=this.style.id;this.container=AE(e),this.container.setAttribute("class",this.getClassName()),this.container.addEventListener("mousemove",function(){return t.showTip()}),this.container.addEventListener("mouseleave",function(){return t.hideTip()})},CE.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(_E,'"></span>'));t.innerHTML=n,np(r)?t.innerHTML+=r:r&&yp(r)&&t.appendChild(r),e&&(t.getElementsByClassName(SE)[0].textContent=e),this.applyStyles(),this.container.style.visibility=this.visibility},CE.prototype.applyStyles=function(){var t,e=Ox({},ME,this.style.domStyles),e=Object.entries(e).reduce(function(t,e){var e=j(e,2),n=e[0],e=e[1],e=Object.entries(e).reduce(function(t,e){var e=j(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))},CE.prototype.setOffsetPosition=function(t,e,n){var n=j(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")},CE.tag="poptip",CE.defaultOptions={style:{x:0,y:0,width:0,height:0,target:null,visibility:"hidden",text:"",position:"top",follow:!1,offset:[0,0],domStyles:ME,template:'<div class="'.concat(SE,'"></div>')}};class NE extends jh{constructor(t){super(t)}connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){this.drawText(),this.drawBackground(),this.drawConnector(),this.drawPoints()}get endPoint(){const t=this.style["connector"];var e,n;return Array.isArray(null===t||void 0===t?void 0:t.path)&&t.path.length?([[,e,n]]=t.path.slice(-1),{x:e,y:n}):{x:0,y:0}}drawText(){var t=this.attributes,e=t["textAlign"],t=I(t,["class","connector","startMarker","endMarker","background","transform","textAlign"]),{x:n,y:r}=this.endPoint;this.textShape=ib(this.textShape||this.appendChild(new rd({}))).call(ab,t).style("x",+n).style("y",+r).style("textAlign",e||(n<0?"right":0<n?"left":"center")).node()}drawBackground(){var t,e,n,r,i,o,a,s,l,u=this.style["background"];u?(t=u.padding,u=I(u,["padding"]),[t=0,e=0,n=t,r=e]=t||[],i=this.getEulerAngles(),{min:[o,a],halfExtents:[s,l]}=(this.setEulerAngles(0),this.textShape.getLocalBounds()),this.setEulerAngles(i),this.background=ib(this.background||this.appendChild(new ed({}))).style("zIndex",-1).style("x",o-r).style("y",a-t).style("width",2*s+r+e).style("height",2*l+t+n).call(ab,u).node()):(this.background&&this.removeChild(this.background,!0),this.background=void 0)}drawConnector(){var t,e=this.style["connector"];e?(t=e.path||function(t){var{min:[t,e],max:[n,r]}=t.getLocalBounds();let i=0,o=0;return 0<t&&(i=t),n<0&&(i=n),0<e&&(o=e),r<0&&(o=r),[["M",0,0],["L",i,o]]}(this.background||this.textShape),this.connector=ib(this.connector||this.appendChild(new Zh({}))).style("zIndex",-1).style("stroke","black").style("lineWidth",1).call(ab,e).style("path",t).node()):(this.connector&&this.removeChild(this.connector,!0),this.connector=void 0)}drawPoints(){var{startMarker:t,endMarker:e}=this.style;this.drawStartMarker(t),this.drawEndMarker(e&&Object.assign(Object.assign({},e),this.endPoint))}drawStartMarker(t){var e=this.startMarkerPoint;t?(e||(this.startMarkerPoint=this.appendChild(new L({style:{symbol:"circle",size:4}}))),this.startMarkerPoint.update(t)):(e&&this.removeChild(e,!0),this.startMarkerPoint=void 0)}drawEndMarker(t){var e=this.endMarkerPoint;t?(e||(this.endMarkerPoint=this.appendChild(new L({style:{symbol:"circle",size:4}}))),this.endMarkerPoint.update(t)):(e&&this.removeChild(e,!0),this.endMarkerPoint=void 0)}}const LE=t=>{const l=I(t,[]);return(t,e,n,r)=>{var r=r["defaultColor"],{color:e=r,text:r="",fontSize:i=12,rotate:o=0,transform:a=""}=e,[[t,s]]=t;return ib(new NE({})).style("x",t).style("y",s).style("text",String(r)).style("stroke",e).style("fill",e).style("fontSize",i).style("transform",a+`rotate(${+o}deg)`).call(ab,l).node()}};LE.props={defaultEnterAnimation:"fadeIn"};class IE extends jh{constructor(t){super(t)}connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){this.drawMarker(),this.drawText()}drawMarker(){const t=this.attributes,{size:s=24}=t,e=I(t,["class","size"]);this.badgeMarker=this.badgeMarker||this.appendChild(new L({})),this.badgeMarker.className="badge-marker",this.badgeMarker.update(Object.assign(Object.assign({symbol:()=>{var t=s/2,e=t/Math.sqrt(2),n=t*Math.sqrt(2),[r,i]=[-e,e-n],[o,a]=[0,0],[e,n]=[e,e-n];return[["M",r,i],["A",t,t,0,1,1,e,n],["L",o,a],["Z"]]},size:s},e),{x:0,y:0}))}drawText(){var t=function(t){var{min:t,max:e}=t.getLocalBounds();return{x:(t[0]+e[0])/2,y:(t[1]+e[1])/2}}(this.badgeMarker),{content:e="",textStyle:n}=this.style,{fontSize:n=10,fill:r="#333"}=n||{};this.badgeText=this.badgeText||this.appendChild(new rd({})),ib(this.badgeText).attr("className","badge-text").style("x",t.x).style("y",t.y).style("textAlign","center").style("textBaseline","middle").call(ab,{fill:r,fontSize:n,text:e}).node()}}const RE=t=>{const o=I(t,[]);return(t,e,n,r)=>{var r=r["defaultColor"],{color:e=r,text:r=""}=e,[[t,i]]=t;return ib(new IE({})).style("x",t).style("y",i).style("text",String(r)).style("stroke",e).style("fill",e).call(ab,o).node()}};function DE(t,e,n,r){const i=t.slice(0,t.length/2),o=t.slice(t.length/2);var a,s,l,u,c;if(zg(r)){const h=r.getCenter();t=e["transform"];return r=O1().curve(P1),a=r.curve,s=r.lineX0,l=r.lineX1,u=r.lineY0,c=r.lineY1,r.angle=r.x,delete r.x,r.startAngle=r.x0,delete r.x0,r.endAngle=r.x1,delete r.x1,r.radius=r.y,delete r.y,r.innerRadius=r.y0,delete r.y0,r.outerRadius=r.y1,delete r.y1,r.lineStartAngle=function(){return N1(s())},delete r.lineX0,r.lineEndAngle=function(){return N1(l())},delete r.lineX1,r.lineInnerRadius=function(){return N1(u())},delete r.lineY0,r.lineOuterRadius=function(){return N1(c())},delete r.lineY1,r.curve=function(t){return arguments.length?a(C1(t)):a()._curve},[r.angle((t,e)=>K1(X1(i[e],h))).outerRadius((t,e)=>Z1(i[e],h)).innerRadius((t,e)=>Z1(o[e],h)).curve(n)(o),`translate(${h[0]}, ${h[1]}) `+(t||"")]}return[O1().x((t,e)=>i[e][0]).y1((t,e)=>i[e][1]).y0((t,e)=>o[e][1]).curve(n)(i),""]}RE.props={defaultEnterAnimation:"fadeIn"};const jE=t=>{const{curve:a,gradient:s=!1}=t,l=I(t,["curve","gradient"]);return(t,e,n,r)=>{var r=r["defaultColor"],{color:r=r,seriesColor:i,seriesX:o}=e,[t,e]=DE(t,e,a,n),n=s&&i?cb(i,o):r;return ib(new Zh({})).style("d",t).style("fill",n).style("stroke",n).style("transform",e).call(ab,l).node()}},BE=(jE.props={defaultEnterAnimation:"fadeIn"},o=>(t,e,n,r)=>{var i=zg(n)?H1:_1;return jE(Object.assign({curve:i},o))(t,e,n,r)}),FE=(BE.props=Object.assign({},jE.props),t=>{const{alpha:o=.5}=t,a=I(t,["alpha"]);return(t,e,n,r)=>{const i=zg(n)?V1:F1;return jE(Object.assign({curve:i.alpha(o)},a))(t,e,n,r)}}),zE=(FE.props=Object.assign({},jE.props),t=>{const s=t["arrow"],l=I(t,["arrow"]);return(t,e,n,r)=>{var i,r=r["defaultColor"],{color:e=r,transform:r}=e,[t,o]=t;const a=e1();return a.moveTo(...t),a.lineTo(...o),s&&([t,i]=lb(t,o,s),a.moveTo(...o),a.lineTo(...t),a.moveTo(...o),a.lineTo(...i)),ib(new Zh).style("d",a.toString()).style("stroke",e).style("transform",r).call(ab,l).node()}}),VE=(zE.props={defaultEnterAnimation:"fadeIn"},t=>{const s=I(t,[]);return(t,e,n,r)=>{var r=r["defaultColor"],{color:e=r,src:r="",size:i=32,transform:o=""}=e,[[t,a]]=t,t=t-Number(i)/2,a=a-Number(i)/2;return ib(new Uh).style("x",t).style("y",a).style("width",i).style("height",i).style("img",r).style("stroke",e).style("transform",o).call(ab,s).node()}});VE.props={defaultEnterAnimation:"fadeIn"};const GE=t=>{const o=I(t,[]);return(t,e,n,r)=>{var r=r["defaultColor"],{color:e=r,transform:r}=e;const i=function(i,t){const o=e1();if(zg(t)){const a=t.getCenter(),e=[...i,i[0]],s=e.map(t=>Z1(t,a));return e.forEach((t,e)=>{var n,r;0===e?o.moveTo(t[0],t[1]):(n=s[e],r=i[e-1],void 0!==(e=s[e-1])&&Math.abs(n-e)<1e-10?ub(o,r,t,a,n):o.lineTo(t[0],t[1]))}),o.closePath(),o}return sb(o,i)}(t,n);return ib(new Zh).style("d",i.toString()).style("stroke",e).style("fill",e).style("transform",r).call(ab,o).node()}};GE.props={defaultEnterAnimation:"fadeIn"};const HE=t=>{const o=I(t,[]);return(t,e,n,r)=>{var r=r["defaultColor"],{color:e=r,transform:r}=e;const i=function(t,e){const n=e1();var r,i,o,a,s,l,u,c;return zg(e)?([r,i]=e=e.getCenter(),o=K1(X1(t[0],e)),a=K1(X1(t[1],e)),s=Z1(e,t[2]),l=Z1(e,t[3]),u=Z1(e,t[8]),c=Z1(e,t[10]),e=Z1(e,t[11]),n.moveTo(...t[0]),n.arc(r,i,s,o,a),n.arc(r,i,s,a,o,!0),n.moveTo(...t[2]),n.lineTo(...t[3]),n.moveTo(...t[4]),n.arc(r,i,l,o,a),n.lineTo(...t[6]),n.arc(r,i,c,a,o,!0),n.closePath(),n.moveTo(...t[8]),n.arc(r,i,u,o,a),n.arc(r,i,u,a,o,!0),n.moveTo(...t[10]),n.lineTo(...t[11]),n.moveTo(...t[12]),n.arc(r,i,e,o,a),n.arc(r,i,e,a,o,!0)):(n.moveTo(...t[0]),n.lineTo(...t[1]),n.moveTo(...t[2]),n.lineTo(...t[3]),n.moveTo(...t[4]),n.lineTo(...t[5]),n.lineTo(...t[6]),n.lineTo(...t[7]),n.closePath(),n.moveTo(...t[8]),n.lineTo(...t[9]),n.moveTo(...t[10]),n.lineTo(...t[11]),n.moveTo(...t[12]),n.lineTo(...t[13])),n}(t,n);return ib(new Zh).style("d",i.toString()).style("stroke",e).style("fill",e).style("transform",r).call(ab,o).node()}},WE=(HE.props={defaultEnterAnimation:"fadeIn"},a=>(t,e,n,r)=>{var r=r["defaultColor"],{color:e=r,transform:r,size:i}=e,[t,o]=t[0];return ib(new Zh).style("d",Eb(t,o,+i)).style("lineWidth",0).style("stroke",e).style("transform",r).style("fill",e).call(ab,a).node()}),UE=(WE.props={defaultEnterAnimation:"fadeIn"},(...t)=>GE(...t)),YE=(UE.props={defaultEnterAnimation:"fadeIn"},(...t)=>zE(...t)),qE=(YE.props={defaultEnterAnimation:"fadeIn"},t=>{const a=I(t,[]);return(t,e,n,r)=>{var r=r["defaultColor"],{color:e=r,transform:r}=e,[t,i]=t;const o=e1();return 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]),ib(new Zh).style("d",o.toString()).style("stroke",e).style("transform",r).call(ab,a).node()}});qE.props={defaultEnterAnimation:"fadeIn"};const XE=t=>{const{cornerRatio:a=1/3}=t,s=I(t,["cornerRatio"]);return(t,e,n,r)=>{var r=r["defaultColor"],{color:e=r,transform:r}=e,[t,i]=t;const o=function(t,e,n,r){const i=e1();var o,a;return zg(n)?(a=Z1(t,o=n.getCenter()),a=(Z1(e,o)-a)*r+a,i.moveTo(t[0],t[1]),ub(i,t,e,o,a),i.lineTo(e[0],e[1])):(Fg(n)?(i.moveTo(t[0],t[1]),i.lineTo(t[0]+(e[0]-t[0])*r,t[1]),i.lineTo(t[0]+(e[0]-t[0])*r,e[1])):(i.moveTo(t[0],t[1]),i.lineTo(t[0],t[1]+(e[1]-t[1])*r),i.lineTo(e[0],t[1]+(e[1]-t[1])*r)),i.lineTo(e[0],e[1])),i}(t,i,n,a);return ib(new Zh).style("d",o.toString()).style("stroke",e).style("transform",r).call(ab,s).node()}},ZE=(XE.props={defaultEnterAnimation:"fadeIn"},t=>{const u=I(t,[]);return(t,e,n,r)=>{var i,o,a,r=r["defaultColor"],{color:e=r,transform:r}=e,[t,s]=t;const l=e1();return l.moveTo(t[0],t[1]),zg(n)?(n=n.getCenter(),l.quadraticCurveTo(n[0],n[1],s[0],s[1])):([[n,i],[o,a]]=[t,s],n=[(n+o)/2,(i+a)/2],o=Z1(t,s)/2,ub(l,t,s,n,o)),ib(new Zh).style("d",l.toString()).style("stroke",e).style("transform",r).call(ab,u).node()}});ZE.props={defaultEnterAnimation:"fadeIn"};const KE=t=>{const o=I(t,[]);return(t,e,n,r)=>{var r=r["defaultColor"],{color:e=r,transform:r}=e;const i=function(t,e){var n,[t,r,i,o]=t;const a=e1();return zg(e)?(n=Z1(e=e.getCenter(),t),a.moveTo(t[0],t[1]),a.quadraticCurveTo(e[0],e[1],i[0],i[1]),ub(a,i,o,e,n),a.quadraticCurveTo(e[0],e[1],r[0],r[1]),ub(a,r,t,e,n),a.closePath()):(a.moveTo(t[0],t[1]),a.bezierCurveTo(t[0]/2+i[0]/2,t[1],t[0]/2+i[0]/2,i[1],i[0],i[1]),a.lineTo(o[0],o[1]),a.bezierCurveTo(o[0]/2+r[0]/2,o[1],o[0]/2+r[0]/2,r[1],r[0],r[1]),a.lineTo(t[0],t[1]),a.closePath()),a}(t,n);return ib(new Zh).style("d",i.toString()).style("fill",e).style("stroke",e).style("transform",r).call(ab,o).node()}};KE.props={defaultEnterAnimation:"fadeIn"};const $E=t=>{const a=I(t,[]);return(t,e,n,r)=>{var{defaultColor:r,defaultSize:i}=r,{color:r=r,size:i=i}=e,o=(t=t,zg(o=n)?(o=o.getCenter(),w1()({startAngle:0,endAngle:2*Math.PI,outerRadius:Z1(t[0],o),innerRadius:Z1(t[1],o)})):T1().x(t=>t[0]).y(t=>t[1])(t)),t=function(t,e){if(!zg(t))return e;var[t,n]=t.getCenter();return`translate(${t}, ${n}) `+(e||"")}(n,e.transform);return ib(new Zh({})).style("d",o).style("stroke",r).style("lineWidth",i).style("transform",t).call(ab,a).node()}};$E.props={defaultEnterAnimation:"fadeIn"};class JE extends jh{constructor(t){super(t)}connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){this.drawPath(),this.drawEndMarker()}drawPath(){var t=this.attributes,e=t["connectorPath"],t=I(t,["connectorPath","class"]);this.connector=ib(this.connector||this.appendChild(new Zh({}))).style("path",e).call(ab,t).node()}drawEndMarker(){var{stroke:t,endMarker:e}=this.style;this.endMarker=this.endMarker||this.appendChild(new L({})),this.endMarker.update(Object.assign({size:8,fill:t},e))}}function QE(t,e,n){return[["M",t-n,e+2*n],["L",t,e],["L",t+n,e+2*n],["Z"]]}function t_(t,e,n){return[["M",t,e],["L",t-n,e-2*n],["L",t+n,e-2*n],["Z"]]}function e_(t,e,n){return[["M",t,e],["L",t+2*n,e-n],["L",t+2*n,e+n],["Z"]]}const n_=t=>{const{direction:o="upward",offset:a=12,endMarker:s}=t,l=I(t,["direction","offset","endMarker"]);return(t,e,n,r)=>{var r=r["defaultColor"],{color:e=r,transform:r}=e,n=function(t,e,n,r){var[e,i]=e;return Fg(t)?[e,[t="downward"===n?Math.min(e[0],i[0])-r:Math.max(e[0],i[0])+r,e[1]],[t,i[1]],i]:(t="downward"===n?Math.max(e[1],i[1])+r:Math.min(e[1],i[1])-r,[e,[e[0],t],[i[0],t],i])}(n,t,o,a),t=(t=n,T1().x(t=>t[0]).y(t=>t[1])(t)),[,,,i]=n;return ib(new JE({})).style("connectorPath",t).style("stroke",e).style("transform",r).style("endMarker",Object.assign({x:i[0],y:i[1],symbol:function(t){var[,,t,e]=t;return e[0]<t[0]?e_:t[1]>e[1]?QE:t_}(n)},s)).call(ab,l).node()}},r_=(n_.props={defaultEnterAnimation:"fadeIn"},t=>{const{label:s={}}=t;return(t,e,n,r)=>{const i=e.element;var{min:o,max:a}=i.getRenderBounds(),[o]=o,[a]=a,a=a-o,o=e["label"];return ib(new rd).style("x",a/2).style("y",0).style("text",""+o).style("fontSize",12).style("dy","-2px").style("textAlign","center").call(ab,s).node()}}),i_=(r_.props={},t=>{return Object.assign({},{defaultColor:"#5B8FF9",defaultCategory10:"category10",defaultCategory20:"category20",defaultSize:1,elementActiveStroke:"black",enter:{duration:300,fill:"both",delay:0},title:{fill:"rgba(0,0,0,0.85)",fontSize:14,fontWeight:"bold"},subtitle:{fill:"rgba(0,0,0,0.65)",fontSize:10}},t)});function o_(r,t,e,i,o){var n;const a=(null==(n=r.getTicks)?void 0:n.call(r))||t,s=(null==(n=r.getFormatter)?void 0:n.call(r))||e;return zg(o)||Fg(o)?a.map(t=>{var e,n=(null==(n=r.getBandWidth)?void 0:n.call(r,t))/2||0,n=r.map(t)+n;return{value:Fg(o)&&null!=(e=r.getTicks)&&e.call(r)?1-n:n,text:s(t)}}):a.map(t=>{var e=(null==(e=r.getBandWidth)?void 0:e.call(r,t))/2||0,e=r.map(t)+e;n=e;var n=function(t,e,n){var{width:n,height:r}=n.getOptions();if("bottom"===e){const i=t[0],o=new mm({domain:[0,n],range:[0,1]});return o.map(i)}const i=t[1],o=new mm({domain:[0,r],range:[0,1]});return o.map(i)}(o.map("bottom"===i?[n,1]:[0,n]),i,o);return{value:Vg(o)?e:n,text:s(t)}})}function a_(t,e,n,r,i){return zg(n)||Vg(n)?[]:t.map(t=>{return{points:function(t,e,n,r,i){var[r,o]=r,[i,a]=i,[n,s]=n.getSize();let l,u,c,h;return"bottom"===e||"top"===e?(l=u=r+(i-r)*t,c=o,h="bottom"===e?o-s:o+s):(c=h=o+(a-o)*t,l=r,u="left"===e?r+n:r-n),[[l,c],[u,h]]}(t.value,e,n,r,i)}})}i_.props={};const s_=t=>{const{position:s,formatter:l=t=>""+t}=t;return(t,e,n,r)=>{var[i,o]=n.getCenter(),{domain:e,bbox:a}=e,i=[i+a.x,o+a.y],o=o_(t,e,l,s,n),e=Math.min(a.width,a.height)/2,n=t.getOptions().guide||{},a=n["grid"],t=a?function(t,e,n,r,i){const[o,a]=e;return t.map(({value:t})=>{t=(r-n)*t+n;return{points:[[o,a],[o+i*Math.cos(t*Math.PI/180),a+i*Math.sin(t*Math.PI/180)]]}})}(o,i,-90,270,e):[];return new S2({style:C({},{center:i,radius:e,startAngle:-90,endAngle:270,ticks:o,axisLine:{style:{lineWidth:0,strokeOpacity:0}},grid:{items:t,lineStyle:{stroke:"#1b1e23",strokeOpacity:.1,lineDash:[0,0]}},tickLine:{len:4,style:{lineWidth:1,stroke:"#BFBFBF"}},label:{align:"tangential",tickPadding:2}},n)})}},l_=t=>{const{position:v,title:m=!0,formatter:b=t=>""+t}=t;return(t,e,n,r)=>{var{domain:e,field:i,bbox:o}=e,{startPos:o,endPos:a,labelOffset:s,titlePosition:l,titlePadding:u,titleRotate:c,verticalFactor:h,titleOffsetY:d,label:f=!0,axisLine:p,tickLine:y=!0}=function(t,e,n){var r,{x:i,y:o,width:a,height:s}=e;return"bottom"===t?{startPos:[i,o],endPos:[i+a,o],labelOffset:8,titlePosition:"end",titlePadding:2,titleRotate:0,verticalFactor:1}:"left"===t||"centerHorizontal"===t?{startPos:[i+a,o],endPos:[i+a,o+s],titlePosition:"center",titlePadding:6,titleRotate:-90,labelAlign:"end",labelOffset:4,verticalFactor:-1}:"right"===t?{startPos:[i,o],endPos:[i,o+s],titlePosition:"center",titlePadding:16,titleRotate:-90,labelAlign:"start",labelOffset:4,verticalFactor:1}:"arcY"===t?([t,n]=n.getCenter(),r=Math.min(e.width,e.height)/2,{startPos:[t+e.x,n+e.y-r],endPos:[t+e.x,n+e.y],titlePosition:"start",titlePadding:4,titleOffsetY:0,titleRotate:-90,labelOffset:4,verticalFactor:-1,axisLine:!1}):{startPos:[i,o+s],endPos:[i+a,o+s],titlePosition:"end",titlePadding:2,titleRotate:0,labelOffset:4,verticalFactor:-1}}(v,o,n),e=o_(t,e,b,v,n),l=t.getTicks?l:"center",g=t.getOptions().guide||{},{grid:t=!!t.getTicks}=g,t=t?a_(e,v,n,o,a):[];return new y2({style:C(Object.assign({startPos:o,endPos:a,verticalFactor:h,ticks:e,label:f?{tickPadding:s,autoHide:!1,style:{}}:null,axisLine:p?{stroke:"#BFBFBF"}:null,grid:{items:t,lineStyle:{stroke:"#1b1e23",strokeOpacity:.05,lineDash:[0,0]}},tickLine:y?{len:4,style:{lineWidth:1,stroke:"#BFBFBF"}}:null},i&&m&&{title:{content:Array.isArray(i)?i[0]:i,titleAnchor:l,style:{fontWeight:"bold",fillOpacity:1,dy:d,textAnchor:l},titlePadding:u,rotate:c}}),g)})}},u_=i=>{const o=i["position"];return(t,e,n,r)=>("arc"===o?s_:l_)(i)(t,e,n,r)},c_=(u_.props={defaultPosition:"left",defaultSize:45,defaultOrder:0},t=>u_(t)),h_=(c_.props=Object.assign(Object.assign({},u_.props),{defaultPosition:"bottom"}),t=>u_(t)),d_=(h_.props=Object.assign(Object.assign({},u_.props),{defaultPosition:"left"}),t=>{const{position:p,formatter:y=t=>""+t}=t;return(e,t,n,r)=>{const{domain:i,field:o,bbox:a}=t;var{x:t,y:s,width:l,height:u}=a,c=i.map(t=>({id:t,name:y(t),color:e.map(t)})),h=e.getOptions().guide||{},{cols:d,autoWrap:f}=h,h=I(h,["cols","autoWrap"]),d=f&&d?l/d:void 0,c=C({},Object.assign(Object.assign({items:c,x:t,y:s,orient:["right","left"].includes(p)?"vertical":"horizontal",maxWidth:l,maxHeight:u,autoWrap:f,maxItemWidth:d,itemWidth:d,spacing:[8,0],itemName:{style:{fontSize:12,fillOpacity:1,fill:"#000",fontWeight:"lighter",active:{fillOpacity:.8},inactive:{fill:"#d8d8d8"},unchecked:{fill:"#d8d8d8"}}}},o&&{title:{content:Array.isArray(o)?o[0]:o,style:{fontSize:12,fontWeight:"bold",fillOpacity:1}}}),{itemMarker:{size:8,symbol:"circle",style:{fillOpacity:1,inactive:{fillOpacity:.2},unchecked:{fill:"#d8d8d8",stroke:"#d8d8d8"}}},itemBackgroundStyle:{fill:"transparent"}}),h);return new _k({className:"category-legend",style:c})}}),f_=(d_.props={defaultPosition:"top",defaultOrder:1,defaultSize:40},t=>(e,t,n,r)=>{const{field:i,domain:o,bbox:a}=t;var{x:t,y:s}=a,l=(null==(l=e.getTicks)?void 0:l.call(e))||[],[u,c]=o;return new Wk({style:Object.assign(Object.assign({x:t,y:s,rail:{length:120,size:12,ticks:l},min:u,max:c,indicator:null,handle:null},i&&{title:{content:Array.isArray(i)?i[0]:i,style:{fontSize:12}}}),{color:o.map(t=>e.map(t))})})});function p_(e){return class extends jh{constructor(t){super(t),this.descriptor=e}connectedCallback(){var t,e;null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)}update(t={}){var e;this.attr(C({},this.attributes,t)),null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)}}}function y_(t,e,n){return t.querySelector(e)?ib(t).select(e):ib(t).append(n)}f_.props={defaultPosition:"top",defaultOrder:1,defaultSize:40};const g_=p_({render(t,e){const{text:n,style:r,subtitle:i,subtitleStyle:o}=t,a=y_(e,".title","text").attr("className","title").style("fontSize",14).style("textBaseline","top").style("text",n).call(ab,r||{}).node();t=a.getLocalBounds();y_(e,".sub-title","text").attr("className","sub-title").style("y",t.max[1]+((null===o||void 0===o?void 0:o.spacing)||0)).style("fontSize",12).style("textBaseline","top").call(t=>{if(!i)return t.node().remove();t.node().attr(Object.assign({text:i},o))})}}),v_=t=>{const{text:o,style:a,subtitle:s,subtitleStyle:l}=t;return(t,e,n,r)=>{var{x:e,y:i}=e.bbox;return new g_({style:C({},{style:r.title,subtitleStyle:r.subtitle},{x:e,y:i,style:a,text:o,subtitle:s,subtitleStyle:l})})}};v_.props={defaultPosition:"top",defaultOrder:2,defaultSize:30};class m_{constructor(t){this.$value=t}static of(t){return new m_(t)}call(t,...e){return this.$value=t(this.$value,...e),this}value(){return this.$value}}function b_(t,e,n){return m_.of({}).call(x_,t).call(x_,e).call(x_,n).value()}function x_(t,e){for(var[n,r]of Object.entries(e))void 0!==r&&(t[n]=e[n]);return t}const w_=h=>{return(t,e,n,r,i)=>{const[o]=t;var t=o.getBoundingClientRect()["height"],a=o.style["transform"],{fillOpacity:s,strokeOpacity:l,opacity:u}=o.parsedStyle,[r,t]=Fg(r)?[[0,t],"scale(1, 0.0001)"]:[[0,0],"scale(0.0001, 1)"],t=[{transform:(a+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(a+" "+t).trimStart(),fillOpacity:s.value,strokeOpacity:l.value,opacity:u.value,offset:.01},{transform:(a+" scale(1, 1)").trimStart()}];o.setOrigin(r);const c=o.animate(t,b_(i,n,h));return c.finished.then(()=>o.setOrigin(0,0)),c}},k_=h=>{return(t,e,n,r,i)=>{const[o]=t;var t=o.getBoundingClientRect()["height"],a=o.style["transform"],{fillOpacity:s,strokeOpacity:l,opacity:u}=o.parsedStyle,[r,t]=Fg(r)?[[0,t],"scale(1, 0.0001)"]:[[0,0],"scale(0.0001, 1)"],s=[{transform:(a+" scale(1, 1)").trimStart()},{transform:(a+" "+t).trimStart(),fillOpacity:s.value,strokeOpacity:l.value,opacity:u.value,offset:.99},{transform:(a+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}];o.setOrigin(r);const c=o.animate(s,b_(i,n,h));return c.finished.then(()=>o.setOrigin(0,0)),c}},E_=h=>{return(t,e,n,r,i)=>{const[o]=t;var t=o.getBoundingClientRect()["height"],a=o.style["transform"],{fillOpacity:s,strokeOpacity:l,opacity:u}=o.parsedStyle,[r,t]=Fg(r)?[[0,0],"scale(0.0001, 1)"]:[[0,t],"scale(1, 0.0001)"],t=[{transform:(a+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(a+" "+t).trimStart(),fillOpacity:s.value,strokeOpacity:l.value,opacity:u.value,offset:.01},{transform:(a+" scale(1, 1)").trimStart()}];o.setOrigin(r);const c=o.animate(t,b_(i,n,h));return c.finished.then(()=>o.setOrigin(0,0)),c}},__=h=>{return(t,e,n,r,i)=>{const[o]=t;var t=o.getBoundingClientRect()["height"],a=o.style["transform"],{fillOpacity:s,strokeOpacity:l,opacity:u}=o.parsedStyle,[r,t]=Fg(r)?[[0,0],"scale(0.0001, 1)"]:[[0,t],"scale(1, 0.0001)"],s=[{transform:(a+" scale(1, 1)").trimStart()},{transform:(a+" "+t).trimStart(),fillOpacity:s.value,strokeOpacity:l.value,opacity:u.value,offset:.99},{transform:(a+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}];o.setOrigin(r);const c=o.animate(s,b_(i,n,h));return c.finished.then(()=>o.setOrigin(0,0)),c}},S_=l=>(t,e,n,r,i)=>{const[o]=t;var{fillOpacity:t,strokeOpacity:a,opacity:s}=o.parsedStyle,t=[{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:t.value,strokeOpacity:a.value,opacity:s.value}];return o.animate(t,b_(i,n,l))},M_=(S_.props={},l=>(t,e,n,r,i)=>{const[o]=t;var{fillOpacity:t,strokeOpacity:a,opacity:s}=o.parsedStyle,t=[{fillOpacity:t.value,strokeOpacity:a.value,opacity:s.value},{fillOpacity:0,strokeOpacity:0,opacity:0}];return o.animate(t,b_(i,n,l))});function T_(t,e){const n={};for(const i of e){var r=t.style[i];r&&(n[i]=r)}return n}function O_(t,e){var[n,r,i,t]=function(t){var{min:t,max:e}=t.getLocalBounds(),[t,n]=t,[e,r]=e;return[t,n,e-t,r-n]}(t),o=Math.ceil(Math.sqrt(e/(t/i)));const a=[];var s=t/Math.ceil(e/o);let l=0,u=e;for(;0<u;){var c=Math.min(u,o),h=i/c;for(let t=0;t<c;t++){var d=n+t*h,f=r+l*s;a.push(function(t){var[t,e,n,r]=t;return`
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).G2={})}(this,function(L){"use strict";var j=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},R={}.toString,F=function(t,e){return R.call(t)==="[object "+e+"]"},z=function(t){return F(t,"Function")},V=function(t){return null==t},G=function(t){return Array.isArray?Array.isArray(t):F(t,"Array")},H=function(t){var e=typeof t;return null!==t&&"object"==e||"function"==e};function W(t,e){if(t)if(G(t))for(var n=0,r=t.length;n<r&&!1!==e(t[n],n);n++);else if(H(t))for(var i in t)if(t.hasOwnProperty(i)&&!1===e(t[i],i))break}function Y(t){return"object"==typeof t&&null!==t}function U(t){if(G(t))return t.reduce(function(t,e){return Math.max(t,e)},t[0])}function q(t){if(G(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])}var X=function(t){if(!Y(t)||!F(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},Z=function(t){return F(t,"String")};function K(t){if(j(t))return t[0]}function $(t){if(j(t))return t[t.length-1]}function J(t,e,n){return t<e?e:n<t?n:t}function Q(t){return F(t,"Number")}var tt=1e-5;function et(t,e,n){return void 0===n&&(n=tt),Math.abs(t-e)<n}var nt=function(t,e){if(G(t)){for(var n,r=-1/0,i=0;i<t.length;i++){var o=t[i],a=z(e)?e(o):o[e];r<a&&(n=o,r=a)}return n}},rt=function(t,e){if(G(t)){for(var n,r=1/0,i=0;i<t.length;i++){var o=t[i],a=z(e)?e(o):o[e];a<r&&(n=o,r=a)}return n}},it=Object.values?function(t){return Object.values(t)}:function(n){var r=[];return W(n,function(t,e){z(n)&&"prototype"===e||r.push(t)}),r},ot=function(t){return V(t)?"":t.toString()};function at(t){return null===t}function st(t){return void 0===t}function lt(t){return t instanceof Element||t instanceof HTMLDocument}var ut=function(t){t=ot(t);return t.charAt(0).toUpperCase()+t.substring(1)};function ct(t,e){for(var n in e)e.hasOwnProperty(n)&&"constructor"!==n&&void 0!==e[n]&&(t[n]=e[n])}function ht(t,e,n,r){return e&&ct(t,e),n&&ct(t,n),r&&ct(t,r),t}function dt(o,a){var s;if(z(o))return(s=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n,r=a?a.apply(this,t):t[0],i=s.cache;return i.has(r)?i.get(r):(n=o.apply(this,t),i.set(r,n),n)}).cache=new Map,s;throw new TypeError("Expected a function")}var pt=function(t){if("object"!=typeof t||null===t)return t;if(G(t))for(var e=[],n=0,r=t.length;n<r;n++)"object"==typeof t[n]&&null!=t[n]?e[n]=pt(t[n]):e[n]=t[n];else for(var i in e={},t)"object"==typeof t[i]&&null!=t[i]?e[i]=pt(t[i]):e[i]=t[i];return e},ft=5;function yt(t,e,n){for(var r=0,i=Z(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return void 0===t||r<i.length?n:t}function gt(e,t){var n;return null!==e&&X(e)?(n={},W(t,function(t){_t.call(e,t)&&(n[t]=e[t])}),n):{}}function mt(t,r){return n=function(t,e,n){return r.includes(n)||(t[n]=e),t},e={},G(t=t)||X(t)?(i=e,W(t,function(t,e){i=n(i,t,e)}),i):t;var n,e,i}function vt(n,r,i){function o(){c=!1===i.leading?0:Date.now(),a=null,u=n.apply(s,l),a||(s=l=null)}function t(){var t=Date.now(),e=(c||!1!==i.leading||(c=t),r-(t-c));return s=this,l=arguments,e<=0||r<e?(a&&(clearTimeout(a),a=null),c=t,u=n.apply(s,l),a||(s=l=null)):a||!1===i.trailing||(a=setTimeout(o,e)),u}var a,s,l,u,c=0;return i=i||{},t.cancel=function(){clearTimeout(a),c=0,a=s=l=null},t}function bt(){}function xt(t){return t}var N=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 o in r=r||0,i=i||ft,n){var a;n.hasOwnProperty(o)&&(null!==(a=n[o])&&X(a)?(X(e[o])||(e[o]={}),r<i?t(e[o],a,r+1,i):e[o]=n[o]):G(a)?(e[o]=[],e[o]=e[o].concat(a)):void 0!==a&&(e[o]=a))}}(t,e[r]);return t},wt=function(t,e){if(!j(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},Et=function(t,e){if(t===e)return!0;if(t&&e&&!Z(t)&&!Z(e)){if(j(t)||j(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=Et(t[r],e[r]));r++);return n}if(Y(t)||Y(e)){var i=Object.keys(t),o=Object.keys(e);if(i.length!==o.length)return!1;for(n=!0,r=0;r<i.length&&(n=Et(t[i[r]],e[i[r]]));r++);return n}}return!1},_t=Object.prototype.hasOwnProperty;function kt(t){return V(t)?0:(j(t)?t:Object.keys(t)).length}var Tt=function(t,e){return(Tt=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 i(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}Tt(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var Mt,T=function(){return(T=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 I(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,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(a=(o<3?i(a):3<o?i(e,n,a):i(e,n))||a);return 3<o&&a&&Object.defineProperty(e,n,a),a}function St(n,r){return function(t,e){r(t,e,n)}}function e(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function Ot(t,a,s,l){return new(s=s||Promise)(function(n,e){function r(t){try{o(l.next(t))}catch(t){e(t)}}function i(t){try{o(l.throw(t))}catch(t){e(t)}}function o(t){var e;t.done?n(t.value):((e=t.value)instanceof s?e:new s(function(t){t(e)})).then(r,i)}o((l=l.apply(t,a||[])).next())})}function D(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||0<e--)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function Pt(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;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))}var At=dt(function(t,e){var n=(e=void 0===e?{}:e).fontSize,r=e.fontFamily,i=e.fontWeight,o=e.fontStyle,e=e.fontVariant;return(Mt=Mt||document.createElement("canvas").getContext("2d")).font=[o,e,i,n+"px",r].join(" "),Mt.measureText(Z(t)?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 o=arguments[e],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}([t],it(e=void 0===e?{}:e)).join("")}),Nt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Ct={},n={},r=(r=n,Object.defineProperty(r,"__esModule",{value:!0}),r.NON_CUSTOM_TAG_KEYS=r.POST_CONSTRUCT=r.DESIGN_PARAM_TYPES=r.PARAM_TYPES=r.TAGGED_PROP=r.TAGGED=r.MULTI_INJECT_TAG=r.INJECT_TAG=r.OPTIONAL_TAG=r.UNMANAGED_TAG=r.NAME_TAG=r.NAMED_TAG=void 0,r.NAMED_TAG="named",r.NAME_TAG="name",r.UNMANAGED_TAG="unmanaged",r.OPTIONAL_TAG="optional",r.INJECT_TAG="inject",r.MULTI_INJECT_TAG="multi_inject",r.TAGGED="inversify:tagged",r.TAGGED_PROP="inversify:tagged_props",r.PARAM_TYPES="inversify:paramtypes",r.DESIGN_PARAM_TYPES="design:paramtypes",r.POST_CONSTRUCT="post_construct",r.NON_CUSTOM_TAG_KEYS=[r.INJECT_TAG,r.MULTI_INJECT_TAG,r.NAME_TAG,r.UNMANAGED_TAG,r.NAMED_TAG,r.OPTIONAL_TAG],{}),Lt={},It={},jt=(Object.defineProperty(It,"__esModule",{value:!0}),It.TargetTypeEnum=It.BindingTypeEnum=It.BindingScopeEnum=void 0,It.BindingScopeEnum={Request:"Request",Singleton:"Singleton",Transient:"Transient"},It.BindingTypeEnum={ConstantValue:"ConstantValue",Constructor:"Constructor",DynamicValue:"DynamicValue",Factory:"Factory",Function:"Function",Instance:"Instance",Invalid:"Invalid",Provider:"Provider"},It.TargetTypeEnum={ClassProperty:"ClassProperty",ConstructorArgument:"ConstructorArgument",Variable:"Variable"},{}),Rt=(Object.defineProperty(jt,"__esModule",{value:!0}),jt.id=void 0,0);jt.id=function(){return Rt++},Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.Binding=void 0;var Dt=It,Bt=jt;function Ft(t,e){this.id=Bt.id(),this.activated=!1,this.serviceIdentifier=t,this.scope=e,this.type=Dt.BindingTypeEnum.Invalid,this.constraint=function(t){return!0},this.implementationType=null,this.cache=null,this.factory=null,this.provider=null,this.onActivation=null,this.dynamicValue=null}Ft.prototype.clone=function(){var t=new Ft(this.serviceIdentifier,this.scope);return t.activated=t.scope===Dt.BindingScopeEnum.Singleton&&this.activated,t.implementationType=this.implementationType,t.dynamicValue=this.dynamicValue,t.scope=this.scope,t.type=this.type,t.factory=this.factory,t.provider=this.provider,t.constraint=this.constraint,t.onActivation=this.onActivation,t.cache=this.cache,t},Lt.Binding=Ft;var o={},zt=(Object.defineProperty(o,"__esModule",{value:!0}),o.STACK_OVERFLOW=o.CIRCULAR_DEPENDENCY_IN_FACTORY=o.POST_CONSTRUCT_ERROR=o.MULTIPLE_POST_CONSTRUCT_METHODS=o.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK=o.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE=o.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE=o.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT=o.ARGUMENTS_LENGTH_MISMATCH=o.INVALID_DECORATOR_OPERATION=o.INVALID_TO_SELF_VALUE=o.INVALID_FUNCTION_BINDING=o.INVALID_MIDDLEWARE_RETURN=o.NO_MORE_SNAPSHOTS_AVAILABLE=o.INVALID_BINDING_TYPE=o.NOT_IMPLEMENTED=o.CIRCULAR_DEPENDENCY=o.UNDEFINED_INJECT_ANNOTATION=o.MISSING_INJECT_ANNOTATION=o.MISSING_INJECTABLE_ANNOTATION=o.NOT_REGISTERED=o.CANNOT_UNBIND=o.AMBIGUOUS_MATCH=o.KEY_NOT_FOUND=o.NULL_ARGUMENT=o.DUPLICATED_METADATA=o.DUPLICATED_INJECTABLE_DECORATOR=void 0,o.DUPLICATED_INJECTABLE_DECORATOR="Cannot apply @injectable decorator multiple times.",o.DUPLICATED_METADATA="Metadata key was used more than once in a parameter:",o.NULL_ARGUMENT="NULL argument",o.KEY_NOT_FOUND="Key Not Found",o.AMBIGUOUS_MATCH="Ambiguous match found for serviceIdentifier:",o.CANNOT_UNBIND="Could not unbind serviceIdentifier:",o.NOT_REGISTERED="No matching bindings found for serviceIdentifier:",o.MISSING_INJECTABLE_ANNOTATION="Missing required @injectable annotation in:",o.MISSING_INJECT_ANNOTATION="Missing required @inject or @multiInject annotation in:",o.UNDEFINED_INJECT_ANNOTATION=function(t){return"@inject called with undefined this could mean that the class "+t+" has a circular dependency problem. You can use a LazyServiceIdentifer to overcome this limitation."},o.CIRCULAR_DEPENDENCY="Circular dependency found:",o.NOT_IMPLEMENTED="Sorry, this feature is not fully implemented yet.",o.INVALID_BINDING_TYPE="Invalid binding type:",o.NO_MORE_SNAPSHOTS_AVAILABLE="No snapshot available to restore.",o.INVALID_MIDDLEWARE_RETURN="Invalid return type in middleware. Middleware must return!",o.INVALID_FUNCTION_BINDING="Value provided to function binding must be a function!",o.INVALID_TO_SELF_VALUE="The toSelf function can only be applied when a constructor is used as service identifier",o.INVALID_DECORATOR_OPERATION="The @inject @multiInject @tagged and @named decorators must be applied to the parameters of a class constructor or a class property.",o.ARGUMENTS_LENGTH_MISMATCH=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return"The number of constructor arguments in the derived class "+t[0]+" must be >= than the number of constructor arguments of its base class."},o.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT="Invalid Container constructor argument. Container options must be an object.",o.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE="Invalid Container option. Default scope must be a string ('singleton' or 'transient').",o.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE="Invalid Container option. Auto bind injectable must be a boolean",o.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK="Invalid Container option. Skip base check must be a boolean",o.MULTIPLE_POST_CONSTRUCT_METHODS="Cannot apply @postConstruct decorator multiple times in the same class",o.POST_CONSTRUCT_ERROR=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return"@postConstruct error in class "+t[0]+": "+t[1]},o.CIRCULAR_DEPENDENCY_IN_FACTORY=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return"It looks like there is a circular dependency in one of the '"+t[0]+"' bindings. Please investigate bindings withservice identifier '"+t[1]+"'."},o.STACK_OVERFLOW="Maximum call stack size exceeded",{}),Vt=(Object.defineProperty(zt,"__esModule",{value:!0}),zt.MetadataReader=void 0,n);function Gt(){}Gt.prototype.getConstructorMetadata=function(t){return{compilerGeneratedMetadata:Reflect.getMetadata(Vt.PARAM_TYPES,t),userGeneratedMetadata:Reflect.getMetadata(Vt.TAGGED,t)||{}}},Gt.prototype.getPropertiesMetadata=function(t){return Reflect.getMetadata(Vt.TAGGED_PROP,t)||[]},zt.MetadataReader=Gt;var Ht={},a={},s=(Object.defineProperty(a,"__esModule",{value:!0}),a.BindingCount=void 0,a.BindingCount={MultipleBindingsAvailable:2,NoBindingsAvailable:0,OnlyOneBindingAvailable:1},{}),Wt=(Object.defineProperty(s,"__esModule",{value:!0}),s.isStackOverflowExeption=void 0,o);s.isStackOverflowExeption=function(t){return t instanceof RangeError||t.message===Wt.STACK_OVERFLOW};var Yt={},Ut=(Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.circularDependencyToException=Yt.listMetadataForTarget=Yt.listRegisteredBindingsForServiceIdentifier=Yt.getServiceIdentifierAsString=Yt.getFunctionName=void 0,o);function qt(t){return"function"==typeof t?t.name:"symbol"==typeof t?t.toString():t}function Xt(t){return function t(e,n){void 0===n&&(n=[]);var r=qt(e.serviceIdentifier);return n.push(r),null!==e.parentRequest?t(e.parentRequest,n):n}(t).reverse().join(" --\x3e ")}function Zt(t){var e;return t.name||((e=(t=t.toString()).match(/^function\s*([^\s(]+)/))?e[1]:"Anonymous function: "+t)}Yt.getServiceIdentifierAsString=qt,Yt.listRegisteredBindingsForServiceIdentifier=function(t,e,n){var r="";return 0!==(n=n(t,e)).length&&(r="\nRegistered bindings:",n.forEach(function(t){var e="Object";null!==t.implementationType&&(e=Zt(t.implementationType)),r=r+"\n "+e,t.constraint.metaData&&(r=r+" - "+t.constraint.metaData)})),r},Yt.circularDependencyToException=function n(t){t.childRequests.forEach(function(t){var e;if(function t(e,n){return null!==e.parentRequest&&(e.parentRequest.serviceIdentifier===n||t(e.parentRequest,n))}(t,t.serviceIdentifier))throw e=Xt(t),new Error(Ut.CIRCULAR_DEPENDENCY+" "+e);n(t)})},Yt.listMetadataForTarget=function(t,e){var n,r;return e.isTagged()||e.isNamed()?(n="",r=e.getNamedTag(),e=e.getCustomTags(),null!==r&&(n+=r.toString()+"\n"),null!==e&&e.forEach(function(t){n+=t.toString()+"\n"})," "+t+"\n "+t+" - "+n):" "+t},Yt.getFunctionName=Zt;var Kt={},$t=(Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.Context=void 0,jt);function Jt(t){this.id=$t.id(),this.container=t}Jt.prototype.addPlan=function(t){this.plan=t},Jt.prototype.setCurrentRequest=function(t){this.currentRequest=t},Kt.Context=Jt;var Qt={},te=(Object.defineProperty(Qt,"__esModule",{value:!0}),Qt.Metadata=void 0,n);function ee(t,e){this.key=t,this.value=e}ee.prototype.toString=function(){return this.key===te.NAMED_TAG?"named: "+this.value.toString()+" ":"tagged: { key:"+this.key.toString()+", value: "+this.value+" }"},Qt.Metadata=ee;function ne(t,e){this.parentContext=t,this.rootRequest=e}var re={},l=(Object.defineProperty(re,"__esModule",{value:!0}),re.Plan=void 0,re.Plan=ne,{}),ie={},oe={},ae=(Object.defineProperty(oe,"__esModule",{value:!0}),oe.tagProperty=oe.tagParameter=oe.decorate=void 0,o),se=n;function le(t,e,n,r,i){var o={},a="number"==typeof i,i=void 0!==i&&a?i.toString():n;if(a&&void 0!==n)throw new Error(ae.INVALID_DECORATOR_OPERATION);a=(o=Reflect.hasOwnMetadata(t,e)?Reflect.getMetadata(t,e):o)[i];if(Array.isArray(a))for(var s=0,l=a;s<l.length;s++){var u=l[s];if(u.key===r.key)throw new Error(ae.DUPLICATED_METADATA+" "+u.key.toString())}else a=[];a.push(r),o[i]=a,Reflect.defineMetadata(t,o,e)}function ue(t,e){Reflect.decorate(t,e)}oe.tagParameter=function(t,e,n,r){le(se.TAGGED,t,e,r,n)},oe.tagProperty=function(t,e,n){le(se.TAGGED_PROP,t.constructor,e,n)},oe.decorate=function(t,e,n){var r,i;"number"==typeof n?ue([(r=n,i=t,function(t,e){i(t,e,r)})],e):"string"==typeof n?Reflect.decorate([t],e,n):ue([t],e)},Object.defineProperty(ie,"__esModule",{value:!0}),ie.inject=ie.LazyServiceIdentifer=void 0;var ce=o,he=n,de=Qt,pe=oe;function fe(t){this._cb=t}fe.prototype.unwrap=function(){return this._cb()},ie.LazyServiceIdentifer=fe,ie.inject=function(i){return function(t,e,n){if(void 0===i)throw new Error(ce.UNDEFINED_INJECT_ANNOTATION(t.name));var r=new de.Metadata(he.INJECT_TAG,i);"number"==typeof n?pe.tagParameter(t,e,n,r):pe.tagProperty(t,e,r)}};var u={},c={},h=(Object.defineProperty(c,"__esModule",{value:!0}),c.QueryableString=void 0,ye.prototype.startsWith=function(t){return 0===this.str.indexOf(t)},ye.prototype.endsWith=function(t){var t=t.split("").reverse().join(""),e=this.str.split("").reverse().join("");return this.startsWith.call({str:e},t)},ye.prototype.contains=function(t){return-1!==this.str.indexOf(t)},ye.prototype.equals=function(t){return this.str===t},ye.prototype.value=function(){return this.str},ye);function ye(t){this.str=t}c.QueryableString=h,Object.defineProperty(u,"__esModule",{value:!0}),u.Target=void 0;var ge,me,ve,be,xe,we,Ee,_e=n,ke=jt,Te=Qt,Me=c;function Se(t,e,n,r){this.id=ke.id(),this.type=t,this.serviceIdentifier=n,this.name=new Me.QueryableString(e||""),this.metadata=new Array;t=null;"string"==typeof r?t=new Te.Metadata(_e.NAMED_TAG,r):r instanceof Te.Metadata&&(t=r),null!==t&&this.metadata.push(t)}function Oe(t,e,n,r){var i=t.getConstructorMetadata(n),o=i.compilerGeneratedMetadata;if(void 0===o)throw a=ve.MISSING_INJECTABLE_ANNOTATION+" "+e+".",new Error(a);var a=i.userGeneratedMetadata,i=Object.keys(a),s=0===n.length&&0<i.length,l=i.length>n.length,r=function(t,e,n,r,i){for(var o=[],a=0;a<i;a++){var s=function(t,e,n,r,i){var i=i[t.toString()]||[],o=Pe(i),a=!0!==o.unmanaged,r=r[t],s=o.inject||o.multiInject;(r=s||r)instanceof me.LazyServiceIdentifer&&(r=r.unwrap());if(a){var s=r===Object,a=r===Function,l=void 0===r,s=s||a||l;if(!e&&s)throw a=ve.MISSING_INJECT_ANNOTATION+" argument "+t+" in class "+n+".",new Error(a);l=new Ee.Target(be.TargetTypeEnum.ConstructorArgument,o.targetName,r);return l.metadata=i,l}return null}(a,t,e,n,r);null!==s&&o.push(s)}return o}(r,e,o,a,(s||l?i:n).length),e=function t(e,n){var r=e.getPropertiesMetadata(n);var i=[];var o=Object.keys(r);for(var a=0,s=o;a<s.length;a++){var l=s[a],u=r[l],c=Pe(r[l]),l=c.targetName||l,c=c.inject||c.multiInject,l=new Ee.Target(be.TargetTypeEnum.ClassProperty,l,c);l.metadata=u,i.push(l)}o=Object.getPrototypeOf(n.prototype).constructor;o!==Object&&(n=t(e,o),i=ge(ge([],i),n));return i}(t,n);return ge(ge([],r),e)}function Pe(t){var e={};return t.forEach(function(t){e[t.key.toString()]=t.value}),{inject:e[xe.INJECT_TAG],multiInject:e[xe.MULTI_INJECT_TAG],targetName:e[xe.NAME_TAG],unmanaged:e[xe.UNMANAGED_TAG]}}Se.prototype.hasTag=function(t){for(var e=0,n=this.metadata;e<n.length;e++)if(n[e].key===t)return!0;return!1},Se.prototype.isArray=function(){return this.hasTag(_e.MULTI_INJECT_TAG)},Se.prototype.matchesArray=function(t){return this.matchesTag(_e.MULTI_INJECT_TAG)(t)},Se.prototype.isNamed=function(){return this.hasTag(_e.NAMED_TAG)},Se.prototype.isTagged=function(){return this.metadata.some(function(e){return _e.NON_CUSTOM_TAG_KEYS.every(function(t){return e.key!==t})})},Se.prototype.isOptional=function(){return this.matchesTag(_e.OPTIONAL_TAG)(!0)},Se.prototype.getNamedTag=function(){return this.isNamed()?this.metadata.filter(function(t){return t.key===_e.NAMED_TAG})[0]:null},Se.prototype.getCustomTags=function(){return this.isTagged()?this.metadata.filter(function(e){return _e.NON_CUSTOM_TAG_KEYS.every(function(t){return e.key!==t})}):null},Se.prototype.matchesNamedTag=function(t){return this.matchesTag(_e.NAMED_TAG)(t)},Se.prototype.matchesTag=function(i){var o=this;return function(t){for(var e=0,n=o.metadata;e<n.length;e++){var r=n[e];if(r.key===i&&r.value===t)return!0}return!1}},u.Target=Se,h=l,ge=Nt&&Nt.__spreadArray||function(t,e){for(var n=0,r=e.length,i=t.length;n<r;n++,i++)t[i]=e[n];return t},Object.defineProperty(h,"__esModule",{value:!0}),h.getFunctionName=h.getBaseClassDependencyCount=h.getDependencies=void 0,me=ie,ve=o,be=It,xe=n,we=Yt,Object.defineProperty(h,"getFunctionName",{enumerable:!0,get:function(){return we.getFunctionName}}),Ee=u,h.getDependencies=function(t,e){return Oe(t,we.getFunctionName(e),e,!1)},h.getBaseClassDependencyCount=function t(e,n){var r,i,n=Object.getPrototypeOf(n.prototype).constructor;return n!==Object?(r=(i=Oe(e,we.getFunctionName(n),n,!0)).map(function(t){return t.metadata.filter(function(t){return t.key===xe.UNMANAGED_TAG})}),r=[].concat.apply([],r).length,0<(i=i.length-r)?i:t(e,n)):0};var c={},Ae=(Object.defineProperty(c,"__esModule",{value:!0}),c.Request=void 0,jt);function Ne(t,e,n,r,i){this.id=Ae.id(),this.serviceIdentifier=t,this.parentContext=e,this.parentRequest=n,this.target=i,this.childRequests=[],this.bindings=Array.isArray(r)?r:[r],this.requestScope=null===n?new Map:null}Ne.prototype.addChildRequest=function(t,e,n){t=new Ne(t,this.parentContext,this,e,n);return this.childRequests.push(t),t},c.Request=Ne,Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.getBindingDictionary=Ht.createMockRequest=Ht.plan=void 0;var Ce=a,Le=o,Ie=It,je=n,Re=s,De=Yt,Be=Kt,Fe=Qt,ze=re,Ve=l,Ge=c,He=u;function We(t){return t._bindingDictionary}function Ye(t,e,n,r,i){var o=Ue(n.container,i.serviceIdentifier),a=[];return o.length===Ce.BindingCount.NoBindingsAvailable&&n.container.options.autoBindInjectable&&"function"==typeof i.serviceIdentifier&&t.getConstructorMetadata(i.serviceIdentifier).compilerGeneratedMetadata&&(n.container.bind(i.serviceIdentifier).toSelf(),o=Ue(n.container,i.serviceIdentifier)),a=e?o:o.filter(function(t){var e=new Ge.Request(t.serviceIdentifier,n,r,t,i);return t.constraint(e)}),function(t,e,n,r){switch(e.length){case Ce.BindingCount.NoBindingsAvailable:if(n.isOptional())return;throw i=De.getServiceIdentifierAsString(t),o=Le.NOT_REGISTERED,o=(o+=De.listMetadataForTarget(i,n))+De.listRegisteredBindingsForServiceIdentifier(r,i,Ue),new Error(o);case Ce.BindingCount.OnlyOneBindingAvailable:if(!n.isArray())return;case Ce.BindingCount.MultipleBindingsAvailable:default:var i,o;if(n.isArray())return;throw i=De.getServiceIdentifierAsString(t),o=Le.AMBIGUOUS_MATCH+" "+i,o+=De.listRegisteredBindingsForServiceIdentifier(r,i,Ue),new Error(o)}}(i.serviceIdentifier,a,i,n.container),a}function Ue(t,e){var n=[],r=We(t);return r.hasKey(e)?n=r.get(e):null!==t.parent&&(n=Ue(t.parent,e)),n}Ht.getBindingDictionary=We,Ht.plan=function(t,e,n,r,i,o,a,s){void 0===s&&(s=!1);var l,e=new Be.Context(e),u=(r=r,u=i,l="",o=o,a=a,n=(n=n)?je.MULTI_INJECT_TAG:je.INJECT_TAG,n=new Fe.Metadata(n,u),r=new He.Target(r,l,u,n),void 0!==o&&(l=new Fe.Metadata(o,a),r.metadata.push(l)),r);try{return function i(o,t,e,a,n,s){var r,l;null===n?(r=Ye(o,t,a,null,s),l=new Ge.Request(e,a,null,r,s),e=new ze.Plan(a,l),a.addPlan(e)):(r=Ye(o,t,a,n,s),l=n.addChildRequest(s.serviceIdentifier,r,s)),r.forEach(function(t){var e=null;if(s.isArray())e=l.addChildRequest(t.serviceIdentifier,t,s);else{if(t.cache)return;e=l}if(t.type===Ie.BindingTypeEnum.Instance&&null!==t.implementationType){var n=Ve.getDependencies(o,t.implementationType);if(!a.container.options.skipBaseClassChecks){var r=Ve.getBaseClassDependencyCount(o,t.implementationType);if(n.length<r)throw r=Le.ARGUMENTS_LENGTH_MISMATCH(Ve.getFunctionName(t.implementationType)),new Error(r)}n.forEach(function(t){i(o,!1,t.serviceIdentifier,a,e,t)})}})}(t,s,i,e,null,u),e}catch(t){throw Re.isStackOverflowExeption(t)&&e.plan&&De.circularDependencyToException(e.plan.rootRequest),t}},Ht.createMockRequest=function(t,e,n,r){return n=new He.Target(Ie.TargetTypeEnum.Variable,"",e,new Fe.Metadata(n,r)),r=new Be.Context(t),new Ge.Request(e,r,null,[],n)};var h={},a={},qe=Nt&&Nt.__spreadArray||function(t,e){for(var n=0,r=e.length,i=t.length;n<r;n++,i++)t[i]=e[n];return t},Xe=(Object.defineProperty(a,"__esModule",{value:!0}),a.resolveInstance=void 0,o),Ze=It,Ke=n;a.resolveInstance=function(t,e,n){var r,i,o=null,e=(o=0<e.length?(a=e.filter(function(t){return null!==t.target&&t.target.type===Ze.TargetTypeEnum.ConstructorArgument}).map(n),o=new(t.bind.apply(t,qe([void 0],a))),r=o,a=n,i=(n=(n=e).filter(function(t){return null!==t.target&&t.target.type===Ze.TargetTypeEnum.ClassProperty})).map(a),n.forEach(function(t,e){t=t.target.name.value(),e=i[e];r[t]=e}),r):new t,t),a=o;if(Reflect.hasMetadata(Ke.POST_CONSTRUCT,e)){n=Reflect.getMetadata(Ke.POST_CONSTRUCT,e);try{a[n.value]()}catch(t){throw new Error(Xe.POST_CONSTRUCT_ERROR(e.name,t.message))}}return o},Object.defineProperty(h,"__esModule",{value:!0}),h.resolve=void 0;var $e=o,Je=It,Qe=s,tn=Yt,en=a,nn=function(e,n,t){try{return t()}catch(t){throw Qe.isStackOverflowExeption(t)?new Error($e.CIRCULAR_DEPENDENCY_IN_FACTORY(e,n.toString())):t}},rn=function(s){return function(t){t.parentContext.setCurrentRequest(t);var e=t.bindings,n=t.childRequests,r=t.target&&t.target.isArray(),i=!(t.parentRequest&&t.parentRequest.target&&t.target&&t.parentRequest.target.matchesArray(t.target.serviceIdentifier));if(r&&i)return n.map(function(t){return rn(s)(t)});r=null;if(!t.target.isOptional()||0!==e.length){var o,a=e[0],i=a.scope===Je.BindingScopeEnum.Singleton,e=a.scope===Je.BindingScopeEnum.Request;if(i&&a.activated)return a.cache;if(e&&null!==s&&s.has(a.id))return s.get(a.id);if(a.type===Je.BindingTypeEnum.ConstantValue)r=a.cache,a.activated=!0;else if(a.type===Je.BindingTypeEnum.Function)r=a.cache,a.activated=!0;else if(a.type===Je.BindingTypeEnum.Constructor)r=a.implementationType;else if(a.type===Je.BindingTypeEnum.DynamicValue&&null!==a.dynamicValue)r=nn("toDynamicValue",a.serviceIdentifier,function(){return a.dynamicValue(t.parentContext)});else if(a.type===Je.BindingTypeEnum.Factory&&null!==a.factory)r=nn("toFactory",a.serviceIdentifier,function(){return a.factory(t.parentContext)});else if(a.type===Je.BindingTypeEnum.Provider&&null!==a.provider)r=nn("toProvider",a.serviceIdentifier,function(){return a.provider(t.parentContext)});else{if(a.type!==Je.BindingTypeEnum.Instance||null===a.implementationType)throw o=tn.getServiceIdentifierAsString(t.serviceIdentifier),new Error($e.INVALID_BINDING_TYPE+" "+o);r=en.resolveInstance(a.implementationType,n,rn(s))}return"function"==typeof a.onActivation&&(r=a.onActivation(t.parentContext,r)),i&&(a.cache=r,a.activated=!0),e&&null!==s&&!s.has(a.id)&&s.set(a.id,r),r}}};h.resolve=function(t){return rn(t.plan.rootRequest.requestScope)(t.plan.rootRequest)};function on(t,e){return null!==(t=t.parentRequest)&&(!!e(t)||on(t,e))}function an(n){return function(e){function t(t){return null!==t&&null!==t.target&&t.target.matchesTag(n)(e)}return t.metaData=new sn.Metadata(n,e),t}}var Kt={},re={},l={},c={},u={},s={},a={},d=(Object.defineProperty(a,"__esModule",{value:!0}),a.typeConstraint=a.namedConstraint=a.taggedConstraint=a.traverseAncerstors=void 0,n),sn=Qt,d=(a.traverseAncerstors=on,(a.taggedConstraint=an)(d.NAMED_TAG)),ln=(a.namedConstraint=d,a.typeConstraint=function(n){return function(t){var e=null;return null!==t&&(e=t.bindings[0],"string"==typeof n?e.serviceIdentifier===n:(e=t.bindings[0].implementationType,n===e))}},Object.defineProperty(s,"__esModule",{value:!0}),s.BindingWhenSyntax=void 0,u),un=a;function cn(t){this._binding=t}cn.prototype.when=function(t){return this._binding.constraint=t,new ln.BindingOnSyntax(this._binding)},cn.prototype.whenTargetNamed=function(t){return this._binding.constraint=un.namedConstraint(t),new ln.BindingOnSyntax(this._binding)},cn.prototype.whenTargetIsDefault=function(){return this._binding.constraint=function(t){return null!==t.target&&!t.target.isNamed()&&!t.target.isTagged()},new ln.BindingOnSyntax(this._binding)},cn.prototype.whenTargetTagged=function(t,e){return this._binding.constraint=un.taggedConstraint(t)(e),new ln.BindingOnSyntax(this._binding)},cn.prototype.whenInjectedInto=function(e){return this._binding.constraint=function(t){return un.typeConstraint(e)(t.parentRequest)},new ln.BindingOnSyntax(this._binding)},cn.prototype.whenParentNamed=function(e){return this._binding.constraint=function(t){return un.namedConstraint(e)(t.parentRequest)},new ln.BindingOnSyntax(this._binding)},cn.prototype.whenParentTagged=function(e,n){return this._binding.constraint=function(t){return un.taggedConstraint(e)(n)(t.parentRequest)},new ln.BindingOnSyntax(this._binding)},cn.prototype.whenAnyAncestorIs=function(e){return this._binding.constraint=function(t){return un.traverseAncerstors(t,un.typeConstraint(e))},new ln.BindingOnSyntax(this._binding)},cn.prototype.whenNoAncestorIs=function(e){return this._binding.constraint=function(t){return!un.traverseAncerstors(t,un.typeConstraint(e))},new ln.BindingOnSyntax(this._binding)},cn.prototype.whenAnyAncestorNamed=function(e){return this._binding.constraint=function(t){return un.traverseAncerstors(t,un.namedConstraint(e))},new ln.BindingOnSyntax(this._binding)},cn.prototype.whenNoAncestorNamed=function(e){return this._binding.constraint=function(t){return!un.traverseAncerstors(t,un.namedConstraint(e))},new ln.BindingOnSyntax(this._binding)},cn.prototype.whenAnyAncestorTagged=function(e,n){return this._binding.constraint=function(t){return un.traverseAncerstors(t,un.taggedConstraint(e)(n))},new ln.BindingOnSyntax(this._binding)},cn.prototype.whenNoAncestorTagged=function(e,n){return this._binding.constraint=function(t){return!un.traverseAncerstors(t,un.taggedConstraint(e)(n))},new ln.BindingOnSyntax(this._binding)},cn.prototype.whenAnyAncestorMatches=function(e){return this._binding.constraint=function(t){return un.traverseAncerstors(t,e)},new ln.BindingOnSyntax(this._binding)},cn.prototype.whenNoAncestorMatches=function(e){return this._binding.constraint=function(t){return!un.traverseAncerstors(t,e)},new ln.BindingOnSyntax(this._binding)},s.BindingWhenSyntax=cn,Object.defineProperty(u,"__esModule",{value:!0}),u.BindingOnSyntax=void 0;var hn=s;function dn(t){this._binding=t}dn.prototype.onActivation=function(t){return this._binding.onActivation=t,new hn.BindingWhenSyntax(this._binding)},u.BindingOnSyntax=dn,Object.defineProperty(c,"__esModule",{value:!0}),c.BindingWhenOnSyntax=void 0;var pn=u,fn=s;function yn(t){this._binding=t,this._bindingWhenSyntax=new fn.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new pn.BindingOnSyntax(this._binding)}yn.prototype.when=function(t){return this._bindingWhenSyntax.when(t)},yn.prototype.whenTargetNamed=function(t){return this._bindingWhenSyntax.whenTargetNamed(t)},yn.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},yn.prototype.whenTargetTagged=function(t,e){return this._bindingWhenSyntax.whenTargetTagged(t,e)},yn.prototype.whenInjectedInto=function(t){return this._bindingWhenSyntax.whenInjectedInto(t)},yn.prototype.whenParentNamed=function(t){return this._bindingWhenSyntax.whenParentNamed(t)},yn.prototype.whenParentTagged=function(t,e){return this._bindingWhenSyntax.whenParentTagged(t,e)},yn.prototype.whenAnyAncestorIs=function(t){return this._bindingWhenSyntax.whenAnyAncestorIs(t)},yn.prototype.whenNoAncestorIs=function(t){return this._bindingWhenSyntax.whenNoAncestorIs(t)},yn.prototype.whenAnyAncestorNamed=function(t){return this._bindingWhenSyntax.whenAnyAncestorNamed(t)},yn.prototype.whenAnyAncestorTagged=function(t,e){return this._bindingWhenSyntax.whenAnyAncestorTagged(t,e)},yn.prototype.whenNoAncestorNamed=function(t){return this._bindingWhenSyntax.whenNoAncestorNamed(t)},yn.prototype.whenNoAncestorTagged=function(t,e){return this._bindingWhenSyntax.whenNoAncestorTagged(t,e)},yn.prototype.whenAnyAncestorMatches=function(t){return this._bindingWhenSyntax.whenAnyAncestorMatches(t)},yn.prototype.whenNoAncestorMatches=function(t){return this._bindingWhenSyntax.whenNoAncestorMatches(t)},yn.prototype.onActivation=function(t){return this._bindingOnSyntax.onActivation(t)},c.BindingWhenOnSyntax=yn,Object.defineProperty(l,"__esModule",{value:!0}),l.BindingInSyntax=void 0;var gn=It,mn=c;function vn(t){this._binding=t}vn.prototype.inRequestScope=function(){return this._binding.scope=gn.BindingScopeEnum.Request,new mn.BindingWhenOnSyntax(this._binding)},vn.prototype.inSingletonScope=function(){return this._binding.scope=gn.BindingScopeEnum.Singleton,new mn.BindingWhenOnSyntax(this._binding)},vn.prototype.inTransientScope=function(){return this._binding.scope=gn.BindingScopeEnum.Transient,new mn.BindingWhenOnSyntax(this._binding)},l.BindingInSyntax=vn,Object.defineProperty(re,"__esModule",{value:!0}),re.BindingInWhenOnSyntax=void 0;var bn=l,xn=u,wn=s;function En(t){this._binding=t,this._bindingWhenSyntax=new wn.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new xn.BindingOnSyntax(this._binding),this._bindingInSyntax=new bn.BindingInSyntax(t)}En.prototype.inRequestScope=function(){return this._bindingInSyntax.inRequestScope()},En.prototype.inSingletonScope=function(){return this._bindingInSyntax.inSingletonScope()},En.prototype.inTransientScope=function(){return this._bindingInSyntax.inTransientScope()},En.prototype.when=function(t){return this._bindingWhenSyntax.when(t)},En.prototype.whenTargetNamed=function(t){return this._bindingWhenSyntax.whenTargetNamed(t)},En.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},En.prototype.whenTargetTagged=function(t,e){return this._bindingWhenSyntax.whenTargetTagged(t,e)},En.prototype.whenInjectedInto=function(t){return this._bindingWhenSyntax.whenInjectedInto(t)},En.prototype.whenParentNamed=function(t){return this._bindingWhenSyntax.whenParentNamed(t)},En.prototype.whenParentTagged=function(t,e){return this._bindingWhenSyntax.whenParentTagged(t,e)},En.prototype.whenAnyAncestorIs=function(t){return this._bindingWhenSyntax.whenAnyAncestorIs(t)},En.prototype.whenNoAncestorIs=function(t){return this._bindingWhenSyntax.whenNoAncestorIs(t)},En.prototype.whenAnyAncestorNamed=function(t){return this._bindingWhenSyntax.whenAnyAncestorNamed(t)},En.prototype.whenAnyAncestorTagged=function(t,e){return this._bindingWhenSyntax.whenAnyAncestorTagged(t,e)},En.prototype.whenNoAncestorNamed=function(t){return this._bindingWhenSyntax.whenNoAncestorNamed(t)},En.prototype.whenNoAncestorTagged=function(t,e){return this._bindingWhenSyntax.whenNoAncestorTagged(t,e)},En.prototype.whenAnyAncestorMatches=function(t){return this._bindingWhenSyntax.whenAnyAncestorMatches(t)},En.prototype.whenNoAncestorMatches=function(t){return this._bindingWhenSyntax.whenNoAncestorMatches(t)},En.prototype.onActivation=function(t){return this._bindingOnSyntax.onActivation(t)},re.BindingInWhenOnSyntax=En,Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.BindingToSyntax=void 0;var _n=o,kn=It,Tn=re,Mn=c;function Sn(t){this._binding=t}Sn.prototype.to=function(t){return this._binding.type=kn.BindingTypeEnum.Instance,this._binding.implementationType=t,new Tn.BindingInWhenOnSyntax(this._binding)},Sn.prototype.toSelf=function(){if("function"!=typeof this._binding.serviceIdentifier)throw new Error(""+_n.INVALID_TO_SELF_VALUE);var t=this._binding.serviceIdentifier;return this.to(t)},Sn.prototype.toConstantValue=function(t){return this._binding.type=kn.BindingTypeEnum.ConstantValue,this._binding.cache=t,this._binding.dynamicValue=null,this._binding.implementationType=null,this._binding.scope=kn.BindingScopeEnum.Singleton,new Mn.BindingWhenOnSyntax(this._binding)},Sn.prototype.toDynamicValue=function(t){return this._binding.type=kn.BindingTypeEnum.DynamicValue,this._binding.cache=null,this._binding.dynamicValue=t,this._binding.implementationType=null,new Tn.BindingInWhenOnSyntax(this._binding)},Sn.prototype.toConstructor=function(t){return this._binding.type=kn.BindingTypeEnum.Constructor,this._binding.implementationType=t,this._binding.scope=kn.BindingScopeEnum.Singleton,new Mn.BindingWhenOnSyntax(this._binding)},Sn.prototype.toFactory=function(t){return this._binding.type=kn.BindingTypeEnum.Factory,this._binding.factory=t,this._binding.scope=kn.BindingScopeEnum.Singleton,new Mn.BindingWhenOnSyntax(this._binding)},Sn.prototype.toFunction=function(t){if("function"!=typeof t)throw new Error(_n.INVALID_FUNCTION_BINDING);t=this.toConstantValue(t);return this._binding.type=kn.BindingTypeEnum.Function,this._binding.scope=kn.BindingScopeEnum.Singleton,t},Sn.prototype.toAutoFactory=function(e){return this._binding.type=kn.BindingTypeEnum.Factory,this._binding.factory=function(t){return function(){return t.container.get(e)}},this._binding.scope=kn.BindingScopeEnum.Singleton,new Mn.BindingWhenOnSyntax(this._binding)},Sn.prototype.toProvider=function(t){return this._binding.type=kn.BindingTypeEnum.Provider,this._binding.provider=t,this._binding.scope=kn.BindingScopeEnum.Singleton,new Mn.BindingWhenOnSyntax(this._binding)},Sn.prototype.toService=function(e){this.toDynamicValue(function(t){return t.container.get(e)})},Kt.BindingToSyntax=Sn;d={},Object.defineProperty(d,"__esModule",{value:!0}),d.ContainerSnapshot=void 0,On.of=function(t,e){var n=new On;return n.bindings=t,n.middleware=e,n},l=On;function On(){}d.ContainerSnapshot=l;var u={},Pn=(Object.defineProperty(u,"__esModule",{value:!0}),u.Lookup=void 0,o);function An(){this._map=new Map}An.prototype.getMap=function(){return this._map},An.prototype.add=function(t,e){if(null==t)throw new Error(Pn.NULL_ARGUMENT);if(null==e)throw new Error(Pn.NULL_ARGUMENT);var n=this._map.get(t);void 0!==n?(n.push(e),this._map.set(t,n)):this._map.set(t,[e])},An.prototype.get=function(t){if(null==t)throw new Error(Pn.NULL_ARGUMENT);t=this._map.get(t);if(void 0!==t)return t;throw new Error(Pn.KEY_NOT_FOUND)},An.prototype.remove=function(t){if(null==t)throw new Error(Pn.NULL_ARGUMENT);if(!this._map.delete(t))throw new Error(Pn.KEY_NOT_FOUND)},An.prototype.removeByCondition=function(n){var r=this;this._map.forEach(function(t,e){t=t.filter(function(t){return!n(t)});0<t.length?r._map.set(e,t):r._map.delete(e)})},An.prototype.hasKey=function(t){if(null==t)throw new Error(Pn.NULL_ARGUMENT);return this._map.has(t)},An.prototype.clone=function(){var n=new An;return this._map.forEach(function(t,e){t.forEach(function(t){return n.add(e,t.clone())})}),n},An.prototype.traverse=function(n){this._map.forEach(function(t,e){n(e,t)})},u.Lookup=An;var Nn=Nt&&Nt.__awaiter||function(t,a,s,l){return new(s=s||Promise)(function(n,e){function r(t){try{o(l.next(t))}catch(t){e(t)}}function i(t){try{o(l.throw(t))}catch(t){e(t)}}function o(t){var e;t.done?n(t.value):((e=t.value)instanceof s?e:new s(function(t){t(e)})).then(r,i)}o((l=l.apply(t,a||[])).next())})},Cn=Nt&&Nt.__generator||function(r,i){var o,a,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},t={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(n){return function(t){var e=[n,t];if(o)throw new TypeError("Generator is already executing.");for(;l;)try{if(o=1,a&&(s=2&e[0]?a.return:e[0]?a.throw||((s=a.return)&&s.call(a),0):a.next)&&!(s=s.call(a,e[1])).done)return s;switch(a=0,(e=s?[2&e[0],s.value]:e)[0]){case 0:case 1:s=e;break;case 4:return l.label++,{value:e[1],done:!1};case 5:l.label++,a=e[1],e=[0];continue;case 7:e=l.ops.pop(),l.trys.pop();continue;default:if(!(s=0<(s=l.trys).length&&s[s.length-1])&&(6===e[0]||2===e[0])){l=0;continue}if(3===e[0]&&(!s||e[1]>s[0]&&e[1]<s[3]))l.label=e[1];else if(6===e[0]&&l.label<s[1])l.label=s[1],s=e;else{if(!(s&&l.label<s[2])){s[2]&&l.ops.pop(),l.trys.pop();continue}l.label=s[2],l.ops.push(e)}}e=i.call(r,l)}catch(t){e=[6,t],a=0}finally{o=s=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}}},Ln=Nt&&Nt.__spreadArray||function(t,e){for(var n=0,r=e.length,i=t.length;n<r;n++,i++)t[i]=e[n];return t},In=(Object.defineProperty(r,"__esModule",{value:!0}),r.Container=void 0,Lt),jn=o,Rn=It,Dn=n,Bn=zt,Fn=Ht,zn=h,Vn=Kt,Gn=jt,Hn=Yt,Wn=d,Yn=u;function Un(t){this._appliedMiddleware=[];t=t||{};if("object"!=typeof t)throw new Error(""+jn.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT);if(void 0===t.defaultScope)t.defaultScope=Rn.BindingScopeEnum.Transient;else if(t.defaultScope!==Rn.BindingScopeEnum.Singleton&&t.defaultScope!==Rn.BindingScopeEnum.Transient&&t.defaultScope!==Rn.BindingScopeEnum.Request)throw new Error(""+jn.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE);if(void 0===t.autoBindInjectable)t.autoBindInjectable=!1;else if("boolean"!=typeof t.autoBindInjectable)throw new Error(""+jn.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE);if(void 0===t.skipBaseClassChecks)t.skipBaseClassChecks=!1;else if("boolean"!=typeof t.skipBaseClassChecks)throw new Error(""+jn.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK);this.options={autoBindInjectable:t.autoBindInjectable,defaultScope:t.defaultScope,skipBaseClassChecks:t.skipBaseClassChecks},this.id=Gn.id(),this._bindingDictionary=new Yn.Lookup,this._snapshots=[],this._middleware=null,this.parent=null,this._metadataReader=new Bn.MetadataReader}Un.merge=function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=new Un,t=Ln([t,e],n).map(function(t){return Fn.getBindingDictionary(t)}),o=Fn.getBindingDictionary(i);return t.forEach(function(t){var n;n=o,t.traverse(function(t,e){e.forEach(function(t){n.add(t.serviceIdentifier,t.clone())})})}),i},Un.prototype.load=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=this._getContainerModuleHelpersFactory(),r=0,i=t;r<i.length;r++){var o=i[r],a=n(o.id);o.registry(a.bindFunction,a.unbindFunction,a.isboundFunction,a.rebindFunction)}},Un.prototype.loadAsync=function(){for(var a=[],t=0;t<arguments.length;t++)a[t]=arguments[t];return Nn(this,void 0,void 0,function(){var e,n,r,i,o;return Cn(this,function(t){switch(t.label){case 0:e=this._getContainerModuleHelpersFactory(),n=0,r=a,t.label=1;case 1:return n<r.length?(i=r[n],o=e(i.id),[4,i.registry(o.bindFunction,o.unbindFunction,o.isboundFunction,o.rebindFunction)]):[3,4];case 2:t.sent(),t.label=3;case 3:return n++,[3,1];case 4:return[2]}})})},Un.prototype.unload=function(){for(var r=this,t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];t.forEach(function(t){function e(t){return t.moduleId===n}var n;n=t.id;r._bindingDictionary.removeByCondition(e)})},Un.prototype.bind=function(t){var e=this.options.defaultScope||Rn.BindingScopeEnum.Transient,e=new In.Binding(t,e);return this._bindingDictionary.add(t,e),new Vn.BindingToSyntax(e)},Un.prototype.rebind=function(t){return this.unbind(t),this.bind(t)},Un.prototype.unbind=function(e){try{this._bindingDictionary.remove(e)}catch(t){throw new Error(jn.CANNOT_UNBIND+" "+Hn.getServiceIdentifierAsString(e))}},Un.prototype.unbindAll=function(){this._bindingDictionary=new Yn.Lookup},Un.prototype.isBound=function(t){var e=this._bindingDictionary.hasKey(t);return e=!e&&this.parent?this.parent.isBound(t):e},Un.prototype.isBoundNamed=function(t,e){return this.isBoundTagged(t,Dn.NAMED_TAG,e)},Un.prototype.isBoundTagged=function(t,e,n){var r,i,o=!1;return this._bindingDictionary.hasKey(t)&&(r=this._bindingDictionary.get(t),i=Fn.createMockRequest(this,t,e,n),o=r.some(function(t){return t.constraint(i)})),o=!o&&this.parent?this.parent.isBoundTagged(t,e,n):o},Un.prototype.snapshot=function(){this._snapshots.push(Wn.ContainerSnapshot.of(this._bindingDictionary.clone(),this._middleware))},Un.prototype.restore=function(){var t=this._snapshots.pop();if(void 0===t)throw new Error(jn.NO_MORE_SNAPSHOTS_AVAILABLE);this._bindingDictionary=t.bindings,this._middleware=t.middleware},Un.prototype.createChild=function(t){t=new Un(t||this.options);return t.parent=this,t},Un.prototype.applyMiddleware=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._appliedMiddleware=this._appliedMiddleware.concat(t);var n=this._middleware||this._planAndResolve();this._middleware=t.reduce(function(t,e){return e(t)},n)},Un.prototype.applyCustomMetadataReader=function(t){this._metadataReader=t},Un.prototype.get=function(t){return this._get(!1,!1,Rn.TargetTypeEnum.Variable,t)},Un.prototype.getTagged=function(t,e,n){return this._get(!1,!1,Rn.TargetTypeEnum.Variable,t,e,n)},Un.prototype.getNamed=function(t,e){return this.getTagged(t,Dn.NAMED_TAG,e)},Un.prototype.getAll=function(t){return this._get(!0,!0,Rn.TargetTypeEnum.Variable,t)},Un.prototype.getAllTagged=function(t,e,n){return this._get(!1,!0,Rn.TargetTypeEnum.Variable,t,e,n)},Un.prototype.getAllNamed=function(t,e){return this.getAllTagged(t,Dn.NAMED_TAG,e)},Un.prototype.resolve=function(t){var e=this.createChild();return e.bind(t).toSelf(),this._appliedMiddleware.forEach(function(t){e.applyMiddleware(t)}),e.get(t)},Un.prototype._getContainerModuleHelpersFactory=function(){function r(t,e){t._binding.moduleId=e}var i=this;return function(t){return{bindFunction:function(t){t=i.bind.bind(i)(t);return r(t,n),t},isboundFunction:function(t){return i.isBound.bind(i)(t)},rebindFunction:(e=n=t,function(t){t=i.rebind.bind(i)(t);return r(t,e),t}),unbindFunction:function(t){i.unbind.bind(i)(t)}};var e,n}},Un.prototype._get=function(t,e,n,r,i,o){var a=null,t={avoidConstraints:t,contextInterceptor:function(t){return t},isMultiInject:e,key:i,serviceIdentifier:r,targetType:n,value:o};if(this._middleware){if(null==(a=this._middleware(t)))throw new Error(jn.INVALID_MIDDLEWARE_RETURN)}else a=this._planAndResolve()(t);return a},Un.prototype._planAndResolve=function(){var n=this;return function(t){var e=Fn.plan(n._metadataReader,n,t.isMultiInject,t.targetType,t.serviceIdentifier,t.key,t.value,t.avoidConstraints),e=t.contextInterceptor(e);return zn.resolve(e)}},r.Container=Un;function qn(t){this.id=Xn.id(),this.registry=t}var s={},Xn=(Object.defineProperty(s,"__esModule",{value:!0}),s.AsyncContainerModule=s.ContainerModule=void 0,jt),re=(s.ContainerModule=function(t){this.id=Xn.id(),this.registry=t},s.AsyncContainerModule=qn,{}),Zn=(Object.defineProperty(re,"__esModule",{value:!0}),re.injectable=void 0,o),Kn=n;re.injectable=function(){return function(t){if(Reflect.hasOwnMetadata(Kn.PARAM_TYPES,t))throw new Error(Zn.DUPLICATED_INJECTABLE_DECORATOR);var e=Reflect.getMetadata(Kn.DESIGN_PARAM_TYPES,t)||[];return Reflect.defineMetadata(Kn.PARAM_TYPES,e,t),t}};var c={},$n=(Object.defineProperty(c,"__esModule",{value:!0}),c.tagged=void 0,Qt),Jn=oe;c.tagged=function(i,o){return function(t,e,n){var r=new $n.Metadata(i,o);"number"==typeof n?Jn.tagParameter(t,e,n,r):Jn.tagProperty(t,e,r)}};var l={},Qn=(Object.defineProperty(l,"__esModule",{value:!0}),l.named=void 0,n),tr=Qt,er=oe;l.named=function(i){return function(t,e,n){var r=new tr.Metadata(Qn.NAMED_TAG,i);"number"==typeof n?er.tagParameter(t,e,n,r):er.tagProperty(t,e,r)}};var Nt={},nr=(Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.optional=void 0,n),rr=Qt,ir=oe;Nt.optional=function(){return function(t,e,n){var r=new rr.Metadata(nr.OPTIONAL_TAG,!0);"number"==typeof n?ir.tagParameter(t,e,n,r):ir.tagProperty(t,e,r)}};var Lt={},or=(Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.unmanaged=void 0,n),ar=Qt,sr=oe;Lt.unmanaged=function(){return function(t,e,n){var r=new ar.Metadata(or.UNMANAGED_TAG,!0);sr.tagParameter(t,e,n,r)}};var Ht={},lr=(Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.multiInject=void 0,n),ur=Qt,cr=oe;Ht.multiInject=function(i){return function(t,e,n){var r=new ur.Metadata(lr.MULTI_INJECT_TAG,i);"number"==typeof n?cr.tagParameter(t,e,n,r):cr.tagProperty(t,e,r)}};var h={},hr=(Object.defineProperty(h,"__esModule",{value:!0}),h.targetName=void 0,n),dr=Qt,pr=oe;h.targetName=function(i){return function(t,e,n){var r=new dr.Metadata(hr.NAME_TAG,i);pr.tagParameter(t,e,n,r)}};var Kt={},fr=(Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.postConstruct=void 0,o),yr=n,gr=Qt;Kt.postConstruct=function(){return function(t,e,n){e=new gr.Metadata(yr.POST_CONSTRUCT,e);if(Reflect.hasOwnMetadata(yr.POST_CONSTRUCT,t.constructor))throw new Error(fr.MULTIPLE_POST_CONSTRUCT_METHODS);Reflect.defineMetadata(yr.POST_CONSTRUCT,e,t.constructor)}};var d={},u=(Object.defineProperty(d,"__esModule",{value:!0}),d.multiBindToService=void 0,d.multiBindToService=function(r){return function(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.forEach(function(t){return r.bind(t).toService(n)})}}},Ct),mr=(Object.defineProperty(u,"__esModule",{value:!0}),u.multiBindToService=u.getServiceIdentifierAsString=u.typeConstraint=u.namedConstraint=u.taggedConstraint=u.traverseAncerstors=u.decorate=u.id=u.MetadataReader=u.postConstruct=u.targetName=u.multiInject=u.unmanaged=u.optional=u.LazyServiceIdentifer=u.inject=u.named=u.tagged=u.injectable=u.ContainerModule=u.AsyncContainerModule=u.TargetTypeEnum=u.BindingTypeEnum=u.BindingScopeEnum=u.Container=u.METADATA_KEY=void 0,u.METADATA_KEY=n,r),vr=(Object.defineProperty(u,"Container",{enumerable:!0,get:function(){return mr.Container}}),It),br=(Object.defineProperty(u,"BindingScopeEnum",{enumerable:!0,get:function(){return vr.BindingScopeEnum}}),Object.defineProperty(u,"BindingTypeEnum",{enumerable:!0,get:function(){return vr.BindingTypeEnum}}),Object.defineProperty(u,"TargetTypeEnum",{enumerable:!0,get:function(){return vr.TargetTypeEnum}}),s),xr=(Object.defineProperty(u,"AsyncContainerModule",{enumerable:!0,get:function(){return br.AsyncContainerModule}}),Object.defineProperty(u,"ContainerModule",{enumerable:!0,get:function(){return br.ContainerModule}}),re),wr=(Object.defineProperty(u,"injectable",{enumerable:!0,get:function(){return xr.injectable}}),c),Er=(Object.defineProperty(u,"tagged",{enumerable:!0,get:function(){return wr.tagged}}),l),_r=(Object.defineProperty(u,"named",{enumerable:!0,get:function(){return Er.named}}),ie),kr=(Object.defineProperty(u,"inject",{enumerable:!0,get:function(){return _r.inject}}),Object.defineProperty(u,"LazyServiceIdentifer",{enumerable:!0,get:function(){return _r.LazyServiceIdentifer}}),Nt),Tr=(Object.defineProperty(u,"optional",{enumerable:!0,get:function(){return kr.optional}}),Lt),Mr=(Object.defineProperty(u,"unmanaged",{enumerable:!0,get:function(){return Tr.unmanaged}}),Ht),Sr=(Object.defineProperty(u,"multiInject",{enumerable:!0,get:function(){return Mr.multiInject}}),h),Or=(Object.defineProperty(u,"targetName",{enumerable:!0,get:function(){return Sr.targetName}}),Kt),Pr=(Object.defineProperty(u,"postConstruct",{enumerable:!0,get:function(){return Or.postConstruct}}),zt),Ar=(Object.defineProperty(u,"MetadataReader",{enumerable:!0,get:function(){return Pr.MetadataReader}}),jt),Nr=(Object.defineProperty(u,"id",{enumerable:!0,get:function(){return Ar.id}}),oe),Cr=(Object.defineProperty(u,"decorate",{enumerable:!0,get:function(){return Nr.decorate}}),a),Lr=(Object.defineProperty(u,"traverseAncerstors",{enumerable:!0,get:function(){return Cr.traverseAncerstors}}),Object.defineProperty(u,"taggedConstraint",{enumerable:!0,get:function(){return Cr.taggedConstraint}}),Object.defineProperty(u,"namedConstraint",{enumerable:!0,get:function(){return Cr.namedConstraint}}),Object.defineProperty(u,"typeConstraint",{enumerable:!0,get:function(){return Cr.typeConstraint}}),Yt),Ir=(Object.defineProperty(u,"getServiceIdentifierAsString",{enumerable:!0,get:function(){return Lr.getServiceIdentifierAsString}}),d),jr=(Object.defineProperty(u,"multiBindToService",{enumerable:!0,get:function(){return Ir.multiBindToService}}),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});function Rr(){throw new Error("setTimeout has not been defined")}function Dr(){throw new Error("clearTimeout has not been defined")}var Br=Rr,Fr=Dr;function zr(e){if(Br===setTimeout)return setTimeout(e,0);if((Br===Rr||!Br)&&setTimeout)return(Br=setTimeout)(e,0);try{return Br(e,0)}catch(t){try{return Br.call(null,e,0)}catch(t){return Br.call(this,e,0)}}}"function"==typeof jr.setTimeout&&(Br=setTimeout),"function"==typeof jr.clearTimeout&&(Fr=clearTimeout);var Vr,Gr=[],Hr=!1,Wr=-1;function Yr(){Hr&&Vr&&(Hr=!1,Vr.length?Gr=Vr.concat(Gr):Wr=-1,Gr.length&&Ur())}function Ur(){if(!Hr){for(var t=zr(Yr),e=(Hr=!0,Gr.length);e;){for(Vr=Gr,Gr=[];++Wr<e;)Vr&&Vr[Wr].run();Wr=-1,e=Gr.length}Vr=null,Hr=!1,!function(e){if(Fr===clearTimeout)return clearTimeout(e);if((Fr===Dr||!Fr)&&clearTimeout)return(Fr=clearTimeout)(e);try{Fr(e)}catch(t){try{return Fr.call(null,e)}catch(t){return Fr.call(this,e)}}}(t)}}function qr(t,e){this.fun=t,this.array=e}qr.prototype.run=function(){this.fun.apply(null,this.array)};function Xr(){}o=Xr,Qt=Xr,n=Xr,r=Xr,It=Xr,s=Xr,re=Xr;var Zr=jr.performance||{},Kr=Zr.now||Zr.mozNow||Zr.msNow||Zr.oNow||Zr.webkitNow||function(){return(new Date).getTime()};var $r=new Date;var Jr,p,Qr,ti,ei,ni={nextTick:function(t){var e=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];Gr.push(new qr(t,e)),1!==Gr.length||Hr||zr(Ur)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:o,addListener:Qt,once:n,off:r,removeListener:It,removeAllListeners:s,emit:re,binding:function(t){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(t){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(t){var e=.001*Kr.call(Zr),n=Math.floor(e),e=Math.floor(e%1*1e9);return t&&(n-=t[0],(e-=t[1])<0&&(n--,e+=1e9)),[n,e]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-$r)/1e3}};function ri(t){return(ri="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 ii(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,r.key,r)}}function oi(t,e,n){return e&&ii(t.prototype,e),n&&ii(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function ai(t){return(ai="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 si(t,e){return e.lifecycle===p.Lifecycle.singleton?t.inSingletonScope():t.inTransientScope()}function li(t,e){t.whenTargetNamed(hi(e))}function ui(t,e){return e.bind(di(t))}function ci(t,e){if(e.isBound(di(t)))try{return e.rebind(di(t))}catch(t){}return e.bind(di(t))}function hi(t){return ti.isDefinedToken(t)?t.symbol:t}function di(t){return ti.isDefinedToken(t)?t.symbol:t}Jr={},function(){var s,l,u,c,r,t,i,h,o,e="object"==typeof jr?jr:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),n=O(Jr);function d(t,e,n){var r=o.get(t);if(m(r)){if(!n)return;r=new i,o.set(t,r)}t=r.get(e);if(m(t)){if(!n)return;t=new i,r.set(e,t)}return t}function a(t,e,n){e=d(e,n,!1);return!m(e)&&!!e.has(t)}function p(t,e,n){e=d(e,n,!1);if(!m(e))return e.get(t)}function f(t,e,n,r){d(n,r,!0).set(t,e)}function y(t,e){var n=[],t=d(t,e,!1);if(m(t))return n;for(var r,i,o=function(t){var e=T(t,u);if(_(e)){e=e.call(t);if(b(e))return e}throw new TypeError}(t.keys()),a=0;;){var s=function(t){t=t.next();return!t.done&&t}(o);if(!s)return n.length=a,n;s=s.value;try{n[a]=s}catch(t){try{i=void 0,(i=(r=o).return)&&i.call(r)}finally{throw t}}a++}}function g(t){if(null===t)return 1;switch(typeof t){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===t?1:6;default:return 6}}function m(t){return void 0===t}function v(t){return null===t}function b(t){return"object"==typeof t?null!==t:"function"==typeof t}function x(t,e){switch(g(t)){case 0:case 1:case 2:case 3:case 4:case 5:return t}var e=3===e?"string":5===e?"number":"default",n=T(t,l);if(void 0===n){var r=t;if("string"===(a="default"==e?"number":e)){a=r.toString;if(_(a))if(!b(o=a.call(r)))return o;var i=r.valueOf;if(_(i))if(!b(o=i.call(r)))return o}else{i=r.valueOf;if(_(i))if(!b(o=i.call(r)))return o;var o,a=r.toString;if(_(a))if(!b(o=a.call(r)))return o}throw new TypeError}i=n.call(t,e);if(b(i))throw new TypeError;return i}function w(t){t=x(t,3);return"symbol"==typeof t?t:""+t}function E(t){return Array.isArray?Array.isArray(t):t instanceof Object?t instanceof Array:"[object Array]"===Object.prototype.toString.call(t)}function _(t){return"function"==typeof t}function k(t){return"function"==typeof t}function T(t,e){t=t[e];if(null!=t){if(_(t))return t;throw new TypeError}}function M(t){var e,n=Object.getPrototypeOf(t);return"function"!=typeof t||t===r||n!==r||null==(e=(e=t.prototype)&&Object.getPrototypeOf(e))||e===Object.prototype||"function"!=typeof(e=e.constructor)||e===t?n:e}function S(t){return t.__=void 0,delete t.__,t}function O(n,r){return function(t,e){"function"!=typeof n[t]&&Object.defineProperty(n,t,{configurable:!0,writable:!0,value:e}),r&&r(t,e)}}void 0===e.Reflect?e.Reflect=Jr:n=O(e.Reflect,n),e=n,s=Object.prototype.hasOwnProperty,n="function"==typeof Symbol,l=n&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",u=n&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",n="function"==typeof Object.create,t={__proto__:[]}instanceof Array,c={create:n?function(){return S(Object.create(null))}:t?function(){return S({__proto__:null})}:function(){return S({})},has:(n=!n&&!t)?function(t,e){return s.call(t,e)}:function(t,e){return e in t},get:n?function(t,e){return s.call(t,e)?t[e]:void 0}:function(t,e){return t[e]}},r=Object.getPrototypeOf(Function),t="object"==typeof ni&&ni.env&&"true"===ni.env.REFLECT_METADATA_USE_MAP_POLYFILL,i=t||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?function(){var i={},n=[],t=function(){function t(t,e,n){this._index=0,this._keys=t,this._values=e,this._selector=n}return t.prototype["@@iterator"]=function(){return this},t.prototype[u]=function(){return this},t.prototype.next=function(){var t,e=this._index;return 0<=e&&e<this._keys.length?(t=this._selector(this._keys[e],this._values[e]),e+1>=this._keys.length?(this._index=-1,this._keys=n,this._values=n):this._index++,{value:t,done:!1}):{value:void 0,done:!0}},t.prototype.throw=function(t){throw 0<=this._index&&(this._index=-1,this._keys=n,this._values=n),t},t.prototype.return=function(t){return 0<=this._index&&(this._index=-1,this._keys=n,this._values=n),{value:t,done:!0}},t}();function e(){this._keys=[],this._values=[],this._cacheKey=i,this._cacheIndex=-2}return Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),e.prototype.has=function(t){return 0<=this._find(t,!1)},e.prototype.get=function(t){t=this._find(t,!1);return 0<=t?this._values[t]:void 0},e.prototype.set=function(t,e){t=this._find(t,!0);return this._values[t]=e,this},e.prototype.delete=function(t){var e=this._find(t,!1);if(0<=e){for(var n=this._keys.length,r=e+1;r<n;r++)this._keys[r-1]=this._keys[r],this._values[r-1]=this._values[r];return this._keys.length--,this._values.length--,t===this._cacheKey&&(this._cacheKey=i,this._cacheIndex=-2),!0}return!1},e.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=i,this._cacheIndex=-2},e.prototype.keys=function(){return new t(this._keys,this._values,r)},e.prototype.values=function(){return new t(this._keys,this._values,o)},e.prototype.entries=function(){return new t(this._keys,this._values,a)},e.prototype["@@iterator"]=function(){return this.entries()},e.prototype[u]=function(){return this.entries()},e.prototype._find=function(t,e){return this._cacheKey!==t&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=t)),this._cacheIndex<0&&e&&(this._cacheIndex=this._keys.length,this._keys.push(t),this._values.push(void 0)),this._cacheIndex},e;function r(t,e){return t}function o(t,e){return e}function a(t,e){return[t,e]}}():Map,h=t||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?function(){function t(){this._map=new i}return Object.defineProperty(t.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),t.prototype.has=function(t){return this._map.has(t)},t.prototype.add=function(t){return this._map.set(t,t),this},t.prototype.delete=function(t){return this._map.delete(t)},t.prototype.clear=function(){this._map.clear()},t.prototype.keys=function(){return this._map.keys()},t.prototype.values=function(){return this._map.values()},t.prototype.entries=function(){return this._map.entries()},t.prototype["@@iterator"]=function(){return this.keys()},t.prototype[u]=function(){return this.keys()},t}():Set,o=new(t||"function"!=typeof WeakMap?function(){var i=16,e=c.create(),n=r();function t(){this._key=r()}return t.prototype.has=function(t){t=o(t,!1);return void 0!==t&&c.has(t,this._key)},t.prototype.get=function(t){t=o(t,!1);return void 0!==t?c.get(t,this._key):void 0},t.prototype.set=function(t,e){return o(t,!0)[this._key]=e,this},t.prototype.delete=function(t){t=o(t,!1);return void 0!==t&&delete t[this._key]},t.prototype.clear=function(){this._key=r()},t;function r(){for(var t;t="@@WeakMap@@"+function(){for(var t=function(t){return"function"!=typeof Uint8Array?a(new Array(t),t):"undefined"!=typeof crypto?crypto.getRandomValues(new Uint8Array(t)):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(new Uint8Array(t)):a(new Uint8Array(t),t)}(i),e=(t[6]=79&t[6]|64,t[8]=191&t[8]|128,""),n=0;n<i;++n){var r=t[n];4!==n&&6!==n&&8!==n||(e+="-"),r<16&&(e+="0"),e+=r.toString(16).toLowerCase()}return e}(),c.has(e,t););return e[t]=!0,t}function o(t,e){if(!s.call(t,n)){if(!e)return;Object.defineProperty(t,n,{value:c.create()})}return t[n]}function a(t,e){for(var n=0;n<e;++n)t[n]=255*Math.random()|0;return t}}():WeakMap),e("decorate",function(t,e,n,r){{if(m(n)){if(E(t)&&k(e))return function(t,e){for(var n=t.length-1;0<=n;--n){var r=(0,t[n])(e);if(!m(r)&&!v(r)){if(!k(r))throw new TypeError;e=r}}return e}(t,e)}else if(E(t)&&b(e)&&(b(r)||m(r)||v(r)))return v(r)&&(r=void 0),n=w(n),function(t,e,n,r){for(var i=t.length-1;0<=i;--i){var o=(0,t[i])(e,n,r);if(!m(o)&&!v(o)){if(!b(o))throw new TypeError;r=o}}return r}(t,e,n,r);throw new TypeError}}),e("metadata",function(n,r){return function(t,e){if(!b(t))throw new TypeError;if(!m(e)&&!function(t){switch(g(t)){case 3:case 4:return 1;default:return}}(e))throw new TypeError;f(n,r,t,e)}}),e("defineMetadata",function(t,e,n,r){if(!b(n))throw new TypeError;m(r)||(r=w(r));return f(t,e,n,r)}),e("hasMetadata",function(t,e,n){if(!b(e))throw new TypeError;m(n)||(n=w(n));return function t(e,n,r){var i=a(e,n,r);if(i)return!0;i=M(n);if(!v(i))return t(e,i,r);return!1}(t,e,n)}),e("hasOwnMetadata",function(t,e,n){if(!b(e))throw new TypeError;m(n)||(n=w(n));return a(t,e,n)}),e("getMetadata",function(t,e,n){if(!b(e))throw new TypeError;m(n)||(n=w(n));return function t(e,n,r){var i=a(e,n,r);if(i)return p(e,n,r);i=M(n);if(!v(i))return t(e,i,r);return}(t,e,n)}),e("getOwnMetadata",function(t,e,n){if(!b(e))throw new TypeError;m(n)||(n=w(n));return p(t,e,n)}),e("getMetadataKeys",function(t,e){if(!b(t))throw new TypeError;m(e)||(e=w(e));return function t(e,n){var r=y(e,n);e=M(e);if(null===e)return r;e=t(e,n);if(e.length<=0)return r;if(r.length<=0)return e;var i=new h;var o=[];for(var a=0,s=r;a<s.length;a++){var l=s[a];i.has(l)||(i.add(l),o.push(l))}for(var u=0,c=e;u<c.length;u++){l=c[u];i.has(l)||(i.add(l),o.push(l))}return o}(t,e)}),e("getOwnMetadataKeys",function(t,e){if(!b(t))throw new TypeError;m(e)||(e=w(e));return y(t,e)}),e("deleteMetadata",function(t,e,n){if(!b(e))throw new TypeError;m(n)||(n=w(n));var r=d(e,n,!1);return!m(r)&&(!!r.delete(t)&&(0<r.size||((t=o.get(e)).delete(n),0<t.size||o.delete(e)),!0))})}(),(Qr=p=p||{}).defineToken=function(t){return new Qr.DefinedToken(t,1<arguments.length&&void 0!==arguments[1]?arguments[1]:{multiple:!0})},c=oi(function t(e){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},r=this,i=t;if(!(r instanceof i))throw new TypeError("Cannot call a class as a function");this.prototype={},this.name=void 0,this.multiple=void 0,this.symbol=void 0;r=n.multiple,i=void 0!==r&&r;this.name=e,this.symbol=Symbol(this.name),this.multiple=i}),Qr.DefinedToken=c,Qr.isModule=function(t){return!!t&&"object"===ri(t)&&"id"in t},(l=c=Qr.Lifecycle||(Qr.Lifecycle={})).singleton="singleton",l.transient="transient",Qr.ClassOptionSymbol=Symbol("SyringeClassOptionSymbol"),Qr.DefaultOption={lifecycle:c.transient},(ei=ti=ti||{}).toArray=function(t){return Array.isArray(t)?t:void 0===t?[]:[t]},ei.isClass=function(t){return!!(t&&"function"==typeof t&&"prototype"in t)},ei.isDefinedToken=function(t){return!!(t&&"object"===ri(t)&&"symbol"in t&&"multiple"in t)},ei.isInjectOption=function(t){return!!(t&&"object"===ri(t)&&"token"in t)},ei.isNamedToken=function(t){return!!(t&&"object"===ri(t)&&"token"in t&&"named"in t)},ei.isMultipleEnabled=function(t){return ei.isDefinedToken(t)&&t.multiple};ie=new Ct.Container;function pi(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 fi(r){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?pi(Object(i),!0).forEach(function(t){var e,n;e=r,n=i[t=t],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)):pi(Object(i)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(i,t))})}return r}function yi(t){var e=0<arguments.length&&void 0!==t?t:{},n=Ct.injectable();return function(t){Reflect.defineMetadata(p.ClassOptionSymbol,fi(fi({},e),{},{target:t}),t),n(t)}}function f(t){return yi(fi(fi({},0<arguments.length&&void 0!==t?t:{}),{},{lifecycle:p.Lifecycle.singleton}))}function y(t){return Ct.inject(di(t))}var gi=Symbol("SyringeOptionSymbol");function mi(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 vi(r){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?mi(Object(i),!0).forEach(function(t){var e,n;e=r,n=i[t=t],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)):mi(Object(i)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(i,t))})}return r}function bi(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,r.key,r)}}var xi=function(){function u(t,e,n){if(!(this instanceof u))throw new TypeError("Cannot call a class as a function");this.token=void 0,this.rawToken=void 0,this.named=void 0,this.generalToken=void 0,this.option=void 0,this.register=void 0,this.mutiple=void 0,this.register=t,this.token=e,this.option=n,this.rawToken=ti.isNamedToken(e)?e.token:e,this.named=ti.isNamedToken(e)?e.named:void 0,this.mutiple=!!this.named||ti.isMultipleEnabled(this.rawToken),this.generalToken=this.rawToken}var t,e,n;return t=u,n=[{key:"resolveTarget",value:function(t,e){var n,r,i,o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};try{try{var a=Reflect.getMetadata(gi,e);a&&u.resolveOption(t,a)}catch(t){}ti.isClass(e)&&(o.useClass?((n=ti.toArray(o.useClass)).unshift(e),o.useClass=n):o.useClass=[e]);try{r=Reflect.getMetadata(p.ClassOptionSymbol,e)}catch(t){}(r=vi(vi({},r||{}),o)).token?((i=ti.toArray(r.token)).unshift(e),r.token=i):r.token=[e],u.resolveOption(t,r)}catch(t){}}},{key:"resolveOption",value:function(e,t){t=vi(vi({},u.globalConfig),t),n=ti.toArray(t.token),r=ti.toArray(t.useClass),i=ti.toArray(t.useDynamic),o=ti.toArray(t.useFactory),a=ti.toArray(t.contrib),s=t.lifecycle||p.Lifecycle.transient,n={token:n,useClass:r,lifecycle:0<a.length?p.Lifecycle.singleton:s,contrib:a,useDynamic:i,useFactory:o},"useValue"in t&&(n.useValue=t.useValue);var n,r,i,o,a,s,l=n;(0!==l.useClass.length||0!==l.useDynamic.length||0!==l.useFactory.length||"useValue"in l)&&l.token.forEach(function(t){new u(e,t,vi({},l)).resolve()})}}],(e=[{key:"resolve",value:function(){var t,e=this,n=this.register;(t=n)&&"object"===ai(t)&&"bind"in t&&"unbind"in t&&"rebind"in t&&"isBound"in t&&(this.mutiple?this.resolveMutilple(n):(this.resolveMono(n),!this.named&&0<this.option.contrib.length&&this.option.contrib.forEach(function(t){(ti.isMultipleEnabled(t)?ui:ci)(t,n).toService(e.generalToken)})))}},{key:"resolveMono",value:function(t){var e,n,r;return"useValue"in this.option?ci(this.generalToken,t).toConstantValue(this.option.useValue):0<this.option.useDynamic.length?(e=this.option.useDynamic[this.option.useDynamic.length-1],si(ci(this.generalToken,t).toDynamicValue(function(t){t=Di.getContainer(t.container);return e({container:t})}),this.option)):0<this.option.useFactory.length?(n=this.option.useFactory[this.option.useFactory.length-1],ci(this.generalToken,t).toFactory(function(t){t=Di.getContainer(t.container);return n({container:t})})):0<this.option.useClass.length?(r=this.option.useClass[this.option.useClass.length-1],si(ci(this.generalToken,t).to(r),this.option)):void 0}},{key:"resolveMutilple",value:function(n){var r=this,t=this.option.useClass.map(function(t){return si(ui(r.generalToken,n).to(t),r.option)}),e=this.option.useDynamic.map(function(e){return si(ui(r.generalToken,n).toDynamicValue(function(t){t=Di.getContainer(t.container);return e({container:t})}),r.option)}),i=this.option.useFactory.map(function(e){return ui(r.generalToken,n).toFactory(function(t){t=Di.getContainer(t.container);return e({container:t})})}),o="useValue"in this.option?ui(this.generalToken,n).toConstantValue(this.option.useValue):void 0;this.named&&(t.forEach(function(t){return r.named&&li(t,r.named)}),e.forEach(function(t){return r.named&&li(t,r.named)}),i.forEach(function(t){return r.named&&li(t,r.named)}),o&&li(o,this.named))}}])&&bi(t.prototype,e),n&&bi(t,n),Object.defineProperty(t,"prototype",{writable:!1}),u}(),wi=(xi.globalConfig=p.DefaultOption,p.defineToken("ContributionProvider"));function Ei(t){return function(t){if(Array.isArray(t))return _i(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){var n;if(t)return"string"==typeof t?_i(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)?_i(t,e):void 0}(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 _i(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 ki(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 Ti(r){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?ki(Object(i),!0).forEach(function(t){var e,n;e=r,n=i[t=t],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)):ki(Object(i)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(i,t))})}return r}function Mi(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,r.key,r)}}var Si=function(){function r(t,e,n){if(!(this instanceof r))throw new TypeError("Cannot call a class as a function");this.option={recursive:!1,cache:!0},this.services=void 0,this.serviceIdentifier=void 0,this.container=void 0,this.container=e,this.serviceIdentifier=t,n&&(this.option=Ti(Ti({},this.option),n))}var t,e,n;return t=r,(e=[{key:"setServices",value:function(t){for(var e,n=[],r=this.container;r;)r.isBound(this.serviceIdentifier)&&(e=r.getAll(this.serviceIdentifier),n.push.apply(n,Ei(e))),r=t?r.parent:void 0;return n}},{key:"getContributions",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=Ti(Ti({},this.option),t),e=t.cache,t=t.recursive;return e&&void 0!==this.services||(this.services=this.setServices(!!t)),this.services}}])&&Mi(t.prototype,e),n&&Mi(t,n),Object.defineProperty(t,"prototype",{writable:!1}),r}();function Oi(t,e,n){t({token:{token:wi,named:e},useDynamic:function(t){return new Si(e,t.container,n)},lifecycle:p.Lifecycle.singleton})}function Pi(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,r.key,r)}}var Ai=function(){function e(t){var a=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.id=void 0,this.inversifyModule=void 0,this.baseRegistry=void 0,this.optionCollection=void 0,this.inversifyRegister=function(t,e,n,r){function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};ti.isInjectOption(t)?xi.resolveOption(o,t):xi.resolveTarget(o,t,e)}var o={bind:t,unbind:e,isBound:n,rebind:r};a.baseRegistry&&a.baseRegistry(i),a.optionCollection&&a.optionCollection.forEach(function(t){return i(t)})},this.baseRegistry=t,this.inversifyModule=new Ct.ContainerModule(this.inversifyRegister),this.id=this.inversifyModule.id}var t,n,r;return t=e,(n=[{key:"options",get:function(){return this.optionCollection||(this.optionCollection=[]),this.optionCollection}},{key:"register",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach(function(t){return e.options.push(t)}),this}},{key:"contribution",value:function(){for(var r=this,t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.forEach(function(t){return r.options.push({token:{token:wi,named:e=t},useDynamic:function(t){return new Si(e,t.container,n)},lifecycle:p.Lifecycle.singleton});var e,n}),this}}])&&Pi(t.prototype,n),r&&Pi(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Ni(t){return t&&"inversifyModule"in t}function Ci(t){return new Ai(t)}function Li(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,r.key,r)}}function Ii(r){return function(t,e,n){Ct.named(hi(r))(t,e,n),y(wi)(t,e,n)}}var ji,Ri=new Map,Di=function(){function n(t){if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");this.loadedModules=[],this.container=void 0,this.inversify=!0,this.parent=void 0,this.container=t||new Ct.Container,n.setContainer(this.container,this)}var t,e,r;return t=n,r=[{key:"setContainer",value:function(t,e){return Ri.set(t.id,e)}},{key:"getContainer",value:function(t){var e=Ri.get(t.id);return e||(e=new n(t),n.setContainer(t,e),e)}},{key:"config",value:function(t){xi.globalConfig=t}}],(e=[{key:"load",value:function(t,e){var n=this;return e||!this.loadedModules.includes(t.id)?(Ni(t)&&this.container.load(t.inversifyModule),this.loadedModules.push(t.id),{dispose:function(){n.unload(t)}}):(console.warn("Unsupported module."),{dispose:function(){}})}},{key:"unload",value:function(e){Ni(e)&&(this.container.unload(e.inversifyModule),this.loadedModules=this.loadedModules.filter(function(t){return t!==e.id}))}},{key:"remove",value:function(t){return this.container.unbind(di(t))}},{key:"get",value:function(t){return this.container.get(di(t))}},{key:"getNamed",value:function(t,e){return this.container.getNamed(di(t),hi(e))}},{key:"getAll",value:function(t){return this.container.getAll(di(t))}},{key:"getAllNamed",value:function(t,e){return this.container.getAllNamed(di(t),hi(e))}},{key:"isBound",value:function(t){return this.container.isBound(di(t))}},{key:"isBoundNamed",value:function(t,e){return this.container.isBoundNamed(di(t),hi(e))}},{key:"createChild",value:function(){var t=new n(this.container.createChild());return t.parent=this,t}},{key:"register",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};ti.isInjectOption(t)?xi.resolveOption(this.container,t):xi.resolveTarget(this.container,t,e)}}])&&Li(t.prototype,e),r&&Li(t,r),Object.defineProperty(t,"prototype",{writable:!1}),n}(),Bi=new Di(ie);Bi.register.bind(Bi);function Fi(t,e,n,r,i){!function t(e,n,r,i,o){for(;r<i;){600<i-r&&(a=i-r+1,c=n-r+1,l=Math.log(a),s=.5*Math.exp(2*l/3),l=.5*Math.sqrt(l*s*(a-s)/a)*(c-a/2<0?-1:1),u=Math.max(r,Math.floor(n-c*s/a+l)),c=Math.min(i,Math.floor(n+(a-c)*s/a+l)),t(e,n,u,c,o));var a,s,l,u,c,h=e[n],d=r,p=i;for(zi(e,r,n),0<o(e[i],h)&&zi(e,r,i);d<p;){for(zi(e,d,p),d++,p--;o(e[d],h)<0;)d++;for(;0<o(e[p],h);)p--}0===o(e[r],h)?zi(e,r,p):zi(e,++p,i),p<=n&&(r=p+1),n<=p&&(i=p-1)}}(t,e,n||0,r||t.length-1,i||Vi)}function zi(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function Vi(t,e){return t<e?-1:e<t?1:0}(Nt=ji=ji||{}).Provider=wi,Nt.register=Oi;class Gi{constructor(t=9){this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}all(){return this._all(this.data,[])}search(e){let n=this.data;const r=[];if($i(e,n)){const a=this.toBBox,s=[];for(;n;){for(let t=0;t<n.children.length;t++){var i=n.children[t],o=n.leaf?a(i):i;$i(e,o)&&(n.leaf?r.push(i):Ki(e,o)?this._all(i,r):s.push(i))}n=s.pop()}}return r}collides(e){let n=this.data;if($i(e,n)){const o=[];for(;n;){for(let t=0;t<n.children.length;t++){var r=n.children[t],i=n.leaf?this.toBBox(r):r;if($i(e,i)){if(n.leaf||Ki(e,i))return!0;o.push(r)}}n=o.pop()}}return!1}load(e){if(e&&e.length)if(e.length<this._minEntries)for(let t=0;t<e.length;t++)this.insert(e[t]);else{let t=this._build(e.slice(),0,e.length-1,0);var n;this.data.children.length?this.data.height===t.height?this._splitRoot(this.data,t):(this.data.height<t.height&&(n=this.data,this.data=t,t=n),this._insert(t,this.data.height-t.height-1,!0)):this.data=t}return this}insert(t){return t&&this._insert(t,this.data.height-1),this}clear(){return this.data=Ji([]),this}remove(i,o){if(i){let t=this.data;var a=this.toBBox(i);const l=[],u=[];let e,n,r;for(;t||l.length;){if(t||(t=l.pop(),n=l[l.length-1],e=u.pop(),r=!0),t.leaf){var s=function(e,n,r){if(!r)return n.indexOf(e);for(let t=0;t<n.length;t++)if(r(e,n[t]))return t;return-1}(i,t.children,o);if(-1!==s)return t.children.splice(s,1),l.push(t),this._condense(l),this}r||t.leaf||!Ki(t,a)?n?(e++,t=n.children[e],r=!1):t=null:(l.push(t),u.push(e),e=0,t=(n=t).children[0])}}return this}toBBox(t){return t}compareMinX(t,e){return t.minX-e.minX}compareMinY(t,e){return t.minY-e.minY}toJSON(){return this.data}fromJSON(t){return this.data=t,this}_all(t,e){const n=[];for(;t;)(t.leaf?e:n).push(...t.children),t=n.pop();return e}_build(n,t,r,i){var e=r-t+1;let o=this._maxEntries,a;if(e<=o)Hi(a=Ji(n.slice(t,r+1)),this.toBBox);else{i||(i=Math.ceil(Math.log(e)/Math.log(o)),o=Math.ceil(e/Math.pow(o,i-1))),(a=Ji([])).leaf=!1,a.height=i;var s=Math.ceil(e/o),l=s*Math.ceil(Math.sqrt(o));Qi(n,t,r,l,this.compareMinX);for(let e=t;e<=r;e+=l){var u=Math.min(e+l-1,r);Qi(n,e,u,s,this.compareMinY);for(let t=e;t<=u;t+=s){var c=Math.min(t+s-1,u);a.children.push(this._build(n,t,c,i-1))}}Hi(a,this.toBBox)}return a}_chooseSubtree(i,o,t,a){for(;;){if(a.push(o),o.leaf||a.length-1===t)break;let e=1/0,n=1/0,r;for(let t=0;t<o.children.length;t++){var s=o.children[t],l=Xi(s),u=(c=i,u=s,(Math.max(u.maxX,c.maxX)-Math.min(u.minX,c.minX))*(Math.max(u.maxY,c.maxY)-Math.min(u.minY,c.minY))-l);u<n?(n=u,e=l<e?l:e,r=s):u===n&&l<e&&(e=l,r=s)}o=r||o.children[0]}var c,u;return o}_insert(t,e,n){var n=n?t:this.toBBox(t),r=[];const i=this._chooseSubtree(n,this.data,e,r);for(i.children.push(t),Yi(i,n);0<=e&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(n,r,e)}_split(t,e){const n=t[e];var r=n.children.length,i=this._minEntries,i=(this._chooseSplitAxis(n,i,r),this._chooseSplitIndex(n,i,r));const o=Ji(n.children.splice(i,n.children.length-i));o.height=n.height,o.leaf=n.leaf,Hi(n,this.toBBox),Hi(o,this.toBBox),e?t[e-1].children.push(o):this._splitRoot(n,o)}_splitRoot(t,e){this.data=Ji([t,e]),this.data.height=t.height+1,this.data.leaf=!1,Hi(this.data,this.toBBox)}_chooseSplitIndex(e,n,r){let i,o=1/0,a=1/0;for(let t=n;t<=r-n;t++){var s=Wi(e,0,t,this.toBBox),l=Wi(e,t,r,this.toBBox),u=(h=s,u=l,c=p=d=void 0,d=Math.max(h.minX,u.minX),p=Math.max(h.minY,u.minY),c=Math.min(h.maxX,u.maxX),h=Math.min(h.maxY,u.maxY),Math.max(0,c-d)*Math.max(0,h-p)),c=Xi(s)+Xi(l);u<o?(o=u,i=t,a=c<a?c:a):u===o&&c<a&&(a=c,i=t)}var h,u,d,p,c;return i||r-n}_chooseSplitAxis(t,e,n){var r=t.leaf?this.compareMinX:Ui,i=t.leaf?this.compareMinY:qi;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)}_allDistMargin(e,n,r,t){e.children.sort(t);const i=this.toBBox;var o=Wi(e,0,n,i),a=Wi(e,r-n,r,i);let s=Zi(o)+Zi(a);for(let t=n;t<r-n;t++){var l=e.children[t];Yi(o,e.leaf?i(l):l),s+=Zi(o)}for(let t=r-n-1;t>=n;t--){var u=e.children[t];Yi(a,e.leaf?i(u):u),s+=Zi(a)}return s}_adjustParentBBoxes(e,n,r){for(let t=r;0<=t;t--)Yi(n[t],e)}_condense(n){for(let t=n.length-1,e;0<=t;t--)0===n[t].children.length?0<t?(e=n[t-1].children).splice(e.indexOf(n[t]),1):this.clear():Hi(n[t],this.toBBox)}}function Hi(t,e){Wi(t,0,t.children.length,e,t)}function Wi(e,n,r,i,o){(o=o||Ji(null)).minX=1/0,o.minY=1/0,o.maxX=-1/0,o.maxY=-1/0;for(let t=n;t<r;t++){var a=e.children[t];Yi(o,e.leaf?i(a):a)}return o}function Yi(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 Ui(t,e){return t.minX-e.minX}function qi(t,e){return t.minY-e.minY}function Xi(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function Zi(t){return t.maxX-t.minX+(t.maxY-t.minY)}function Ki(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function $i(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function Ji(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function Qi(t,e,n,r,i){const o=[e,n];for(;o.length;){var a;(n=o.pop())-(e=o.pop())<=r||(Fi(t,a=e+Math.ceil((n-e)/r/2)*r,e,n,i),o.push(e,a,a,n))}}var to=1e-6,eo="undefined"!=typeof Float32Array?Float32Array:Array;function no(){var t=new eo(9);return eo!=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 ro=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],e=e[8],h=n[0],d=n[1],p=n[2],f=n[3],y=n[4],g=n[5],m=n[6],v=n[7],n=n[8];return t[0]=h*r+d*a+p*u,t[1]=h*i+d*s+p*c,t[2]=h*o+d*l+p*e,t[3]=f*r+y*a+g*u,t[4]=f*i+y*s+g*c,t[5]=f*o+y*l+g*e,t[6]=m*r+v*a+n*u,t[7]=m*i+v*s+n*c,t[8]=m*o+v*l+n*e,t};function io(){var t=new eo(16);return eo!=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 oo(t){var e=new eo(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}function ao(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 so(t,e,n,r,i,o,a,s,l,u,c,h,d,p,f,y,g){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s,t[7]=l,t[8]=u,t[9]=c,t[10]=h,t[11]=d,t[12]=p,t[13]=f,t[14]=y,t[15]=g,t}function lo(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 uo(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],h=e[9],d=e[10],p=e[11],f=e[12],y=e[13],g=e[14],e=e[15],m=n*s-r*a,v=n*l-i*a,b=n*u-o*a,x=r*l-i*s,w=r*u-o*s,E=i*u-o*l,_=c*y-h*f,k=c*g-d*f,T=c*e-p*f,M=h*g-d*y,S=h*e-p*y,O=d*e-p*g,P=m*O-v*S+b*M+x*T-w*k+E*_;return P?(t[0]=(s*O-l*S+u*M)*(P=1/P),t[1]=(i*S-r*O-o*M)*P,t[2]=(y*E-g*w+e*x)*P,t[3]=(d*w-h*E-p*x)*P,t[4]=(l*T-a*O-u*k)*P,t[5]=(n*O-i*T+o*k)*P,t[6]=(g*b-f*E-e*v)*P,t[7]=(c*E-d*b+p*v)*P,t[8]=(a*S-s*T+u*_)*P,t[9]=(r*T-n*S-o*_)*P,t[10]=(f*w-y*b+e*m)*P,t[11]=(h*b-c*w-p*m)*P,t[12]=(s*k-a*M-l*_)*P,t[13]=(n*M-r*k+i*_)*P,t[14]=(y*v-f*x-g*m)*P,t[15]=(c*x-h*v+d*m)*P,t):null}function co(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],h=e[8],d=e[9],p=e[10],f=e[11],y=e[12],g=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*h+w*y,t[1]=v*i+b*l+x*d+w*g,t[2]=v*o+b*u+x*p+w*m,t[3]=v*a+b*c+x*f+w*e,v=n[4],b=n[5],x=n[6],w=n[7],t[4]=v*r+b*s+x*h+w*y,t[5]=v*i+b*l+x*d+w*g,t[6]=v*o+b*u+x*p+w*m,t[7]=v*a+b*c+x*f+w*e,v=n[8],b=n[9],x=n[10],w=n[11],t[8]=v*r+b*s+x*h+w*y,t[9]=v*i+b*l+x*d+w*g,t[10]=v*o+b*u+x*p+w*m,t[11]=v*a+b*c+x*f+w*e,v=n[12],b=n[13],x=n[14],w=n[15],t[12]=v*r+b*s+x*h+w*y,t[13]=v*i+b*l+x*d+w*g,t[14]=v*o+b*u+x*p+w*m,t[15]=v*a+b*c+x*f+w*e,t}function ho(t,e,n){var r,i,o,a,s,l,u,c,h,d,p,f,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],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],h=e[8],d=e[9],p=e[10],f=e[11],t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t[6]=u,t[7]=c,t[8]=h,t[9]=d,t[10]=p,t[11]=f,t[12]=r*y+s*g+h*n+e[12],t[13]=i*y+l*g+d*n+e[13],t[14]=o*y+u*g+p*n+e[14],t[15]=a*y+c*g+f*n+e[15]),t}function po(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 fo(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[4],o=e[5],a=e[6],s=e[7],l=e[8],u=e[9],c=e[10],h=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]=o*n+u*r,t[6]=a*n+c*r,t[7]=s*n+h*r,t[8]=l*n-i*r,t[9]=u*n-o*r,t[10]=c*n-a*r,t[11]=h*n-s*r,t}function yo(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[0],o=e[1],a=e[2],s=e[3],l=e[8],u=e[9],c=e[10],h=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]=o*n-u*r,t[2]=a*n-c*r,t[3]=s*n-h*r,t[8]=i*r+l*n,t[9]=o*r+u*n,t[10]=a*r+c*n,t[11]=s*r+h*n,t}function go(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 mo(t,e,n){var r=e[0],i=e[1],o=e[2],e=e[3],a=r+r,s=i+i,l=o+o,u=r*a,c=r*s,r=r*l,h=i*s,i=i*l,o=o*l,a=e*a,s=e*s,e=e*l;return t[0]=1-(h+o),t[1]=c+e,t[2]=r-s,t[3]=0,t[4]=c-e,t[5]=1-(u+o),t[6]=i+a,t[7]=0,t[8]=r+s,t[9]=i-a,t[10]=1-(u+h),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function vo(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function bo(t,e){var n=e[0],r=e[1],i=e[2],o=e[4],a=e[5],s=e[6],l=e[8],u=e[9],e=e[10];return t[0]=Math.hypot(n,r,i),t[1]=Math.hypot(o,a,s),t[2]=Math.hypot(l,u,e),t}function xo(t,e){var n=new eo(3),r=(bo(n,e),1/n[0]),i=1/n[1],n=1/n[2],o=e[0]*r,a=e[1]*i,s=e[2]*n,l=e[4]*r,u=e[5]*i,c=e[6]*n,r=e[8]*r,i=e[9]*i,e=e[10]*n,n=o+u+e,h=0;return 0<n?(h=2*Math.sqrt(1+n),t[3]=.25*h,t[0]=(c-i)/h,t[1]=(r-s)/h,t[2]=(a-l)/h):u<o&&e<o?(h=2*Math.sqrt(1+o-u-e),t[3]=(c-i)/h,t[0]=.25*h,t[1]=(a+l)/h,t[2]=(r+s)/h):e<u?(h=2*Math.sqrt(1+u-o-e),t[3]=(r-s)/h,t[0]=(a+l)/h,t[1]=.25*h,t[2]=(c+i)/h):(h=2*Math.sqrt(1+e-o-u),t[3]=(a-l)/h,t[0]=(r+s)/h,t[1]=(c+i)/h,t[2]=.25*h),t}function wo(t,e,n,r,i){var o=e[0],a=e[1],s=e[2],e=e[3],l=o+o,u=a+a,c=s+s,h=o*l,d=o*u,o=o*c,p=a*u,a=a*c,s=s*c,l=e*l,u=e*u,e=e*c,c=r[0],f=r[1],r=r[2],y=i[0],g=i[1],i=i[2],m=(1-(p+s))*c,v=(d+e)*c,c=(o-u)*c,d=(d-e)*f,e=(1-(h+s))*f,s=(a+l)*f,f=(o+u)*r,o=(a-l)*r,u=(1-(h+p))*r;return t[0]=m,t[1]=v,t[2]=c,t[3]=0,t[4]=d,t[5]=e,t[6]=s,t[7]=0,t[8]=f,t[9]=o,t[10]=u,t[11]=0,t[12]=n[0]+y-(m*y+d*g+f*i),t[13]=n[1]+g-(v*y+e*g+o*i),t[14]=n[2]+i-(c*y+s*g+u*i),t[15]=1,t}function Eo(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],o=n+n,a=r+r,s=i+i,n=n*o,l=r*o,r=r*a,u=i*o,c=i*a,i=i*s,o=e*o,a=e*a,e=e*s;return t[0]=1-r-i,t[1]=l+e,t[2]=u-a,t[3]=0,t[4]=l-e,t[5]=1-n-i,t[6]=c+o,t[7]=0,t[8]=u+a,t[9]=c-o,t[10]=1-n-r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function _o(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 ko(t,e,n,r,i,o,a){var s=1/(e-n),l=1/(r-i),u=1/(o-a);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*u,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*l,t[14]=(a+o)*u,t[15]=1,t}var To=ko;function Mo(t,e,n,r){var i,o,a,s,l=e[0],u=e[1],e=e[2],c=r[0],h=r[1],r=r[2],d=n[0],p=n[1],n=n[2];return Math.abs(l-d)<to&&Math.abs(u-p)<to&&Math.abs(e-n)<to?lo(t):(n=e-n,i=h*(n*=s=1/Math.hypot(d=l-d,p=u-p,n))-r*(p*=s),r=r*(d*=s)-c*n,c=c*p-h*d,(s=Math.hypot(i,r,c))?(i*=s=1/s,r*=s,c*=s):c=r=i=0,h=p*c-n*r,o=n*i-d*c,a=d*r-p*i,(s=Math.hypot(h,o,a))?(h*=s=1/s,o*=s,a*=s):a=o=h=0,t[0]=i,t[1]=h,t[2]=d,t[3]=0,t[4]=r,t[5]=o,t[6]=p,t[7]=0,t[8]=c,t[9]=a,t[10]=n,t[11]=0,t[12]=-(i*l+r*u+c*e),t[13]=-(h*l+o*u+a*e),t[14]=-(d*l+p*u+n*e),t[15]=1,t)}function So(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 Oo=Object.freeze({__proto__:null,create:io,clone:oo,copy:ao,fromValues:function(t,e,n,r,i,o,a,s,l,u,c,h,d,p,f,y){var g=new eo(16);return g[0]=t,g[1]=e,g[2]=n,g[3]=r,g[4]=i,g[5]=o,g[6]=a,g[7]=s,g[8]=l,g[9]=u,g[10]=c,g[11]=h,g[12]=d,g[13]=p,g[14]=f,g[15]=y,g},set:so,identity:lo,transpose:function(t,e){var n,r,i,o,a,s;return t===e?(n=e[1],r=e[2],i=e[3],o=e[6],a=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]=o,t[11]=e[14],t[12]=i,t[13]=a,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},invert:uo,adjoint:function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],h=e[9],d=e[10],p=e[11],f=e[12],y=e[13],g=e[14],e=e[15];return t[0]=s*(d*e-p*g)-h*(l*e-u*g)+y*(l*p-u*d),t[1]=-(r*(d*e-p*g)-h*(i*e-o*g)+y*(i*p-o*d)),t[2]=r*(l*e-u*g)-s*(i*e-o*g)+y*(i*u-o*l),t[3]=-(r*(l*p-u*d)-s*(i*p-o*d)+h*(i*u-o*l)),t[4]=-(a*(d*e-p*g)-c*(l*e-u*g)+f*(l*p-u*d)),t[5]=n*(d*e-p*g)-c*(i*e-o*g)+f*(i*p-o*d),t[6]=-(n*(l*e-u*g)-a*(i*e-o*g)+f*(i*u-o*l)),t[7]=n*(l*p-u*d)-a*(i*p-o*d)+c*(i*u-o*l),t[8]=a*(h*e-p*y)-c*(s*e-u*y)+f*(s*p-u*h),t[9]=-(n*(h*e-p*y)-c*(r*e-o*y)+f*(r*p-o*h)),t[10]=n*(s*e-u*y)-a*(r*e-o*y)+f*(r*u-o*s),t[11]=-(n*(s*p-u*h)-a*(r*p-o*h)+c*(r*u-o*s)),t[12]=-(a*(h*g-d*y)-c*(s*g-l*y)+f*(s*d-l*h)),t[13]=n*(h*g-d*y)-c*(r*g-i*y)+f*(r*d-i*h),t[14]=-(n*(s*g-l*y)-a*(r*g-i*y)+f*(r*l-i*s)),t[15]=n*(s*d-l*h)-a*(r*d-i*h)+c*(r*l-i*s),t},determinant:function(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],l=t[7],u=t[8],c=t[9],h=t[10],d=t[11],p=t[12],f=t[13],y=t[14],t=t[15];return(e*a-n*o)*(h*t-d*y)-(e*s-r*o)*(c*t-d*f)+(e*l-i*o)*(c*y-h*f)+(n*s-r*a)*(u*t-d*p)-(n*l-i*a)*(u*y-h*p)+(r*l-i*s)*(u*f-c*p)},multiply:co,translate:ho,scale:po,rotate:function(t,e,n,r){var i,o,a,s,l,u,c,h,d,p,f,y,g,m,v,b,x,w,E,_,k=r[0],T=r[1],r=r[2],M=Math.hypot(k,T,r);return M<to?null:(k*=M=1/M,T*=M,r*=M,M=Math.sin(n),n=Math.cos(n),o=e[0],a=e[1],s=e[2],l=e[3],u=e[4],c=e[5],h=e[6],d=e[7],p=e[8],f=e[9],y=e[10],g=e[11],v=k*T*(i=1-n)-r*M,b=T*T*i+n,x=r*T*i+k*M,w=k*r*i+T*M,E=T*r*i-k*M,_=r*r*i+n,t[0]=o*(n=k*k*i+n)+u*(m=T*k*i+r*M)+p*(r=r*k*i-T*M),t[1]=a*n+c*m+f*r,t[2]=s*n+h*m+y*r,t[3]=l*n+d*m+g*r,t[4]=o*v+u*b+p*x,t[5]=a*v+c*b+f*x,t[6]=s*v+h*b+y*x,t[7]=l*v+d*b+g*x,t[8]=o*w+u*E+p*_,t[9]=a*w+c*E+f*_,t[10]=s*w+h*E+y*_,t[11]=l*w+d*E+g*_,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)},rotateX:fo,rotateY:yo,rotateZ:function(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[0],o=e[1],a=e[2],s=e[3],l=e[4],u=e[5],c=e[6],h=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]=o*n+u*r,t[2]=a*n+c*r,t[3]=s*n+h*r,t[4]=l*n-i*r,t[5]=u*n-o*r,t[6]=c*n-a*r,t[7]=h*n-s*r,t},fromTranslation:go,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],o=n[1],n=n[2],a=Math.hypot(i,o,n);return a<to?null:(i*=a=1/a,o*=a,n*=a,a=Math.sin(e),e=Math.cos(e),t[0]=i*i*(r=1-e)+e,t[1]=o*i*r+n*a,t[2]=n*i*r-o*a,t[3]=0,t[4]=i*o*r-n*a,t[5]=o*o*r+e,t[6]=n*o*r+i*a,t[7]=0,t[8]=i*n*r+o*a,t[9]=o*n*r-i*a,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:mo,fromQuat2:function(t,e){var n=new eo(3),r=-e[0],i=-e[1],o=-e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],h=r*r+i*i+o*o+a*a;return 0<h?(n[0]=2*(s*a+c*r+l*o-u*i)/h,n[1]=2*(l*a+c*i+u*r-s*o)/h,n[2]=2*(u*a+c*o+s*i-l*r)/h):(n[0]=2*(s*a+c*r+l*o-u*i),n[1]=2*(l*a+c*i+u*r-s*o),n[2]=2*(u*a+c*o+s*i-l*r)),mo(t,e,n),t},getTranslation:vo,getScaling:bo,getRotation:xo,fromRotationTranslationScale:function(t,e,n,r){var i=e[0],o=e[1],a=e[2],e=e[3],s=i*(c=i+i),l=i*(h=o+o),i=i*(d=a+a),u=o*h,o=o*d,a=a*d,c=e*c,h=e*h,e=e*d,d=r[0],p=r[1],r=r[2];return t[0]=(1-(u+a))*d,t[1]=(l+e)*d,t[2]=(i-h)*d,t[3]=0,t[4]=(l-e)*p,t[5]=(1-(s+a))*p,t[6]=(o+c)*p,t[7]=0,t[8]=(i+h)*r,t[9]=(o-c)*r,t[10]=(1-(s+u))*r,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t},fromRotationTranslationScaleOrigin:wo,fromQuat:Eo,frustum:function(t,e,n,r,i,o,a){var s=1/(n-e),l=1/(i-r),u=1/(o-a);return t[0]=2*o*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*l,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*l,t[10]=(a+o)*u,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*u,t[15]=0,t},perspectiveNO:_o,perspective:_o,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),o=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),e=Math.tan(e.rightDegrees*Math.PI/180),s=2/(a+e),l=2/(i+o);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]=-(a-e)*s*.5,t[9]=(i-o)*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:ko,ortho:To,orthoZO:function(t,e,n,r,i,o,a){var s=1/(e-n),l=1/(r-i),a=1/(o-a);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]=a,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*l,t[14]=o*a,t[15]=1,t},lookAt:Mo,targetTo:function(t,e,n,r){var i=e[0],o=e[1],e=e[2],a=r[0],s=r[1],r=r[2],l=i-n[0],u=o-n[1],n=e-n[2],c=l*l+u*u+n*n,h=(0<c&&(l*=c=1/Math.sqrt(c),u*=c,n*=c),s*n-r*u);return 0<(c=h*h+(r=r*l-a*n)*r+(a=a*u-s*l)*a)&&(h*=c=1/Math.sqrt(c),r*=c,a*=c),t[0]=h,t[1]=r,t[2]=a,t[3]=0,t[4]=u*a-n*r,t[5]=n*h-l*a,t[6]=l*r-u*h,t[7]=0,t[8]=l,t[9]=u,t[10]=n,t[11]=0,t[12]=i,t[13]=o,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:So,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],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],h=t[9],d=t[10],p=t[11],f=t[12],y=t[13],g=t[14],t=t[15],m=e[0],v=e[1],b=e[2],x=e[3],w=e[4],E=e[5],_=e[6],k=e[7],T=e[8],M=e[9],S=e[10],O=e[11],P=e[12],A=e[13],N=e[14],e=e[15];return Math.abs(n-m)<=to*Math.max(1,Math.abs(n),Math.abs(m))&&Math.abs(r-v)<=to*Math.max(1,Math.abs(r),Math.abs(v))&&Math.abs(i-b)<=to*Math.max(1,Math.abs(i),Math.abs(b))&&Math.abs(o-x)<=to*Math.max(1,Math.abs(o),Math.abs(x))&&Math.abs(a-w)<=to*Math.max(1,Math.abs(a),Math.abs(w))&&Math.abs(s-E)<=to*Math.max(1,Math.abs(s),Math.abs(E))&&Math.abs(l-_)<=to*Math.max(1,Math.abs(l),Math.abs(_))&&Math.abs(u-k)<=to*Math.max(1,Math.abs(u),Math.abs(k))&&Math.abs(c-T)<=to*Math.max(1,Math.abs(c),Math.abs(T))&&Math.abs(h-M)<=to*Math.max(1,Math.abs(h),Math.abs(M))&&Math.abs(d-S)<=to*Math.max(1,Math.abs(d),Math.abs(S))&&Math.abs(p-O)<=to*Math.max(1,Math.abs(p),Math.abs(O))&&Math.abs(f-P)<=to*Math.max(1,Math.abs(f),Math.abs(P))&&Math.abs(y-A)<=to*Math.max(1,Math.abs(y),Math.abs(A))&&Math.abs(g-N)<=to*Math.max(1,Math.abs(g),Math.abs(N))&&Math.abs(t-e)<=to*Math.max(1,Math.abs(t),Math.abs(e))},mul:co,sub:So});function m(){var t=new eo(3);return eo!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function Po(t){var e=new eo(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function Ao(t){var e=t[0],n=t[1],t=t[2];return Math.hypot(e,n,t)}function _(t,e,n){var r=new eo(3);return r[0]=t,r[1]=e,r[2]=n,r}function No(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function Co(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function Lo(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function Io(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function jo(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function Ro(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 Do(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Bo(t,e,n,r){var i=e[0],o=e[1],e=e[2];t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=e+r*(n[2]-e)}function Fo(t,e,n){var r=e[0],i=e[1],e=e[2],o=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])/(o=o||1),t[1]=(n[1]*r+n[5]*i+n[9]*e+n[13])/o,t[2]=(n[2]*r+n[6]*i+n[10]*e+n[14])/o,t}function zo(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 Vo(t,e){var n=t[0],r=t[1],t=t[2],i=e[0],o=e[1],e=e[2];return Math.abs(n-i)<=to*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(r-o)<=to*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(t-e)<=to*Math.max(1,Math.abs(t),Math.abs(e))}var Go=Io,Ho=function(t,e){var n=e[0]-t[0],r=e[1]-t[1],e=e[2]-t[2];return Math.hypot(n,r,e)},Wo=Ao;function Yo(){var t=new eo(4);return eo!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function Uo(t,e,n){var r=e[0],i=e[1],o=e[2],e=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*e,t[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*e,t[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*e,t[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*e,t}function qo(){var t=new eo(4);return eo!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function Xo(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 Zo(t,e,n){var r=e[0],i=e[1],o=e[2],e=e[3],a=n[0],s=n[1],l=n[2],n=n[3];return t[0]=r*n+e*a+i*l-o*s,t[1]=i*n+e*s+o*a-r*l,t[2]=o*n+e*l+r*s-i*a,t[3]=e*n-r*a-i*s-o*l,t}function Ko(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],o=n*n+r*r+i*i+e*e,o=o?1/o:0;return t[0]=-n*o,t[1]=-r*o,t[2]=-i*o,t[3]=e*o,t}function $o(t,e,n,r){var i=.5*Math.PI/180,i=(e*=i,n*=i,r*=i,Math.sin(e)),e=Math.cos(e),o=Math.sin(n),n=Math.cos(n),a=Math.sin(r),r=Math.cos(r);t[0]=i*n*r-e*o*a,t[1]=e*o*r+i*n*a,t[2]=e*n*a-i*o*r,t[3]=e*n*r+i*o*a}m(),Yo();var Jo=function(t,e,n,r){var i=new eo(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i},Qo=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},ta=Zo,ea=function(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],o=n*n+r*r+i*i+e*e;return 0<o&&(o=1/Math.sqrt(o)),t[0]=n*o,t[1]=r*o,t[2]=i*o,t[3]=e*o,t};function na(t,e){var n=new eo(2);return n[0]=t,n[1]=e,n}function ra(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function ia(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function oa(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}function aa(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function sa(t,e){var n=e[0]-t[0],e=e[1]-t[1];return Math.hypot(n,e)}function la(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(),_(1,0,0),_(0,1,0),qo(),qo(),no();var ua=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t};function ca(t){return t.map(function(t){return Array.isArray(t)?[].concat(t):t})}Lt=new eo(2),eo!=Float32Array&&(Lt[0]=0,Lt[1]=0);var ha={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};var da={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function pa(t){return Array.isArray(t)&&t.every(function(t){var e=t[0].toLowerCase();return da[e]===t.length-1&&"achlmqstvz".includes(e)})}function fa(t){return pa(t)&&t.every(function(t){t=t[0];return t===t.toUpperCase()})}function ya(t){return fa(t)&&t.every(function(t){t=t[0];return"ACLMQZ".includes(t)})}function ga(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=da[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,da[n]))),da[n]););}function ma(t){return 48<=t&&t<=57}function va(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 ba(t){var e,n,r,i,o,a=t.max,s=t.pathValue,l=t.index,u=s.charCodeAt(l),c=da[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}}(u)){if(t.index+=1,va(t),t.data=[],c)for(;;){for(var h=c;0<h;--h){if(97!=(32|u)||3!==h&&4!==h?function(t){var e,n,r=t.max,i=t.pathValue,o=t.index,a=o,s=!1,l=!1,u=!1;if(r<=a)t.err="[path-util]: Invalid path value at index "+a+', "pathValue" is missing param';else if(ma(n=43!==(n=i.charCodeAt(a))&&45!==n?n:i.charCodeAt(a+=1))||46===n){if(46!==n){if(e=48===n,n=i.charCodeAt(a+=1),e&&a<r&&n&&ma(n))return t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" illegal number';for(;a<r&&ma(i.charCodeAt(a));)a+=1,s=!0;n=i.charCodeAt(a)}if(46===n){for(u=!0,a+=1;ma(i.charCodeAt(a));)a+=1,l=!0;n=i.charCodeAt(a)}if(101===n||69===n){if(u&&!s&&!l)return t.err="[path-util]: Invalid path value at index "+a+', "'+i[a]+'" invalid float exponent';if(43!==(n=i.charCodeAt(a+=1))&&45!==n||(a+=1),!(a<r&&ma(i.charCodeAt(a))))return t.err="[path-util]: Invalid path value at index "+a+', "'+i[a]+'" invalid integer exponent';for(;a<r&&ma(i.charCodeAt(a));)a+=1}t.index=a,t.param=+t.pathValue.slice(o,a)}else t.err="[path-util]: Invalid path value at index "+a+', "'+i[a]+'" is not a number'}(t):(o=i=r=void 0,r=(n=t).index,i=n.pathValue,48===(o=i.charCodeAt(r))?(n.param=0,n.index+=1):49===o?(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),va(t),t.index<a&&44===s.charCodeAt(t.index)&&(t.index+=1,va(t))}if(t.index>=t.max)break;if(!(48<=(e=s.charCodeAt(t.index))&&e<=57||43===e||45===e||46===e))break}ga(t)}else t.err='[path-util]: Invalid path value "'+s[l]+'" is not a path command'}var xa=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 wa(t){var a,s,l,u;return fa(t)?ca(t):(t=function(t){if(pa(t))return ca(t);var e=new xa(t);for(va(e);e.index<e.max&&!e.err.length;)ba(e);return e.err||e.segments}(t),u=l=s=a=0,t.map(function(t){var e=t.slice(1).map(Number),t=t[0],n=t.toUpperCase();if("M"===t)return a=e[0],s=e[1],["M",l=a,u=s];if(t!==n)switch(n){case"A":i=[n,e[0],e[1],e[2],e[3],e[4],e[5]+a,e[6]+s];break;case"V":i=[n,e[0]+s];break;case"H":i=[n,e[0]+a];break;default:var r=e.map(function(t,e){return t+(e%2?s:a)}),i=[n].concat(r)}else i=[n].concat(e);var o=i.length;switch(n){case"Z":a=l,s=u;break;case"H":a=i[1];break;case"V":s=i[1];break;default:a=i[o-2],s=i[o-1],"M"===n&&(l=a,u=s)}return i}))}function Ea(t){if(ya(t))return ca(t);for(var e,n,r,i,o,a,s,l=wa(t),u=T({},ha),c=0;c<l.length;c+=1){l[c]=(e=l[c],n=u,s=a=d=o=h=i=r=void 0,r=e[0],i=n.x1,h=n.y1,o=n.x2,d=n.y2,a=e.slice(1).map(Number),s=e,"TQ".includes(r)||(n.qx=null,n.qy=null),"H"===r?s=["L",e[1],h]:"V"===r?s=["L",i,e[1]]:"S"===r?(e=2*h-d,s=["C",n.x1=2*i-o,n.y1=e].concat(a)):"T"===r?(d=2*i-n.qx,o=2*h-n.qy,s=["Q",n.qx=d,n.qy=o].concat(a)):"Q"===r&&(e=a[0],i=a[1],n.qx=e,n.qy=i),s);var h=l[c],d=h.length;u.x1=+h[d-2],u.y1=+h[d-1],u.x2=+h[d-4]||u.x1,u.y2=+h[d-3]||u.y1}return l}function _a(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}function ka(t,e,n){var r=t[0],t=t[1];return[r+(e[0]-r)*n,t+(e[1]-t)*n]}function Ta(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function Ma(t,e,n,r,i){var o=Ta([t,e],[n,r]),a={x:0,y:0};return{length:o,point:a="number"==typeof i?i<=0?{x:t,y:e}:o<=i?{x:n,y:r}:{x:(i=ka([t,e],[n,r],i/o))[0],y:i[1]}:a,min:{x:Math.min(t,n),y:Math.min(e,r)},max:{x:Math.max(t,n),y:Math.max(e,r)}}}function Sa(t,e,n,r){var t=[t,e],e=[n,r],i=ka(t,e,.5),e=ka(e,i,.5),o=ka(i,e,.5),a=ka(e,o,.5),s=ka(o,a,.5),t=Ma(t[0],t[1],i[0],i[1],o[0]).point,i=Ma(s[0],s[1],a[0],a[1],e[0]).point;return[t.x,t.y,i.x,i.y,n,r]}function Oa(t,e){var n,r,i,o,a,s,l=t[0],u=t.slice(1).map(Number),c=u[0],h=u[1],d=e.x1,p=e.y1,f=e.x,y=e.y;switch("TQ".includes(l)||(e.qx=null,e.qy=null),l){case"M":return e.x=c,e.y=h,t;case"A":return s=[d,p].concat(u),["C"].concat(function t(e,n,r,i,o,a,s,l,u,c){var h=120*Math.PI/180,d=Math.PI/180*(+o||0),p=[],f=(c?(x=c[0],w=c[1],v=c[2],b=c[3]):(e=(g=_a(e,n,-d)).x,n=g.y,1<(f=(y=(e-(l=(g=_a(l,u,-d)).x))/2)*y/(r*r)+(g=(n-(u=g.y))/2)*g/(i*i))&&(r*=f=Math.sqrt(f),i*=f),f=r*r,m=i*i,v=(a=(a===s?-1:1)*Math.sqrt(Math.abs((f*m-f*g*g-m*y*y)/(f*g*g+m*y*y))))*r*g/i+(e+l)/2,b=a*-i*y/r+(n+u)/2,x=Math.asin(((n-b)/i*Math.pow(10,9)>>0)/Math.pow(10,9)),w=Math.asin(((u-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),y=(Math.abs(f)>h&&(m=w,g=l,a=u,w=x+h*(s&&x<w?1:-1),p=t(l=v+r*Math.cos(w),u=b+i*Math.sin(w),r,i,o,0,s,g,a,[w,m,v,b])),f=w-x,Math.cos(x)),h=Math.sin(x),o=Math.cos(w),s=Math.sin(w),g=Math.tan(f/4),a=4/3*r*g,m=4/3*i*g,v=[e,n],b=[e+a*h,n-m*y],x=[l+a*s,u-m*o],w=[l,u];if(b[0]=2*v[0]-b[0],b[1]=2*v[1]-b[1],c)return b.concat(x,w,p);for(var E=[],_=0,k=(p=b.concat(x,w,p)).length;_<k;_+=1)E[_]=_%2?_a(p[_-1],p[_],d).y:_a(p[_],p[_+1],d).x;return E}(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=c,e.qy=h,s=[d,p].concat(u),["C"].concat((n=s[0],r=s[1],i=s[2],o=s[3],a=s[4],s=s[5],[1/3*n+2/3*i,1/3*r+2/3*o,1/3*a+2/3*i,1/3*s+2/3*o,a,s]));case"L":return["C"].concat(Sa(d,p,c,h));case"Z":return d===f&&p===y?["C",d,p,f,y,f,y]:["C"].concat(Sa(d,p,f,y))}return t}function Pa(t,e){var n;if(void 0===e&&(e=!1),ya(n=t)&&n.every(function(t){t=t[0];return"MC".includes(t)}))return n=ca(t),e?[n,[]]:n;for(var r,i=Ea(t),o=T({},ha),a=[],s="",l=i.length,u=[],c=0;c<l;c+=1){i[c]&&(s=i[c][0]),a[c]=s;var h=Oa(i[c],o),d=(i[c]=h,g=y=f=p=d=void 0,i),p=a,f=c;if(7<d[f].length){d[f].shift();for(var y=d[f],g=f;y.length;)p[f]="A",d.splice(g+=1,0,["C"].concat(y.splice(0,6)));d.splice(f,1)}l=i.length,"Z"===s&&u.push(c),r=(h=i[c]).length,o.x1=+h[r-2],o.y1=+h[r-1],o.x2=+h[r-4]||o.x1,o.y2=+h[r-3]||o.y1}return e?[i,u]:i}function Aa(t,e){var n=t.x,t=t.y,r=e.x,e=e.y,i=n*r+t*e,o=Math.sqrt((Math.pow(n,2)+Math.pow(t,2))*(Math.pow(r,2)+Math.pow(e,2)));return(n*e-t*r<0?-1:1)*Math.acos(i/o)}function Na(t,e,n,r,i,R,D,o,a,s,l){var u=l.bbox,B=void 0===u||u,u=l.length,F=void 0===u||u,u=l.sampleSize,c=void 0===u?30:u,h="number"==typeof s,d=t,p=e,f=0,y=[d,p,f],g=[d,p],m={x:0,y:0},v=[{x:d,y:p}];h&&s<=0&&(m={x:d,y:p});for(var b,x,w,E,_,k,T,M,S,O,P,A,N,C,L,I,j=0;j<=c;j+=1)b=t,x=e,w=n,E=r,_=i,k=R,T=D,M=o,S=a,O=j/c,A=I=L=C=N=A=P=void 0,A=Math.abs,N=Math.sin,C=Math.cos,L=Math.sqrt,I=Math.PI,w=A(w),A=A(E),E=I/180*((_%360+360)%360),d=(P=b===M&&x===S?{x:b,y:x}:0===w||0===A?Ma(b,x,M,S,O).point:(_=(b-M)/2,P=(x-S)/2,_={x:C(E)*_+N(E)*P,y:-N(E)*_+C(E)*P},1<(P=Math.pow(_.x,2)/Math.pow(w,2)+Math.pow(_.y,2)/Math.pow(A,2))&&(w*=L(P),A*=L(P)),P=(Math.pow(w,2)*Math.pow(A,2)-Math.pow(w,2)*Math.pow(_.y,2)-Math.pow(A,2)*Math.pow(_.x,2))/(Math.pow(w,2)*Math.pow(_.y,2)+Math.pow(A,2)*Math.pow(_.x,2)),k=(k!==T?1:-1)*L(P=P<0?0:P),L=w*_.y/A*k,P=-A*_.x/w*k,k=C(E)*L-N(E)*P+(b+M)/2,b=N(E)*L+C(E)*P+(x+S)/2,x=Aa({x:1,y:0},M={x:(_.x-L)/w,y:(_.y-P)/A}),S=Aa(M,{x:(-_.x-L)/w,y:(-_.y-P)/A}),!T&&0<S?S-=2*I:T&&S<0&&(S+=2*I),M=x+(S%=2*I)*O,L=w*C(M),_=A*N(M),{x:C(E)*L-N(E)*_+k,y:N(E)*L+C(E)*_+b})).x,p=P.y,B&&v.push({x:d,y:p}),F&&(f+=Ta(g,[d,p])),g=[d,p],h&&s<=f&&s>y[2]&&(T=(f-s)/(f-y[2]),m={x:g[0]*(1-T)+y[0]*T,y:g[1]*(1-T)+y[1]*T}),y=[d,p,f];return{length:f,point:m=h&&f<=s?{x:o,y:a}:m,min:{x:Math.min.apply(null,v.map(function(t){return t.x})),y:Math.min.apply(null,v.map(function(t){return t.y}))},max:{x:Math.max.apply(null,v.map(function(t){return t.x})),y:Math.max.apply(null,v.map(function(t){return t.y}))}}}function Ca(t,e,n,r,i,o,a,s,l,u){var c=u.bbox,h=void 0===c||c,c=u.length,d=void 0===c||c,c=u.sampleSize,p=void 0===c?10:c,f="number"==typeof l,y=t,g=e,m=0,v=[y,g,m],b=[y,g],x={x:0,y:0},w=[{x:y,y:g}];f&&l<=0&&(x={x:y,y:g});for(var E,_,k,T,M,S,O,P,A,N,C=0;C<=p;C+=1)E=t,_=e,k=n,T=r,M=i,S=o,O=a,P=s,N=void 0,N=1-(A=C/p),y=(E={x:Math.pow(N,3)*E+3*Math.pow(N,2)*A*k+3*N*Math.pow(A,2)*M+Math.pow(A,3)*O,y:Math.pow(N,3)*_+3*Math.pow(N,2)*A*T+3*N*Math.pow(A,2)*S+Math.pow(A,3)*P}).x,g=E.y,h&&w.push({x:y,y:g}),d&&(m+=Ta(b,[y,g])),b=[y,g],f&&l<=m&&l>v[2]&&(k=(m-l)/(m-v[2]),x={x:b[0]*(1-k)+v[0]*k,y:b[1]*(1-k)+v[1]*k}),v=[y,g,m];return{length:m,point:x=f&&m<=l?{x:a,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 La(t,e,n,r,i,o,a,s){var l=s.bbox,u=void 0===l||l,l=s.length,c=void 0===l||l,l=s.sampleSize,h=void 0===l?10:l,d="number"==typeof a,p=t,f=e,y=0,g=[p,f,y],m=[p,f],v={x:0,y:0},b=[{x:p,y:f}];d&&a<=0&&(v={x:p,y:f});for(var x,w,E,_,k,T,M,S,O=0;O<=h;O+=1)x=t,w=e,E=n,_=r,k=i,T=o,S=void 0,S=1-(M=O/h),p=(x={x:Math.pow(S,2)*x+2*S*M*E+Math.pow(M,2)*k,y:Math.pow(S,2)*w+2*S*M*_+Math.pow(M,2)*T}).x,f=x.y,u&&b.push({x:p,y:f}),c&&(y+=Ta(m,[p,f])),m=[p,f],d&&a<=y&&a>g[2]&&(E=(y-a)/(y-g[2]),v={x:m[0]*(1-E)+g[0]*E,y:m[1]*(1-E)+g[1]*E}),g=[p,f,y];return{length:y,point:v=d&&y<=a?{x:i,y:o}:v,min:{x:Math.min.apply(null,b.map(function(t){return t.x})),y:Math.min.apply(null,b.map(function(t){return t.y}))},max:{x:Math.max.apply(null,b.map(function(t){return t.x})),y:Math.max.apply(null,b.map(function(t){return t.y}))}}}function Ia(t,e,n){for(var r,i,o,a=Ea(t),s="number"==typeof e,l=[],u=0,c=0,h=0,d=0,p=[],f=[],y=0,g={x:0,y:0},m=g,v=g,b=g,x=0,w=0,E=a.length;w<E;w+=1)l=(r="M"===(i=(o=a[w])[0]))?l:[u,c].concat(o.slice(1)),r?(m=g={x:h=o[1],y:d=o[2]},y=0,s&&e<.001&&(b=g)):"L"===i?(y=(r=Ma(l[0],l[1],l[2],l[3],(e||0)-x)).length,g=r.min,m=r.max,v=r.point):"A"===i?(y=(r=Na(l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7],l[8],(e||0)-x,n||{})).length,g=r.min,m=r.max,v=r.point):"C"===i?(y=(r=Ca(l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7],(e||0)-x,n||{})).length,g=r.min,m=r.max,v=r.point):"Q"===i?(y=(r=La(l[0],l[1],l[2],l[3],l[4],l[5],(e||0)-x,n||{})).length,g=r.min,m=r.max,v=r.point):"Z"===i&&(y=(r=Ma((l=[u,c,h,d])[0],l[1],l[2],l[3],(e||0)-x)).length,g=r.min,m=r.max,v=r.point),s&&x<e&&e<=x+y&&(b=v),f.push(m),p.push(g),x+=y,u=(r="Z"!==i?o.slice(-2):[h,d])[0],c=r[1];return{length:x,point:b=s&&x<=e?{x:u,y:c}:b,min:{x:Math.min.apply(null,p.map(function(t){return t.x})),y:Math.min.apply(null,p.map(function(t){return t.y}))},max:{x:Math.max.apply(null,f.map(function(t){return t.x})),y:Math.max.apply(null,f.map(function(t){return t.y}))}}}function ja(t){return(u=l=s=0)<=Pa(t).map(function(t){var e,n,r,i,o,a;return"M"===t[0]?(s=t[1],l=t[2],0):(a=t.slice(1),e=a[0],n=a[1],r=a[2],i=a[3],o=a[4],a=a[5],u=3*((a-l)*(e+r)-(o-s)*(n+i)+n*(s-r)-e*(l-i)+a*(r+s/3)-o*(i+l/3))/20,n=t.slice(-2),s=n[0],l=n[1],u)}).reduce(function(t,e){return t+e},0);var s,l,u}function Ra(t){return t.map(function(t,e,n){var r,i,o,a,n=e&&n[e-1].slice(-2).concat(t.slice(1)),s=e?Ca(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),o=e.slice(4,6),e=e.slice(6,8),n=ka(n,i,r),i=ka(i,o,r),o=ka(o,e,r),a=ka(n,i,r),i=ka(i,o,r),r=ka(a,i,r),[["C"].concat(n,a,r),["C"].concat(i,o,e)]):[t,t]:[t];return{s:t,ss:n,l:s}})}function Da(o,a){var s;if(Fa(o,"Function"))return(s=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n,r=a?a.apply(this,t):t[0],i=s.cache;return i.has(r)?i.get(r):(n=o.apply(this,t),i.set(r,n),n)}).cache=new Map,s;throw new TypeError("Expected a function")}var Ba={}.toString,Fa=function(t,e){return Ba.call(t)==="[object "+e+"]"};function za(t,e,n){(t.prototype=e.prototype=n).constructor=t}function Va(t,e){var n,r=Object.create(t.prototype);for(n in e)r[n]=e[n];return r}function Ga(){}var Ht="\\s*([+-]?\\d+)\\s*",h="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Kt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ha=/^#([0-9a-f]{3,8})$/,Wa=new RegExp("^rgb\\("+[Ht,Ht,Ht]+"\\)$"),Ya=new RegExp("^rgb\\("+[Kt,Kt,Kt]+"\\)$"),Ua=new RegExp("^rgba\\("+[Ht,Ht,Ht,h]+"\\)$"),qa=new RegExp("^rgba\\("+[Kt,Kt,Kt,h]+"\\)$"),Xa=new RegExp("^hsl\\("+[h,Kt,Kt]+"\\)$"),Za=new RegExp("^hsla\\("+[h,Kt,Kt,h]+"\\)$"),Ka={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 $a(){return this.rgb().formatHex()}function Ja(){return this.rgb().formatRgb()}function Qa(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Ha.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?ts(e):3===n?new ns(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?es(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?es(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=Wa.exec(t))?new ns(e[1],e[2],e[3],1):(e=Ya.exec(t))?new ns(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Ua.exec(t))?es(e[1],e[2],e[3],e[4]):(e=qa.exec(t))?es(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Xa.exec(t))?as(e[1],e[2]/100,e[3]/100,1):(e=Za.exec(t))?as(e[1],e[2]/100,e[3]/100,e[4]):Ka.hasOwnProperty(t)?ts(Ka[t]):"transparent"===t?new ns(NaN,NaN,NaN,0):null}function ts(t){return new ns(t>>16&255,t>>8&255,255&t,1)}function es(t,e,n,r){return new ns(t=r<=0?e=n=NaN:t,e,n,r)}function ns(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function rs(){return"#"+os(this.r)+os(this.g)+os(this.b)}function is(){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 os(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function as(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new ls(t,e,n,r)}function ss(t){var e,n,r,i,o,a,s,l;return t instanceof ls?new ls(t.h,t.s,t.l,t.opacity):(t=t instanceof Ga?t:Qa(t))?t instanceof ls?t:(e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=NaN,l=((o=Math.max(e,n,r))+i)/2,(s=o-i)?(a=e===o?(n-r)/s+6*(n<r):n===o?(r-e)/s+2:(e-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=0<l&&l<1?0:a,new ls(a,s,l,t.opacity)):new ls}function ls(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function us(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 cs(t,e,n,r){t-=n,n=e-r;return Math.sqrt(t*t+n*n)}function hs(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}}za(Ga,Qa,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:$a,formatHex:$a,formatHsl:function(){return ss(this).formatHsl()},formatRgb:Ja,toString:Ja}),za(ns,function(t,e,n,r){return 1===arguments.length?(i=(i=t)instanceof Ga?i:Qa(i))?new ns((i=i.rgb()).r,i.g,i.b,i.opacity):new ns:new ns(t,e,n,null==r?1:r);var i},Va(Ga,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new ns(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new ns(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:rs,formatHex:rs,formatRgb:is,toString:is})),za(ls,function(t,e,n,r){return 1===arguments.length?ss(t):new ls(t,e,n,null==r?1:r)},Va(Ga,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new ls(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new ls(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 ns(us(240<=t?t-240:120+t,n,e),us(t,n,e),us(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 ds={box:function(t,e,n,r){return hs([t,n],[e,r])},length:cs,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,o){var a=(n-t)*(i-t)+(r-e)*(o-e);return a<0?cs(t,e,i,o):(n-t)*(n-t)+(r-e)*(r-e)<a?cs(n,r,i,o):this.pointToLine(t,e,n,r,i,o)},pointToLine:function(t,e,n,r,i,o){var a,n=[n-t,r-e];return(r=n)[0]===(a=[0,0])[0]&&r[1]===a[1]?Math.sqrt((i-t)*(i-t)+(o-e)*(o-e)):(la(r=[-n[1],n[0]],r),a=[i-t,o-e],Math.abs(a[0]*r[0]+a[1]*r[1]))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}};function ps(t){for(var e=0,n=[],r=0;r<t.length-1;r++){var i=t[r],o=t[r+1],a=cs(i[0],i[1],o[0],o[1]);n.push({from:i,to:o,length:a}),e+=a}return{segments:n,totalLength:e}}var fs={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 hs(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],o=e[r+1];n+=cs(i[0],i[1],o[0],o[1])}return n},pointAt:function(t,e){var n=e;if(1<n||n<0||t.length<2)return null;var e=ps(t),r=e.segments,i=e.totalLength;if(0===i)return{x:t[0][0],y:t[0][1]};for(var o=0,a=null,s=0;s<r.length;s++){var l=r[s],u=l.from,c=l.to,l=l.length/i;if(o<=n&&n<=o+l){a=ds.pointAt(u[0],u[1],c[0],c[1],(n-o)/l);break}o+=l}return a},pointDistance:function(t,e,n){for(var r=t,i=e,o=n,a=1/0,s=0;s<r.length-1;s++){var l=r[s],u=r[s+1],l=ds.pointDistance(l[0],l[1],u[0],u[1],i,o);l<a&&(a=l)}return a},tangentAngle:function(t,e){var n=e;if(1<n||n<0||t.length<2)return 0;for(var r=(t=ps(t)).segments,i=t.totalLength,o=0,a=0,s=0;s<r.length;s++){var l=r[s],u=l.from,c=l.to,l=l.length/i;if(o<=n&&n<=o+l){a=Math.atan2(c[1]-u[1],c[0]-u[0]);break}o+=l}return a}};var ys=function(t,e){var n=e[15];if(0===n)return!1;for(var r=1/n,i=0;i<16;i++)t[i]=e[i]*r;return!0},zt=function(){var t=new Float32Array(16);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},gs=function(t){var e=new Float32Array(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},ms=function(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],l=t[7],u=t[8],c=t[9],h=t[10],d=t[11],p=t[12],f=t[13],y=t[14],t=t[15];return(e*a-n*o)*(h*t-d*y)-(e*s-r*o)*(c*t-d*f)+(e*l-i*o)*(c*y-h*f)+(n*s-r*a)*(u*t-d*p)-(n*l-i*a)*(u*y-h*p)+(r*l-i*s)*(u*f-c*p)},vs=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],h=e[9],d=e[10],p=e[11],f=e[12],y=e[13],g=e[14],e=e[15],m=n*s-r*a,v=n*l-i*a,b=n*u-o*a,x=r*l-i*s,w=r*u-o*s,E=i*u-o*l,_=c*y-h*f,k=c*g-d*f,T=c*e-p*f,M=h*g-d*y,S=h*e-p*y,O=d*e-p*g,P=m*O-v*S+b*M+x*T-w*k+E*_;return P?(P=1/P,t[0]=(s*O-l*S+u*M)*P,t[1]=(i*S-r*O-o*M)*P,t[2]=(y*E-g*w+e*x)*P,t[3]=(d*w-h*E-p*x)*P,t[4]=(l*T-a*O-u*k)*P,t[5]=(n*O-i*T+o*k)*P,t[6]=(g*b-f*E-e*v)*P,t[7]=(c*E-d*b+p*v)*P,t[8]=(a*S-s*T+u*_)*P,t[9]=(r*T-n*S-o*_)*P,t[10]=(f*w-y*b+e*m)*P,t[11]=(h*b-c*w-p*m)*P,t[12]=(s*k-a*M-l*_)*P,t[13]=(n*M-r*k+i*_)*P,t[14]=(y*v-f*x-g*m)*P,t[15]=(c*x-h*v+d*m)*P,t):null},bs=function(t,e){{var n,r,i,o,a,s;t===e?(n=e[1],r=e[2],i=e[3],o=e[6],a=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]=o,t[11]=e[14],t[12]=i,t[13]=a,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])}return t},xs={length:function(t){var e=t[0],n=t[1],t=t[2];return Math.sqrt(e*e+n*n+t*t)},normalize:function(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);return t},dot:function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]},cross:function(t,e,n){var r=e[0],i=e[1],e=e[2],o=n[0],a=n[1],n=n[2];return t[0]=i*n-e*a,t[1]=e*o-r*n,t[2]=r*a-i*o,t}},ws=zt(),Es=zt(),_s=[0,0,0,0],g=[[0,0,0],[0,0,0],[0,0,0]],ks=[0,0,0];function Ts(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 Ms,Ss,Os={exports:{}};function Ps(){}function As(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function Ns(t,e,n,r,i){if("function"!=typeof n)throw new TypeError("The listener must be a function");n=new As(n,r||t,i),r=Ss?Ss+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 Cs(t,e){0==--t._eventsCount?t._events=new Ps:delete t._events[e]}function Ls(){this._events=new Ps,this._eventsCount=0}jt=Os,Ms=Object.prototype.hasOwnProperty,Ss="~",Object.create&&(Ps.prototype=Object.create(null),(new Ps).__proto__||(Ss=!1)),Ls.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)Ms.call(t,e)&&n.push(Ss?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},Ls.prototype.listeners=function(t){var t=Ss?Ss+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},Ls.prototype.listenerCount=function(t){t=Ss?Ss+t:t,t=this._events[t];return t?t.fn?1:t.length:0},Ls.prototype.emit=function(t,e,n,r,i,o){var a=Ss?Ss+t:t;if(!this._events[a])return!1;var s,l=this._events[a],u=arguments.length;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),u){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,o),!0}for(d=1,s=new Array(u-1);d<u;d++)s[d-1]=arguments[d];l.fn.apply(l.context,s)}else for(var c,h=l.length,d=0;d<h;d++)switch(l[d].once&&this.removeListener(t,l[d].fn,void 0,!0),u){case 1:l[d].fn.call(l[d].context);break;case 2:l[d].fn.call(l[d].context,e);break;case 3:l[d].fn.call(l[d].context,e,n);break;case 4:l[d].fn.call(l[d].context,e,n,r);break;default:if(!s)for(c=1,s=new Array(u-1);c<u;c++)s[c-1]=arguments[c];l[d].fn.apply(l[d].context,s)}return!0},Ls.prototype.on=function(t,e,n){return Ns(this,t,e,n,!1)},Ls.prototype.once=function(t,e,n){return Ns(this,t,e,n,!0)},Ls.prototype.removeListener=function(t,e,n,r){t=Ss?Ss+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||Cs(this,t);else{for(var o=0,a=[],s=i.length;o<s;o++)(i[o].fn!==e||r&&!i[o].once||n&&i[o].context!==n)&&a.push(i[o]);a.length?this._events[t]=1===a.length?a[0]:a:Cs(this,t)}}else Cs(this,t);return this},Ls.prototype.removeAllListeners=function(t){return t?(t=Ss?Ss+t:t,this._events[t]&&Cs(this,t)):(this._events=new Ps,this._eventsCount=0),this},Ls.prototype.off=Ls.prototype.removeListener,Ls.prototype.addListener=Ls.prototype.on,Ls.prefixed=Ss,jt.exports=Ls.EventEmitter=Ls;let Is=1;const js="object"==typeof self&&self.self==self?self:"object"==typeof jr&&jr.global==jr?jr:{},Rs=Date.now();let Ds={},Bs=Date.now();const Fs=t=>"string"!=typeof t?t=>{if("function"!=typeof t)throw new TypeError(t+" is not a function");const n=Date.now(),e=n-Bs,r=16<e?0:16-e,i=Is++;return Ds[i]=t,1<Object.keys(Ds).length||setTimeout(()=>{Bs=n;const e=Ds;Ds={},Object.keys(e).forEach(t=>e[t](js.performance&&"function"==typeof js.performance.now?js.performance.now():Date.now()-Rs))},r),i}:""===t?js.requestAnimationFrame:js[t+"RequestAnimationFrame"],zs=((t,e)=>{let n=0;for(;void 0!==t[n];){if(e(t[n]))return t[n];n+=1}})(["","webkit","moz","ms","o"],t=>!!Fs(t)),Vs=Fs(zs),Gs="string"!=typeof(oe=zs)?t=>{delete Ds[t]}:""===oe?js.cancelAnimationFrame:js[oe+"CancelAnimationFrame"]||js[oe+"CancelRequestAnimationFrame"];js.requestAnimationFrame=Vs,js.cancelAnimationFrame=Gs,"undefined"!=typeof module&&module.exports&&(module.exports={requestAnimationFrame:Vs,cancelAnimationFrame:Gs}),(a=w=w||{}).COORDINATE="<coordinate>",a.COLOR="<color>",a.PAINT="<paint>",a.NUMBER="<number>",a.ANGLE="<angle>",a.OPACITY_VALUE="<opacity-value>",a.SHADOW_BLUR="<shadow-blur>",a.LENGTH="<length>",a.PERCENTAGE="<percentage>",a.LENGTH_PERCENTAGE="<length> | <percentage>",a.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",a.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",a.LIST_OF_POINTS="<list-of-points>",a.PATH="<path>",a.FILTER="<filter>",a.Z_INDEX="<z-index>",a.OFFSET_PATH="<offset-path>",a.OFFSET_DISTANCE="<offset-distance>",a.CLIP_PATH="<clip-path>",a.MARKER="<marker>",a.TRANSFORM="<transform>",a.TRANSFORM_ORIGIN="<transform-origin>",a.TEXT="<text>",a.TEXT_TRANSFORM="<text-transform>";var v,Hs,Ws,Ys,Yt=p.defineToken("");function k(){k=function(){return a};var a={},t=Object.prototype,l=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function o(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{o({},"")}catch(t){o=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,o,a,s,e=e&&e.prototype instanceof h?e:h,e=Object.create(e.prototype),r=new x(r||[]);return e._invoke=(i=t,o=n,a=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 E()}for(a.method=t,a.arg=e;;){var n=a.delegate;if(n){n=function t(e,n){var r=e.iterator[n.method];if(void 0===r){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method))return c;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}r=u(r,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,c;r=r.arg;return r?r.done?(n[e.resultName]=r.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,c):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,c)}(n,a);if(n){if(n===c)continue;return n}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===s)throw s="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s="executing";n=u(i,o,a);if("normal"===n.type){if(s=a.done?"completed":"suspendedYield",n.arg===c)continue;return{value:n.arg,done:a.done}}"throw"===n.type&&(s="completed",a.method="throw",a.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}}}a.wrap=s;var c={};function h(){}function d(){}function p(){}var e={},f=(o(e,r,function(){return this}),Object.getPrototypeOf),f=f&&f(f(w([]))),y=(f&&f!==t&&l.call(f,r)&&(e=f),p.prototype=h.prototype=Object.create(e));function g(t){["next","throw","return"].forEach(function(e){o(t,e,function(t){return this._invoke(e,t)})})}function m(a,s){var e;this._invoke=function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var o,t=u(a[t],a,n);if("throw"!==t.type)return(n=(o=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){o.value=t,r(o)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}}function v(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 b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(v,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:E}}function E(){return{value:void 0,done:!0}}return o(y,"constructor",d.prototype=p),o(p,"constructor",d),d.displayName=o(p,i,"GeneratorFunction"),a.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,o(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},a.awrap=function(t){return{__await:t}},g(m.prototype),o(m.prototype,n,function(){return this}),a.AsyncIterator=m,a.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var o=new m(s(t,e,n,r),i);return a.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},g(y),o(y,i,"Generator"),o(y,r,function(){return this}),o(y,"toString",function(){return"[object Generator]"}),a.keys=function(n){var t,r=[];for(t in n)r.push(t);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}},a.values=w,x.prototype={constructor:x,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(b),!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 o.type="throw",o.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],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(a&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){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 o=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,c):this.complete(o)},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),c},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),b(n),c}},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,b(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),c}},a}function Us(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function qs(s){return function(){var t=this,a=arguments;return new Promise(function(e,n){var r=s.apply(t,a);function i(t){Us(r,e,n,i,o,"next",t)}function o(t){Us(r,e,n,i,o,"throw",t)}i(void 0)})}}function Xs(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,r.key,r)}}function Zs(t,e,n){e&&Xs(t.prototype,e),n&&Xs(t,n),Object.defineProperty(t,"prototype",{writable:!1})}function Ks(){return(Ks=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 b(t,e){t.prototype=Object.create(e.prototype),$s(t.prototype.constructor=t,e)}function $s(t,e){return($s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Js(t,e){if(null==t)return{};for(var n,r={},i=Object.keys(t),o=0;o<i.length;o++)n=i[o],0<=e.indexOf(n)||(r[n]=t[n]);return r}function Qs(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function tl(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 el(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?tl(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)?tl(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.")}(d=v=v||{})[d.kUnknown=0]="kUnknown",d[d.kNumber=1]="kNumber",d[d.kPercentage=2]="kPercentage",d[d.kEms=3]="kEms",d[d.kPixels=4]="kPixels",d[d.kRems=5]="kRems",d[d.kDegrees=6]="kDegrees",d[d.kRadians=7]="kRadians",d[d.kGradians=8]="kGradians",d[d.kTurns=9]="kTurns",d[d.kMilliseconds=10]="kMilliseconds",d[d.kSeconds=11]="kSeconds",d[d.kInteger=12]="kInteger",(u=Hs=Hs||{})[u.kUNumber=0]="kUNumber",u[u.kUPercent=1]="kUPercent",u[u.kULength=2]="kULength",u[u.kUAngle=3]="kUAngle",u[u.kUTime=4]="kUTime",u[u.kUOther=5]="kUOther",(o=Ws=Ws||{})[o.kYes=0]="kYes",o[o.kNo=1]="kNo",(Qt=Ys=Ys||{})[Qt.kYes=0]="kYes",Qt[Qt.kNo=1]="kNo";var nl,rl=[{name:"em",unit_type:v.kEms},{name:"px",unit_type:v.kPixels},{name:"deg",unit_type:v.kDegrees},{name:"rad",unit_type:v.kRadians},{name:"grad",unit_type:v.kGradians},{name:"ms",unit_type:v.kMilliseconds},{name:"s",unit_type:v.kSeconds},{name:"rem",unit_type:v.kRems},{name:"turn",unit_type:v.kTurns}];(n=nl=nl||{})[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";var il,ol,al=function(){function t(){}t.parse=function(t,e){return[][0]},t.parseAll=function(t,e){return[]},t.unitFromName=function(t){return t?"number"===t?v.kNumber:"percent"===t||"%"===t?v.kPercentage:this.stringToUnitType(t):v.kUnknown},t.unitTypeToUnitCategory=function(t){switch(t){case v.kNumber:case v.kInteger:return Hs.kUNumber;case v.kPercentage:return Hs.kUPercent;case v.kPixels:return Hs.kULength;case v.kMilliseconds:case v.kSeconds:return Hs.kUTime;case v.kDegrees:case v.kRadians:case v.kGradians:case v.kTurns:return Hs.kUAngle;default:return Hs.kUOther}},t.unitTypeToString=function(t){switch(t){case v.kNumber:case v.kInteger:return"";case v.kPercentage:return"%";case v.kEms:return"em";case v.kRems:return"rem";case v.kPixels:return"px";case v.kDegrees:return"deg";case v.kRadians:return"rad";case v.kGradians:return"grad";case v.kMilliseconds:return"ms";case v.kSeconds:return"s";case v.kTurns:return"turn"}return""},t.stringToUnitType=function(e){return rl.find(function(t){return t.name===e}).unit_type},t.canonicalUnitTypeForCategory=function(t){switch(t){case Hs.kUNumber:return v.kNumber;case Hs.kULength:return v.kPixels;case Hs.kUPercent:return v.kPercentage;case Hs.kUTime:return v.kSeconds;case Hs.kUAngle:return v.kDegrees;default:return v.kUnknown}},t.conversionToCanonicalUnitsScaleFactor=function(t){var e=1;switch(t){case v.kPixels:case v.kDegrees:case v.kSeconds:break;case v.kMilliseconds:e=.001;break;case v.kRadians:e=180/Math.PI;break;case v.kGradians:e=.9;break;case v.kTurns:e=360}return e},t.isAngle=function(t){return t===v.kDegrees||t===v.kRadians||t===v.kGradians||t===v.kTurns},t.isLength=function(t){return t>=v.kEms&&t<v.kDegrees},t.isRelativeUnit=function(t){return t===v.kPercentage||t===v.kEms||t===v.kRems},t.isTime=function(t){return t===v.kSeconds||t===v.kMilliseconds};var e=t.prototype;return e.toString=function(){return this.buildCSSText(Ws.kNo,Ys.kNo,"")},e.isNumericValue=function(){return this.getType()>=nl.kUnitType&&this.getType()<=nl.kClampType},t}(),r=function(n){function t(t){var e=n.call(this)||this;return e.colorSpace=void 0,e.colorSpace=t,e}b(t,n);var e=t.prototype;return e.getType=function(){return nl.kColorType},e.to=function(t){return this},t}(al),sl=function(n){function t(t){var e=n.call(this)||this;return e.value=void 0,e.value=t,e}b(t,n);var e=t.prototype;return e.clone=function(){return new t(this.value)},e.getType=function(){return nl.kKeywordType},e.buildCSSText=function(t,e,n){return n+this.value},t}(al);function ll(t){if(!t)throw new Error}function ul(t,e){if(t===e)throw new Error}function cl(t){return void 0===t}function S(t){return null==t}function hl(t){return"number"==typeof t}function dl(t){return"function"==typeof t}function pl(t){return"boolean"==typeof t}function fl(t){return"[object Object]"===Object.prototype.toString.call(t)}(It=il=il||{}).kAdd="+",It.kSubtract="-",It.kMultiply="*",It.kDivide="/",It.kMin="min",It.kMax="max",It.kClamp="clamp",It.kInvalid="",(s=ol=ol||{})[s.kLength=0]="kLength",s[s.kAngle=1]="kAngle",s[s.kTime=2]="kTime",s[s.kFrequency=3]="kFrequency",s[s.kResolution=4]="kResolution",s[s.kFlex=5]="kFlex",s[s.kPercent=6]="kPercent",s[s.kNumBaseTypes=7]="kNumBaseTypes";var yl=function(){function t(t,e){void 0===t&&(t=v.kNumber),void 0===e&&(e=1),this.exponents=[],this.numNonZeroEntries=0,this.percentHint=ol.kPercent,this.hasPercentHint=!1,this.exponents=new Array(ol.kNumBaseTypes).fill(0),t!==v.kNumber&&this.setExponent(function(t){switch(ul(t,v.kNumber),t){case v.kEms:case v.kPixels:case v.kRems:return ol.kLength;case v.kMilliseconds:case v.kSeconds:return ol.kTime;case v.kDegrees:case v.kRadians:case v.kGradians:case v.kTurns:return ol.kAngle;case v.kPercentage:return ol.kPercent;default:return ol.kLength}}(t),e)}var e=t.prototype;return e.applyPercentHint=function(t){ul(t,ol.kPercent),this.setExponent(t,this.exponent(t)+this.exponent(ol.kPercent)),this.setExponent(ol.kPercent,0),this.percentHint=t,this.hasPercentHint=!0},e.hasNonZeroEntries=function(){return 0<this.numNonZeroEntries},e.isOnlyNonZeroEntry=function(t,e){return ul(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 ul(t,ol.kPercent),this.isOnlyNonZeroEntry(t,1)&&!this.hasPercentHint},e.matchesPercentage=function(){return this.isOnlyNonZeroEntry(ol.kPercent,1)},e.matchesBaseTypePercentage=function(t){return ul(t,ol.kPercent),this.isOnlyNonZeroEntry(t,1)||this.isOnlyNonZeroEntry(ol.kPercent,1)},e.matchesNumber=function(){return!this.hasNonZeroEntries()&&!this.hasPercentHint},e.matchesNumberPercentage=function(){return!this.hasNonZeroEntries()||this.isOnlyNonZeroEntry(ol.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 o=0;o<ol.kNumBaseTypes;++o){var a=o;if(t.exponents[o]!==e.exponents[o]&&(a!==ol.kPercent&&(t.applyPercentHint(a),e.applyPercentHint(a)),t.exponents[o]!==e.exponents[o]))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<ol.kNumBaseTypes;++r){var i=r;t.setExponent(i,t.exponent(i)+e.exponent(i))}}return t},t}(),gl=function(n){function p(t){var e=n.call(this)||this;return e.type_=void 0,e.type_=t,e}b(p,n),p.fromNumberish=function(t){return"number"==typeof t?new El(t,v.kNumber):t},p.fromPercentish=function(t){return"number"==typeof t?new El(100*t,v.kPercentage):t};var t=p.prototype;return t.getType=function(){return nl.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 ml(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=ml(e),i=(vl(nl.kSumType,r,this),xl(r,il.kAdd));return i||Pl.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=ml(e)).map(function(t){return t.negate()}),i=(vl(nl.kSumType,r,this),xl(r,il.kAdd));return i||Pl.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=ml(e),i=(vl(nl.kProductType,r,this),wl(r));return i||Al.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=ml(e)).map(function(t){return t.invert()}),i=(vl(nl.kProductType,r,this),wl(r));return i||Al.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=ml(e),i=(vl(nl.kMinType,r,this),xl(r,il.kMin));return i||Sl.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=ml(e),i=(vl(nl.kMaxType,r,this),xl(r,il.kMax));return i||Ol.create(r)},t.to=function(t){var e=this.sumValue();return 0!==e.length&&1===e.length&&(e=bl(e[0]))?(t="string"==typeof t?El.unitFromName(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 o=i[r];if(!p.isValidUnit(p.unitFromName(o)))return null}var a=this.sumValue();if(!a.length)return null;for(var s=[],l=el(a);!(u=l()).done;){var u=bl(u.value);if(!u)return null;s.push(u)}if(0===e.length)return s.sort(function(t,e){return t.unit-e.unit}),ll(!!(a=Pl.create(s))),a;for(var c=[],h=0,d=e;h<d.length;h++)!function(){var t=d[h],r=p.unitFromName(t),t=(ll(p.isValidUnit(r)),s.reduce(function(t,e,n){return e&&(e=e.convertTo(r))&&(t+=e.value,s[n]=null),t},0));c.push(new El(t,r))}();if(s.some(function(t){return!!t}))throw new Error("There were leftover terms that were not converted");return Pl.create(c)},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(ol.kLength);return e&&(t.length=e),(e=this.type_.exponent(ol.kAngle))&&(t.angle=e),(e=this.type_.exponent(ol.kTime))&&(t.time=e),(e=this.type_.exponent(ol.kFrequency))&&(t.frequency=e),(e=this.type_.exponent(ol.kResolution))&&(t.resolution=e),(e=this.type_.exponent(ol.kFlex))&&(t.flex=e),(e=this.type_.exponent(ol.kPercent))&&(t.percent=e),this.type_.hasPercentHint&&(t.percentHint=function(t){switch(t){case ol.kLength:return"length";case ol.kAngle:return"angle";case ol.kTime:return"time";case ol.kFrequency:return"frequency";case ol.kResolution:return"resolution";case ol.kFlex:return"flex";case ol.kPercent:return"percent"}return""}(this.type_.percentHint)),t},p.isValidUnit=function(t){return!!(t===v.kNumber||t==v.kPercentage||this.isLength(t)||this.isAngle(t)||this.isTime(t))},t.negate=function(){return kl.create(this)},t.invert=function(){return _l.create(this)},p}(al);function ml(t){return t.map(gl.fromNumberish)}function vl(t,e,n){ll(!!n),n.getType()===t?e.unshift.apply(e,n.numericValues()):e.unshift(n)}function bl(t){return 0===Object.keys(t.units).length?new El(t.value):1===Object.keys(t.units).length&&1===t.units[Object.keys(t.units)[0]]?new El(t.value,Number(Object.keys(t.units)[0])):null}function xl(t,e){ll(!!t.length);var n=t[0]instanceof El?t[0]:null;if(!n)return null;for(var r=n.value,i=1;i<t.length;i++){var o=t[i]instanceof El?t[i]:null;if(!o||o.unit!==n.unit)return null;e===il.kAdd?r+=o.value:e===il.kMax?r=Math.max(r,o.value):e===il.kMin&&(r=Math.min(r,o.value))}return new El(r,n.unit)}function wl(t){ll(!!t.length);for(var e=v.kNumber,n=1,r=0;r<t.length;r++){var i=t[r]instanceof El?t[r]:null;if(!i)return null;if(i.unit!==v.kNumber){if(e!==v.kNumber)return null;e=i.unit}n*=i.value}return new El(n,e)}var El=function(r){function s(t,e){var n,e="string"==typeof(e=void 0===e?v.kNumber:e)?s.unitFromName(e):e;return ll(s.isValidUnit(e)),(n=r.call(this,new yl(e))||this).unit=void 0,n.value=void 0,n.unit=e,n.value=t,n}b(s,r),s.toCanonicalUnit=function(t){return this.canonicalUnitTypeForCategory(this.unitTypeToUnitCategory(t))},s.toCanonicalUnitIfPossible=function(t){var e=this.toCanonicalUnit(t);return e===v.kUnknown?t:e},s.formatInfinityOrNaN=function(t,e){void 0===e&&(e="");return(Number.isFinite(t)?(ll(Number.isNaN(t)),"NaN"):0<t?"infinity":"-infinity")+e},s.formatNumber=function(t,e){return t+(e=void 0===e?"":e)};var t=s.prototype;return t.clone=function(){return new s(this.value,this.unit)},t.convertTo=function(t){var e;return this.unit===t?new s(this.value,this.unit):(e=s.toCanonicalUnit(this.unit))!==s.toCanonicalUnit(t)||e===v.kUnknown?null:(e=al.conversionToCanonicalUnitsScaleFactor(this.unit)/al.conversionToCanonicalUnitsScaleFactor(t),new s(this.value*e,t))},t.equals=function(t){return this.value===t.value&&this.unit===t.unit},t.getType=function(){return nl.kUnitType},t.sumValue=function(){var t=[],e={};return this.unit!==v.kNumber&&(e[s.toCanonicalUnitIfPossible(this.unit)]=1),t.push({value:this.value*al.conversionToCanonicalUnitsScaleFactor(this.unit),units:e}),t},t.negate=function(){return new s(-this.value,this.unit)},t.invert=function(){return this.unit===v.kNumber?0===this.value?null:new s(1/this.value,this.unit):_l.create(this)},t.buildCSSText=function(t,e,n){switch(this.unit){case v.kUnknown:break;case v.kInteger:i=Number(this.value).toFixed(0);break;case v.kNumber:case v.kPercentage:case v.kEms:case v.kRems:case v.kPixels:case v.kDegrees:case v.kRadians:case v.kGradians:case v.kMilliseconds:case v.kSeconds:case v.kTurns:var r,i,o=this.value,a=s.unitTypeToString(this.unit);i=o<-999999||999999<o?(r=s.unitTypeToString(this.unit),!Number.isFinite(o)||Number.isNaN(o)?s.formatInfinityOrNaN(o,r):s.formatNumber(o,r)):""+o+a}return n+=i},s}(gl),re=function(t){function e(){return t.apply(this,arguments)||this}return b(e,t),e.prototype.isUnitValue=function(){return!1},e}(gl),_l=function(n){function e(t,e){e=n.call(this,e)||this;return e.value=void 0,e.operator="invert",e.value=t,e}b(e,n),e.create=function(t){return new e(t,yl.negateExponents(t.type_))};var t=e.prototype;return t.clone=function(){return new e(this.value,this.type_)},t.getType=function(){return nl.kInvertType},t.equals=function(t){return t.getType()===nl.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==Ys.kNo&&(n+=t===Ws.kYes?"(":"calc("),n=this.value.buildCSSText(Ws.kYes,Ys.kNo,n+="1 / "),e===Ys.kNo&&(n+=")"),n},e}(re),kl=function(n){function e(t,e){e=n.call(this,e)||this;return e.value=void 0,e.operator="negate",e.value=t,e}b(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 nl.kNegateType},t.equals=function(t){return t.getType()===nl.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==Ys.kNo&&(n+=t===Ws.kYes?"(":"calc("),n=this.value.buildCSSText(Ws.kYes,Ys.kNo,n+="-"),e===Ys.kNo&&(n+=")"),n},e}(re);function Tl(t,e){for(var n=t[0].type_,r=1;r<t.length;r++)n=e(n,t[r].type_,!1);return n}var Ml,l=function(n){function t(t,e){e=n.call(this,e)||this;return e.values=void 0,e.values=t,e}b(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}(re),Sl=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}b(e,i),e.create=function(t){return new e(t,Tl(t,yl.add))};var t=e.prototype;return t.clone=function(){return new e(this.values,this.type_)},t.getType=function(){return nl.kMinType},t.sumValue=function(){var t=this.numericValues()[0].sumValue();if(!t.length)return null;for(var e=el(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,o=el(this.numericValues());!(r=o()).done;)i||(n+=", "),i=!1,n=r.value.buildCSSText(Ws.kYes,Ys.kYes,n);return n+=")"},e}(l),Ol=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}b(e,i),e.create=function(t){return new e(t,Tl(t,yl.add))};var t=e.prototype;return t.clone=function(){return new e(this.values,this.type_)},t.getType=function(){return nl.kMaxType},t.sumValue=function(){var t=this.numericValues()[0].sumValue();if(!t.length)return null;for(var e=el(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,o=el(this.numericValues());!(r=o()).done;)i||(n+=", "),i=!1,n=r.value.buildCSSText(Ws.kYes,Ys.kYes,n);return n+=")"},e}(l),Pl=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}b(e,i),e.create=function(t){return new e(t,Tl(t,yl.add))},e.numericTypeFromUnitMap=function(n){var r=new yl;return Object.keys(n).forEach(function(t){var e=n[t];r=yl.multiply(r,new yl(Number(t),e),!1),ll(!0)}),r},e.canCreateNumericTypeFromSumValue=function(t){var e=this,n=(ll(!!t.length),this.numericTypeFromUnitMap(t[0].units));return t.every(function(t){return yl.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 nl.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(Ks({},e)):n[t].value+=e.value})}),e.canCreateNumericTypeFromSumValue(n)?n:null},t.buildCSSText=function(t,e,n){e==Ys.kNo&&(n+=t===Ws.kYes?"(":"calc(");var r=this.numericValues();n=r[0].buildCSSText(Ws.kYes,Ys.kNo,n);for(var i=1;i<r.length;i++){var o=r[i];n=(o.getType()===nl.kNegateType?(n+=" - ",o.value):(n+=" + ",o)).buildCSSText(Ws.kYes,Ys.kNo,n)}return e===Ys.kNo&&(n+=")"),n},e}(l),Al=function(i){function o(){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}b(o,i),o.create=function(t){return new o(t,Tl(t,yl.multiply))},o.multiplyUnitMaps=function(n,r){return Object.keys(r).forEach(function(t){ul(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=o.prototype;return t.clone=function(){return new o(this.values,this.type_)},t.getType=function(){return nl.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:o.multiplyUnitMaps(e.units,t.units)})})}),e=r}),e},t.buildCSSText=function(t,e,n){e==Ys.kNo&&(n+=t===Ws.kYes?"(":"calc(");var r=this.numericValues();n=r[0].buildCSSText(Ws.kYes,Ys.kNo,n);for(var i=1;i<r.length;i++){var o=r[i];n=(o.getType()===nl.kInvertType?(n+=" / ",o.value):(n+=" * ",o)).buildCSSText(Ws.kYes,Ys.kNo,n)}return e===Ys.kNo&&(n+=")"),n},o}(l),Nl=new El(0,"px"),Cl=new El(0,"deg"),Ll=function(a){function t(t,e,n,r,i){var o;return void 0===r&&(r=1),void 0===i&&(i=!1),(o=a.call(this,"rgb")||this).r=void 0,o.g=void 0,o.b=void 0,o.alpha=void 0,o.isNone=void 0,o.r=t,o.g=e,o.b=n,o.alpha=r,o.isNone=i,o}b(t,a);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}(r),Il=((c=Ml=Ml||{})[c.Constant=0]="Constant",c[c.LinearGradient=1]="LinearGradient",c[c.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}b(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 nl.kColorType},t}(al)),jl={},Rl=0;function Dl(b,e,x,n){if(!(0<=b&&b<=1&&0<=x&&x<=1))throw new Error("bezier x values must be in [0, 1] range");if(b===e&&x===n)return function(t){return t};for(var w=new(Gl?Float32Array:Array)(11),t=0;t<11;++t)w[t]=Ul(.1*t,b,x);function r(t){for(var e=0,n=1;10!==n&&w[n]<=t;++n)e+=.1;var r=e+.1*((t-w[--n])/(w[n+1]-w[n])),i=ql(r,b,x);if(.001<=i){for(var o=t,a=r,s=b,l=x,u=0;u<Fl;++u){var c=ql(a,s,l);if(0===c)return a;a-=(Ul(a,s,l)-o)/c}return a}if(0===i)return r;for(var h,d,p=t,f=e,y=e+.1,g=b,m=x,v=0;0<(h=Ul(d=f+(y-f)/2,g,m)-p)?y=d:f=d,Math.abs(h)>zl&&++v<Vl;);return d}return function(t){return 0===t||1===t?t:Ul(r(t),e,n)}}var Bl="undefined"!=typeof window&&void 0!==window.document,Fl=4,zl=1e-7,Vl=10,Gl="function"==typeof Float32Array,Hl=function(t,e){return 1-3*e+3*t},Wl=function(t,e){return 3*e-6*t},Yl=function(t){return 3*t},Ul=function(t,e,n){return((Hl(e,n)*t+Wl(e,n))*t+Yl(e))*t},ql=function(t,e,n){return 3*Hl(e,n)*t*t+2*Wl(e,n)*t+Yl(e)};function Xl(t,e,n){return n?Math.min(t,e)===t?e:Math.max(t,n)===t?n:t:Math.max(t,e)===e?t:e}function Zl(t){return void 0===t?0:360<t||t<-360?t%360:t}function Kl(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),hl(t)?_(t,e,n):Array.isArray(t)&&3===t.length?Po(t):_(t[0],t[1]||e,t[2]||n)}function $l(t){return t*(Math.PI/180)}function Jl(t){return t*(180/Math.PI)}function Ql(t,e){return 16===e.length?(n=t,r=e,a=.5*Math.PI,s=(u=bo(m(),r))[0],l=u[1],u=u[2],(c=Math.asin(-r[2]/s))<a?-a<c?(i=Math.atan2(r[6]/l,r[10]/u),o=Math.atan2(r[1]/s,r[0]/s)):(o=0,i=-Math.atan2(r[4]/l,r[5]/l)):(o=0,i=Math.atan2(r[4]/l,r[5]/l)),n[0]=i,n[1]=c,n[2]=o,n):(a=t,s=(u=e)[0],r=u[1],l=u[2],u=u[3],.499995*(n=s*s+(i=r*r)+(c=l*l)+(o=u*u))<(t=s*u-r*l)?(a[0]=Math.PI/2,a[1]=2*Math.atan2(r,s),a[2]=0):t<-.499995*n?(a[0]=-Math.PI/2,a[1]=2*Math.atan2(r,s),a[2]=0):(a[0]=Math.asin(2*(s*l-u*r)),a[1]=Math.atan2(2*(s*u+r*l),1-2*(c+o)),a[2]=Math.atan2(2*(s*r+l*u),1-2*(i+c))),a);var n,r,i,o,a,s,l,u,c}function tu(t,e,n,r,i){var o,a,s,l,u=Math.cos(t),t=Math.sin(t);return o=r*u,a=i*t,r=-r*t,t=i*u,u=i=0,e=e,n=n,s=1,(l=new eo(9))[0]=o,l[1]=a,l[2]=i,l[3]=r,l[4]=t,l[5]=u,l[6]=e,l[7]=n,l[8]=s,l}function eu(t){var e=t[0],n=t[1],r=t[3],i=t[4],o=Math.sqrt(e*e+n*n),a=Math.sqrt(r*r+i*i);e*i-n*r<0&&(e<i?o=-o:a=-a),o&&(e*=1/o,n*=1/o),a&&(i*=1/a);r=Jl(Math.atan2(n,e));return[t[6],t[7],o,a,r]}function nu(t){return Math.pow(t,2)}function ru(t){return Math.pow(t,3)}function iu(t){return Math.pow(t,4)}function ou(t){return Math.pow(t,5)}function au(t){return Math.pow(t,6)}function su(t){return 1-Math.cos(t*Math.PI/2)}function lu(t){return 1-Math.sqrt(1-t*t)}function uu(t){return t*t*(3*t-2)}function cu(t){for(var e,n=4;t<((e=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*e-2)/22-t,2)}function hu(t,e){var n=(e=e=void 0===e?[]:e)[0],e=void 0===(e=e[1])?.5:e,n=Xl(Number(void 0===n?1:n),1,10),e=Xl(Number(e),.1,2);return 0===t||1===t?t:-n*Math.pow(2,10*(t-1))*Math.sin((t-1-e/(2*Math.PI)*Math.asin(1/n))*(2*Math.PI)/e)}function du(t,e,n){var r=(e=e=void 0===e?[]:e)[0],i=void 0===(i=e[1])?100:i,o=void 0===(o=e[2])?10:o,e=void 0===(e=e[3])?0:e,r=Xl(void 0===r?1:r,.1,1e3),i=Xl(i,.1,1e3),o=Xl(o,.1,1e3),e=Xl(e,.1,1e3),a=Math.sqrt(i/r),i=(o=o/(2*Math.sqrt(i*r)))<1?a*Math.sqrt(1-o*o):0,r=o<1?(o*a-e)/i:-e+a,e=n?n*t/1e3:t,e=o<1?Math.exp(-e*o*a)*(+Math.cos(i*e)+r*Math.sin(i*e)):(1+r*e)*Math.exp(-e*a);return 0===t||1===t?t:1-e}function pu(t,e){var e=e=void 0===e?[]:e,n=void 0===(n=e[0])?10:n;return("start"==e[1]?Math.ceil:Math.floor)(Xl(t,0,1)*n)/n}function fu(t,e){var n=(e=e=void 0===e?[]:e)[0],r=e[1],i=e[2],e=e[3];return Dl(n,r,i,e)(t)}function yu(r){return function(t,e,n){return 1-r(1-t,e=void 0===e?[]:e,n)}}function gu(r){return function(t,e,n){return void 0===e&&(e=[]),t<.5?r(2*t,e,n)/2:1-r(-2*t+2,e,n)/2}}function mu(r){return function(t,e,n){return void 0===e&&(e=[]),t<.5?(1-r(1-2*t,e,n))/2:(r(2*t-1,e,n)+1)/2}}function vu(){var n=this;this.resolve=void 0,this.reject=void 0,this.promise=new Promise(function(t,e){n.resolve=t,n.reject=e})}var ie=Dl(.42,0,1,1),bu={steps:pu,"step-start":function(t){return pu(t,[1,"start"])},"step-end":function(t){return pu(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":fu,ease:function(t){return fu(t,[.25,.1,.25,1])},in:ie,out:yu(ie),"in-out":gu(ie),"out-in":mu(ie),"in-quad":nu,"out-quad":yu(nu),"in-out-quad":gu(nu),"out-in-quad":mu(nu),"in-cubic":ru,"out-cubic":yu(ru),"in-out-cubic":gu(ru),"out-in-cubic":mu(ru),"in-quart":iu,"out-quart":yu(iu),"in-out-quart":gu(iu),"out-in-quart":mu(iu),"in-quint":ou,"out-quint":yu(ou),"in-out-quint":gu(ou),"out-in-quint":mu(ou),"in-expo":au,"out-expo":yu(au),"in-out-expo":gu(au),"out-in-expo":mu(au),"in-sine":su,"out-sine":yu(su),"in-out-sine":gu(su),"out-in-sine":mu(su),"in-circ":lu,"out-circ":yu(lu),"in-out-circ":gu(lu),"out-in-circ":mu(lu),"in-back":uu,"out-back":yu(uu),"in-out-back":gu(uu),"out-in-back":mu(uu),"in-bounce":cu,"out-bounce":yu(cu),"in-out-bounce":gu(cu),"out-in-bounce":mu(cu),"in-elastic":hu,"out-elastic":yu(hu),"in-out-elastic":gu(hu),"out-in-elastic":mu(hu),spring:du,"spring-in":du,"spring-out":yu(du),"spring-in-out":gu(du),"spring-out-in":mu(du)},xu=function(t){return("-"===(t=(t=t).replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})).charAt(0)?t.substring(1):t).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()};function wu(t,e){if(Bl)return document.defaultView.getComputedStyle(t,null).getPropertyValue(e)}var Eu={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"};_u={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]+\.?))/},ku="";var _u,ku,Tu=function(t){return ku=t,Su()};function Mu(t){throw new Error(ku+": "+t)}function Su(){var t=Du(Ou);return 0<ku.length&&Mu("Invalid input not EOF"),t}function Ou(){return Pu("linear-gradient",_u.linearGradient,Nu)||Pu("repeating-linear-gradient",_u.repeatingLinearGradient,Nu)||Pu("radial-gradient",_u.radialGradient,Cu)||Pu("repeating-radial-gradient",_u.repeatingRadialGradient,Cu)||Pu("conic-gradient",_u.conicGradient,Cu)}function Pu(n,t,r){return Au(t,function(t){var e=r();return e&&!Hu(_u.comma)&&Mu("Missing comma before color stops"),{type:n,orientation:e,colorStops:Du(Bu)}})}function Au(t,e){t=Hu(t);if(t)return Hu(_u.startCall)||Mu("Missing ("),e=e(t),Hu(_u.endCall)||Mu("Missing )"),e}function Nu(){return Gu("directional",_u.sideOrCorner,1)||Gu("angular",_u.angleValue,1)}function Cu(){var t,e,n=Lu();return n&&((t=[]).push(n),e=ku,Hu(_u.comma)&&((n=Lu())?t.push(n):ku=e)),t}function Lu(){var t,e=function(){var t=Gu("shape",/^(circle)/i,0);t&&(t.style=Vu()||Iu());return t}()||function(){var t=Gu("shape",/^(ellipse)/i,0);t&&(t.style=zu()||Iu());return t}();return e?e.at=ju():(t=Iu())?(e=t,(t=ju())&&(e.at=t)):(t=Ru())&&(e={type:"default-radial",at:t}),e}function Iu(){return Gu("extent-keyword",_u.extentKeywords,1)}function ju(){var t;if(Gu("position",/^at/,0))return(t=Ru())||Mu("Missing positioning value"),t}function Ru(){var t={x:zu(),y:zu()};if(t.x||t.y)return{type:"position",value:t}}function Du(t){var e=t(),n=[];if(e)for(n.push(e);Hu(_u.comma);)(e=t())?n.push(e):Mu("One extra comma");return n}function Bu(){var t=Gu("hex",_u.hexColor,1)||Au(_u.rgbaColor,function(){return{type:"rgba",value:Du(Fu)}})||Au(_u.rgbColor,function(){return{type:"rgb",value:Du(Fu)}})||Gu("literal",_u.literalColor,0);return t||Mu("Expected color definition"),t.length=zu(),t}function Fu(){return Hu(_u.number)[1]}function zu(){return Gu("%",_u.percentageValue,1)||Gu("position-keyword",_u.positionKeywords,1)||Vu()}function Vu(){return Gu("px",_u.pixelValue,1)||Gu("em",_u.emValue,1)}function Gu(t,e,n){e=Hu(e);if(e)return{type:t,value:e[n]}}function Hu(t){var e=/^[\n\r\t\s]+/.exec(ku),e=(e&&Wu(e[0].length),t.exec(ku));return e&&Wu(e[0].length),e}function Wu(t){ku=ku.substring(t)}function Yu(t){return t}function Uu(n,r){return function(t){var e;return 1<=t?1:(t+=r*(e=1/n))-t%e}}var Nt="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",qu=new RegExp("cubic-bezier\\("+Nt+","+Nt+","+Nt+","+Nt+"\\)"),Xu=/steps\(\s*(\d+)\s*\)/,Zu=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function Ku(t){var e=qu.exec(t);return e?Dl.apply(void 0,e.slice(1).map(Number)):(e=Xu.exec(t))?Uu(Number(e[1]),0):(e=Zu.exec(t))?Uu(Number(e[1]),{start:1,middle:.5,end:0}[e[2]]):bu[xu(t)]||bu.linear}function $u(t){return Math.abs((0!==(e=t).duration&&0!==e.iterations?("auto"===e.duration?0:Number(e.duration))*(null!=(e=e.iterations)?e:1):0)/(t.playbackRate||1));var e}var Ju=0,Qu=1,tc=2,ec=3;function nc(t,e,n){u=t,i=n;var r,i,o,a,s,l=null===(l=e)?Ju:(r=i.endTime,l<Math.min(i.delay,r)?Qu:l>=Math.min(i.delay+u+i.endDelay,r)?tc:ec),u=function(t,e,n,r,i){switch(r){case Qu:return"backwards"===e||"both"===e?0:null;case ec:return n-i;case tc:return"forwards"===e||"both"===e?t:null;case Ju:return null}}(t,n.fill,e,l,n.delay);return null===u?null:(i="auto"===n.duration?0:n.duration,r=i,t=l,e=n.iterations,a=u,s=n.iterationStart,0===r?t!==Qu&&(s+=e):s+=a/r,e=t=s,a=n.iterationStart,s=l,o=n.iterations,u=u,i=i,e=a=0!==(a=e===1/0?a%1:e%1)||s!==tc||0===o||0===u&&0!==i?a:1,s=n.iterations,o=e,u=t,i=l===tc&&s===1/0?1/0:1===o?Math.floor(u)-1:Math.floor(u),a=n.direction,t=i,l=e,"normal"!==(s=a)&&"reverse"!==a&&(t=t,"alternate-reverse"===a&&(t+=1),s=t!==1/0&&t%2!=0?"reverse":"normal"),o="normal"===s?l:1-l,n.currentIteration=i,n.progress=o,n.easingFunction(o))}var rc=Da(function(t){return(t=void 0===t?"":t).replace(/-([a-z])/g,function(t){return t[1].toUpperCase()})});function ic(t){return!S(t)&&"string"==typeof t}function oc(t,e,n){var o=function(t,e){for(var n={},r=0;r<t.length;r++)for(var i in t[r]){var o;ac(i)&&(o={offset:t[r].offset,computedOffset:t[r].computedOffset,easing:t[r].easing,easingFunction:Ku(t[r].easing)||e.easingFunction,value:t[r][i]},n[i]=n[i]||[],n[i].push(o))}return n}(t,e),a=function(t,e){var n,r=[];for(n in t)for(var i=t[n],o=0;o<i.length-1;o++){var a=o,s=o+1,l=i[a].computedOffset,u=i[s].computedOffset,c=l,h=u;0===o&&(c=-1/0,0===u&&(s=a)),o===i.length-2&&(h=1/0,1===l&&(a=s)),r.push({applyFrom:c,applyTo:h,startOffset:i[a].computedOffset,endOffset:i[s].computedOffset,easingFunction:i[a].easingFunction,property:n,interpolation:function(t,e,n,r){var i=qc[t];if(i&&i.syntax&&i.interpolable){i=Jf.getPropertySyntax(i.syntax);if(i){var o,a=Jf.parseProperty(t,e,r),s=Jf.parseProperty(t,n,r),a=Jf.computeProperty(t,a,r),t=Jf.computeProperty(t,s,r),s=i.mixer(a,t,r);if(s)return o=sc.apply(void 0,s),function(t){return 0===t?e:1===t?n:o(t)}}}return sc(!1,!0,function(t){return t?n:e})}(n,i[a].value,i[s].value,e)})}return r.sort(function(t,e){return t.startOffset-e.startOffset}),r}(o,n);return function(r,i){if(null!==i)a.filter(function(t){return i>=t.applyFrom&&i<t.applyTo}).forEach(function(t){var e=i-t.startOffset,n=t.endOffset-t.startOffset,e=0==n?0:t.easingFunction(e/n);r.style[t.property]=t.interpolation(e)});else for(var t in o)ac(t)&&(r.style[t]=null)}}function ac(t){return"offset"!==t&&"easing"!==t&&"composite"!==t&&"computedOffset"!==t}var sc=function(e,n,r){return function(t){return r(function t(e,n,r){if("number"==typeof e&&"number"==typeof n)return e*(1-r)+n*r;if("boolean"==typeof e&&"boolean"==typeof n||"string"==typeof e&&"string"==typeof n)return r<.5?e:n;if(Array.isArray(e)&&Array.isArray(n)&&e.length===n.length){for(var i=[],o=0;o<e.length;o++)i.push(t(e[o],n[o],r));return i}throw new Error("Mismatched interpolation arguments "+e+":"+n)}(e,n,t))}};var M,lc={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign",values:{middle:"center"}},src:{alias:"img"}},uc=Da(function(t){var t=rc(t),e=lc[t];return[t=(null==e?void 0:e.alias)||t,e]});function cc(t,e){var t=uc(t),n=t[0],t=t[1];return[n,ic(e)&&(null==t||null==(n=t.values)?void 0:n[e])||e]}(Lt=M=M||{}).GROUP="g",Lt.CIRCLE="circle",Lt.ELLIPSE="ellipse",Lt.IMAGE="image",Lt.RECT="rect",Lt.LINE="line",Lt.POLYLINE="polyline",Lt.POLYGON="polygon",Lt.TEXT="text",Lt.PATH="path",Lt.HTML="html",Lt.MESH="mesh";var hc=p.defineToken("");function dc(t,e,n,r){var i=(-1+Math.sqrt(2))/3*4,o=t*i,i=e*i,a=n-t,t=n+t,s=r-e,e=r+e;return[["M",a,r],["C",a,r-i,n-o,s,n,s],["C",n+o,s,t,r-i,t,r],["C",t,r+i,n+o,e,n,e],["C",n-o,e,a,r+i,a,r],["Z"]]}function pc(t,e){void 0===e&&(e=!0);var n,r,i,o,a,s,l,u,c,h,d=[];switch(t.nodeName){case M.LINE:var p=t.parsedStyle,d=[["M",p.x1,p.y1],["L",p.x2,p.y2]];break;case M.CIRCLE:var p=t.parsedStyle,f=p.r,y=p.cx,p=p.cy;d=dc(f,f,y,p);break;case M.ELLIPSE:var f=t.parsedStyle,y=f.rx,p=f.ry,g=f.cx,f=f.cy;d=dc(y,p,g,f);break;case M.POLYLINE:case M.POLYGON:y=t.parsedStyle.points;p=y.points,g=t.nodeName===M.POLYGON,p=p.map(function(t,e){return[0===e?"M":"L",t[0],t[1]]}),g&&p.push(["Z"]),d=p;break;case M.RECT:var f=t.parsedStyle,m=f.width,v=f.height,y=f.x,b=f.y,f=f.radius,x=f&&f.some(function(t){return 0!==t});n=m,r=v,y=y,b=b,x=x&&f.map(function(t){return Xl(t,0,Math.min(Math.abs(m)/2,Math.abs(v)/2))}),d=x?(o=(f=0<n?1:-1)+(E=0<r?1:-1)!=0?1:0,[["M",f*(i=x[0])+y,b],["L",n-f*(w=x[1])+y,b],w?["A",w,w,0,0,o,n+y,E*w+b]:null,["L",n+y,r-E*(w=x[2])+b],w?["A",w,w,0,0,o,n+y-f*w,r+b]:null,["L",y+f*(w=x[3]),r+b],w?["A",w,w,0,0,o,y,r+b-E*w]:null,["L",y,E*i+b],i?["A",i,i,0,0,o,f*i+y,b]:null,["Z"]].filter(function(t){return t})):[["M",y,b],["L",y+n,b],["L",y+n,b+r],["L",y,b+r],["Z"]];break;case M.PATH:var x=t.parsedStyle.path,w=x.curve,E=x.zCommandIndexes;d=[].concat(w),E.forEach(function(t,e){d.splice(t+e,1,["Z"])})}if(d.length)return a=d,s=t,(l=void 0===(l=e)?!0:l)&&(u=s.getLocalTransform()),e=(s=s.parsedStyle).defX,c=void 0===e?0:e,h=void 0===(e=s.defY)?0:e,a.reduce(function(t,e){var n,r,i,o="";return"M"===e[0]||"L"===e[0]?(i=_(e[1]-c,e[2]-h,0),l&&Fo(i,i,u),o=""+e[0]+i[0]+","+i[1]):"Z"===e[0]?o=e[0]:"C"===e[0]?(i=_(e[1]-c,e[2]-h,0),n=_(e[3]-c,e[4]-h,0),r=_(e[5]-c,e[6]-h,0),l&&(Fo(i,i,u),Fo(n,n,u),Fo(r,r,u)),o=""+e[0]+i[0]+","+i[1]+","+n[0]+","+n[1]+","+r[0]+","+r[1]):"A"===e[0]&&(i=_(e[6]-c,e[7]-h,0),l&&Fo(i,i,u),o=""+e[0]+e[1]+","+e[2]+","+e[3]+","+e[4]+","+e[5]+","+i[0]+","+i[1]),t+o},"")}function fc(t,e,n){var r=!1,i=!1,e=!!e&&!e.isNone,n=!!n&&!n.isNone;return"visiblepainted"===t||"painted"===t||"auto"===t?(r=e,i=n):"visiblefill"===t||"fill"===t?r=!0:"visiblestroke"===t||"stroke"===t?i=!0:"visible"!==t&&"all"!==t||(i=r=!0),[r,i]}function yc(){return this.call=this._createCall("sync"),this.call.apply(this,arguments)}function gc(){return this.callAsync=this._createCall("async"),this.callAsync.apply(this,arguments)}function mc(){return this.promise=this._createCall("promise"),this.promise.apply(this,arguments)}function vc(t){return Mc.setup(this,t),Mc.create(t)}function bc(t){return Oc.setup(this,t),Oc.create(t)}function xc(){throw new Error("tapAsync is not supported on a SyncHook")}function wc(){throw new Error("tapPromise is not supported on a SyncHook")}function Ec(t){return Ac.setup(this,t),Ac.create(t)}function _c(){throw new Error("tapAsync is not supported on a SyncWaterfallHook")}function kc(){throw new Error("tapPromise is not supported on a SyncWaterfallHook")}function Tc(t){return Cc.setup(this,t),Cc.create(t)}var Ht=function(){function t(t,e){void 0===t&&(t=[]),void 0===e&&(e=void 0),this.name=void 0,this.taps=void 0,this.promise=void 0,this._promise=void 0,this._args=t,this.name=e,this.taps=[],this.interceptors=[],this._call=yc,this.call=yc,this._callAsync=gc,this.callAsync=gc,this._promise=mc,this.promise=mc,this._x=void 0}var e=t.prototype;return e.compile=function(t){throw new Error("Abstract: should be overridden")},e._createCall=function(t){return this.compile({taps:this.taps,interceptors:this.interceptors,args:this._args,type:t})},e._tap=function(t,e,n){if("string"==typeof e)e={name:e.trim()};else if("object"!=typeof e||null===e)throw new Error("Invalid tap options");if("string"!=typeof e.name||""===e.name)throw new Error("Missing name for tap");e=Object.assign({type:t,fn:n},e),e=this._runRegisterInterceptors(e),this._insert(e)},e.tap=function(t,e){this._tap("sync",t,e)},e.tapAsync=function(t,e){this._tap("async",t,e)},e.tapPromise=function(t,e){this._tap("promise",t,e)},e._runRegisterInterceptors=function(t){for(var e=el(this.interceptors);!(n=e()).done;){var n=n.value;!n.register||void 0!==(n=n.register(t))&&(t=n)}return t},e.withOptions=function(e){function n(t){return Object.assign({},e,"string"==typeof t?{name:t}:t)}var r=this;return{name:this.name,tap:function(t,e){return r.tap(n(t),e)},tapAsync:function(t,e){return r.tapAsync(n(t),e)},tapPromise:function(t,e){return r.tapPromise(n(t),e)},isUsed:function(){return r.isUsed()},withOptions:function(t){return r.withOptions(n(t))}}},e.isUsed=function(){return 0<this.taps.length||0<this.interceptors.length},e._resetCompilation=function(){this.call=this._call,this.callAsync=this._callAsync,this.promise=this._promise},e._insert=function(t){this._resetCompilation(),"string"==typeof t.before?e=new Set([t.before]):Array.isArray(t.before)&&(e=new Set(t.before));for(var e,n=0,r=("number"==typeof t.stage&&(n=t.stage),this.taps.length);0<r;){r--;var i=this.taps[r],o=(this.taps[r+1]=i).stage||0;if(e){if(e.has(i.name)){e.delete(i.name);continue}if(0<e.size)continue}if(!(n<o)){r++;break}}this.taps[r]=t},t}(),Kt=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,o=t.onResult,n=t.onDone,e="",a=0;a<this.options.interceptors.length;a++){var s=this.options.interceptors[a];s.call&&(e+=this.getInterceptor(a)+".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:o&&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+=o(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=el(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,o=e.rethrowIfPossible,a="",s=!1,l=0;l<this.options.interceptors.length;l++){var u=this.options.interceptors[l];u.tap&&(s||(a+="var _tap"+t+" = "+this.getTap(t)+";\n",s=!0),a+=this.getInterceptor(l)+".tap("+(u.context?"_context, ":"")+"_tap"+t+");\n")}a+="var _fn"+t+" = "+this.getTapFn(t)+";\n";var c=this.options.taps[t];switch(c.type){case"sync":o||(a=a+"var _hasError"+t+" = false;\ntry {\n"),a+=r?"var _result"+t+" = _fn"+t+"("+this.args({before:c.context?"_context":void 0})+");\n":"_fn"+t+"("+this.args({before:c.context?"_context":void 0})+");\n",o||(a=(a=(a=a+"} catch(_err) {\n_hasError"+t+" = true;\n")+n("_err"))+"}\nif(!_hasError"+t+") {\n"),r&&(a+=r("_result"+t)),i&&(a+=i()),o||(a+="}\n");break;case"async":var h=(h=(h="")+(r?"(function(_err"+t+", _result"+t+") {\n":"(function(_err"+t+") {\n")+("if(_err"+t+") {\n"))+n("_err"+t)+"} else {\n";r&&(h+=r("_result"+t)),i&&(h+=i()),a+="_fn"+t+"("+this.args({before:c.context?"_context":void 0,after:h=h+"}\n"+"})"})+");\n";break;case"promise":a=(a=(a=(a+="var _hasResult"+t+" = false;\n")+("var _promise"+t+" = _fn"+t+"("+this.args({before:c.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&&(a+=r("_result"+t)),i&&(a+=i()),a=(a=a+("}), function(_err"+t+") {\n")+("if(_hasResult"+t+") throw _err"+t+";\n"))+n("_err"+t)+"});\n"}return a},e.callTapsSeries=function(t){var o=this,a=t.onError,s=t.onResult,e=t.resultReturns,l=t.onDone,n=t.doneReturns,u=t.rethrowIfPossible;if(0===this.options.taps.length)return l();for(var c=this.options.taps.findIndex(function(t){return"sync"!==t.type}),h=e||n,d="",p=l,f=0,r=function(t){function e(t){return t?"":l()}var n=t,r=(p!==l&&("sync"!==o.options.taps[n].type||20<f++)&&(f=0,d=(d+="function _next"+n+"() {\n")+p()+"}\n",p=function(){return(h?"return ":"")+"_next"+n+"();\n"}),p),i=o.callTap(n,{onError:function(t){return a(n,t,r,e)},onResult:s&&function(t){return s(n,t,r,e)},onDone:!s&&r,rethrowIfPossible:u&&(c<0||n<c)});p=function(){return i}},i=this.options.taps.length-1;0<=i;i--)r(i);return d+=p()},e.callTapsLooping=function(t){var e=t.onError,n=t.onDone,t=t.rethrowIfPossible;if(0===this.options.taps.length)return n();var o=this.options.taps.every(function(t){return"sync"===t.type}),r="";o||(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 a=this.options.interceptors[i];a.loop&&(r+=this.getInterceptor(i)+".loop("+this.args({before:a.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 o||(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&&o})+"} while(_loop);\n",o||(r+="_loopAsync = true;\n});\n_looper();\n"),r},e.callTapsParallel=function(t){var e=this,o=t.onError,a=t.onResult,s=t.onDone,l=t.rethrowIfPossible,t=t.onTap,u=void 0===t?function(t,e){return e()}:t;if(this.options.taps.length<=1)return this.callTapsSeries({onError:o,onResult:a,onDone:s,rethrowIfPossible:l});for(var c="",n=(c=(c+="do {\n")+("var _counter = "+this.options.taps.length+";\n"),s&&(c=(c+="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"}c=(c+="if(_counter <= 0) break;\n")+u(n,function(){return e.callTap(n,{onError:function(t){var e="";return(e+="if(_counter > 0) {\n")+o(n,t,r,i)+"}\n"},onResult:a&&function(t){var e="";return(e+="if(_counter > 0) {\n")+a(n,t,r,i)+"}\n"},onDone:!a&&r,rethrowIfPossible:l})},r,i)}),r=0;r<this.options.taps.length;r++)n(r);return c+="} 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}(),Mc=new(function(t){function e(){return t.apply(this,arguments)||this}return b(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}(Kt)),Sc=function(n){function t(t,e){return(t=n.call(this,t=void 0===t?[]:t,e=void 0===e?void 0:e)||this).compile=vc,t._call=void 0,t.call=void 0,t}return b(t,n),t}(Ht),Oc=new(function(t){function e(){return t.apply(this,arguments)||this}return b(e,t),e.prototype.content=function(t){var i=this,o=t.onError,e=t.onResult;return t.onDone,this.callTapsSeries({onError:function(t,e,n,r){return o(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}(Kt)),Pc=function(n){function t(t,e){return(t=n.call(this,t=void 0===t?[]:t,e=void 0===e?void 0:e)||this).compile=bc,t._call=void 0,t.call=void 0,t}return b(t,n),t}(Ht),Ac=new(function(t){function e(){return t.apply(this,arguments)||this}return b(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}(Kt)),Nc=function(n){function t(t,e){return(t=n.call(this,t=void 0===t?[]:t,e=void 0===e?void 0:e)||this).tapAsync=xc,t.tapPromise=wc,t.compile=Ec,t}return b(t,n),t}(Ht),Cc=new(function(t){function e(){return t.apply(this,arguments)||this}return b(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}(Kt)),Lc=function(n){function t(t,e){return(t=n.call(this,t=void 0===t?[]:t,e=void 0===e?void 0:e)||this).tapAsync=_c,t.tapPromise=kc,t.compile=Tc,t}return b(t,n),t}(Nc),Ic=["serif","sans-serif","monospace","cursive","fantasy","system-ui"];function jc(t){return ih[t]||(ih[t]=new sl(t)),ih[t]}var Rc,Dc=p.defineToken(""),Bc=p.defineToken(""),Fc=function(){function g(t,e){this.center=m(),this.halfExtents=m(),this.min=m(),this.max=m(),this.update(t,e)}g.isEmpty=function(t){return!t||0===t.halfExtents[0]&&0===t.halfExtents[1]&&0===t.halfExtents[2]};var t=g.prototype;return t.update=function(t,e){t&&No(this.center,t),e&&No(this.halfExtents,e||_(0,0,0)),this.min=Go(this.min,this.center,this.halfExtents),this.max=Lo(this.max,this.center,this.halfExtents)},t.setMinMax=function(t,e){Lo(this.center,e,t),jo(this.center,this.center,.5),Go(this.halfExtents,e,t),jo(this.halfExtents,this.halfExtents,.5),No(this.min,t),No(this.max,e)},t.getMin=function(){return this.min},t.getMax=function(){return this.max},t.add=function(t){var e,n,r,i,o,a,s,l,u,c,h,d,p,f,y;g.isEmpty(t)||(g.isEmpty(this)?this.setMinMax(t.getMin(),t.getMax()):(n=(e=this.center)[0],f=e[1],o=e[2],i=(r=this.halfExtents)[0],h=r[1],a=r[2],l=(d=t.center)[0],y=d[1],d=d[2],u=(t=t.halfExtents)[0],(p=y-(c=t[1]))<(s=f-h)&&(s=p),(p=f+h)<(f=y+c)&&(p=f),(y=d-(h=t[2]))<(c=o-a)&&(c=y),(f=o+a)<(t=d+h)&&(f=t),e[0]=.5*((o=(y=l-u)<(o=n-i)?y:o)+(a=(a=n+i)<(d=l+u)?d:a)),e[1]=.5*(s+p),e[2]=.5*(c+f),r[0]=.5*(a-o),r[1]=.5*(p-s),r[2]=.5*(f-c),this.min[0]=o,this.min[1]=s,this.min[2]=c,this.max[0]=a,this.max[1]=p,this.max[2]=f))},t.setFromTransformedAABB=function(t,e){var n=this.center,r=this.halfExtents,i=t.center,t=t.halfExtents,o=e[0],a=e[4],s=e[8],l=e[1],u=e[5],c=e[9],h=e[2],d=e[6],p=e[10],f=Math.abs(o),y=Math.abs(a),g=Math.abs(s),m=Math.abs(l),v=Math.abs(u),b=Math.abs(c),x=Math.abs(h),w=Math.abs(d),E=Math.abs(p);Co(n,e[12]+o*i[0]+a*i[1]+s*i[2],e[13]+l*i[0]+u*i[1]+c*i[2],e[14]+h*i[0]+d*i[1]+p*i[2]),Co(r,f*t[0]+y*t[1]+g*t[2],m*t[0]+v*t[1]+b*t[2],x*t[0]+w*t[1]+E*t[2]),this.min=Go(this.min,n,r),this.max=Lo(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 g,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?No(m(),this.min):272===t.pnVertexFlag?_(this.min[0],this.min[1],this.max[2]):257===t.pnVertexFlag?_(this.min[0],this.max[1],this.min[2]):256===t.pnVertexFlag?_(this.min[0],this.max[1],this.max[2]):17===t.pnVertexFlag?_(this.max[0],this.min[1],this.min[2]):16===t.pnVertexFlag?_(this.max[0],this.min[1],this.max[2]):1===t.pnVertexFlag?_(this.max[0],this.max[1],this.min[2]):_(this.max[0],this.max[1],this.max[2])},t.getPositiveFarPoint=function(t){return 273===t.pnVertexFlag?No(m(),this.max):272===t.pnVertexFlag?_(this.max[0],this.max[1],this.min[2]):257===t.pnVertexFlag?_(this.max[0],this.min[1],this.max[2]):256===t.pnVertexFlag?_(this.max[0],this.min[1],this.min[2]):17===t.pnVertexFlag?_(this.min[0],this.max[1],this.max[2]):16===t.pnVertexFlag?_(this.min[0],this.max[1],this.min[2]):1===t.pnVertexFlag?_(this.min[0],this.min[1],this.max[2]):_(this.min[0],this.min[1],this.min[2])},g}(),zc=(m(),function(){function t(t,e){this.distance=void 0,this.normal=void 0,this.pnVertexFlag=void 0,this.distance=t||0,this.normal=e||_(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 Do(t,this.normal)-this.distance},e.normalize=function(){var t=1/Wo(this.normal);jo(this.normal,this.normal,t),this.distance*=t},e.intersectsLine=function(t,e,n){var r=this.distanceToPoint(t),r=r/(r-this.distanceToPoint(e)),i=0<=r&&r<=1;return i&&n&&Bo(n,t,e,r),i},t}()),Vc=((h=Rc=Rc||{})[h.OUTSIDE=4294967295]="OUTSIDE",h[h.INSIDE=0]="INSIDE",h[h.INDETERMINATE=2147483647]="INDETERMINATE",function(){function t(t){if(this.planes=[],t)this.planes=t;else for(var e=0;e<6;e++)this.planes.push(new zc)}return t.prototype.extractFromVPMatrix=function(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],l=t[7],u=t[8],c=t[9],h=t[10],d=t[11],p=t[12],f=t[13],y=t[14],t=t[15];Co(this.planes[0].normal,i-e,l-o,d-u),this.planes[0].distance=t-p,Co(this.planes[1].normal,i+e,l+o,d+u),this.planes[1].distance=t+p,Co(this.planes[2].normal,i+n,l+a,d+c),this.planes[2].distance=t+f,Co(this.planes[3].normal,i-n,l-a,d-c),this.planes[3].distance=t-f,Co(this.planes[4].normal,i-r,l-s,d-h),this.planes[4].distance=t-y,Co(this.planes[5].normal,i+r,l+s,d+h),this.planes[5].distance=t+y,this.planes.forEach(function(t){t.normalize(),t.updatePNVertexFlag()})},t}()),Gc=(m(),m(),m(),m(),m(),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}()),Hc=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}(),Wc=p.defineToken(""),Yc=p.defineToken(""),Uc=[{name:"display",keywords:["none"]},{name:"opacity",interpolable:!0,inherited:!0,defaultValue:"1",syntax:w.OPACITY_VALUE},{name:"fillOpacity",interpolable:!0,inherited:!0,defaultValue:"1",syntax:w.OPACITY_VALUE},{name:"strokeOpacity",interpolable:!0,inherited:!0,defaultValue:"1",syntax:w.OPACITY_VALUE},{name:"fill",interpolable:!0,keywords:["none"],defaultValue:"none",syntax:w.PAINT},{name:"stroke",interpolable:!0,keywords:["none"],defaultValue:"none",syntax:w.PAINT},{name:"shadowType",keywords:["inner","outer","both"],defaultValue:"outer",layoutDependent:!0},{name:"shadowColor",interpolable:!0,syntax:w.COLOR},{name:"shadowOffsetX",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:w.LENGTH_PERCENTAGE},{name:"shadowOffsetY",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:w.LENGTH_PERCENTAGE},{name:"shadowBlur",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:w.SHADOW_BLUR},{name:"lineWidth",interpolable:!0,inherited:!0,defaultValue:"1",layoutDependent:!0,alias:["strokeWidth"],syntax:w.LENGTH_PERCENTAGE},{name:"increasedLineWidthForHitTesting",inherited:!0,defaultValue:"0",layoutDependent:!0,syntax:w.LENGTH_PERCENTAGE},{name:"lineJoin",inherited:!0,layoutDependent:!0,alias:["strokeLinejoin"],keywords:["miter","bevel","round"],defaultValue:"miter"},{name:"lineCap",inherited:!0,layoutDependent:!0,alias:["strokeLinecap"],keywords:["butt","round","square"],defaultValue:"butt"},{name:"lineDash",interpolable:!0,inherited:!0,keywords:["none"],alias:["strokeDasharray"],syntax:w.LENGTH_PERCENTAGE_12},{name:"lineDashOffset",interpolable:!0,inherited:!0,defaultValue:"0",alias:["strokeDashoffset"],syntax:w.LENGTH_PERCENTAGE},{name:"offsetPath",syntax:w.OFFSET_PATH},{name:"offsetDistance",interpolable:!0,syntax:w.OFFSET_DISTANCE},{name:"dx",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:w.LENGTH_PERCENTAGE},{name:"dy",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:w.LENGTH_PERCENTAGE},{name:"zIndex",independent:!0,interpolable:!0,defaultValue:"0",keywords:["auto"],syntax:w.Z_INDEX},{name:"visibility",keywords:["visible","hidden"],independent:!0,inherited:!0,defaultValue:"visible"},{name:"pointerEvents",inherited:!0,keywords:["none","auto","stroke","fill","painted","visible","visiblestroke","visiblefill","visiblepainted","all"],defaultValue:"auto"},{name:"filter",independent:!0,layoutDependent:!0,keywords:["none"],defaultValue:"none",syntax:w.FILTER},{name:"clipPath",syntax:w.CLIP_PATH},{name:"transform",parsePriority:100,interpolable:!0,keywords:["none"],defaultValue:"none",syntax:w.TRANSFORM},{name:"transformOrigin",parsePriority:100,defaultValue:function(t){return t===M.CIRCLE||t===M.ELLIPSE?"center":t===M.TEXT?"text-anchor":"left top"},layoutDependent:!0,syntax:w.TRANSFORM_ORIGIN},{name:"anchor",parsePriority:99,defaultValue:function(t){return t===M.CIRCLE||t===M.ELLIPSE?"0.5 0.5":"0 0"},layoutDependent:!0,syntax:w.LENGTH_PERCENTAGE_12},{name:"cx",interpolable:!0,defaultValue:"0",syntax:w.COORDINATE},{name:"cy",interpolable:!0,defaultValue:"0",syntax:w.COORDINATE},{name:"r",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:w.LENGTH_PERCENTAGE},{name:"rx",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:w.LENGTH_PERCENTAGE},{name:"ry",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:w.LENGTH_PERCENTAGE},{name:"x",interpolable:!0,defaultValue:"0",syntax:w.COORDINATE},{name:"y",interpolable:!0,defaultValue:"0",syntax:w.COORDINATE},{name:"z",interpolable:!0,defaultValue:"0",syntax:w.COORDINATE},{name:"width",interpolable:!0,layoutDependent:!0,keywords:["auto","fit-content","min-content","max-content"],defaultValue:"0",syntax:w.LENGTH_PERCENTAGE},{name:"height",interpolable:!0,layoutDependent:!0,keywords:["auto","fit-content","min-content","max-content"],defaultValue:"0",syntax:w.LENGTH_PERCENTAGE},{name:"radius",interpolable:!0,layoutDependent:!0,defaultValue:"0",syntax:w.LENGTH_PERCENTAGE_14},{name:"x1",interpolable:!0,layoutDependent:!0,syntax:w.COORDINATE},{name:"y1",interpolable:!0,layoutDependent:!0,syntax:w.COORDINATE},{name:"z1",interpolable:!0,layoutDependent:!0,syntax:w.COORDINATE},{name:"x2",interpolable:!0,layoutDependent:!0,syntax:w.COORDINATE},{name:"y2",interpolable:!0,layoutDependent:!0,syntax:w.COORDINATE},{name:"z2",interpolable:!0,layoutDependent:!0,syntax:w.COORDINATE},{name:"path",interpolable:!0,layoutDependent:!0,defaultValue:"",alias:["d"],syntax:w.PATH,parsePriority:50},{name:"points",layoutDependent:!0,syntax:w.LIST_OF_POINTS,parsePriority:50},{name:"text",layoutDependent:!0,defaultValue:"",syntax:w.TEXT,parsePriority:50},{name:"textTransform",layoutDependent:!0,inherited:!0,keywords:["capitalize","uppercase","lowercase","none"],defaultValue:"none",syntax:w.TEXT_TRANSFORM,parsePriority:51},{name:"font",layoutDependent:!0},{name:"fontSize",interpolable:!0,inherited:!0,defaultValue:"16px",layoutDependent:!0,syntax:w.LENGTH_PERCENTAGE},{name:"fontFamily",layoutDependent:!0,inherited:!0,defaultValue:"sans-serif"},{name:"fontStyle",layoutDependent:!0,inherited:!0,keywords:["normal","italic","oblique"],defaultValue:"normal"},{name:"fontWeight",layoutDependent:!0,inherited:!0,keywords:["normal","bold","bolder","lighter"],defaultValue:"normal"},{name:"fontVariant",layoutDependent:!0,inherited:!0,keywords:["normal","small-caps"],defaultValue:"normal"},{name:"lineHeight",layoutDependent:!0,syntax:w.LENGTH,interpolable:!0,defaultValue:"0"},{name:"letterSpacing",layoutDependent:!0,syntax:w.LENGTH,interpolable:!0,defaultValue:"0"},{name:"miterLimit",layoutDependent:!0,syntax:w.NUMBER,defaultValue:function(t){return t===M.PATH||t===M.POLYGON||t===M.POLYLINE?"4":"10"}},{name:"wordWrap",layoutDependent:!0},{name:"wordWrapWidth",layoutDependent:!0},{name:"leading",layoutDependent:!0},{name:"textBaseline",layoutDependent:!0,inherited:!0,keywords:["top","hanging","middle","alphabetic","ideographic","bottom"],defaultValue:"alphabetic"},{name:"textAlign",layoutDependent:!0,inherited:!0,keywords:["start","center","end","left","right"],defaultValue:"start"},{name:"whiteSpace",layoutDependent:!0},{name:"markerStart",syntax:w.MARKER},{name:"markerEnd",syntax:w.MARKER},{name:"markerMid",syntax:w.MARKER},{name:"markerStartOffset",syntax:w.LENGTH,layoutDependent:!0,interpolable:!0,defaultValue:"0"},{name:"markerEndOffset",syntax:w.LENGTH,layoutDependent:!0,interpolable:!0,defaultValue:"0"}],qc={},Xc={},Zc={},Kc=Da(function(t){return t.sort(function(t,e){return Zc[t]-Zc[e]})}),$c=m(),Jc=m(),Qc=m(),th=new sl("unset"),zt=new sl("initial"),jt=new sl("inherit"),eh=new Ll(0,0,0,0,!0),nh=new Ll(0,0,0,0),rh=Da(function(t,e,n,r){return new Ll(t,e,n,r)},function(t,e,n,r){return"rgba("+t+","+e+","+n+","+r+")"}),ih={"":th,unset:th,initial:zt,inherit:jt},oh=function(){function t(){this.propertySyntaxFactory=void 0,this.geometryUpdaterFactory=void 0}var e=t.prototype;return e.init=function(){var e=this;Uc.forEach(function(t){e.registerMetadata(t)})},e.registerMetadata=function(e){[e.name].concat(e.alias||[]).forEach(function(t){qc[t]=e,Zc[t]=e.parsePriority||0})},e.unregisterMetadata=function(t){delete qc[t]},e.getPropertySyntax=function(t){return this.propertySyntaxFactory(t)},e.processProperties=function(n,r,t){var i=this,t=t=void 0===t?{skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[]}:t,o=t.skipUpdateAttribute,e=t.skipParse,a=t.forceUpdateGeometry,t=t.usedAttributes,s=a,a=Object.keys(r);a.forEach(function(t){var t=cc(t,r[t]),e=t[0],t=t[1];o||(n.attributes[e]=t),!s&&null!=(t=qc[e])&&t.layoutDependent&&(s=!0)}),e||a.forEach(function(t){n.computedStyle[t]=i.parseProperty(t,n.attributes[t],n)}),(a=Kc(null!=t&&t.length?Array.from(new Set(a.concat(t))):a)).forEach(function(t){t in n.computedStyle&&(n.parsedStyle[t]=i.computeProperty(t,n.computedStyle[t],n))}),s&&this.updateGeometry(n),a.forEach(function(t){t in n.parsedStyle&&i.postProcessProperty(t,n)}),n.children.length&&a.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=qc[t],i=e;return"unset"===(e=""!==e&&!S(e)?e:"unset")||"initial"===e||"inherit"===e?i=jc(e):t&&(r=t.keywords,t=(t=t.syntax)&&this.getPropertySyntax(t),r&&-1<r.indexOf(e)?i=jc(e):t&&t.parser&&(i=t.parser(e,n))),i},e.computeProperty=function(t,e,n){var r=qc[t],i="g-root"===n.id,o=e;if(r){var a=r.syntax,s=r.inherited,r=r.defaultValue;if(e instanceof sl){var l=e.value;if("initial"===(l="unset"===l?s&&!i?"inherit":"initial":l))S(r)||(e=this.parseProperty(t,dl(r)?r(n.nodeName):r,n));else if("inherit"===l)return S(s=this.tryToResolveProperty(n,t,{inherited:!0}))?void this.addUnresolveProperty(n,t):s}i=a&&this.getPropertySyntax(a);o=i&&i.calculator?(r=n.parsedStyle[t],i.calculator(t,r,e,n,this)):e instanceof sl?e.value:e}return o},e.postProcessProperty=function(t,e){var t=qc[t];t&&t.syntax&&((t=t.syntax&&this.getPropertySyntax(t.syntax))&&t.postProcessor&&t.postProcessor(e))},e.isPropertyResolved=function(t,e){return!Xc[t.entity]||0===Xc[t.entity].length||Xc[t.entity].includes(e)},e.addUnresolveProperty=function(t,e){Xc[t.entity]||(Xc[t.entity]=[]),-1===Xc[t.entity].indexOf(e)&&Xc[t.entity].push(e)},e.tryToResolveProperty=function(t,e,n){var n=(n=void 0===n?{}:n).inherited;if(n&&(t.parentElement&&this.isPropertyResolved(t.parentElement,e)))return"unset"===(n=t.parentElement.parsedStyle[e])||"initial"===n||"inherit"===n?void 0:n},e.recalc=function(e){var n,t=Xc[e.entity];t&&t.length&&(n={},t.forEach(function(t){n[t]=e.attributes[t]}),this.processProperties(e,n),delete Xc[e.entity])},e.updateGeometry=function(t){var s,e,n,r,i,o,a,l,u,c,h,d,p,f,y,g,m,v=this.geometryUpdaterFactory(t.nodeName);v&&((s=t.geometry).contentBounds||(s.contentBounds=new Fc),s.renderBounds||(s.renderBounds=new Fc),e=t.parsedStyle,p=(v=v.update(e,t)).width,d=v.height,f=void 0===(f=v.depth)?0:f,h=void 0===(h=v.offsetX)?0:h,m=void 0===(m=v.offsetY)?0:m,v=void 0===(v=v.offsetZ)?0:v,n=p<0,r=d<0,f=Co($c,Math.abs(p)/2,Math.abs(d)/2,f/2),l=e.stroke,u=e.lineWidth,c=e.increasedLineWidthForHitTesting,g=e.shadowType,y=e.shadowColor,i=void 0===(i=e.filter)?[]:i,o=e.transformOrigin,a=e.anchor,t.nodeName===M.TEXT&&delete e.anchor,p=Co(Jc,(1-2*(a&&a[0]||0))*p/2+h,(1-2*(a&&a[1]||0))*d/2+m,(1-2*(a&&a[2]||0))*f[2]+v),s.contentBounds.update(p,f),h=t.nodeName===M.POLYLINE||t.nodeName===M.POLYGON||t.nodeName===M.PATH?Math.SQRT2:.5,l&&!l.isNone&&Lo(f,f,Co(Qc,d=((u||0)+(c||0))*h,d,0)),s.renderBounds.update(p,f),y&&g&&"inner"!==g&&(v=(m=s.renderBounds).min,l=m.max,u=e.shadowBlur||0,c=e.shadowOffsetX||0,h=e.shadowOffsetY||0,d=v[0]-u+c,p=l[0]+u+c,f=v[1]-u+h,y=l[1]+u+h,v[0]=Math.min(v[0],d),l[0]=Math.max(l[0],p),v[1]=Math.min(v[1],f),l[1]=Math.max(l[1],y),s.renderBounds.setMinMax(v,l)),i.forEach(function(t){var e,n,r,i,o,a=t.name,t=t.params;"blur"===a?(i=t[0].value,s.renderBounds.update(s.renderBounds.center,Lo(s.renderBounds.halfExtents,s.renderBounds.halfExtents,_(i,i,0)))):"drop-shadow"===a&&(i=t[0].value,a=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,o=e[1]-t+a,t=n[1]+t+a,e[0]=Math.min(e[0],r),n[0]=Math.max(n[0],i),e[1]=Math.min(e[1],o),n[1]=Math.max(n[1],t),s.renderBounds.setMinMax(e,n))}),a=e.anchor,g=(n?-1:1)*_h(o[0],0,t),m=(r?-1:1)*_h(o[1],1,t),g-=(n?-1:1)*(a&&a[0]||0)*s.contentBounds.halfExtents[0]*2,m-=(r?-1:1)*(a&&a[1]||0)*s.contentBounds.halfExtents[1]*2,t.setOrigin(g,m),x.dirtifyToRoot(t))},e.isPropertyInheritable=function(t){t=qc[t];return!!t&&t.inherited},t}(),ah=(t([y(Wc),e("design:type",Function)],oh.prototype,"propertySyntaxFactory",void 0),t([y(Dc),e("design:type",Function)],oh.prototype,"geometryUpdaterFactory",void 0),t([Ct.postConstruct(),e("design:type",Function),e("design:paramtypes",[]),e("design:returntype",void 0)],oh.prototype,"init",null),oh=t([f({token:Yt})],oh),/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i),sh=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,lh=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,uh=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;var ch={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},hh=Da(function(t){t="angular"===t.type?Number(t.value):ch[t.value]||0;return t}),dh=Da(function(t){var e,n=.5,r=.5;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=.5:"right"===e.value?n=1:"top"===e.value?r=0:"bottom"===e.value&&(r=1)),"position-keyword"===(null==t?void 0:t.type)&&("left"===t.value?n=0:"center"===t.value?r=.5:"right"===t.value?n=1:"top"===t.value?r=0:"bottom"===t.value&&(r=1)),"%"===(null==e?void 0:e.type)&&(n=Number(e.value)/100),"%"===(null==t?void 0:t.type)&&(r=Number(e.value)/100)),{cx:n,cy:r}}),ph=Da(function(d){if(-1<d.indexOf("linear")||-1<d.indexOf("radial"))return Tu(d).map(function(t){for(var e=t.type,n=t.orientation,t=t.colorStops,r=t,i=r.length,o=(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),a=Number(r[0].length.value),s=1;s<i;s++){var l,u=null==(l=r[s].length)?void 0:l.value;if(!S(u)&&!S(a)){for(var c=1;c<s-o;c++)r[o+c].length={type:"%",value:""+(a+(Number(u)-a)*c/(s-o))};o=s,a=Number(u)}}var h=t.map(function(t){return[Number(t.length.value)/100,(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 Il(Ml.LinearGradient,{angle:n?hh(n):0,steps:h,hash:d}):"radial-gradient"===e&&"shape"===(n=n||[{type:"shape",value:"circle"}])[0].type&&"circle"===n[0].value?(e=(t=dh(n[0].at)).cx,n=t.cy,new Il(Ml.RadialGradient,{cx:e,cy:n,steps:h,hash:d})):void 0});var t=d[0];if("("===d[1]||"("===d[2])if("l"===t){var e=ah.exec(d);if(e)return n=(null==(n=e[2].match(uh))?void 0:n.map(function(t){return t.split(":")}))||[],[new Il(Ml.LinearGradient,{angle:parseFloat(e[1]),steps:n.map(function(t){var e=t[0],t=t[1];return[Number(e),t]}),hash:d})]}else if("r"===t){e=function(t){var e=sh.exec(t);if(e)return{cx:.5,cy:.5,steps:((null==(e=e[4].match(uh))?void 0:e.map(function(t){return t.split(":")}))||[]).map(function(t){var e=t[0],t=t[1];return[Number(e),t]}),hash:t};return null}(d);if(e){if(!ic(e))return[new Il(Ml.RadialGradient,e)];d=e}}else if("p"===t){var n=d;if(n=lh.exec(n)){var r=n[1],n=n[2];switch(r){case"a":r="repeat";break;case"x":r="repeat-x";break;case"y":r="repeat-y";break;default:r="no-repeat"}return{image:n,repetition:r}}return null}});function fh(t){return fl(t)&&t.image}var yh=Da(function(t){var e;return fh(t)?Ks({repetition:"repeat"},t):"transparent"===(t=S(t)?"":t)?nh:ph(t="currentColor"===t?"black":t)||(e=[0,0,0,0],null!==(t=Qa(t))&&(e[0]=t.r||0,e[1]=t.g||0,e[2]=t.b||0,e[3]=t.opacity),rh.apply(void 0,e))});function gh(t,e){if(t instanceof Ll&&e instanceof Ll)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(Xl(e[n],0,255));return e[3]=Xl(e[3],0,1),"rgba("+e.join(",")+")"}]}function mh(t,e){if(S(e))return new El(0,"px");if(e=(""+e).trim().toLowerCase(),isFinite(Number(e))){if(0<="px".search(t))return new El(Number(e),"px");if(0<="deg".search(t))return new El(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 new El(Number(e.replace(new RegExp("U"+t,"g"),"").replace(new RegExp(r,"g"),"*0")),t)})[0]}var vh=Da(function(t){return mh(new RegExp("px","g"),t)}),bh=(Da(function(t){return mh(new RegExp("%","g"),t)}),Da(function(t){return hl(t)||isFinite(Number(t))?new El(Number(t),"px"):mh(new RegExp("px|%|em|rem","g"),t)})),xh=Da(function(t){return mh(new RegExp("deg|rad|grad|turn","g"),t)});function wh(t){var e=0;return t.unit===v.kDegrees?e=t.value:t.unit===v.kRadians?e=Jl(Number(t.value)):t.unit===v.kTurns&&(e=360*Number(t.value)),e}function Eh(t){return ic(t)?t.split(" ").map(function(t){return bh(t)}):t.map(function(t){return bh(t.toString())})}function _h(t,e,n){var r;return t.unit===v.kPixels?Number(t.value):t.unit===v.kPercentage&&n?(n=n.nodeName===M.GROUP?n.getLocalBounds():n.getGeometryBounds(),r=0,Fc.isEmpty(n)||(r=2*n.halfExtents[e]),Number(t.value)/100*r):0}function kh(t){return t.toString()}var Th=Da(function(t){return"number"==typeof t?new El(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?new El(Number(t)):new El(0)});function Mh(t,e){return[t,e,kh]}function Sh(n,r){return function(t,e){return[t,e,function(t){return kh(Xl(t,n,r))}]}}function Oh(t,e){if(t.length===e.length)return[t,e,function(t){return t}]}Da(function(t){return(ic(t)?t.split(" "):t).map(Th)});var Ph=function(e){if(""===e||Array.isArray(e)&&0===e.length)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:[],totalLength:0,zCommandIndexes:[],rect:{x:0,y:0,width:0,height:0}};var n;try{n=Ea(e)}catch(t){n=Ea(""),console.error("[g]: Invalid SVG Path definition: "+e)}var t,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),r=function(t){for(var e=[],n=[],r=[],i=0;i<t.length;i++){var o=t[i],a=o[0];"M"===a?(r.length&&(n.push(r),r=[]),r.push([o[1],o[2]])):"Z"===a?r.length&&(e.push(r),r=[]):r.push([o[1],o[2]])}return 0<r.length&&n.push(r),{polygons:e,polylines:n}}(n),i=r.polygons,r=r.polylines,o=Pa(n,!0),a=o[0],o=o[1],s=function(t){for(var e=[],n=null,r=0,i=t.length,o=0;o<i;o++){var a=t[o],s=t[o+1],l=a[0],u={command:l,prePoint:n,params:a,startTangent:null,endTangent:null},c=("M"===l&&(r=o),a.length),n=[a[c-2],a[c-1]],c=(u.currentPoint=n,e[r]&&(c=n,h=e[r].currentPoint,c[0]===h[0]&&c[1]===h[1])&&(e[r].prePoint=u.prePoint),s?[s[s.length-2],s[s.length-1]]:null),h=(u.nextPoint=c,u.prePoint);"C"===l&&(s=[a[1],a[2]],c=[a[3],a[4]],u.startTangent=[h[0]-s[0],h[1]-s[1]],u.endTangent=[n[0]-c[0],n[1]-c[1]],0===u.startTangent[0]&&0===u.startTangent[1]&&(u.startTangent=[s[0]-c[0],s[1]-c[1]]),0===u.endTangent[0]&&0===u.endTangent[1]&&(u.endTangent=[c[0]-s[0],c[1]-s[1]])),e.push(u)}return e}(a),l=(l=n)?(u=(l=Ia(l,void 0,T(T({},u),{bbox:!0,length:!0}))).length,c=(h=l.min).x,h=h.y,{length:u,width:d=(l=(u=l.max).x)-c,height:t=(u=u.y)-h,x:c,y:h,x2:l,y2:u,cx:c+d/2,cy:h+t/2,cz:Math.max(d,t)+Math.min(d,t)/2}):{length:0,x:0,y:0,width:0,height:0,x2:0,y2:0,cx:0,cy:0,cz:0},u=l.x,c=l.y,h=l.width,d=l.height;return{absolutePath:n,hasArc:e,segments:s,polygons:i,polylines:r,curve:a,totalLength:l.length,zCommandIndexes:o,rect:{x:Number.isFinite(u)?u:0,y:Number.isFinite(c)?c:0,width:Number.isFinite(h)?h:0,height:Number.isFinite(d)?d:0}}},Ah=Da(Ph);function Nh(t,e){t=(ic(t)?Ah:Ph)(t);return e&&(e.parsedStyle.defX=t.rect.x,e.parsedStyle.defY=t.rect.y),t}function Ch(t,e,n){var r,i,o,a,s,l,u,c,h,t=t.curve,e=e.curve,d=[t,e],e=ja((d=t.length!==e.length?function t(e,n,r){var i,e=Ra(e),n=Ra(n),o=e.length,a=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,u=r||Math.max(o,a),c=[s,l],h=[u-o,u-a],r=[e,n].map(function(t,n){return t.l===u?t.map(function(t){return t.s}):t.map(function(t,e){return i=e&&h[n]&&t.l>=c[n],h[n]-=i?1:0,i?t.ss:[t.s]}).flat()});return r[0].length===r[1].length?r:t(r[0],r[1],u)}(t,e):d)[0])!==ja(d[1])?(r=d[0],t=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(t[0].slice(0,2))].concat(t.map(function(t){return["C"].concat(t.slice(2))}))):ca(d[0]);return[e,(i=d[1],o=e,u=i.length-1,c=[],h=0,s=(a=i).length,l=s-1,(t=a.map(function(t,r){return a.map(function(t,e){var n=r+e;return 0===e||a[n]&&"M"===a[n][0]?(e=a[n],["M"].concat(e.slice(-2))):(s<=n&&(n-=l),a[n])})})).forEach(function(t,n){i.slice(1).forEach(function(t,e){h+=Ta(i[(n+e)%u].slice(-2),o[e%u].slice(-2))}),c[n]=h,h=0}),t[c.indexOf(Math.min.apply(null,c))]),function(t){return t}]}function Lh(t,e){var n,r,i=ic(t)?t.split(" ").map(function(t){var t=t.split(","),e=t[0],t=t[1];return[Number(e),Number(t)]}):t,o=[],a=0,s=fs.length(i),t=(i.forEach(function(t,e){i[e+1]&&((n=[0,0])[0]=a/s,r=ds.length(t[0],t[1],i[e+1][0],i[e+1][1]),a+=r,n[1]=a/s,o.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:o}}var Ih=function(t){return mh(/deg|rad|grad|turn|px|%/g,t)},jh=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function Rh(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<jh.indexOf(e[1])&&r.push({name:e[1],params:e[2].split(" ").map(function(t){return Ih(t)||yh(t)})}),n.lastIndex===t.length)return r}return[]}function Dh(e){return void 0===e&&(e=0),new Promise(function(t){setTimeout(function(){t()},e)})}var Bh,Fh,zh,Vh=p.defineToken(""),Gh=p.defineToken(""),Hh=0,Wh=function(){function t(t){this.options=void 0,this.contextId=void 0,this.workQueue=[],this.mode=void 0,this.layoutChildrenFactory=void 0,this.fragmentResultFactory=void 0,this.layoutFragmentFactory=void 0,this.options=t,this.contextId=""+Hh++,this.mode=t.mode,this.layoutChildrenFactory=t.layoutChildrenFactory,this.fragmentResultFactory=t.fragmentResultFactory,this.layoutFragmentFactory=t.layoutFragmentFactory}var e=t.prototype;return e.appendWorkTask=function(t){this.workQueue.push(t)},e.clearWorkQueue=function(){this.workQueue=[]},t}(),Wh=t([f(),St(0,y(Gh)),e("design:paramtypes",[Object])],Wh),Yh=((oe=Bh=Bh||{}).Layout="layout",oe.IntrinsicSizes="intrinsic-sizes",0,0,(a=Fh=Fh||{}).LAYOUT="display",a.LEFT="left",a.TOP="top",a.BOTTOM="bottom",a.RIGHT="right",a.WIDTH="width",a.HEIGHT="height",a.MIN_WIDTH="minWidth",a.MAX_WIDTH="maxWidth",a.MIN_HEIGHT="minHeight",a.MAX_HEIGHT="maxHeight",a.BOX_SIZING="boxSizing",a.PADDING="padding",a.PADDING_TOP="paddingTop",a.PADDING_BOTTOM="paddingBottom",a.PADDING_START="paddingLeft",a.PADDING_END="paddingRight",a.MARGIN="margin",a.MARGIN_TOP="marginTop",a.MARGIN_BOTTOM="marginBottom",a.MARGIN_START="marginLeft",a.MARGIN_END="marginRight",a.BORDER="border",a.BORDER_TOP="borderTop",a.BORDER_BOTTOM="borderBottom",a.BORDER_START="borderLeft",a.BORDER_END="borderRight",a.FLEX_DIRECTION="flexDirection",a.FLEX_WRAP="flexWrap",a.FLEX_FLOW="flexFlow",a.ALIGN_ITEMS="alignItems",a.ALIGN_CONTENT="alignContent",a.JUSTIFY_CONTENT="justifyContent",a.FLEX="flex",a.ALIGN_SELF="alignSelf",a.FLEX_SHRINK="flexShrink",a.FLEX_BASIS="flexBasis",a.FLEX_GROW="flexGrow",a.OFFSET_WIDTH="offsetWidth",a.OFFSET_HEIGHT="offsetHeight",a.ORDER="order",1),d=function(){function t(t){void 0===t&&(t=new Map),this.id=void 0,this.style=void 0,this.dirty=void 0,this.parent=void 0,this.children=void 0,this.internalIntrisicSizes=void 0,this.computedLayout=void 0,this.measureFn=void 0,this.id=Yh++,this.style=t,this.parent=void 0,this.children=[],this.dirty=!1}var e=t.prototype;return e.setMeasure=function(t){this.measureFn=t},e.setIntrisicSizes=function(t){this.internalIntrisicSizes=t},e.addChild=function(t){var e;null!=(e=this.children)&&e.push(t)},e.insertChild=function(t,e){this.children.splice(t,0,e)},e.removeChild=function(e){var t=null==(t=this.children)?void 0:t.findIndex(function(t){return t.id===e.id});this.removeChildAtIndex(t)},e.removeChildAtIndex=function(t){this.children.splice(t,1)},e.replaceChildAtIndex=function(t,e){this.children.splice(t,1,e)},e.setStyle=function(t,e){this.style.set(t,e)},e.getStyle=function(){for(var n=this,r=new Map,t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return e.forEach(function(t){var e=n.style.get(t);e&&r.set(t,e)}),r},e.getAllStyle=function(){return this.style},e.markDirty=function(){this.dirty=!0},e.idDirty=function(){return this.dirty},e.getSize=function(){var t;return{width:null!=(t=null==(t=this.style.get(Fh.WIDTH))?void 0:t.value)?t:0,height:null!=(t=null==(t=this.style.get(Fh.HEIGHT))?void 0:t.value)?t:0}},e.computeLayout=function(){var t=qs(k().mark(function t(){var e;return k().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.getSize(),t.next=3,Qf.computeLayout(this,{availableInlineSize:e.width,availableBlockSize:e.height,fixedInlineSize:e.width,fixedBlockSize:e.height,percentageInlineSize:e.width,percentageBlockSize:e.height,data:void 0});case 3:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),e.setComputedLayout=function(t){this.computedLayout=t},e.getComputedLayout=function(){return this.computedLayout},e.getAllComputedLayout=function(){},e.toString=function(){return"LayoutObject "+this.id},Zs(t,[{key:"intrisicSizes",get:function(){return this.internalIntrisicSizes}},{key:"childCount",get:function(){return this.children.length}}]),t}(),Uh=p.defineToken(""),qh=p.defineToken(""),Xh=p.defineToken(""),Zh=function(t,e,n){this._layoutContext=void 0,this._node=void 0,this.options=void 0,this.layoutContext=void 0,this.inlineSize=void 0,this.blockSize=void 0,this.node=void 0,this.childFragments=void 0,this.data=void 0,this._layoutContext=t,this._node=e,this.options=n,this.layoutContext=t,this.inlineSize=null==n?void 0:n.inlineSize,this.blockSize=null==n?void 0:n.blockSize,this.childFragments=null==n?void 0:n.childFragments,this.data=n.data,this.node=e},Zh=t([yi(),St(0,y(Wh)),St(1,y(Xh)),St(2,y(qh)),e("design:paramtypes",[Wh,d,Object])],Zh),Kh=p.defineToken(""),$h=p.defineToken(""),Jh=function(){function t(t,e){this._layoutContext=void 0,this.options=void 0,this.node=void 0,this.styleMap=void 0,this.layoutContext=void 0,this._layoutContext=t,this.options=e,this.layoutContext=t,this.node=e.node,this.styleMap=e.node.getAllStyle()}var e=t.prototype;return e.intrinsicSizes=function(){var t=new vu;return this.layoutContext.appendWorkTask({layoutChild:this,taskType:Bh.IntrinsicSizes,deferred:t}),t.promise},e.layoutNextFragment=function(t){if(this.layoutContext.mode===Bh.IntrinsicSizes)throw new Error("Not Supported: cant call layoutNextFragment in intrinsicSizes");var e=new vu;return this.layoutContext.appendWorkTask({layoutConstraints:t,layoutChild:this,taskType:Bh.Layout,deferred:e}),e.promise},t}(),Jh=t([yi(),St(0,y(Wh)),St(1,y($h)),e("design:paramtypes",[Wh,Object])],Jh),Qh=p.defineToken(""),td=p.defineToken(""),ed=[0,0,0,0],nd=function(t){this.options=void 0,this.inlineStart=void 0,this.inlineEnd=void 0,this.blockStart=void 0,this.blockEnd=void 0,this.inline=void 0,this.block=void 0;var t=(this.options=t).node.getAllStyle(),e=null!=(e=null==(e=t.get(Fh.PADDING_TOP))?void 0:e.value)?e:0,n=null!=(n=null==(n=t.get(Fh.PADDING_END))?void 0:n.value)?n:0,r=null!=(r=null==(r=t.get(Fh.PADDING_BOTTOM))?void 0:r.value)?r:0,i=null!=(i=null==(i=t.get(Fh.PADDING_START))?void 0:i.value)?i:0,o=null!=(o=null==(o=t.get(Fh.PADDING_TOP))?void 0:o.value)?o:0,a=null!=(a=null==(a=t.get(Fh.PADDING_END))?void 0:a.value)?a:0,s=null!=(s=null==(s=t.get(Fh.PADDING_BOTTOM))?void 0:s.value)?s:0,t=null!=(t=null==(t=t.get(Fh.PADDING_START))?void 0:t.value)?t:0;this.blockStart=e+ed[0]+o,this.inlineStart=n+ed[1]+a,this.blockEnd=r+ed[2]+s,this.inlineEnd=i+ed[3]+t,this.block=this.blockStart+this.blockEnd,this.inline=this.inlineStart+this.inlineEnd},nd=t([yi(),St(0,y(td)),e("design:paramtypes",[Object])],nd),rd=((u=function(){function t(){this.registry=new Map}var e=t.prototype;return e.hasLayout=function(t){return this.registry.has(t)},e.getLayout=function(t){if(this.hasLayout(t=void 0===t?"absolute":t))return this.registry.get(t);throw new Error("invalid layout property: "+t)},e.updateLayout=function(t,e){this.registry.set(t,e)},e.registerLayout=function(t,e){if(""===t)throw new TypeError("layout name cant't be empty");if(zh.reservedLayout.includes(t))throw new Error("layout name '"+t+"' is a system reserved layout name, please use another name");if(this.hasLayout(t))throw new Error("layout '"+t+"' already exist.");this.registry.set(t,e)},e.deleteLayout=function(t){this.registry.delete(t)},Zs(t,[{key:"size",get:function(){return this.registry.size}}]),t}()).reservedLayout=[],zh=u),rd=zh=t([f()],rd),id=function(){function t(t,e,n){this._layoutRegistry=void 0,this._layoutContextFactory=void 0,this._layoutEdgesFactory=void 0,this.layoutRegistry=void 0,this.layoutContextFactory=void 0,this.layoutEdgesFactory=void 0,this._layoutRegistry=t,this._layoutContextFactory=e,this._layoutEdgesFactory=n,this.layoutRegistry=t,this.layoutContextFactory=e,this.layoutEdgesFactory=n}var e=t.prototype;return e.computeLayout=function(){var n=qs(k().mark(function t(e,n){return k().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.determineIntrinsicSizes(e,e.children);case 2:return t.next=4,this.calculateLayout(e,e.children,n);case 4:case"end":return t.stop()}},t,this)}));return function(t,e){return n.apply(this,arguments)}}(),e.determineAllIntrinsicSizes=function(){var e=qs(k().mark(function t(e){return k().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),e.getLayoutDefinitionName=function(t){t=t.getAllStyle().get(Fh.LAYOUT);if(t)return t.value;throw new Error("layout property not found")},e.determineIntrinsicSizes=function(){var n=qs(k().mark(function t(e,n){var r;return k().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=this.getLayoutDefinitionName(e),t.next=3,this.invokeIntrinsicSizesCallback(r,e,n);case 3:case"end":return t.stop()}},t,this)}));return function(t,e){return n.apply(this,arguments)}}(),e.invokeIntrinsicSizesCallback=function(){var r=qs(k().mark(function t(e,n,r){var i,o,a,s,l;return k().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return l=this.layoutRegistry.getLayout(e),a=new l,i=this.layoutContextFactory({mode:Bh.IntrinsicSizes}),l=l.inputProperties,l=void 0===l?[]:l,o=[],r.forEach(function(t){t=i.layoutChildrenFactory({node:t});o.push(t)}),s=this.layoutEdgesFactory({node:n}),l=n.getStyle.apply(n,l),a=a.intrinsicSizes(o,s,l),(s=this.runWorkQueue(a,i.workQueue)).next(),t.next=13,Dh();case 13:l=s.next().value,i.clearWorkQueue(),n.setIntrisicSizes(l);case 16:case"end":return t.stop()}},t,this)}));return function(t,e,n){return r.apply(this,arguments)}}(),e.calculateLayout=function(){var r=qs(k().mark(function t(e,n,r){var i;return k().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return i=this.getLayoutDefinitionName(e),t.next=3,this.invokeLayoutCallback(i,e,n,r);case 3:case"end":return t.stop()}},t,this)}));return function(t,e,n){return r.apply(this,arguments)}}(),e.invokeLayoutCallback=function(){var i=qs(k().mark(function t(e,n,r,i){var o,a,s,l,u,c;return k().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return l=this.layoutRegistry.getLayout(e),c=new l,o=this.layoutContextFactory({mode:Bh.Layout}),l=l.inputProperties,l=void 0===l?[]:l,a=[],r.forEach(function(t){t=o.layoutChildrenFactory({node:t});a.push(t)}),s=this.layoutEdgesFactory({node:n}),l=n.getStyle.apply(n,l),c=c.layout(a,s,i,l),(s=this.runWorkQueue(c,o.workQueue)).next(),t.next=13,Dh();case 13:l=s.next().value,o.clearWorkQueue(),u=l instanceof Zh?l:o.fragmentResultFactory(l),c=o.layoutFragmentFactory({inlineSize:u.inlineSize,blockSize:u.blockSize,data:u.data}),n.setComputedLayout(c),r.forEach(function(t,e){t.setComputedLayout(u.childFragments[e])});case 19:case"end":return t.stop()}},t,this)}));return function(t,e,n,r){return i.apply(this,arguments)}}(),e.runWorkQueue=k().mark(function t(e,n){var r,i=this;return k().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=function(t){var e,n,r,i;return t.isRejected||t.isFulfilled||(r=n=!(e=!0),(t=t.then(function(t){return e=!(r=!0),i=t},function(t){throw e=!(n=!0),t})).isFulfilled=function(){return r},t.isPending=function(){return e},t.isRejected=function(){return n},t.getFullFilledValue=function(){return i}),t}(e),0<n.length&&r.isPending()&&n.forEach(function(t){var e,n,r;t.taskType===Bh.IntrinsicSizes&&(e=t.layoutChild,n=t.deferred,e=e.node,n.resolve(i.getNodeIntrisicSizes(e))),t.taskType===Bh.Layout&&(n=t.layoutChild,e=t.deferred,t=t.layoutConstraints,r=n.node,n=n.layoutContext,r=i.getNodeFragment(r,t),e.resolve(n.layoutFragmentFactory(r)))}),void(t.next=4);case 4:if(r.isFulfilled()){t.next=6;break}throw new Error("promise not fullfilled!");case 6:return t.abrupt("return",r.getFullFilledValue());case 7:case"end":return t.stop()}},t)}),e.getNodeIntrisicSizes=function(t){var e,n=t.getAllStyle();return{minContentInlineSize:(null==(e=n.get(Fh.MIN_WIDTH))?void 0:e.value)||(null==(e=t.intrisicSizes)?void 0:e.minContentInlineSize)||(null==(e=n.get(Fh.WIDTH))?void 0:e.value)||0,maxContentInlineSize:(null==(e=n.get(Fh.MAX_WIDTH))?void 0:e.value)||(null==(e=t.intrisicSizes)?void 0:e.maxContentInlineSize)||(null==(e=n.get(Fh.WIDTH))?void 0:e.value)||0,minContentBlockSize:(null==(e=n.get(Fh.MIN_HEIGHT))?void 0:e.value)||(null==(e=t.intrisicSizes)?void 0:e.minContentBlockSize)||(null==(e=n.get(Fh.HEIGHT))?void 0:e.value)||0,maxContentBlockSize:(null==(e=n.get(Fh.MAX_HEIGHT))?void 0:e.value)||(null==(e=t.intrisicSizes)?void 0:e.maxContentBlockSize)||(null==(t=n.get(Fh.HEIGHT))?void 0:t.value)||0}},e.getNodeFragment=function(t,e){var n;return{inlineSize:(null==(n=t.getComputedLayout())?void 0:n.inlineSize)||(null==(n=t.getAllStyle().get(Fh.MIN_WIDTH))?void 0:n.value)||(null==(n=t.getAllStyle().get(Fh.WIDTH))?void 0:n.value)||0,blockSize:(null==(n=t.getComputedLayout())?void 0:n.blockSize)||(null==(n=t.getAllStyle().get(Fh.MIN_HEIGHT))?void 0:n.value)||(null==(n=t.getAllStyle().get(Fh.HEIGHT))?void 0:n.value)||0,data:e.data}},t}(),id=t([f(),St(0,y(rd)),St(1,y(Vh)),St(2,y(Qh)),e("design:paramtypes",[rd,Function,Function])],id),od=p.defineToken(""),ad=p.defineToken(""),sd=function(t,e){this._layoutContext=void 0,this.options=void 0,this.layoutContext=void 0,this.inlineSize=void 0,this.blockSize=void 0,this.inlineOffset=void 0,this.blockOffset=void 0,this.data=void 0,this._layoutContext=t,this.options=e,this.layoutContext=t,this.inlineSize=e.inlineSize,this.blockSize=e.blockSize,this.inlineOffset=0,this.blockOffset=0,this.data=e.data},sd=t([yi(),St(0,y(Wh)),St(1,y(ad)),e("design:paramtypes",[Wh,Object])],sd),o=function(t){return new El(t)},ld=null;function ud(t){return function(e){var n=0;return t.map(function(t){return t===ld?e[n++]:t})}}function cd(t){return t}var hd={matrix:["NNNNNN",[ld,ld,0,0,ld,ld,0,0,0,0,1,0,ld,ld,0,1],cd],matrix3d:["NNNNNNNNNNNNNNNN",cd],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",ud([ld,ld,o(1)]),cd],scalex:["N",ud([ld,o(1),o(1)]),ud([ld,o(1)])],scaley:["N",ud([o(1),ld,o(1)]),ud([o(1),ld])],scalez:["N",ud([o(1),o(1),ld])],scale3d:["NNN",cd],skew:["Aa",null,cd],skewx:["A",null,ud([ld,Cl])],skewy:["A",null,ud([Cl,ld])],translate:["Tt",ud([ld,ld,Nl]),cd],translatex:["T",ud([ld,Nl,Nl]),ud([ld,Nl])],translatey:["T",ud([Nl,ld,Nl]),ud([Nl,ld])],translatez:["L",ud([Nl,Nl,ld])],translate3d:["TTL",cd]};function dd(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,o=e[1],a=hd[o];if(!a)return[];var s=e[2].split(","),l=a[0];if(l.length<s.length)return[];for(var u=[],c=0;c<l.length;c++){var h=s[c],d=l[c],p=void 0;if(void 0===(p=h?{A:function(t){return"0"===t.trim()?Cl:xh(t)},N:Th,T:bh,L:vh}[d.toUpperCase()](h):{a:Cl,n:u[0],t:Nl}[d]))return[];u.push(p)}if(r.push({t:o,d:u}),n.lastIndex===t.length)return r}return[]}function pd(t){switch(t.t){case"rotatex":return i=$l(wh(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=$l(wh(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=$l(wh(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=$l(wh(t.d[3])),o=e*e+n*n+r*r,o=(0==o?(e=1,r=n=0):1!=o&&(e/=o=Math.sqrt(o),n/=o,r/=o),Math.sin(i/2)),a=o*Math.cos(i/2),o=o*o;return[1-2*(n*n+r*r)*o,2*(e*n*o+r*a),2*(e*r*o-n*a),0,2*(e*n*o-r*a),1-2*(e*e+r*r)*o,2*(n*r*o+e*a),0,2*(e*r*o+n*a),2*(n*r*o-e*a),1-2*(e*e+n*n)*o,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":a=$l(wh(t.d[0])),o=$l(wh(t.d[1]));return[1,Math.tan(o),0,0,Math.tan(a),1,0,0,0,0,1,0,0,0,0,1];case"skewx":return i=$l(wh(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=$l(wh(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=_h(t.d[0],0,null)||0,n=_h(t.d[1],0,null)||0,0,1];case"translatex":return[1,0,0,0,0,1,0,0,0,0,1,0,e=_h(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=_h(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=_h(t.d[0],0,null)||0,1];case"translate3d":return[1,0,0,0,0,1,0,0,0,0,1,0,e=_h(t.d[0],0,null)||0,n=_h(t.d[1],0,null)||0,r=_h(t.d[2],0,null)||0,1];case"perspective":o=_h(t.d[0],0,null)||0;return[1,0,0,0,0,1,0,0,0,0,1,o?-1/o: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 fd(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 yd(t){var e=[0,0,0],n=[1,1,1],r=[0,0,0],i=[0,0,0,1],o=[0,0,0,1];return function(t,e,n,r,i,o){if(e=e||[0,0,0],n=n||[0,0,0],r=r||[0,0,0],i=i||[0,0,0,1],o=o||[0,0,0,1],!ys(ws,t))return;if(gs(Es),Es[3]=0,Es[7]=0,Es[11]=0,Es[15]=1,Math.abs(ms(Es)<1e-8))return;var a,s,t=ws[3],l=ws[7],u=ws[11],c=ws[12],h=ws[13],d=ws[14],p=ws[15];if(0!==t||0!==l||0!==u){if(_s[0]=t,_s[1]=l,_s[2]=u,_s[3]=p,!vs(Es,Es))return;bs(Es,Es),t=i,l=Es,p=(u=_s)[0],a=u[1],s=u[2],u=u[3],t[0]=l[0]*p+l[4]*a+l[8]*s+l[12]*u,t[1]=l[1]*p+l[5]*a+l[9]*s+l[13]*u,t[2]=l[2]*p+l[6]*a+l[10]*s+l[14]*u,t[3]=l[3]*p+l[7]*a+l[11]*s+l[15]*u}else i[0]=i[1]=i[2]=0,i[3]=1;if(e[0]=c,e[1]=h,e[2]=d,t=ws,(p=g)[0][0]=t[0],p[0][1]=t[1],p[0][2]=t[2],p[1][0]=t[4],p[1][1]=t[5],p[1][2]=t[6],p[2][0]=t[8],p[2][1]=t[9],p[2][2]=t[10],n[0]=xs.length(g[0]),xs.normalize(g[0],g[0]),r[0]=xs.dot(g[0],g[1]),Ts(g[1],g[1],g[0],1,-r[0]),n[1]=xs.length(g[1]),xs.normalize(g[1],g[1]),r[0]/=n[1],r[1]=xs.dot(g[0],g[2]),Ts(g[2],g[2],g[0],1,-r[1]),r[2]=xs.dot(g[1],g[2]),Ts(g[2],g[2],g[1],1,-r[2]),n[2]=xs.length(g[2]),xs.normalize(g[2],g[2]),r[1]/=n[2],r[2]/=n[2],xs.cross(ks,g[1],g[2]),xs.dot(g[0],ks)<0)for(var f=0;f<3;f++)n[f]*=-1,g[f][0]*=-1,g[f][1]*=-1,g[f][2]*=-1;o[0]=.5*Math.sqrt(Math.max(1+g[0][0]-g[1][1]-g[2][2],0)),o[1]=.5*Math.sqrt(Math.max(1-g[0][0]+g[1][1]-g[2][2],0)),o[2]=.5*Math.sqrt(Math.max(1-g[0][0]-g[1][1]+g[2][2],0)),o[3]=.5*Math.sqrt(Math.max(1+g[0][0]+g[1][1]+g[2][2],0)),g[2][1]>g[1][2]&&(o[0]=-o[0]),g[0][2]>g[2][0]&&(o[1]=-o[1]),g[1][0]>g[0][1]&&(o[2]=-o[2])}(0===(t=t).length?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:t.map(pd).reduce(fd),e,n,r,i,o),[[e,n,r,o,i]]}var gd=function(t,e,n,r,i){for(var o=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],a=0;a<4;a++)o[a][3]=i[a];for(var s=0;s<3;s++)for(var l=0;l<3;l++)o[3][s]+=t[l]*o[l][s];var u=r[0],c=r[1],h=r[2],r=r[3],d=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],h=(d[0][0]=1-2*(c*c+h*h),d[0][1]=2*(u*c-h*r),d[0][2]=2*(u*h+c*r),d[1][0]=2*(u*c+h*r),d[1][1]=1-2*(u*u+h*h),d[1][2]=2*(c*h-u*r),d[2][0]=2*(u*h-c*r),d[2][1]=2*(c*h+u*r),d[2][2]=1-2*(u*u+c*c),o=md(o,d),[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]);n[2]&&(h[2][1]=n[2],o=md(o,h)),n[1]&&(h[2][1]=0,h[2][0]=n[0],o=md(o,h)),n[0]&&(h[2][0]=0,h[1][0]=n[0],o=md(o,h));for(var p=0;p<3;p++)for(var f=0;f<3;f++)o[p][f]*=e[p];return 0==(r=o)[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]?[o[0][0],o[0][1],o[1][0],o[1][1],o[3][0],o[3][1]]:o[0].concat(o[1],o[2],o[3])};function md(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 o=0;o<4;o++)n[r][i]+=e[r][o]*t[o][i];return n}function vd(t){return t.toFixed(6).replace(".000000","")}function bd(e,n){var r,i;return e.decompositionPair!==n&&(e.decompositionPair=n,r=yd(e)),n.decompositionPair!==e&&(n.decompositionPair=e,i=yd(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){r=Xl(r=function(t,e){for(var n=0,r=0;r<t.length;r++)n+=t[r]*e[r];return n}(t,e),-1,1);var r,i=[];if(1===r)i=t;else for(var o=Math.acos(r),a=+Math.sin(n*o)/Math.sqrt(1-r*r),s=0;s<4;s++)i.push(t[s]*(Math.cos(n*o)-r*a)+e[s]*a);return i}(r[0][3],i[0][3],t[5]);return gd(t[0],t[1],t[2],e,t[4]).map(vd).join(",")}])}function xd(t){return t.replace(/[xy]/,"")}function wd(t){return t.replace(/(x|y|z|3d)?$/,"3d")}var Ed=function(t,e){return"perspective"===t&&"perspective"===e||("matrix"===t||"matrix3d"===t)&&("matrix"===e||"matrix3d"===e)};function _d(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?new El(n):new El(n,t.unit)})})}(n)}var o=[],a=[],s=[];if(r.length!==i.length)var l=bd(r,i),o=[l[0]],a=[l[1]],s=[["matrix",[l[2]]]];else for(var u=0;u<r.length;u++){var c=r[u].t,h=i[u].t,d=r[u].d,p=i[u].d,f=hd[c],y=hd[h],g=void 0;if(Ed(c,h)){var m=bd([r[u]],[i[u]]);o.push(m[0]),a.push(m[1]),s.push(["matrix",[m[2]]])}else{if(c===h)g=c;else if(f[2]&&y[2]&&xd(c)===xd(h))g=xd(c),d=f[2](d),p=y[2](p);else{if(!f[1]||!y[1]||wd(c)!==wd(h)){m=bd(r,i);o=[m[0]],a=[m[1]],s=[["matrix",[m[2]]]];break}g=wd(c),d=f[1](d),p=y[1](p)}for(var v=[],b=[],x=[],w=0;w<d.length;w++){var E=function(t,e,n,r,i){void 0===i&&(i=0);var o="",a=t.value||0,s=e.value||0,l=El.toCanonicalUnit(t.unit),u=t.convertTo(l),l=e.convertTo(l);return u&&l?(a=u.value,s=l.value,o=El.unitTypeToString(t.unit)):(El.isLength(t.unit)||El.isLength(e.unit))&&(a=_h(t,i,n),s=_h(e,i,n),o="px"),[a,s,function(t){return(t=r?Math.max(t,0):t)+o}]}(d[w],p[w],t,!1,w);v[w]=E[0],b[w]=E[1],x.push(E[2])}o.push(v),a.push(b),s.push([g,x])}}return e&&(l=o,o=a,a=l),[o,a,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 kd=Da(function(t){var e;return ic(t)?"text-anchor"===t?[new El(0,"px"),new El(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:[bh(Td(e[0])),bh(Td(e[1]))]):[new El(t[0]||0,"px"),new El(t[1]||0,"px")]});function Td(t){return"center"===t?"50%":"left"===t||"top"===t?"0":"right"===t||"bottom"===t?"100%":t}function Md(){this.contentBounds=void 0,this.renderBounds=void 0}function Sd(){this.aabb=void 0}function Od(){this.bounds=void 0,this.boundsDirty=!0,this.renderBounds=void 0,this.renderBoundsDirty=!0,this.dirtyRenderBounds=void 0,this.dirty=!1,this.proxyNodeName=void 0}function Pd(){this.dirty=!1,this.sorted=void 0,this.lastSortedIndex=void 0,this.renderOrder=0}function Ad(){this.dirtyFlag=!1,this.localDirtyFlag=!1,this.frozen=!1,this.localPosition=_(0,0,0),this.localRotation=Jo(0,0,0,1),this.localScale=_(1,1,1),this.localTransform=io(),this.localSkew=na(0,0),this.position=_(0,0,0),this.rotation=Jo(0,0,0,1),this.scaling=_(1,1,1),this.worldTransform=io(),this.origin=_(0,0,0)}var E,Nd,Cd,Ld=function(){function t(){this.parser=xh,this.mixer=Mh}return t.prototype.calculator=function(t,e,n,r){return wh(n)},t}(),Ld=t([f({token:{token:Yc,named:w.ANGLE}})],Ld),Id=((Qt=E=E||{}).DESTROY="destroy",Qt.ATTR_MODIFIED="DOMAttrModified",Qt.INSERTED="DOMNodeInserted",Qt.CHILD_INSERTED="child-inserted",Qt.REMOVED="removed",Qt.CHILD_REMOVED="child-removed",Qt.MOUNTED="DOMNodeInsertedIntoDocument",Qt.UNMOUNTED="DOMNodeRemovedFromDocument",Qt.BOUNDS_CHANGED="bounds-changed",Qt.RENDER_ORDER_CHANGED="render-order-changed",Qt.CULLED="culled",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 Gc,this.page=new Gc,this.canvas=new Gc,this.viewport=new Gc,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("Method not implemented.")},Zs(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}()),jd=function(r){function t(t,e){var n=r.call(this,null)||this;return n.type=t,n.detail=e,Object.assign(Qs(n),e),n}return b(t,r),t}(Id),n=function(){function t(){this.emitter=new Os.exports.EventEmitter}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,o,a=pl(n)&&n||fl(n)&&n.capture,n=fl(n)&&n.once,s=dl(e)?void 0:e,l=!1,u="";return-1<t.indexOf(":")&&(i=(r=t.split(":"))[0],t=r[1],u=i,l=!0),t=a?t+"capture":t,e=dl(e)?e:e.handleEvent,l&&(o=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)===u&&o.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=pl(n)&&n||fl(n)&&n.capture,i=dl(e)?void 0:e;return e=dl(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 jd(t,e))},e.dispatchEvent=function(t){if(!(t instanceof Id))throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");var e;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=[],t.target=this,null!=(e=t.manager)&&e.dispatchEvent(t)}return!t.defaultPrevented},t}(),Rd=function(i){function p(){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}b(p,i),p.isNode=function(t){return!!t.childNodes};var t=p.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("Method not implemented.")},t.lookupNamespaceURI=function(t){throw new Error("Method not implemented.")},t.lookupPrefix=function(t){throw new Error("Method not implemented.")},t.normalize=function(){throw new Error("Method not implemented.")},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 p))throw new TypeError("Node.compareDocumentPosition: Argument 1 does not implement interface Node.");for(var e=[i=t],n=[o=this];null!=(r=i.parentNode)?r:o.parentNode;)var r,i=i.parentNode?(e.push(i.parentNode),i.parentNode):i,o=o.parentNode?(n.push(o.parentNode),o.parentNode):o;if(i!==o)return p.DOCUMENT_POSITION_DISCONNECTED|p.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|p.DOCUMENT_POSITION_PRECEDING;var a=e.length>n.length?e:n,s=a===e?n:e;if(a[a.length-s.length]===s[0])return a===e?p.DOCUMENT_POSITION_CONTAINED_BY|p.DOCUMENT_POSITION_FOLLOWING:p.DOCUMENT_POSITION_CONTAINS|p.DOCUMENT_POSITION_PRECEDING;for(var l=a.length-s.length,u=s.length-1;0<=u;u--){var c,h=s[u],d=a[l+u];if(d!==h)return(c=h.parentNode.childNodes).indexOf(h)<c.indexOf(d)?s===e?p.DOCUMENT_POSITION_PRECEDING:p.DOCUMENT_POSITION_FOLLOWING:a===e?p.DOCUMENT_POSITION_PRECEDING:p.DOCUMENT_POSITION_FOLLOWING}return p.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)})},Zs(p,[{key:"textContent",get:function(){var t="";this.nodeName===M.TEXT&&(t+=this.style.text);for(var e=el(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,!0)}),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}}]),p}(n),Dd=(Rd.DOCUMENT_POSITION_DISCONNECTED=1,Rd.DOCUMENT_POSITION_PRECEDING=2,Rd.DOCUMENT_POSITION_FOLLOWING=4,Rd.DOCUMENT_POSITION_CONTAINS=8,Rd.DOCUMENT_POSITION_CONTAINED_BY=16,Rd.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32,Nd=Nd||{},Nd[Nd.Standard=0]="Standard",function(){function t(){this.strategy=Nd.Standard,this.visibilityPlaneMask=-1,this.visible=!0,this.enable=!0}return t.prototype.isCulled=function(){return this.enable&&!this.visible},t}()),Bd=(Dd.tag="c-cullable",Md.tag="c-geometry",Sd.tag="c-rbush-node",p.defineToken("")),Fd=(Od.tag="c-renderable",Pd.tag="c-sortable",Ad.tag="c-transform",function(u){function t(t,e,n,r,i,o,a,s){var l=u.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=o,l.prevParsedValue=a,l.newParsedValue=s,l.type=t,l}return b(t,u),t}(Id)),zd=(Fd.ADDITION=2,Fd.MODIFICATION=1,Fd.REMOVAL=3,0),Vd=new jd(E.CHILD_INSERTED,{child:null}),Gd=new Fd(E.INSERTED,null,"","","",0,"",""),Hd=new Fd(E.REMOVED,null,"","","",0,"",""),Wd=new jd(E.DESTROY),Yd=new jd(E.CHILD_REMOVED,{child:null}),Ud=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=zd++,t.renderable=new Od,t.cullable=new Dd,t.transformable=new Ad,t.sortable=new Pd,t.geometry=new Md,t.rBushNode=new Sd,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:th,opacity:th,fillOpacity:th,strokeOpacity:th,fill:th,stroke:th,transform:th,transformOrigin:th,visibility:th,pointerEvents:th,lineWidth:th,lineCap:th,lineJoin:th,increasedLineWidthForHitTesting:th,fontSize:th,fontFamily:th,fontStyle:th,fontWeight:th,fontVariant:th,textAlign:th,textBaseline:th,textTransform:th,zIndex:th,filter:th,shadowType:th},t.parsedStyle={},t.attributes={},t}b(t,i),t.isElement=function(t){return!!t.getAttribute};var e=t.prototype;return e.cloneNode=function(t){throw new Error("Method not implemented.")},e.appendChild=function(t,e){return x.attach(t,this,e),Vd.detail.child=t,this.dispatchEvent(Vd),Gd.relatedNode=this,t.dispatchEvent(Gd),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,n){var r=this.childNodes.indexOf(e);return this.removeChild(e,n),this.appendChild(t,r),e},e.removeChild=function(t,e){return void 0===e&&(e=!0),Hd.relatedNode=this,t.dispatchEvent(Hd),e&&(t.dispatchEvent(Wd),t.destroyed=!0),Yd.detail.child=t,this.dispatchEvent(Yd),x.detach(t),e&&(t.emitter.removeAllListeners(),ty.remove(t.entity)),t},e.removeChildren=function(e){var n=this;void 0===e&&(e=!0),this.childNodes.slice().forEach(function(t){n.removeChild(t,e)})},e.matches=function(t){return x.matches(t,this)},e.getElementById=function(t){return x.querySelector("#"+t,this)},e.getElementsByName=function(t){return x.querySelectorAll('[name="'+t+'"]',this)},e.getElementsByClassName=function(t){return x.querySelectorAll("."+t,this)},e.getElementsByTagName=function(t){return x.querySelectorAll(t,this)},e.querySelector=function(t){return x.querySelector(t,this)},e.querySelectorAll=function(t){return x.querySelectorAll(t,this)},e.closest=function(t){var e=this;do{if(x.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],o=n.slice(1);this.parentNode.appendChild(i,t),i.after.apply(i,o)}},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(t){return void 0===t&&(t=!0),this.parentNode?this.parentNode.removeChild(this,t):this},e.destroy=function(){this.dispatchEvent(Wd),this.remove(!1),this.emitter.removeAllListeners(),this.destroyed=!0},e.getGeometryBounds=function(){return x.getGeometryBounds(this)},e.getRenderBounds=function(){return x.getBounds(this,!0)},e.getBounds=function(){return x.getBounds(this)},e.getLocalBounds=function(){return x.getLocalBounds(this)},e.getBoundingClientRect=function(){return x.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=cc(t.toString(),"")[0],e=this.attributes[t]),S(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("Method not implemented.")},e.getAttributeNode=function(t){throw new Error("Method not implemented.")},e.getAttributeNodeNS=function(t,e){throw new Error("Method not implemented.")},e.hasAttributeNS=function(t,e){throw new Error("Method not implemented.")},e.removeAttributeNS=function(t,e){throw new Error("Method not implemented.")},e.removeAttributeNode=function(t){throw new Error("Method not implemented.")},e.setAttributeNS=function(t,e,n){throw new Error("Method not implemented.")},e.setAttributeNode=function(t){throw new Error("Method not implemented.")},e.setAttributeNodeNS=function(t){throw new Error("Method not implemented.")},e.toggleAttribute=function(t,e){throw new Error("Method not implemented.")},Zs(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}(Rd),O=function(i){function a(t){var r=i.call(this)||this;return r.config=void 0,r.isCustomElement=!1,r.activeAnimations=[],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=Ks({},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,{anchor:[0,0],fill:eh,stroke:eh,transform:[],zIndex:0,filter:[],shadowType:"outer"},r.config.initialParsedStyle),Object.assign(r.attributes,{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:""}),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}}),ty.add(r.entity,Qs(r)),r}b(a,i);var t=a.prototype;return t.destroy=function(){i.prototype.destroy.call(this),ty.remove(this.entity),this.getAnimations().forEach(function(t){t.cancel()})},t.cloneNode=function(e,t){var n,r=Ks({},this.attributes);for(n in r){var i=r[n];i instanceof a&&(r[n]=i.cloneNode(e)),t&&(r[n]=t(n,i))}var o=new this.constructor({id:this.id,name:this.name,className:this.name,interactive:this.interactive,style:r});return o.setLocalTransform(this.getLocalTransform()),e&&this.children.forEach(function(t){t.style.isMarker||(t=t.cloneNode(e),o.appendChild(t))}),o},t.initAttributes=function(t){var e=this.renderable;Jf.processProperties(this,t=void 0===t?{}:t,{forceUpdateGeometry:!0,usedAttributes:["opacity","fillOpacity","strokeOpacity","transformOrigin","visibility","pointerEvents","lineWidth","lineCap","lineJoin","increasedLineWidthForHitTesting","fontSize","fontFamily","fontStyle","fontWeight","fontVariant","textAlign","textBaseline","textTransform"]}),e.dirty=!0},t.setAttribute=function(t,e,n){void 0===n&&(n=!1);var t=cc(t,e),r=t[0],t=t[1];cl(e)||!n&&t===this.attributes[r]||(this.internalSetAttribute(r,t),i.prototype.setAttribute.call(this,r,t))},t.internalSetAttribute=function(t,e,n){var r=this,i=(void 0===n&&(n={}),this.renderable),o=this.attributes[t],a=this.parsedStyle[t],s=(Jf.processProperties(this,((s={})[t]=e,s),n),this.parsedStyle.clipPathTargets&&this.parsedStyle.clipPathTargets.length&&this.parsedStyle.clipPathTargets.forEach(function(t){x.dirtifyToRoot(t),t.dispatchEvent(new Fd(E.ATTR_MODIFIED,t,r,r,"clipPath",Fd.MODIFICATION,r,r)),t.isCustomElement&&t.isConnected&&t.attributeChangedCallback&&t.attributeChangedCallback("clipPath",r,r)}),i.dirty=!0,this.parsedStyle[t]);this.isConnected&&((Cd=Cd||new Fd(E.ATTR_MODIFIED,null,null,null,null,Fd.MODIFICATION,null,null)).relatedNode=this,Cd.prevValue=o,Cd.newValue=e,Cd.attrName=t,Cd.prevParsedValue=a,Cd.newParsedValue=s,this.dispatchEvent(Cd)),(this.isCustomElement&&this.isConnected||!this.isCustomElement)&&this.attributeChangedCallback&&this.attributeChangedCallback(t,o,e,a,s)},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 Hc(n,e,r-n,t-e)},t.setOrigin=function(t,e,n){return x.setOrigin(this,Kl(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},t.getOrigin=function(){return x.getOrigin(this)},t.setPosition=function(t,e,n){return x.setPosition(this,Kl(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},t.setLocalPosition=function(t,e,n){return x.setLocalPosition(this,Kl(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},t.translate=function(t,e,n){return x.translate(this,Kl(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},t.translateLocal=function(t,e,n){return x.translateLocal(this,Kl(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},t.getPosition=function(){return x.getPosition(this)},t.getLocalPosition=function(){return x.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=Kl(t,e=e||t,n=n||t)),x.scaleLocal(this,t),this},t.setLocalScale=function(t,e,n){return"number"==typeof t&&(t=Kl(t,e=e||t,n=n||t)),x.setLocalScale(this,t),this},t.getLocalScale=function(){return x.getLocalScale(this)},t.getScale=function(){return x.getScale(this)},t.getEulerAngles=function(){var t=Ql(m(),x.getWorldTransform(this));return t[0],t[1],Jl(t[2])},t.getLocalEulerAngles=function(){var t=Ql(m(),x.getLocalRotation(this));return t[0],t[1],Jl(t[2])},t.setEulerAngles=function(t){return x.setEulerAngles(this,0,0,t),this},t.setLocalEulerAngles=function(t){return x.setLocalEulerAngles(this,0,0,t),this},t.rotateLocal=function(t,e,n){return S(e)&&S(n)?x.rotateLocal(this,0,0,t):x.rotateLocal(this,t,e,n),this},t.rotate=function(t,e,n){return S(e)&&S(n)?x.rotate(this,0,0,t):x.rotate(this,t,e,n),this},t.setRotation=function(t,e,n,r){return x.setRotation(this,t,e,n,r),this},t.setLocalRotation=function(t,e,n,r){return x.setLocalRotation(this,t,e,n,r),this},t.setLocalSkew=function(t,e){return x.setLocalSkew(this,t,e),this},t.getRotation=function(){return x.getRotation(this)},t.getLocalRotation=function(){return x.getLocalRotation(this)},t.getLocalSkew=function(){return x.getLocalSkew(this)},t.getLocalTransform=function(){return x.getLocalTransform(this)},t.getWorldTransform=function(){return x.getWorldTransform(this)},t.setLocalTransform=function(t){return x.setLocalTransform(this,t),this},t.resetLocalTransform=function(){x.resetLocalTransform(this)},t.getAnimations=function(){return this.activeAnimations},t.animate=function(t,e){var n,r=null==(r=this.ownerDocument)?void 0:r.timeline;return this.parsedStyle.clipPathTargets&&this.parsedStyle.clipPathTargets.length&&(r=null==(n=this.parsedStyle.clipPathTargets[0].ownerDocument)?void 0:n.timeline),delete this.parsedStyle.transform,r?r.play(new Np(this,t,e)):null},t.show=function(){this.style.visibility="visible"},t.hide=function(){this.style.visibility="hidden"},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.isCulled())},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.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.getClip=function(){return this.style.clipPath||null},t.set=function(t,e){this.config[t]=e},t.get=function(t){return this.config[t]},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],o=n[1];return i?fl(i)?(Object.keys(i).forEach(function(t){e.setAttribute(t,i[t])}),this):2===n.length?(this.setAttribute(i,o),this):this.attributes[i]:this.attributes},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},t.getMatrix=function(t){var t=t||this.getWorldTransform(),e=vo(m(),t),n=e[0],e=e[1],r=bo(m(),t),i=r[0],r=r[1],t=xo(qo(),t),t=Ql(m(),t),o=t[0],t=(t[1],t[2]);return tu(o||t,n,e,i,r)},t.getLocalMatrix=function(){return this.getMatrix(this.getLocalTransform())},t.setMatrix=function(t){var t=eu(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=eu(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)},Zs(a,[{key:"interactive",get:function(){return this.isInteractive()},set:function(t){this.style.pointerEvents=t?"auto":"none"}}]),a}(Ud),qd=["style"],Xd=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Js(t,qd),e=n.call(this,Ks({style:Ks({x:"",y:""},e)},t))||this;return e.isCustomElement=!0,e}return b(t,n),t}(O),Zd=["style"],Kd=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Js(t,Zd);return n.call(this,Ks({type:M.CIRCLE,style:Ks({cx:"",cy:"",r:""},e),initialParsedStyle:{anchor:[.5,.5]}},t))||this}return b(t,n),t}(O),$d=["style"],Jd=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Js(t,$d);return n.call(this,Ks({type:M.ELLIPSE,style:Ks({cx:"",cy:"",rx:"",ry:""},e),initialParsedStyle:{anchor:[.5,.5]}},t))||this}return b(t,n),t}(O),Qd=["style"],tp=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Js(t,Qd);return n.call(this,Ks({type:M.GROUP,style:Ks({x:"",y:"",width:"",height:""},e)},t))||this}return b(t,n),t}(O),ep=["style"],np=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Js(t,ep);return n.call(this,Ks({type:M.IMAGE,style:Ks({x:"",y:"",img:"",width:"",height:""},e)},t))||this}return b(t,n),t}(O),rp=["style"],ip=function(r){function t(t){var t=void 0===t?{}:t,e=t.style,t=Js(t,rp),e=r.call(this,Ks({type:M.LINE,style:Ks({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0,isBillboard:!1},e)},t))||this,t=(e.markerStartAngle=0,e.markerEndAngle=0,e.parsedStyle),n=t.markerStart,t=t.markerEnd;return n&&n instanceof O&&(e.markerStartAngle=n.getLocalEulerAngles(),e.appendChild(n)),t&&t instanceof O&&(e.markerEndAngle=t.getLocalEulerAngles(),e.appendChild(t)),e.transformMarker(!0),e.transformMarker(!1),e}b(t,r);var e=t.prototype;return e.attributeChangedCallback=function(t,e,n,r,i){"x1"===t||"y1"===t||"x2"===t||"y2"===t||"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&r instanceof O&&(this.markerStartAngle=0,r.remove()),i&&i instanceof O&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t&&(r&&r instanceof O&&(this.markerEndAngle=0,r.remove()),i&&i instanceof O&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1)))},e.transformMarker=function(t){var e,n,r,i,o,a=this.parsedStyle,s=a.markerStart,l=a.markerEnd,u=a.markerStartOffset,c=a.markerEndOffset,h=a.x1,d=a.x2,p=a.y1,f=a.y2,y=a.defX,a=a.defY,s=t?s:l;s&&s instanceof O&&(l=0,t=t?(r=h-y,i=p-a,e=d-h,n=f-p,o=u||0,this.markerStartAngle):(r=d-y,i=f-a,e=h-d,n=p-f,o=c||0,this.markerEndAngle),l=Math.atan2(n,e),s.setLocalEulerAngles(180*l/Math.PI+t),s.setLocalPosition(r+Math.cos(l)*o,i+Math.sin(l)*o))},e.getPoint=function(t){var e=this.parsedStyle,n=e.x1,r=e.y1,i=e.x2,o=e.y2,a=e.defX,e=e.defY,n=ds.pointAt(n,r,i,o,t),r=n.x,i=n.y,o=Fo(m(),_(r-a,i-e,0),this.getLocalTransform());return new Gc(o[0],o[1])},e.getTotalLength=function(){var t=this.parsedStyle,e=t.x1,n=t.y1,r=t.x2,t=t.y2;return ds.length(e,n,r,t)},t}(O),op=["style"],ap=function(i){function t(t){var t=void 0===t?{}:t,e=t.style,t=Js(t,op),e=i.call(this,Ks({type:M.PATH,style:Ks({path:"",miterLimit:""},e)},t))||this,t=(e.markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[],e.parsedStyle),n=t.markerStart,r=t.markerEnd,t=t.markerMid;return n&&n instanceof O&&(e.markerStartAngle=n.getLocalEulerAngles(),e.appendChild(n)),t&&t instanceof O&&e.placeMarkerMid(t),r&&r instanceof O&&(e.markerEndAngle=r.getLocalEulerAngles(),e.appendChild(r)),e.transformMarker(!0),e.transformMarker(!1),e}b(t,i);var e=t.prototype;return e.attributeChangedCallback=function(t,e,n,r,i){"path"===t?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&r instanceof O&&(this.markerStartAngle=0,r.remove()),i&&i instanceof O&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&r instanceof O&&(this.markerEndAngle=0,r.remove()),i&&i instanceof O&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))):"markerMid"===t&&this.placeMarkerMid(i)},e.transformMarker=function(t){var e,n,r,i,o,a=this.parsedStyle,s=a.markerStart,l=a.markerEnd,u=a.markerStartOffset,c=a.markerEndOffset,h=a.defX,a=a.defY,s=t?s:l;s&&s instanceof O&&(l=0,h=t?(i=(t=this.getStartTangent())[0],e=(t=t[1])[0]-h,n=t[1]-a,r=i[0]-t[0],i=i[1]-t[1],o=u||0,this.markerStartAngle):(u=(t=this.getEndTangent())[0],e=(t=t[1])[0]-h,n=t[1]-a,r=u[0]-t[0],i=u[1]-t[1],o=c||0,this.markerEndAngle),l=Math.atan2(i,r),s.setLocalEulerAngles(180*l/Math.PI+h),s.setLocalPosition(e+Math.cos(l)*o,n+Math.sin(l)*o))},e.placeMarkerMid=function(t){var e=this.parsedStyle,n=e.path.segments,r=e.defX,i=e.defY;if(this.markerMidList.forEach(function(t){t.remove()}),t&&t instanceof O)for(var o=1;o<n.length-1;o++){var a=n[o].currentPoint,s=a[0],a=a[1],l=1===o?t:t.cloneNode(!0);this.markerMidList.push(l),this.appendChild(l),l.setLocalPosition(s-r,a-i)}},e.getTotalLength=function(){return this.parsedStyle.path.totalLength},e.getPoint=function(t){var e=this.parsedStyle,n=e.defX,r=e.defY,e=e.path,i=e.totalLength,e=Ia(e.absolutePath,t*i,T(T({},o),{bbox:!1,length:!0})).point,t=e.x,i=e.y,o=Fo(m(),_(t-n,i-r,0),this.getLocalTransform());return new Gc(o[0],o[1])},e.getStartTangent=function(){var t,e,n=this.parsedStyle.path.segments,r=[];return 1<n.length&&(t=n[0].currentPoint,e=n[1].currentPoint,r=[],(n=n[1].startTangent)?r.push([t[0]-n[0],t[1]-n[1]]):r.push([e[0],e[1]]),r.push([t[0],t[1]])),r},e.getEndTangent=function(){var t,e,n=this.parsedStyle.path.segments,r=n.length,i=[];return 1<r&&(t=n[r-2].currentPoint,e=n[r-1].currentPoint,i=[],(n=n[r-1].endTangent)?i.push([e[0]-n[0],e[1]-n[1]]):i.push([t[0],t[1]]),i.push([e[0],e[1]])),i},t}(O),sp=["style"],lp=function(i){function t(t){var t=void 0===t?{}:t,e=t.style,t=Js(t,sp),e=i.call(this,Ks({type:M.POLYGON,style:Ks({points:"",miterLimit:"",isClosed:!0},e)},t))||this,t=(e.markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[],e.parsedStyle),n=t.markerStart,r=t.markerEnd,t=t.markerMid;return n&&n instanceof O&&(e.markerStartAngle=n.getLocalEulerAngles(),e.appendChild(n)),t&&t instanceof O&&e.placeMarkerMid(t),r&&r instanceof O&&(e.markerEndAngle=r.getLocalEulerAngles(),e.appendChild(r)),e.transformMarker(!0),e.transformMarker(!1),e}b(t,i);var e=t.prototype;return e.attributeChangedCallback=function(t,e,n,r,i){"points"===t?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&r instanceof O&&(this.markerStartAngle=0,r.remove()),i&&i instanceof O&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&r instanceof O&&(this.markerEndAngle=0,r.remove()),i&&i instanceof O&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))):"markerMid"===t&&this.placeMarkerMid(i)},e.transformMarker=function(t){var e,n,r,i,o,a=this.parsedStyle,s=a.markerStart,l=a.markerEnd,u=a.markerStartOffset,c=a.markerEndOffset,h=a.points.points,d=a.defX,a=a.defY,s=t?s:l;s&&s instanceof O&&(i=h[l=0][0]-d,o=h[0][1]-a,u=t?(e=h[1][0]-h[0][0],n=h[1][1]-h[0][1],r=u||0,this.markerStartAngle):(t=h.length,n=this.style.isClosed?(e=h[t-1][0]-h[0][0],h[t-1][1]-h[0][1]):(i=h[t-1][0]-d,o=h[t-1][1]-a,e=h[t-2][0]-h[t-1][0],h[t-2][1]-h[t-1][1]),r=c||0,this.markerEndAngle),l=Math.atan2(n,e),s.setLocalEulerAngles(180*l/Math.PI+u),s.setLocalPosition(i+Math.cos(l)*r,o+Math.sin(l)*r))},e.placeMarkerMid=function(t){var e=this.parsedStyle,n=e.points.points,r=e.defX,i=e.defY;if(this.markerMidList.forEach(function(t){t.remove()}),this.markerMidList=[],t&&t instanceof O)for(var o=1;o<(this.style.isClosed?n.length:n.length-1);o++){var a=n[o][0]-r,s=n[o][1]-i,l=1===o?t:t.cloneNode(!0);this.markerMidList.push(l),this.appendChild(l),l.setLocalPosition(a,s)}},t}(O),up=["style"],cp=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Js(t,up);return n.call(this,Ks({type:M.POLYLINE,style:Ks({points:"",miterLimit:"",isClosed:!1},e)},t))||this}b(t,n);var e=t.prototype;return e.getTotalLength=function(){return this.parsedStyle.points.totalLength},e.getPoint=function(n){var t=this.parsedStyle,e=t.defX,r=t.defY,t=t.points,i=t.points,t=t.segments,o=0,a=0,t=(t.forEach(function(t,e){n>=t[0]&&n<=t[1]&&(o=(n-t[0])/(t[1]-t[0]),a=e)}),ds.pointAt(i[a][0],i[a][1],i[a+1][0],i[a+1][1],o)),i=t.x,t=t.y,i=Fo(m(),_(i-e,t-r,0),this.getLocalTransform());return new Gc(i[0],i[1])},e.getStartTangent=function(){var t=this.parsedStyle.points.points,e=[];return e.push([t[1][0],t[1][1]]),e.push([t[0][0],t[0][1]]),e},e.getEndTangent=function(){var t=this.parsedStyle.points.points,e=t.length-1,n=[];return n.push([t[e-1][0],t[e-1][1]]),n.push([t[e][0],t[e][1]]),n},t}(lp),hp=["style"],dp=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Js(t,hp);return n.call(this,Ks({type:M.RECT,style:Ks({x:"",y:"",width:"",height:"",radius:""},e)},t))||this}return b(t,n),t}(O),pp=["style"],fp=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Js(t,pp);return n.call(this,Ks({type:M.TEXT,style:Ks({x:"",y:"",text:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",fill:"black",letterSpacing:"",lineHeight:"",miterLimit:"",whiteSpace:"pre",wordWrap:!1,wordWrapWidth:0,leading:0,dx:"",dy:""},e)},t))||this}b(t,n);var e=t.prototype;return e.getComputedTextLength=function(){var t;return(null==(t=this.parsedStyle.metrics)?void 0:t.maxLineWidth)||0},e.getLineBoundingRects=function(){var t;return(null==(t=this.parsedStyle.metrics)?void 0:t.lineMetrics)||[]},t}(O),yp=["style"],gp=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Js(t,yp),e=n.call(this,Ks({type:M.HTML,style:Ks({x:"",y:"",width:"auto",height:"auto",innerHTML:""},e)},t))||this;return e.cullable.enable=!1,e}b(t,n);var e=t.prototype;return e.getDomElement=function(){return this.parsedStyle.$el},e.getBoundingClientRect=function(){return this.parsedStyle.$el.getBoundingClientRect()},e.getClientRects=function(){return[this.getBoundingClientRect()]},e.getBounds=function(){var t,e,n=this.getBoundingClientRect(),r=null==(r=this.ownerDocument)||null==(r=r.defaultView)?void 0:r.getContextService().getBoundingClientRect();return r?(t=n.left-r.left,r=n.top-r.top,(e=new Fc).setMinMax(_(t,r,0),_(t+n.width,r+n.height,0)),e):null},e.getLocalBounds=function(){if(this.parentNode){var t,e=uo(io(),this.parentNode.getWorldTransform()),n=this.getBounds();if(!Fc.isEmpty(n))return(t=new Fc).setFromTransformedAABB(n,e),t}return this.getBounds()},t}(O),mp=function(i){function t(t,e,n,r){t=i.call(this,t)||this;return t.currentTime=void 0,t.timelineTime=void 0,t.currentTime=n,t.timelineTime=r,t.target=e,t.type="finish",t.bubbles=!1,t.currentTarget=e,t.defaultPrevented=!1,t.eventPhase=t.AT_TARGET,t.timeStamp=Date.now(),t.currentTime=n,t.timelineTime=r,t}return b(t,i),t}(Id),vp=0,bp=function(){function t(t,e){this.effect=void 0,this.timeline=void 0,this.id=void 0,this.currentTimePending=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this.oldPlayState=void 0,this._holdTime=void 0,this.readyPromise=void 0,this.finishedPromise=void 0,this.resolveReadyPromise=void 0,this.rejectReadyPromise=void 0,this.resolveFinishedPromise=void 0,this.rejectFinishedPromise=void 0,this.onfinish=void 0,this.oncancel=void 0,this.onframe=void 0,this._currentTime=0,this._startTime=void 0,this._playbackRate=1,this._totalDuration=void 0,this._inEffect=void 0,this._inTimeline=!0,this.onremove=void 0,((this.effect=t).animation=this).timeline=e,this.id=""+vp++,this._inEffect=!!this.effect.update(0),this._totalDuration=Number(null==(t=this.effect)?void 0:t.getComputedTiming().endTime),this._holdTime=0,this._paused=!1,this.oldPlayState="idle",this.updatePromises()}var e=t.prototype;return e.updatePromises=function(){var t=this.oldPlayState,e=this.pending?"pending":this.playState;return this.readyPromise&&e!==t&&("idle"===e?(this.rejectReadyPromise(),this.readyPromise=void 0):"pending"===t?this.resolveReadyPromise():"pending"===e&&(this.readyPromise=void 0)),this.finishedPromise&&e!==t&&("idle"===e?(this.rejectFinishedPromise(),this.finishedPromise=void 0):"finished"===e?this.resolveFinishedPromise():"finished"===t&&(this.finishedPromise=void 0)),this.oldPlayState=e,this.readyPromise||this.finishedPromise},e.play=function(){this.updatePromises(),this._paused=!1,(this._isFinished||this._idle)&&(this.rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this),-1===this.timeline.animations.indexOf(this)&&this.timeline.animations.push(this),this.updatePromises()},e.pause=function(){this.updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),this._isFinished||this._paused||this._idle?this._idle&&(this.rewind(),this._idle=!1):this.currentTimePending=!0,this._startTime=null,this._paused=!0,this.updatePromises()},e.finish=function(){this.updatePromises(),this._idle||(this.currentTime=0<this._playbackRate?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this.currentTimePending=!1,this.timeline.applyDirtiedAnimation(this),this.updatePromises())},e.cancel=function(){this.updatePromises(),this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this.effect.update(null),this.timeline.applyDirtiedAnimation(this),this.updatePromises())},e.reverse=function(){this.updatePromises();var t=this.currentTime;this.playbackRate*=-1,this.play(),null!==t&&(this.currentTime=t),this.updatePromises()},e.updatePlaybackRate=function(t){this.playbackRate=t},e.targetAnimations=function(){var t;return(null==(t=this.effect)?void 0:t.target).getAnimations()},e.markTarget=function(){var t=this.targetAnimations();-1===t.indexOf(this)&&t.push(this)},e.unmarkTarget=function(){var t=this.targetAnimations(),e=t.indexOf(this);-1!==e&&t.splice(e,1)},e.tick=function(t,e){this._idle||this._paused||(null===this._startTime?e&&(this.startTime=t-this._currentTime/this.playbackRate):this._isFinished||this.tickCurrentTime((t-this._startTime)*this.playbackRate)),e&&(this.currentTimePending=!1,this.fireEvents(t))},e.rewind=function(){if(0<=this.playbackRate)this.currentTime=0;else{if(!(this._totalDuration<1/0))throw new Error("Unable to rewind negative playback rate animation with infinite duration");this.currentTime=this._totalDuration}},e.persist=function(){throw new Error("Method not implemented.")},e.addEventListener=function(t,e,n){throw new Error("Method not implemented.")},e.removeEventListener=function(t,e,n){throw new Error("Method not implemented.")},e.dispatchEvent=function(t){throw new Error("Method not implemented.")},e.commitStyles=function(){throw new Error("Method not implemented.")},e.ensureAlive=function(){var t;this.playbackRate<0&&0===this.currentTime?this._inEffect=!(null==(t=this.effect)||!t.update(-1)):this._inEffect=!(null==(t=this.effect)||!t.update(this.currentTime)),this._inTimeline||!this._inEffect&&this._finishedFlag||(this._inTimeline=!0,this.timeline.animations.push(this))},e.tickCurrentTime=function(t,e){t!==this._currentTime&&(this._currentTime=t,this._isFinished&&!e&&(this._currentTime=0<this._playbackRate?this._totalDuration:0),this.ensureAlive())},e.fireEvents=function(t){var e,n=this;this._isFinished?this._finishedFlag||(this.onfinish&&(e=new mp(null,this,this.currentTime,t),setTimeout(function(){n.onfinish&&n.onfinish(e)})),this._finishedFlag=!0):(this.onframe&&"running"===this.playState&&(t=new mp(null,this,this.currentTime,t),this.onframe(t)),this._finishedFlag=!1)},Zs(t,[{key:"pending",get:function(){return null===this._startTime&&!this._paused&&0!==this.playbackRate||this.currentTimePending}},{key:"playState",get:function(){return this._idle?"idle":this._isFinished?"finished":this._paused?"paused":"running"}},{key:"ready",get:function(){var n=this;return this.readyPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.readyPromise=new Promise(function(t,e){n.resolveReadyPromise=function(){t(n)},n.rejectReadyPromise=function(){e(new Error)}}),this.pending||this.resolveReadyPromise()),this.readyPromise}},{key:"finished",get:function(){var n=this;return this.finishedPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.finishedPromise=new Promise(function(t,e){n.resolveFinishedPromise=function(){t(n)},n.rejectFinishedPromise=function(){e(new Error)}}),"finished"===this.playState&&this.resolveFinishedPromise()),this.finishedPromise}},{key:"currentTime",get:function(){return this.updatePromises(),this._idle||this.currentTimePending?null:this._currentTime},set:function(t){var e;t=Number(t),isNaN(t)||(this.timeline.restart(),this._paused||null===this._startTime||(this._startTime=Number(null==(e=this.timeline)?void 0:e.currentTime)-t/this.playbackRate),this.currentTimePending=!1,this._currentTime!==t&&(this._idle&&(this._idle=!1,this._paused=!0),this.tickCurrentTime(t,!0),this.timeline.applyDirtiedAnimation(this)))}},{key:"startTime",get:function(){return this._startTime},set:function(t){null!==t&&(this.updatePromises(),t=Number(t),isNaN(t)||this._paused||this._idle||(this._startTime=t,this.tickCurrentTime((Number(this.timeline.currentTime)-this._startTime)*this.playbackRate),this.timeline.applyDirtiedAnimation(this),this.updatePromises()))}},{key:"playbackRate",get:function(){return this._playbackRate},set:function(t){var e;t!==this._playbackRate&&(this.updatePromises(),e=this.currentTime,this._playbackRate=t,this.startTime=null,"paused"!==this.playState&&"idle"!==this.playState&&(this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this)),null!==e&&(this.currentTime=e),this.updatePromises())}},{key:"_isFinished",get:function(){return!this._idle&&(0<this._playbackRate&&Number(this._currentTime)>=this._totalDuration||this._playbackRate<0&&Number(this._currentTime)<=0)}},{key:"totalDuration",get:function(){return this._totalDuration}},{key:"_needsTick",get:function(){return this.pending||"running"===this.playState||!this._finishedFlag}}]),t}();function xp(t,e){return Number(t.id)-Number(e.id)}var wp=function(){function t(t){var n=this;this.document=void 0,this.animations=[],this.ticking=!1,this.timelineTicking=!1,this.hasRestartedThisFrame=!1,this.animationsWithPromises=[],this.inTick=!1,this.pendingEffects=[],this.currentTime=null,this.rafId=0,this.rafCallbacks=[],this.frameId=void 0,this.webAnimationsNextTick=function(t){n.currentTime=t,n.discardAnimations(),0===n.animations.length?n.timelineTicking=!1:n.requestAnimationFrame(n.webAnimationsNextTick)},this.processRafCallbacks=function(e){var t=n.rafCallbacks;n.rafCallbacks=[],e<Number(n.currentTime)&&(e=Number(n.currentTime)),n.animations.sort(xp),n.animations=n.tick(e,!0,n.animations)[0],t.forEach(function(t){t[1](e)}),n.applyPendingEffects()},this.document=t}var e=t.prototype;return e.getAnimations=function(){return this.discardAnimations(),this.animations.slice()},e.isTicking=function(){return this.inTick},e.play=function(t){t=new bp(t,this);return this.animations.push(t),this.restartWebAnimationsNextTick(),t.updatePromises(),t.play(),t.updatePromises(),t},e.applyDirtiedAnimation=function(t){var e=this;this.inTick||(t.markTarget(),(t=t.targetAnimations()).sort(xp),this.tick(Number(this.currentTime),!1,t.slice())[1].forEach(function(t){t=e.animations.indexOf(t);-1!==t&&e.animations.splice(t,1)}),this.applyPendingEffects())},e.restart=function(){return this.ticking||(this.ticking=!0,this.requestAnimationFrame(function(){}),this.hasRestartedThisFrame=!0),this.hasRestartedThisFrame},e.destroy=function(){this.document.defaultView.cancelAnimationFrame(this.frameId)},e.applyPendingEffects=function(){this.pendingEffects.forEach(function(t){null!=t&&t.applyInterpolations()}),this.pendingEffects=[]},e.updateAnimationsPromises=function(){this.animationsWithPromises=this.animationsWithPromises.filter(function(t){return t.updatePromises()})},e.discardAnimations=function(){this.updateAnimationsPromises(),this.animations=this.animations.filter(function(t){return"finished"!==t.playState&&"idle"!==t.playState})},e.restartWebAnimationsNextTick=function(){this.timelineTicking||(this.timelineTicking=!0,this.requestAnimationFrame(this.webAnimationsNextTick))},e.rAF=function(t){var e=this.rafId++;return 0===this.rafCallbacks.length&&(this.frameId=this.document.defaultView.requestAnimationFrame(this.processRafCallbacks)),this.rafCallbacks.push([e,t]),e},e.requestAnimationFrame=function(e){var n=this;return this.rAF(function(t){n.updateAnimationsPromises(),e(t),n.updateAnimationsPromises()})},e.tick=function(n,r,t){var i=this,o=(this.inTick=!0,this.hasRestartedThisFrame=!1,this.currentTime=n,this.ticking=!1,[]),a=[],s=[],l=[];return t.forEach(function(t){t.tick(n,r),t._inEffect?(a.push(t.effect),t.markTarget()):(o.push(t.effect),t.unmarkTarget()),t._needsTick&&(i.ticking=!0);var e=t._inEffect||t._needsTick;((t._inTimeline=e)?s:l).push(t)}),(t=this.pendingEffects).push.apply(t,o),(t=this.pendingEffects).push.apply(t,a),this.ticking&&this.requestAnimationFrame(function(){}),this.inTick=!1,[s,l]},t}(),Ep=function(e){function t(){var t=e.call(this)||this,r=(t.defaultView=null,t.documentElement=void 0,t.timeline=void 0,t.ownerDocument=null,t.nodeName="document",t.timeline=new wp(Qs(t)),{});return Uc.forEach(function(t){var e=t.name,n=t.inherited,t=t.defaultValue;n&&t&&(r[e]=dl(t)?t(M.GROUP):t)}),t.documentElement=new tp({id:"g-root",style:r}),t.documentElement.ownerDocument=Qs(t),t.documentElement.parentNode=Qs(t),t.childNodes=[t.documentElement],t}b(t,e);var n=t.prototype;return n.createElement=function(t,e){var n;return"svg"===t?this.documentElement:((n=this.defaultView.customElements.get(t))||(console.warn("Unsupported tagName: ",t),n="tspan"===t?fp:tp),(t=new n(e)).ownerDocument=this,t)},n.createElementNS=function(t,e,n){return this.createElement(e,n)},n.cloneNode=function(t){throw new Error("Method not implemented.")},n.destroy=function(){try{this.documentElement.destroy()}catch(t){}this.timeline.destroy()},n.elementFromPoint=function(){var n=qs(k().mark(function t(e,n){var r,i,o,a,s,l;return k().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(i=this.defaultView.canvas2Viewport({x:e,y:n}),r=i.x,i=i.y,a=this.defaultView.getConfig(),o=a.width,a=a.height,r<0||i<0||o<r||a<i)return t.abrupt("return",null);t.next=4;break;case 4:return o=this.defaultView.viewport2Client({x:r,y:i}),a=o.x,s=o.y,t.next=7,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!0,position:{x:e,y:n,viewportX:r,viewportY:i,clientX:a,clientY:s},picked:[]});case 7:return s=t.sent,l=s.picked,t.abrupt("return",l&&l[0]||this.documentElement);case 10:case"end":return t.stop()}},t,this)}));return function(t,e){return n.apply(this,arguments)}}(),n.elementsFromPoint=function(){var n=qs(k().mark(function t(e,n){var r,i,o,a,s,l;return k().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(i=this.defaultView.canvas2Viewport({x:e,y:n}),r=i.x,i=i.y,a=this.defaultView.getConfig(),o=a.width,a=a.height,r<0||i<0||o<r||a<i)return t.abrupt("return",[]);t.next=4;break;case 4:return o=this.defaultView.viewport2Client({x:r,y:i}),a=o.x,s=o.y,t.next=7,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!1,position:{x:e,y:n,viewportX:r,viewportY:i,clientX:a,clientY:s},picked:[]});case 7:return s=t.sent,(l=s.picked)[l.length-1]!==this.documentElement&&l.push(this.documentElement),t.abrupt("return",l);case 11:case"end":return t.stop()}},t,this)}));return function(t,e){return n.apply(this,arguments)}}(),n.appendChild=function(t,e){throw new Error("Use document.documentElement instead.")},n.insertBefore=function(t,e){throw new Error("Use document.documentElement instead.")},n.removeChild=function(t,e){throw new Error("Use document.documentElement instead.")},n.replaceChild=function(t,e,n){throw new Error("Use document.documentElement instead.")},n.append=function(){throw new Error("Use document.documentElement instead.")},n.prepend=function(){throw new Error("Use document.documentElement instead.")},n.getElementById=function(t){return this.documentElement.getElementById(t)},n.getElementsByName=function(t){return this.documentElement.getElementsByName(t)},n.getElementsByTagName=function(t){return this.documentElement.getElementsByTagName(t)},n.getElementsByClassName=function(t){return this.documentElement.getElementsByClassName(t)},n.querySelector=function(t){return this.documentElement.querySelector(t)},n.querySelectorAll=function(t){return this.documentElement.querySelectorAll(t)},n.find=function(t){return this.documentElement.find(t)},n.findAll=function(t){return this.documentElement.findAll(t)},Zs(t,[{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}}]),t}(Rd),_p=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).altKey=void 0,t.button=void 0,t.buttons=void 0,t.ctrlKey=void 0,t.metaKey=void 0,t.relatedTarget=void 0,t.shiftKey=void 0,t.client=new Gc,t.movement=new Gc,t.offset=new Gc,t.global=new Gc,t.screen=new Gc,t}b(t,i);var e=t.prototype;return e.getModifierState=function(t){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(t)},e.initMouseEvent=function(){throw new Error("Method not implemented.")},Zs(t,[{key:"clientX",get:function(){return this.client.x}},{key:"clientY",get:function(){return this.client.y}},{key:"movementX",get:function(){return this.movement.x}},{key:"movementY",get:function(){return this.movement.y}},{key:"offsetX",get:function(){return this.offset.x}},{key:"offsetY",get:function(){return this.offset.y}},{key:"globalX",get:function(){return this.global.x}},{key:"globalY",get:function(){return this.global.y}},{key:"screenX",get:function(){return this.screen.x}},{key:"screenY",get:function(){return this.screen.y}}]),t}(Id),kp=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).pointerId=void 0,t.width=0,t.height=0,t.isPrimary=!1,t.pointerType=void 0,t.pressure=void 0,t.tangentialPressure=void 0,t.tiltX=void 0,t.tiltY=void 0,t.twist=void 0,t}b(t,i);var e=t.prototype;return e.getCoalescedEvents=function(){return"pointermove"===this.type||"mousemove"===this.type||"touchmove"===this.type?[this]:[]},e.getPredictedEvents=function(){throw new Error("getPredictedEvents is not supported!")},e.clone=function(){return this.manager.clonePointerEvent(this)},t}(_p),Tp=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).deltaMode=void 0,t.deltaX=void 0,t.deltaY=void 0,t.deltaZ=void 0,t.DOM_DELTA_LINE=0,t.DOM_DELTA_PAGE=1,t.DOM_DELTA_PIXEL=2,t}return b(t,i),t.prototype.clone=function(){return this.manager.cloneWheelEvent(this)},t}(_p),Mp=function(){function t(){this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=Yu,this.endDelay=0,this.fill="auto",this.iterationStart=0,this.iterations=1,this.playbackRate=void 0,this.effect=void 0,this.composite=void 0,this.activeDuration=void 0,this.endTime=void 0,this.currentIteration=null,this.progress=null}return Zs(t,[{key:"easing",get:function(){return this._easing},set:function(t){this.easingFunction=Ku(t),this._easing=t}}]),t}();function Sp(t,i){if(null===t)return[];for(var e=(t=Array.isArray(t)?t:function(t){var e,n=[];for(e in t)if(!(e in["easing","offset","composite"]))for(var r,i=t[e],o=(i=Array.isArray(i)?i:[i]).length,a=0;a<o;a++)n[a]||(r={},"offset"in t&&(r.offset=Number(t.offset)),"easing"in t&&(r.easing=t.easing),"composite"in t&&(r.composite=t.composite),n[a]=r),void 0!==i[a]&&null!==i[a]&&(n[a][e]=i[a]);return n.sort(function(t,e){return(t.computedOffset||0)-(e.computedOffset||0)}),n}(t)).map(function(t){var e,n={};for(e in null!=i&&i.composite&&(n.composite="auto"),t){var r=t[e];if("offset"===e){if(null!==r){if(r=Number(r),!isFinite(r))throw new Error("Keyframe offsets must be numbers.");if(r<0||1<r)throw new Error("Keyframe offsets must be between 0 and 1.");n.computedOffset=r}}else if("composite"===e&&-1===["replace","add","accumulate","auto"].indexOf(r))throw new Error(r+" compositing is not supported");n[e]=r}return void 0===n.offset&&(n.offset=null),void 0===n.easing&&(n.easing=(null==i?void 0:i.easing)||"linear"),void 0===n.composite&&(n.composite="auto"),n}),n=!0,r=-1/0,o=0;o<e.length;o++){var a=e[o].offset;if(S(a))n=!1;else{if(a<r)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");r=a}}if(e=e.filter(function(t){return 0<=Number(t.offset)&&Number(t.offset)<=1}),!n)for(var s=e.length,l=(e[s-1].computedOffset=Number(null!=(t=e[s-1].offset)?t:1),1<s&&(e[0].computedOffset=Number(null!=(t=e[0].offset)?t:0)),0),u=Number(e[0].computedOffset),c=1;c<s;c++){var h=e[c].computedOffset;if(!S(h)&&!S(u)){for(var d=1;d<c-l;d++)e[l+d].computedOffset=u+(Number(h)-u)*d/(c-l);l=c,u=Number(h)}}return e}var Op="backwards|forwards|both|none".split("|"),Pp="reverse|alternate|alternate-reverse".split("|");function Ap(t,e){var n,r,i;return t=function(t){"number"==typeof t&&(t=isNaN(t)?{duration:"auto"}:{duration:t});return t}(null!=(r=t)?r:{duration:"auto"}),n=t,r=e,i=new Mp,r&&(i.fill="both",i.duration="auto"),"number"!=typeof n||isNaN(n)?void 0!==n&&Object.keys(n).forEach(function(t){void 0===n[t]||null===n[t]||"auto"===n[t]||!("number"!=typeof i[t]&&"duration"!==t||"number"==typeof n[t]&&!isNaN(n[t]))||"fill"===t&&-1===Op.indexOf(n[t])||"direction"===t&&-1===Pp.indexOf(n[t])||(i[t]=n[t])}):i.duration=n,i}var Np=function(){function t(t,e,n){var r=this;this.composite="replace",this.iterationComposite="replace",this.target=void 0,this.animation=void 0,this.timing=void 0,this.computedTiming=void 0,this.normalizedKeyframes=void 0,this.timeFraction=void 0,this.interpolations=void 0,this.target=t,this.timing=Ap(n,!1),(this.timing.effect=this).timing.activeDuration=$u(this.timing),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=Sp(e,this.timing),this.interpolations=oc(this.normalizedKeyframes,this.timing,this.target),this.computedTiming=new Proxy(this.timing,{get:function(t,e){return"duration"===e?"auto"===t.duration?0:t.duration:"fill"===e?"auto"===t.fill?"none":t.fill:"localTime"===e?r.animation&&r.animation.currentTime||null:"currentIteration"===e?r.animation&&"running"===r.animation.playState?t.currentIteration||0:null:"progress"===e?r.animation&&"running"===r.animation.playState?t.progress||0:null:t[e]},set:function(){return!0}})}var e=t.prototype;return e.applyInterpolations=function(){this.interpolations(this.target,Number(this.timeFraction))},e.update=function(t){return null!==t&&(this.timeFraction=nc(this.timing.activeDuration,t,this.timing),null!==this.timeFraction)},e.getKeyframes=function(){return this.normalizedKeyframes},e.setKeyframes=function(t){this.normalizedKeyframes=Sp(t)},e.getComputedTiming=function(){return this.computedTiming},e.getTiming=function(){return this.timing},e.updateTiming=function(e){var n=this;Object.keys(e||{}).forEach(function(t){n.timing=e[t]})},t}(),Cp=function(){function t(){this.registry={},this.define(M.CIRCLE,Kd),this.define(M.ELLIPSE,Jd),this.define(M.RECT,dp),this.define(M.IMAGE,np),this.define(M.LINE,ip),this.define(M.GROUP,tp),this.define(M.PATH,ap),this.define(M.POLYGON,lp),this.define(M.POLYLINE,cp),this.define(M.TEXT,fp),this.define(M.HTML,gp)}var e=t.prototype;return e.define=function(t,e){this.registry[t]=e},e.get=function(t){return this.registry[t]},t}(),Lp=p.defineToken(""),Ip=p.defineToken("",{multiple:!1}),jp=/\[\s*(.*)=(.*)\s*\]/,Rp=function(){function t(){}var e=t.prototype;return e.selectOne=function(e,n){var t,r,i,o=this;return e.startsWith(".")?n.find(function(t){return-1<((null==t?void 0:t.classList)||[]).indexOf(o.getIdOrClassname(e))}):e.startsWith("#")?n.find(function(t){return t.id===o.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:o.attributeToString(t,r)===i)}):null):n.find(function(t){return n!==t&&t.nodeName===e})},e.selectAll=function(e,n){var t,r,i,o=this;return e.startsWith(".")?n.findAll(function(t){return n!==t&&-1<((null==t?void 0:t.classList)||[]).indexOf(o.getIdOrClassname(e))}):e.startsWith("#")?n.findAll(function(t){return n!==t&&t.id===o.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:o.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(jp),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&&!S(t=t.getAttribute(e))&&t.toString?t.toString():""},t}();function Dp(t,e){var n=Number(t.style.zIndex),r=Number(e.style.zIndex);if(n===r){var i=t.parentNode;if(i)return(i=i.childNodes||[]).indexOf(t)-i.indexOf(e)}return n-r}var Bp,Fp,zp,Vp,Rp=t([f({token:Ip})],Rp),It=p.defineToken(""),Gp=function(){function t(){var a,i,o,r,s,l,u,c,h,n,d,p,y=this;this.sceneGraphSelectorFactory=void 0,this.pendingEvents=[],this.boundsChangedEvent=new jd(E.BOUNDS_CHANGED),this.rotate=(a=qo(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=_(e,n,r));var i,o,n=t.transformable;null!==t.parentNode&&t.parentNode.transformable?($o(r=qo(),e[0],e[1],e[2]),i=y.getRotation(t),o=y.getRotation(t.parentNode),Qo(a,o),Ko(a,a),Zo(r,a,r),Zo(n.localRotation,r,i),ea(n.localRotation,n.localRotation),y.dirtifyLocal(t,n)):y.rotateLocal(t,e)}),this.rotateLocal=(i=qo(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=_(e,n,r));n=t.transformable;$o(i,e[0],e[1],e[2]),ta(n.localRotation,n.localRotation,i),y.dirtifyLocal(t,n)}),this.setEulerAngles=(o=qo(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=_(e,n,r));n=t.transformable;null!==t.parentNode&&t.parentNode.transformable?($o(n.localRotation,e[0],e[1],e[2]),r=y.getRotation(t.parentNode),Qo(o,Ko(qo(),r)),ta(n.localRotation,n.localRotation,o),y.dirtifyLocal(t,n)):y.setLocalEulerAngles(t,e)}),this.translateLocal=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=_(e,n,r));var i,o,a,s,l,u,c,h,d,p,f,n=t.transformable;Vo(e,m())||(i=r=e,o=n.localRotation,a=o[0],s=o[1],l=o[2],o=o[3],u=i[0],c=i[1],i=i[2],f=s*(p=a*c-s*u)-l*(d=l*u-a*i),l=l*(h=s*i-l*c)-a*p,a=a*d-s*h,d*=s=2*o,p*=s,l*=2,a*=2,r[0]=u+(h*=s)+(f*=2),r[1]=c+d+l,r[2]=i+p+a,Lo(n.localPosition,n.localPosition,e),y.dirtifyLocal(t,n))},this.setPosition=(r=io(),s=m(),function(t,e){var n=t.transformable;s[0]=e[0],s[1]=e[1],s[2]=e[2]||0,Vo(y.getPosition(t),s)||(No(n.position,s),null!==t.parentNode&&t.parentNode.transformable?(e=t.parentNode.transformable,ao(r,e.worldTransform),uo(r,r),Fo(n.localPosition,s,r)):No(n.localPosition,s),y.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,Vo(n.localPosition,l)||(No(n.localPosition,l),y.dirtifyLocal(t,n))}),this.translate=(u=m(),c=m(),h=m(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),Vo(e="number"==typeof e?Co(c,e,n,r):e,u)||(Lo(h,y.getPosition(t),e),y.setPosition(t,h))}),this.setRotation=function(){var a=qo();return function(t,e,n,r,i){var o=t.transformable;"number"==typeof e&&(e=Jo(e,n,r,i)),null!==t.parentNode&&t.parentNode.transformable?(n=y.getRotation(t.parentNode),Qo(a,n),Ko(a,a),Zo(o.localRotation,a,e),ea(o.localRotation,o.localRotation),y.dirtifyLocal(t,o)):y.setLocalRotation(t,e)}},this.calcLocalTransform=(n=io(),d=m(),p=Jo(0,0,0,1),function(t){wo(t.localTransform,t.localRotation,t.localPosition,_(1,1,1),t.origin),0===t.localSkew[0]&&0===t.localSkew[1]||((e=lo(n))[4]=Math.tan(t.localSkew[0]),e[1]=Math.tan(t.localSkew[1]),co(t.localTransform,t.localTransform,e));var e=wo(n,p,d,t.localScale,t.origin);co(t.localTransform,t.localTransform,e)})}var e=t.prototype;return e.matches=function(t,e){return this.sceneGraphSelectorFactory().is(t,e)},e.querySelector=function(t,e){return this.sceneGraphSelectorFactory().selectOne(t,e)},e.querySelectorAll=function(t,e){return this.sceneGraphSelectorFactory().selectAll(t,e)},e.attach=function(t,e,n){t.parentNode&&this.detach(t),t.parentNode=e,S(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=_(e,n,r));n=t.transformable;Vo(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=_(e,n,r));n=t.transformable;$o(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=_(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=_(e[0],e[1],e[2]||n.localScale[2]);Vo(e,n.localScale)||(No(n.localScale,e),this.dirtifyLocal(t,n))},e.setLocalRotation=function(t,e,n,r,i){"number"==typeof e&&(e=Jo(e,n,r,i));n=t.transformable;Qo(n.localRotation,e),this.dirtifyLocal(t,n)},e.setLocalSkew=function(t,e,n){"number"==typeof e&&(e=na(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){i.has(t.entity)||(n.boundsChangedEvent.detail=e,t.dispatchEvent(n.boundsChangedEvent),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=[]},e.dirtifyToRoot=function(t,e){void 0===e&&(e=!1);var 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.pendingEvents.push([t,{affectChildren:e}])},e.getPosition=function(t){var e=t.transformable;return vo(e.position,this.getWorldTransform(t,e))},e.getRotation=function(t){var e=t.transformable;return xo(e.rotation,this.getWorldTransform(t,e))},e.getScale=function(t){var e=t.transformable;return bo(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=vo(m(),e),r=xo(qo(),e),e=bo(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 Fc.isEmpty(e)?null:((n=n||new Fc).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 Fc},e.getBounds=function(t,e){var n,r,i,o,a=this,s=(void 0===e&&(e=!1),t.renderable);return s.boundsDirty||e||!s.bounds?!s.renderBoundsDirty&&e&&s.renderBounds?s.renderBounds:(n=e?s.renderBounds:s.bounds,r=this.getTransformedGeometryBounds(t,e,n),t.childNodes.forEach(function(t){t=a.getBounds(t,e);t&&(r?r.add(t):(r=n||new Fc).update(t.center,t.halfExtents))}),(i=t.parsedStyle.clipPath)&&((i=this.getTransformedGeometryBounds(i,!0))&&(o=new Fc).setFromTransformedAABB(i,this.getWorldTransform(t)),r?o&&(r=o.intersection(r)):r=o),(r=r||new Fc)&&(e?s.renderBounds=r:s.bounds=r),e?s.renderBoundsDirty=!1:s.boundsDirty=!1,r):s.bounds},e.getLocalBounds=function(t){if(t.parentNode){var e,n=io(),r=(t.parentNode.transformable&&(n=uo(io(),this.getWorldTransform(t.parentNode))),this.getBounds(t));if(!Fc.isEmpty(r))return(e=new Fc).setFromTransformedAABB(r,n),e}return this.getBounds(t)},e.getBoundingClientRect=function(t){var e,n,r,i=this.getGeometryBounds(t),i=(Fc.isEmpty(i)||(r=new Fc).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 Hc(e+((null==i?void 0:i.left)||0),t+((null==i?void 0:i.top)||0),n-e,r-t)):new Hc((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?co(e.worldTransform,n.worldTransform,e.localTransform):ao(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}(),Hp=(t([y(Lp),e("design:type",Function)],Gp.prototype,"sceneGraphSelectorFactory",void 0),Gp=t([f({token:It})],Gp),p.defineToken("",{multiple:!1})),Wp=((s=Bp=Bp||{})[s.CAMERA_CHANGED=0]="CAMERA_CHANGED",s[s.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",s[s.NONE=2]="NONE",p.defineToken("")),Yp=p.defineToken("");(re=Fp=Fp||{})[re.ORBITING=0]="ORBITING",re[re.EXPLORING=1]="EXPLORING",re[re.TRACKING=2]="TRACKING",(l=zp=zp||{})[l.DEFAULT=0]="DEFAULT",l[l.ROTATIONAL=1]="ROTATIONAL",l[l.TRANSLATIONAL=2]="TRANSLATIONAL",l[l.CINEMATIC=3]="CINEMATIC",(r=Vp=Vp||{})[r.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",r[r.PERSPECTIVE=1]="PERSPECTIVE";var Up="updated",qp=Math.PI/180,Xp=180/Math.PI,Zp=function(r){function a(t,e){var n;return void 0===t&&(t=Fp.EXPLORING),void 0===e&&(e=zp.DEFAULT),(n=r.call(this)||this).canvas=void 0,n.matrix=io(),n.right=_(1,0,0),n.up=_(0,1,0),n.forward=_(0,0,1),n.position=_(0,0,1),n.focalPoint=_(0,0,0),n.distanceVector=_(0,0,-1),n.distance=1,n.azimuth=0,n.elevation=0,n.roll=0,n.relAzimuth=0,n.relElevation=0,n.relRoll=0,n.dollyingStep=0,n.maxDistance=1/0,n.minDistance=-1/0,n.zoom=1,n.rotateWorld=!1,n.fov=30,n.near=.1,n.far=1e3,n.aspect=1,n.left=void 0,n.rright=void 0,n.top=void 0,n.bottom=void 0,n.projectionMatrix=io(),n.projectionMatrixInverse=io(),n.jitteredProjectionMatrix=void 0,n.view=void 0,n.enableUpdate=!0,n.type=Fp.EXPLORING,n.trackingMode=zp.DEFAULT,n.projectionMode=Vp.PERSPECTIVE,n.frustum=new Vc,n.landmarks=[],n.landmarkAnimationID=void 0,n.orthoMatrix=io(),n.setType(t,e),n}b(a,r);var t=a.prototype;return t.isOrtho=function(){return this.projectionMode===Vp.ORTHOGRAPHIC},t.getProjectionMode=function(){return this.projectionMode},t.getPerspective=function(){return this.jitteredProjectionMatrix||this.projectionMatrix},t.getPerspectiveInverse=function(){return this.projectionMatrixInverse},t.getFrustum=function(){return this.frustum},t.getPosition=function(){return this.position},t.getFocalPoint=function(){return this.focalPoint},t.getDollyingStep=function(){return this.dollyingStep},t.getNear=function(){return this.near},t.getFar=function(){return this.far},t.getZoom=function(){return this.zoom},t.getOrthoMatrix=function(){return this.orthoMatrix},t.getView=function(){return this.view},t.setEnableUpdate=function(t){this.enableUpdate=t},t.setType=function(t,e){return this.type=t,this.type===Fp.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===Fp.TRACKING&&void 0!==e&&this.setTrackingMode(e),this},t.setProjectionMode=function(t){return this.projectionMode=t,this},t.setTrackingMode=function(t){if(this.type!==Fp.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=t,this},t.setWorldRotation=function(t){return this.rotateWorld=t,this._getAngles(),this},t.getViewTransform=function(){return uo(io(),this.matrix)},t.getWorldTransform=function(){return this.matrix},t.jitterProjectionMatrix=function(t,e){t=go(io(),[t,e,0]);this.jitteredProjectionMatrix=co(io(),t,this.projectionMatrix)},t.clearJitterProjectionMatrix=function(){this.jitteredProjectionMatrix=void 0},t.setMatrix=function(t){return this.matrix=t,this._update(),this},t.setFov=function(t){return this.setPerspective(this.near,this.far,t,this.aspect),this},t.setAspect=function(t){return this.setPerspective(this.near,this.far,this.fov,t),this},t.setNear=function(t){return this.projectionMode===Vp.PERSPECTIVE?this.setPerspective(t,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,t,this.far),this},t.setFar=function(t){return this.projectionMode===Vp.PERSPECTIVE?this.setPerspective(this.near,t,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,t),this},t.setViewOffset=function(t,e,n,r,i,o){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=o,this.projectionMode===Vp.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},t.clearViewOffset=function(){return void 0!==this.view&&(this.view.enabled=!1),this.projectionMode===Vp.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},t.setZoom=function(t){return this.zoom=t,this.projectionMode===Vp.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===Vp.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this},t.setPerspective=function(t,e,n,r){this.projectionMode=Vp.PERSPECTIVE,this.fov=n,this.near=t,this.far=e,this.aspect=r;var i,o,a,s,n=this.near*Math.tan(.5*qp*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,o=this.view.fullHeight,l+=this.view.offsetX*r/i,n-=this.view.offsetY*e/o,r*=this.view.width/i,e*=this.view.height/o),i=this.projectionMatrix,l=(o=l)+r,n=(r=n)-e,e=this.far,a=2*t/(r-n),s=(l+o)/(l-o),r=(r+n)/(r-n),n=-(e+t)/(e-t),e=-2*e*t/(e-t),i[0]=2*t/(l-o),i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=a,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,po(this.projectionMatrix,this.projectionMatrix,_(1,-1,1)),uo(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},t.setOrthographic=function(t,e,n,r,i,o){this.projectionMode=Vp.ORTHOGRAPHIC,this.rright=e,this.left=t,this.top=n,this.bottom=r,this.near=i,this.far=o;var a,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,a=(this.top-this.bottom)/this.view.fullHeight/this.zoom,n=(s+=t*this.view.offsetX)+t*this.view.width,r=(e-=a*this.view.offsetY)-a*this.view.height),To(this.projectionMatrix,s,n,r,e,i,o),po(this.projectionMatrix,this.projectionMatrix,_(1,-1,1)),uo(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this},t.setPosition=function(t,e,n){t=Kl(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},t.setFocalPoint=function(t,e,n){void 0===e&&(e=this.focalPoint[1]),void 0===n&&(n=this.focalPoint[2]);var r,i=_(0,1,0);return this.focalPoint=Kl(t,e,n),this.trackingMode===zp.CINEMATIC&&(t=(r=Io(m(),this.focalPoint,this.position))[0],e=r[1],n=r[2],r=Ao(r),e=Math.asin(e/r)*Xp,r=90+Math.atan2(n,t)*Xp,yo(n=io(),n,r*qp),fo(n,n,e*qp),i=Fo(m(),[0,1,0],n)),uo(this.matrix,Mo(io(),this.position,this.focalPoint,i)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this},t.getDistance=function(){return this.distance},t.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},t.setMaxDistance=function(t){return this.maxDistance=t,this},t.setMinDistance=function(t){return this.minDistance=t,this},t.setAzimuth=function(t){return this.azimuth=Zl(t),this.computeMatrix(),this._getAxes(),this.type===Fp.ORBITING||this.type===Fp.EXPLORING?this._getPosition():this.type===Fp.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},t.getAzimuth=function(){return this.azimuth},t.setElevation=function(t){return this.elevation=Zl(t),this.computeMatrix(),this._getAxes(),this.type===Fp.ORBITING||this.type===Fp.EXPLORING?this._getPosition():this.type===Fp.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},t.getElevation=function(){return this.elevation},t.setRoll=function(t){return this.roll=Zl(t),this.computeMatrix(),this._getAxes(),this.type===Fp.ORBITING||this.type===Fp.EXPLORING?this._getPosition():this.type===Fp.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},t.getRoll=function(){return this.roll},t.rotate=function(t,e,n){if(this.relElevation=Zl(e),this.relAzimuth=Zl(t),this.relRoll=Zl(n),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===Fp.EXPLORING){e=Xo(qo(),[1,0,0],(this.rotateWorld?1:-1)*this.relElevation*qp),t=Xo(qo(),[0,1,0],(this.rotateWorld?1:-1)*this.relAzimuth*qp),n=Xo(qo(),[0,0,1],this.relRoll*qp),t=Zo(qo(),t,e),t=Zo(qo(),t,n),e=Eo(io(),t);ho(this.matrix,this.matrix,[0,0,-this.distance]),co(this.matrix,this.matrix,e),ho(this.matrix,this.matrix,[0,0,this.distance])}else{if(90<Math.abs(this.elevation))return this;this.computeMatrix()}return this._getAxes(),this.type===Fp.ORBITING||this.type===Fp.EXPLORING?this._getPosition():this.type===Fp.TRACKING&&this._getFocalPoint(),this._update(),this},t.pan=function(t,e){t=Kl(t,e,0),e=Po(this.position);return Lo(e,e,jo(m(),this.right,t[0])),Lo(e,e,jo(m(),this.up,t[1])),this._setPosition(e),this.triggerUpdate(),this},t.dolly=function(t){var e=this.forward,n=Po(this.position),t=(this.dollyingStep,this.distance+t*this.dollyingStep),t=Math.max(Math.min(t,this.maxDistance),this.minDistance)-this.distance;return n[0]+=t*e[0],n[1]+=t*e[1],n[2]+=t*e[2],this._setPosition(n),this.type===Fp.ORBITING||this.type===Fp.EXPLORING?this._getDistance():this.type===Fp.TRACKING&&Lo(this.focalPoint,n,this.distanceVector),this.triggerUpdate(),this},t.createLandmark=function(t,e){var e=e=void 0===e?{}:e,n=e.position,n=void 0===n?this.position:n,r=e.focalPoint,r=void 0===r?this.focalPoint:r,i=e.roll,e=e.zoom,o=new a,n=(o.setType(this.type,void 0),o.setPosition(n[0],n[1]||this.position[1],n[2]||this.position[2]),o.setFocalPoint(r[0],r[1]||this.focalPoint[1],r[2]||this.focalPoint[2]),o.setRoll(i||this.roll),o.setZoom(e||this.zoom),{name:t,matrix:oo(o.matrix),right:Po(o.right),up:Po(o.up),forward:Po(o.forward),position:Po(o.position),focalPoint:Po(o.focalPoint),distanceVector:Po(o.distanceVector),distance:o.distance,dollyingStep:o.dollyingStep,azimuth:o.azimuth,elevation:o.elevation,roll:o.roll,relAzimuth:o.relAzimuth,relElevation:o.relElevation,relRoll:o.relRoll,zoom:o.zoom});return this.landmarks.push(n),n},t.gotoLandmark=function(e,t){var n,s,r,i,l,u,c,h,d,p,f,y,g=this,o=(void 0===t&&(t={}),ic(e)?this.landmarks.find(function(t){return t.name===e}):e);o&&(n=void 0===(n=(t=hl(t)?{duration:t}:t).easing)?"linear":n,r=t.duration,s=void 0===r?100:r,r=void 0===(r=t.easingFunction)?void 0:r,t=t.onfinish,i=void 0===t?void 0:t,l=.01,0===s?(this.syncFromLandmark(o),i&&i()):(void 0!==this.landmarkAnimationID&&this.canvas.cancelAnimationFrame(this.landmarkAnimationID),u=o.position,c=o.focalPoint,h=o.zoom,d=o.roll,p=r||Ku(n),y=function(){g.setFocalPoint(c),g.setPosition(u),g.setRoll(d),g.setZoom(h),g.computeMatrix(),g.triggerUpdate(),i&&i()},this.canvas.requestAnimationFrame(function t(e){var n,r,i,o,a,e=e-(f=void 0===f?e:f);s<e||(n=p(e/s),r=m(),i=m(),o=1,a=0,Bo(r,g.focalPoint,c,n),Bo(i,g.position,u,n),a=g.roll*(1-n)+d*n,o=g.zoom*(1-n)+h*n,g.setFocalPoint(r),g.setPosition(i),g.setRoll(a),g.setZoom(o),Ho(r,c)+Ho(i,u)<=l)?y():(g.computeMatrix(),g.triggerUpdate(),e<s&&(g.landmarkAnimationID=g.canvas.requestAnimationFrame(t)))})))},t._update=function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()},t.computeMatrix=function(){var t=Xo(qo(),[0,0,1],this.roll*qp),e=(lo(this.matrix),Xo(qo(),[1,0,0],(this.rotateWorld&&this.type!==Fp.TRACKING||this.type===Fp.TRACKING?1:-1)*this.elevation*qp)),n=Xo(qo(),[0,1,0],(this.rotateWorld&&this.type!==Fp.TRACKING||this.type===Fp.TRACKING?1:-1)*this.azimuth*qp),n=Zo(qo(),n,e),n=Zo(qo(),n,t),e=Eo(io(),n);this.type===Fp.ORBITING||this.type===Fp.EXPLORING?(ho(this.matrix,this.matrix,this.focalPoint),co(this.matrix,this.matrix,e),ho(this.matrix,this.matrix,[0,0,this.distance])):this.type===Fp.TRACKING&&(ho(this.matrix,this.matrix,this.position),co(this.matrix,this.matrix,e))},t._setPosition=function(t,e,n){this.position=Kl(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()},t._getAxes=function(){No(this.right,Kl(Uo(Yo(),[1,0,0,0],this.matrix))),No(this.up,Kl(Uo(Yo(),[0,1,0,0],this.matrix))),No(this.forward,Kl(Uo(Yo(),[0,0,1,0],this.matrix))),Ro(this.right,this.right),Ro(this.up,this.up),Ro(this.forward,this.forward)},t._getAngles=function(){var t=this.distanceVector[0],e=this.distanceVector[1],n=this.distanceVector[2],r=Ao(this.distanceVector);0===r?(this.elevation=0,this.azimuth=0):this.type===Fp.TRACKING||this.rotateWorld?(this.elevation=Math.asin(e/r)*Xp,this.azimuth=Math.atan2(-t,-n)*Xp):(this.elevation=-Math.asin(e/r)*Xp,this.azimuth=-Math.atan2(-t,-n)*Xp)},t._getPosition=function(){No(this.position,Kl(Uo(Yo(),[0,0,0,1],this.matrix))),this._getDistance()},t._getFocalPoint=function(){var t,e;zo(this.distanceVector,[0,0,-this.distance],(t=no(),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)),Lo(this.focalPoint,this.position,this.distanceVector),this._getDistance()},t._getDistance=function(){this.distanceVector=Io(m(),this.focalPoint,this.position),this.distance=Ao(this.distanceVector),this.dollyingStep=this.distance/100},t._getOrthoMatrix=function(){var t,e;this.projectionMode===Vp.ORTHOGRAPHIC&&(t=this.position,e=Xo(qo(),[0,0,1],-this.roll*Math.PI/180),wo(this.orthoMatrix,e,_((this.rright-this.left)/2-t[0],(this.top-this.bottom)/2-t[1],0),_(this.zoom,this.zoom,1),t))},t.triggerUpdate=function(){var t;this.enableUpdate&&(t=this.getViewTransform(),t=co(io(),this.getPerspective(),t),this.getFrustum().extractFromVPMatrix(t),this.emit(Up))},t.syncFromLandmark=function(t){this.matrix=ao(this.matrix,t.matrix),this.right=No(this.right,t.right),this.up=No(this.up,t.up),this.forward=No(this.forward,t.forward),this.position=No(this.position,t.position),this.focalPoint=No(this.focalPoint,t.focalPoint),this.distanceVector=No(this.distanceVector,t.distanceVector),this.azimuth=t.azimuth,this.elevation=t.elevation,this.roll=t.roll,this.relAzimuth=t.relAzimuth,this.relElevation=t.relElevation,this.relRoll=t.relRoll,this.dollyingStep=t.dollyingStep,this.distance=t.distance,this.zoom=t.zoom},a}(Os.exports.EventEmitter),Kp=p.defineToken(""),$p=function(){function t(){this.renderingPluginProvider=void 0,this.canvasConfig=void 0,this.renderingContext=void 0,this.sceneGraphService=void 0,this.styleValueRegistry=void 0,this.camera=void 0,this.inited=!1,this.stats={total:0,rendered:0},this.zIndexCounter=0,this.renderOrderChangedEvent=new jd(E.RENDER_ORDER_CHANGED),this.hooks={init:new Sc,dirtycheck:new Lc(["object"]),cull:new Lc(["object","camera"]),beginFrame:new Nc([]),beforeRender:new Nc(["objectToRender"]),render:new Nc(["objectToRender"]),afterRender:new Nc(["objectToRender"]),endFrame:new Nc([]),destroy:new Nc([]),pick:new Pc(["result"]),pointerDown:new Nc(["event"]),pointerUp:new Nc(["event"]),pointerMove:new Nc(["event"]),pointerOut:new Nc(["event"]),pointerOver:new Nc(["event"]),pointerWheel:new Nc(["event"]),pointerCancel:new Nc(["event"])}}var e=t.prototype;return e.init=function(){var t=qs(k().mark(function t(){var e=this;return k().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.renderingPluginProvider.getContributions({cache:!1}).forEach(function(t){t.apply(e)}),t.next=3,this.hooks.init.promise();case 3:this.inited=!0;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),e.getStats=function(){return this.stats},e.disableDirtyRectangleRendering=function(){return!this.canvasConfig.renderer.getConfig().enableDirtyRectangleRendering||this.renderingContext.renderReasons.has(Bp.CAMERA_CHANGED)},e.render=function(t){var e=this;this.stats.total=0,this.stats.rendered=0,this.zIndexCounter=0,this.sceneGraphService.syncHierarchy(this.renderingContext.root),this.sceneGraphService.triggerPendingEvents(),this.renderingContext.renderReasons.size&&this.inited&&(this.renderDisplayObject(this.renderingContext.root,t),this.hooks.beginFrame.call(),this.renderingContext.renderListCurrentFrame.forEach(function(t){e.hooks.beforeRender.call(t),e.hooks.render.call(t),e.hooks.afterRender.call(t)}),this.hooks.endFrame.call(),this.renderingContext.renderListCurrentFrame=[],this.renderingContext.renderReasons.clear())},e.renderDisplayObject=function(t,e){var n=this,r=e.renderer.getConfig(),i=r.enableDirtyCheck,r=r.enableCulling,i=(this.styleValueRegistry.recalc(t),i?this.hooks.dirtycheck.call(t):t),i=(!i||(r=r?this.hooks.cull.call(i,this.camera):i)&&(this.stats.rendered++,this.renderingContext.renderListCurrentFrame.push(r)),t.renderable.dirty=!1,t.sortable.renderOrder=this.zIndexCounter++,this.stats.total++,t.sortable),r=!1;i.dirty&&(i.sorted=t.childNodes.slice().sort(Dp),i.dirty=!(r=!0)),(i.sorted||t.childNodes).forEach(function(t){n.renderDisplayObject(t,e)}),r&&t.forEach(function(t){n.renderOrderChangedEvent.detail={renderOrder:t.sortable.renderOrder},t.dispatchEvent(n.renderOrderChangedEvent)})},e.destroy=function(){this.inited=!1,this.hooks.destroy.call()},e.dirtify=function(){this.renderingContext.renderReasons.add(Bp.DISPLAY_OBJECT_CHANGED)},t}(),Jp=(t([Ii(Kp),e("design:type",Object)],$p.prototype,"renderingPluginProvider",void 0),t([y(hc),e("design:type",Object)],$p.prototype,"canvasConfig",void 0),t([y(Wp),e("design:type",Object)],$p.prototype,"renderingContext",void 0),t([y(It),e("design:type",Object)],$p.prototype,"sceneGraphService",void 0),t([y(Yt),e("design:type",Object)],$p.prototype,"styleValueRegistry",void 0),t([y(Yp),e("design:type",Zp)],$p.prototype,"camera",void 0),$p=t([f()],$p),function(r){function t(){for(var d,t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return(d=r.call.apply(r,[this].concat(e))||this).renderingContext=void 0,d.contextService=void 0,d.canvasConfig=void 0,d.rootTarget=void 0,d.cursor="default",d.mappingTable={},d.mappingState={trackingData:{}},d.eventPool=new Map,d.pickHandler=void 0,d.tmpMatrix=io(),d.tmpVec3=m(),d.onPointerDown=function(){var e=qs(k().mark(function t(e){var n,r;return k().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof kp){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,d.createPointerEvent(e);case 4:n=t.sent,d.dispatchEvent(n,"pointerdown"),"touch"===n.pointerType?d.dispatchEvent(n,"touchstart"):"mouse"!==n.pointerType&&"pen"!==n.pointerType||(r=2===n.button,d.dispatchEvent(n,r?"rightdown":"mousedown")),d.trackingData(e.pointerId).pressTargetsByButton[e.button]=n.composedPath(),d.freeEvent(n);case 10:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),d.onPointerUp=function(){var e=qs(k().mark(function t(e){var n,r,i,o,a,s,l;return k().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof kp){t.next=2;break}return t.abrupt("return");case 2:return n=performance.now(),t.next=5,d.createPointerEvent(e);case 5:if(r=t.sent,d.dispatchEvent(r,"pointerup"),"touch"===r.pointerType?d.dispatchEvent(r,"touchend"):"mouse"!==r.pointerType&&"pen"!==r.pointerType||(i=2===r.button,d.dispatchEvent(r,i?"rightup":"mouseup")),i=d.trackingData(e.pointerId),s=d.findMountedTarget(i.pressTargetsByButton[e.button]),(l=s)&&!r.composedPath().includes(s)){for(o=s;o&&!r.composedPath().includes(o);)r.currentTarget=o,d.notifyTarget(r,"pointerupoutside"),"touch"===r.pointerType?d.notifyTarget(r,"touchendoutside"):"mouse"!==r.pointerType&&"pen"!==r.pointerType||(a=2===r.button,d.notifyTarget(r,a?"rightupoutside":"mouseupoutside")),Rd.isNode(o)&&(o=o.parentNode);delete i.pressTargetsByButton[e.button],l=o}l&&((s=d.clonePointerEvent(r,"click")).target=l,s.path=[],i.clicksByButton[e.button]||(i.clicksByButton[e.button]={clickCount:0,target:s.target,timeStamp:n}),(l=i.clicksByButton[e.button]).target===s.target&&n-l.timeStamp<200?++l.clickCount:l.clickCount=1,l.target=s.target,l.timeStamp=n,s.detail=l.clickCount,null!=(l=r.detail)&&l.preventClick||("mouse"===s.pointerType||"touch"===s.pointerType?d.dispatchEvent(s,"click"):d.dispatchEvent(s,"pointertap")),d.freeEvent(s)),d.freeEvent(r);case 14:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),d.onPointerMove=function(){var e=qs(k().mark(function t(e){var n,r,i,o,a,s,l,u,c,h;return k().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof kp){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,d.createPointerEvent(e);case 4:if(n=t.sent,r="mouse"===n.pointerType||"pen"===n.pointerType,i=d.trackingData(e.pointerId),o=d.findMountedTarget(i.overTargets),i.overTargets&&o!==n.target)return l="mousemove"===e.type?"mouseout":"pointerout",t.next=12,d.createPointerEvent(e,l,o||void 0);t.next=23;break;case 12:if(a=t.sent,d.dispatchEvent(a,"pointerout"),r&&d.dispatchEvent(a,"mouseout"),n.composedPath().includes(o)){t.next=22;break}return t.next=18,d.createPointerEvent(e,"pointerleave",o||void 0);case 18:for((s=t.sent).eventPhase=s.AT_TARGET;s.target&&!n.composedPath().includes(s.target);)s.currentTarget=s.target,d.notifyTarget(s),r&&d.notifyTarget(s,"mouseleave"),Rd.isNode(s.target)&&(s.target=s.target.parentNode);d.freeEvent(s);case 22:d.freeEvent(a);case 23:if(o===n.target){t.next=38;break}l="mousemove"===e.type?"mouseover":"pointerover",u=d.clonePointerEvent(n,l),d.dispatchEvent(u,"pointerover"),r&&d.dispatchEvent(u,"mouseover"),c=o&&Rd.isNode(o)&&o.parentNode;case 29:if(c&&c!==(Rd.isNode(d.rootTarget)&&d.rootTarget.parentNode)){if(c===n.target)return t.abrupt("break",35);t.next=32}else t.next=35;break;case 32:c=c.parentNode,t.next=29;break;case 35:if(!c||c===(Rd.isNode(d.rootTarget)&&d.rootTarget.parentNode)){for((h=d.clonePointerEvent(n,"pointerenter")).eventPhase=h.AT_TARGET;h.target&&h.target!==o&&h.target!==(Rd.isNode(d.rootTarget)&&d.rootTarget.parentNode);)h.currentTarget=h.target,d.notifyTarget(h),r&&d.notifyTarget(h,"mouseenter"),Rd.isNode(h.target)&&(h.target=h.target.parentNode);d.freeEvent(h)}d.freeEvent(u);case 38:d.dispatchEvent(n,"pointermove"),"touch"===n.pointerType&&d.dispatchEvent(n,"touchmove"),r&&(d.dispatchEvent(n,"mousemove"),d.cursor=d.getCursor(n.target)),i.overTargets=n.composedPath(),d.freeEvent(n);case 43:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),d.onPointerOut=function(){var e=qs(k().mark(function t(e){var n,r,i,o,a;return k().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof kp){t.next=2;break}return t.abrupt("return");case 2:if((n=d.trackingData(e.pointerId)).overTargets)return r="mouse"===e.pointerType||"pen"===e.pointerType,i=d.findMountedTarget(n.overTargets),t.next=8,d.createPointerEvent(e,"pointerout",i||void 0);t.next=19;break;case 8:return o=t.sent,d.dispatchEvent(o),r&&d.dispatchEvent(o,"mouseout"),t.next=13,d.createPointerEvent(e,"pointerleave",i||void 0);case 13:for((a=t.sent).eventPhase=a.AT_TARGET;a.target&&a.target!==(Rd.isNode(d.rootTarget)&&d.rootTarget.parentNode);)a.currentTarget=a.target,d.notifyTarget(a),r&&d.notifyTarget(a,"mouseleave"),Rd.isNode(a.target)&&(a.target=a.target.parentNode);n.overTargets=null,d.freeEvent(o),d.freeEvent(a);case 19:d.cursor=null;case 20:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),d.onPointerOver=function(){var e=qs(k().mark(function t(e){var n,r,i,o;return k().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof kp){t.next=2;break}return t.abrupt("return");case 2:return n=d.trackingData(e.pointerId),t.next=5,d.createPointerEvent(e);case 5:for(r=t.sent,i="mouse"===r.pointerType||"pen"===r.pointerType,d.dispatchEvent(r,"pointerover"),i&&d.dispatchEvent(r,"mouseover"),"mouse"===r.pointerType&&(d.cursor=d.getCursor(r.target)),(o=d.clonePointerEvent(r,"pointerenter")).eventPhase=o.AT_TARGET;o.target&&o.target!==(Rd.isNode(d.rootTarget)&&d.rootTarget.parentNode);)o.currentTarget=o.target,d.notifyTarget(o),i&&d.notifyTarget(o,"mouseenter"),Rd.isNode(o.target)&&(o.target=o.target.parentNode);n.overTargets=r.composedPath(),d.freeEvent(r),d.freeEvent(o);case 16:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),d.onPointerUpOutside=function(){var e=qs(k().mark(function t(e){var n,r,i,o;return k().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof kp){t.next=2;break}return t.abrupt("return");case 2:return n=d.trackingData(e.pointerId),r=d.findMountedTarget(n.pressTargetsByButton[e.button]),t.next=6,d.createPointerEvent(e);case 6:if(i=t.sent,r){for(o=r;o;)i.currentTarget=o,d.notifyTarget(i,"pointerupoutside"),"touch"===i.pointerType||"mouse"!==i.pointerType&&"pen"!==i.pointerType||d.notifyTarget(i,2===i.button?"rightupoutside":"mouseupoutside"),Rd.isNode(o)&&(o=o.parentNode);delete n.pressTargetsByButton[e.button]}d.freeEvent(i);case 9:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),d.onWheel=function(){var e=qs(k().mark(function t(e){var n;return k().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof Tp){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,d.createWheelEvent(e);case 4:n=t.sent,d.dispatchEvent(n),d.freeEvent(n);case 7:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),d}b(t,r);var e=t.prototype;return e.init=function(){this.rootTarget=this.renderingContext.root.parentNode,this.addEventMapping("pointerdown",this.onPointerDown),this.addEventMapping("pointerup",this.onPointerUp),this.addEventMapping("pointermove",this.onPointerMove),this.addEventMapping("pointerout",this.onPointerOut),this.addEventMapping("pointerleave",this.onPointerOut),this.addEventMapping("pointerover",this.onPointerOver),this.addEventMapping("pointerupoutside",this.onPointerUpOutside),this.addEventMapping("wheel",this.onWheel)},e.client2Viewport=function(t){var e=this.contextService.getBoundingClientRect();return new Gc(t.x-((null==e?void 0:e.left)||0),t.y-((null==e?void 0:e.top)||0))},e.viewport2Client=function(t){var e=this.contextService.getBoundingClientRect();return new Gc(t.x+((null==e?void 0:e.left)||0),t.y+((null==e?void 0:e.top)||0))},e.viewport2Canvas=function(t){var e=t.x,t=t.y,n=this.rootTarget.defaultView.getCamera(),r=this.canvasConfig,i=r.width,r=r.height,o=n.getPerspectiveInverse(),n=n.getWorldTransform(),n=co(this.tmpMatrix,n,o),o=Co(this.tmpVec3,e/i*2-1,2*(1-t/r)-1,0);return Fo(o,o,n),new Gc(o[0],o[1])},e.canvas2Viewport=function(t){var e=this.rootTarget.defaultView.getCamera(),n=e.getPerspective(),e=e.getViewTransform(),n=co(this.tmpMatrix,n,e),e=Co(this.tmpVec3,t.x,t.y,0),t=(Fo(this.tmpVec3,this.tmpVec3,n),this.canvasConfig),n=t.width,t=t.height;return new Gc((e[0]+1)/2*n,(1-(e[1]+1)/2)*t)},e.setPickHandler=function(t){this.pickHandler=t},e.addEventMapping=function(t,e){this.mappingTable[t]||(this.mappingTable[t]=[]),this.mappingTable[t].push({fn:e,priority:0}),this.mappingTable[t].sort(function(t,e){return t.priority-e.priority})},e.mapEvent=function(t){if(this.rootTarget){var e=this.mappingTable[t.type];if(e)for(var n=0,r=e.length;n<r;n++)e[n].fn(t);else console.warn("[EventService]: Event mapping not defined for "+t.type)}},e.dispatchEvent=function(t,e){t.propagationStopped=!1,t.propagationImmediatelyStopped=!1,this.propagate(t,e),this.emit(e||t.type,t)},e.propagate=function(t,e){if(t.target){var n=t.composedPath();t.eventPhase=t.CAPTURING_PHASE;for(var r=n.length-1;1<=r;r--)if(t.currentTarget=n[r],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return;if(t.eventPhase=t.AT_TARGET,t.currentTarget=t.target,this.notifyTarget(t,e),!t.propagationStopped&&!t.propagationImmediatelyStopped){var i=n.indexOf(t.currentTarget);t.eventPhase=t.BUBBLING_PHASE;for(var o=i+1;o<n.length;o++)if(t.currentTarget=n[o],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return}}},e.propagationPath=function(t){var e=[t],n=this.rootTarget.defaultView||null;if(n&&n===t)e.unshift(n.document);else{for(var r=0;r<2048&&t!==this.rootTarget;r++)Rd.isNode(t)&&t.parentNode&&(e.push(t.parentNode),t=t.parentNode);n&&e.push(n)}return e},e.hitTest=function(){var e=qs(k().mark(function t(e){var n,r,i,o;return k().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.viewportX,r=e.viewportY,o=this.canvasConfig,i=o.width,o=o.height,n<0||r<0||i<n||o<r)return t.abrupt("return",null);t.next=4;break;case 4:return t.next=6,this.pickHandler(e);case 6:if(t.t1=t.sent,t.t1){t.next=9;break}t.t1=this.rootTarget;case 9:if(t.t0=t.t1,t.t0){t.next=12;break}t.t0=null;case 12:return t.abrupt("return",t.t0);case 13:case"end":return t.stop()}},t,this)}));return function(t){return e.apply(this,arguments)}}(),e.isNativeEventFromCanvas=function(t){var e=this.contextService.getDomElement(),n=null==(n=t.nativeEvent)?void 0:n.target;if(n){if(n===e)return!0;if(e&&e.contains)return e.contains(n)}return!!t.nativeEvent.composedPath&&-1<t.nativeEvent.composedPath().indexOf(e)},e.getExistedHTML=function(t){if(t.nativeEvent.composedPath)for(var e=el(ty.getHTMLs());!(n=e()).done;){var n=n.value;if(-1<t.nativeEvent.composedPath().indexOf(n))return n}return null},e.pickTarget=function(){var e=qs(k().mark(function t(e){return k().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.hitTest({clientX:e.clientX,clientY:e.clientY,viewportX:e.viewportX,viewportY:e.viewportY,x:e.canvasX,y:e.canvasY}));case 1:case"end":return t.stop()}},t,this)}));return function(t){return e.apply(this,arguments)}}(),e.createPointerEvent=function(){var r=qs(k().mark(function t(e,n,r){var i,o;return k().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:i=this.allocateEvent(kp),this.copyPointerData(e,i),this.copyMouseData(e,i),this.copyData(e,i),i.nativeEvent=e.nativeEvent,i.originalEvent=e,o=this.getExistedHTML(i),null==r?t.next=11:(t.t0=r,t.next=20);break;case 11:if(t.t1=o,t.t1)t.next=19;else{if(t.t2=this.isNativeEventFromCanvas(i),t.t2)return t.next=17,this.pickTarget(i);t.next=18}break;case 17:t.t2=t.sent;case 18:t.t1=t.t2;case 19:t.t0=t.t1;case 20:return i.target=t.t0,"string"==typeof n&&(i.type=n),t.abrupt("return",i);case 23:case"end":return t.stop()}},t,this)}));return function(t,e,n){return r.apply(this,arguments)}}(),e.createWheelEvent=function(){var e=qs(k().mark(function t(e){var n,r;return k().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this.allocateEvent(Tp),this.copyWheelData(e,n),this.copyMouseData(e,n),this.copyData(e,n),n.nativeEvent=e.nativeEvent,n.originalEvent=e,r=this.getExistedHTML(n),t.t0=r,t.t0)t.next=15;else{if(t.t1=this.isNativeEventFromCanvas(n),t.t1)return t.next=13,this.pickTarget(n);t.next=14}break;case 13:t.t1=t.sent;case 14:t.t0=t.t1;case 15:return n.target=t.t0,t.abrupt("return",n);case 17:case"end":return t.stop()}},t,this)}));return function(t){return e.apply(this,arguments)}}(),e.trackingData=function(t){return this.mappingState.trackingData[t]||(this.mappingState.trackingData[t]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[t]},e.cloneWheelEvent=function(t){var e=this.allocateEvent(Tp);return e.nativeEvent=t.nativeEvent,e.originalEvent=t.originalEvent,this.copyWheelData(t,e),this.copyMouseData(t,e),this.copyData(t,e),e.target=t.target,e.path=t.composedPath().slice(),e.type=e.type,e},e.clonePointerEvent=function(t,e){var n=this.allocateEvent(kp);return n.nativeEvent=t.nativeEvent,n.originalEvent=t.originalEvent,this.copyPointerData(t,n),this.copyMouseData(t,n),this.copyData(t,n),n.target=t.target,n.path=t.composedPath().slice(),n.type=null!=e?e:n.type,n},e.copyPointerData=function(t,e){t instanceof kp&&e instanceof kp&&(e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist)},e.copyMouseData=function(t,e){t instanceof _p&&e instanceof _p&&(e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.shiftKey=t.shiftKey,e.client.copyFrom(t.client),e.movement.copyFrom(t.movement),e.canvas.copyFrom(t.canvas),e.screen.copyFrom(t.screen),e.global.copyFrom(t.global),e.offset.copyFrom(t.offset))},e.copyWheelData=function(t,e){e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ},e.copyData=function(t,e){e.isTrusted=t.isTrusted,e.timeStamp=performance.now(),e.type=t.type,e.detail=t.detail,e.view=t.view,e.page.copyFrom(t.page),e.viewport.copyFrom(t.viewport)},e.allocateEvent=function(t){this.eventPool.has(t)||this.eventPool.set(t,[]);t=this.eventPool.get(t).pop()||new t(this);return t.eventPhase=t.NONE,t.currentTarget=null,t.path=[],t.target=null,t},e.freeEvent=function(t){if(t.manager!==this)throw new Error("It is illegal to free an event not managed by this EventBoundary!");var e=t.constructor;this.eventPool.has(e)||this.eventPool.set(e,[]),this.eventPool.get(e).push(t)},e.notifyTarget=function(t,e){e=null!=(n=e)?n:t.type;var n=t.eventPhase===t.CAPTURING_PHASE||t.eventPhase===t.AT_TARGET?e+"capture":e;this.notifyListeners(t,n),t.eventPhase===t.AT_TARGET&&this.notifyListeners(t,e)},e.notifyListeners=function(t,e){var n=t.currentTarget.emitter,r=n._events[e];if(r)if("fn"in r)r.once&&n.removeListener(e,r.fn,void 0,!0),r.fn.call(t.currentTarget||r.context,t);else for(var i=0;i<r.length&&!t.propagationImmediatelyStopped;i++)r[i].once&&n.removeListener(e,r[i].fn,void 0,!0),r[i].fn.call(t.currentTarget||r[i].context,t)},e.findMountedTarget=function(t){if(!t)return null;for(var e=t[t.length-1],n=t.length-2;0<=n;n--){var r=t[n];if(!(r===this.rootTarget||Rd.isNode(r)&&r.parentNode===e))break;e=t[n]}return e},e.getCursor=function(t){for(var e=t;e;){var n=Ud.isElement(e)&&e.getAttribute("cursor");if(n)return n;e=Rd.isNode(e)&&e.parentNode}},t}(Os.exports.EventEmitter)),Qp=(t([y(Wp),e("design:type",Object)],Jp.prototype,"renderingContext",void 0),t([y(Hp),e("design:type",Object)],Jp.prototype,"contextService",void 0),t([y(hc),e("design:type",Object)],Jp.prototype,"canvasConfig",void 0),t([Ct.postConstruct(),e("design:type",Function),e("design:paramtypes",[]),e("design:returntype",void 0)],Jp.prototype,"init",null),Jp=t([f()],Jp),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}()),Qp=t([f()],Qp),tf={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]},ef=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,nf=new RegExp(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source+"|"+/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source+"|"+/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source+"|"+/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source),rf=new RegExp(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source+"|"+/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source+"|"+/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source+"|"+/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source),of=function(){function t(){var n=this;this.cache={},this.offscreenCanvas=void 0,this.shouldBreakByKinsokuShorui=function(t,e){return!n.isBreakingSpace(e)&&!(!t||!rf.exec(e)&&!nf.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}}var e=t.prototype;return e.measureFont=function(t,e){if(this.cache[t])return this.cache[t];for(var n={ascent:0,descent:0,fontSize:0},r=this.offscreenCanvas.getOrCreateCanvas(e),e=this.offscreenCanvas.getOrCreateContext(e),i=(e.font=t,tf.MetricsString+tf.BaselineSymbol),o=Math.ceil(e.measureText(i).width),a=Math.ceil(e.measureText(tf.BaselineSymbol).width),s=tf.HeightMultiplier*a,a=a*tf.BaselineMultiplier|0,l=(r.width=o,r.height=s,e.fillStyle="#f00",e.fillRect(0,0,o,s),e.font=t,e.textBaseline="alphabetic",e.fillStyle="#000",e.fillText(i,0,a),e.getImageData(0,0,o||1,s||1).data),r=l.length,u=4*o,c=0,h=0,d=!1,c=0;c<a;++c){for(var p=0;p<u;p+=4)if(255!==l[h+p]){d=!0;break}if(d)break;h+=u}for(n.ascent=a-c,h=r-u,d=!1,c=s;a<c;--c){for(var f=0;f<u;f+=4)if(255!==l[h+f]){d=!0;break}if(d)break;h-=u}return n.descent=c-a,n.fontSize=n.ascent+n.descent,this.cache[t]=n},e.measureText=function(t,e,n){var r=e.fontSize,i=e.wordWrap,o=e.lineHeight,a=e.lineWidth,s=e.textBaseline,l=e.textAlign,u=e.letterSpacing,c=e.leading,c=void 0===c?0:c,h=function(t){for(var e=t.fontSize,n=t.fontFamily,r=t.fontStyle,i=t.fontVariant,t=t.fontWeight,e=hl(e)&&e+"px"||"16px",o=ic(n)?n.split(","):[n],a=o.length-1;0<=a;a--){var s=o[a].trim();!/([\"\'])[^\'\"]+\1/.test(s)&&Ic.indexOf(s)<0&&(s='"'+s+'"'),o[a]=s}return r+" "+i+" "+t+" "+e+" "+o.join(",")}(e),d=this.measureFont(h,n),p=(0===d.fontSize&&(d.fontSize=r,d.ascent=r),this.offscreenCanvas.getOrCreateContext(n));p.font=h;for(var f=(i?this.wordWrap(t,e,n):t).split(/(?:\r\n|\r|\n)/),y=new Array(f.length),g=0,m=0;m<f.length;m++){var v=p.measureText(f[m]).width+(f[m].length-1)*u;y[m]=v,g=Math.max(g,v)}var r=g+a,b=o||d.fontSize+a,i=Math.max(b,d.fontSize+a)+(f.length-1)*(b+c),x=0;return"middle"===s?x=-i/2:"bottom"===s||"alphabetic"===s||"ideographic"===s?x=-i:"top"!==s&&"hanging"!==s||(x=0),{font:h,width:r,height:i,lines:f,lineWidths:y,lineHeight:b+=c,maxLineWidth:g,fontProperties:d,lineMetrics:y.map(function(t,e){var n=0;return"center"===l?n-=t/2:"right"!==l&&"end"!==l||(n-=t),new Hc(n-a/2,x+e*b,t+a,b)})}},e.wordWrap=function(i,t,e){function o(t){return a.getFromCache(t,r,d,s)}var a=this,n=t.wordWrapWidth,n=void 0===n?0:n,r=t.letterSpacing,s=this.offscreenCanvas.getOrCreateContext(e),l=n+r,u=[],c=0,h=0,d={};return Array.from(i).forEach(function(t,e){var n=i[e-1],e=i[e+1],r=o(t);if(a.isNewline(t))h=0,u[++c]="";else{if(0<h&&l<h+r){if(h=0,u[++c]="",a.isBreakingSpace(t))return;a.canBreakInLastChar(t)||(u=a.trimToBreakable(u),h=a.sumTextWidthByCache(u[c]||"",d)),a.shouldBreakByKinsokuShorui(t,e)&&(u=a.trimByKinsokuShorui(u),h+=o(n||""))}h+=r,u[c]=(u[c]||"")+t}}),u.join("\n")},e.isBreakingSpace=function(t){return"string"==typeof t&&0<=tf.BreakingSpaces.indexOf(t.charCodeAt(0))},e.isNewline=function(t){return"string"==typeof t&&0<=tf.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||!ef.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(!ef.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}(),af=(t([y(Qp),e("design:type",Qp)],of.prototype,"offscreenCanvas",void 0),of=t([f()],of),function(){function t(){}return t.prototype.update=function(t,e){t=t.r;return{width:2*t,height:2*t}},t}()),af=t([f({token:{token:Bc,named:M.CIRCLE}})],af),sf=function(){function t(){}return t.prototype.update=function(t,e){return{width:2*t.rx,height:2*t.ry}},t}(),sf=t([f({token:{token:Bc,named:M.ELLIPSE}})],sf),lf=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&&!ic(n)&&(r||(r=n.width,t.width=r),i||(i=n.height,t.height=i)),{width:r,height:i}},t}(),lf=t([f({token:[{token:Bc,named:M.RECT},{token:Bc,named:M.IMAGE},{token:Bc,named:M.GROUP}]})],lf),uf=function(){function t(){this.textService=void 0}var e=t.prototype;return e.isReadyToMeasure=function(t,e){var n=t.text,r=t.textAlign,i=t.textBaseline,o=t.fontSize,a=t.fontStyle,s=t.fontWeight,l=t.fontVariant,t=t.lineWidth;return n&&o&&a&&s&&l&&r&&i&&!S(t)},e.update=function(t,e){var n,r,i=t.text,o=t.textAlign,a=t.lineWidth,s=t.textBaseline,l=t.dx,u=t.dy,c=((null==e||null==(c=e.ownerDocument)||null==(c=c.defaultView)?void 0:c.getConfig())||{}).offscreenCanvas;return this.isReadyToMeasure(t,e)?(e=this.textService.measureText(i,t,c),i=(t.metrics=e).width,c=e.height,n=e.lineHeight,e=e.fontProperties,i=[i/2,c/2,0],c=[0,1],r=0,"center"===o?(r=a/2,c=[.5,1]):"right"!==o&&"end"!==o||(r=a,c=[1,1]),o=0,"middle"===s?o=i[1]:"top"===s||"hanging"===s?o=2*i[1]:"alphabetic"===s?o=n-e.ascent:"bottom"!==s&&"ideographic"!==s||(o=0),l&&(r+=l),u&&(o+=u),t.anchor=[c[0],c[1],0],{width:2*i[0],height:2*i[1],offsetX:r,offsetY:o}):(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}(),cf=(t([y(of),e("design:type",of)],uf.prototype,"textService",void 0),uf=t([f({token:{token:Bc,named:M.TEXT}})],uf),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}()),cf=t([f({token:{token:Bc,named:M.LINE}})],cf),hf=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}(),hf=t([f({token:[{token:Bc,named:M.POLYLINE},{token:Bc,named:M.POLYGON}]})],hf),df=function(){function t(){}return t.prototype.update=function(t){t=t.path.rect;return{width:t.width,height:t.height}},t}(),df=t([f({token:{token:Bc,named:M.PATH}})],df),pf=function(){function t(){this.sceneGraphService=void 0}return t.prototype.calculator=function(t,e,n,r){var i;return n instanceof sl&&(n=null),e&&e!==n&&e.parsedStyle.clipPathTargets&&(i=e.parsedStyle.clipPathTargets.indexOf(r),e.parsedStyle.clipPathTargets.splice(i,1)),n&&(n.parsedStyle.clipPathTargets||(n.parsedStyle.clipPathTargets=[]),n.parsedStyle.clipPathTargets.push(r)),this.sceneGraphService.dirtifyToRoot(r),n},t}(),ff=(t([y(It),e("design:type",Object)],pf.prototype,"sceneGraphService",void 0),pf=t([f({token:{token:Yc,named:w.CLIP_PATH}})],pf),function(){function t(){this.parser=yh,this.mixer=gh}return t.prototype.calculator=function(t,e,n,r){return n instanceof sl?"none"===n.value?eh:nh:n},t}()),ff=t([f({token:[{token:Yc,named:w.PAINT},{token:Yc,named:w.COLOR}]})],ff),yf=function(){function t(){this.parser=Rh}return t.prototype.calculator=function(t,e,n){return n instanceof sl?[]:n},t}();function gf(t){t=t.parsedStyle.fontSize;return S(t)?null:t}function mf(){this.container=void 0}var vf,bf,xf,wf,Ef,yf=t([f({token:{token:Yc,named:w.FILTER}})],yf),_f=function(){function t(){this.parser=bh,this.mixer=Mh}return t.prototype.calculator=function(t,e,n,r,i){if(!El.isRelativeUnit(n.unit))return n.value;if(n.unit===v.kPercentage)return 0;if(n.unit===v.kEms){if(r.parentNode){var o=gf(r.parentNode);if(o)return o*=n.value}return i.addUnresolveProperty(r,t),0}if(n.unit===v.kRems){if(null!=r&&(null!=(o=r.ownerDocument)&&o.documentElement)){o=gf(r.ownerDocument.documentElement);if(o)return o*=n.value}return i.addUnresolveProperty(r,t),0}},t}(),_f=t([f({token:[{token:Yc,named:w.LENGTH_PERCENTAGE},{token:Yc,named:w.LENGTH}]})],_f),kf=function(){function t(){this.mixer=Oh}var e=t.prototype;return e.parser=function(t){t=Eh(hl(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}(),kf=t([f({token:{token:Yc,named:w.LENGTH_PERCENTAGE_12}})],kf),Tf=function(){function t(){this.mixer=Oh}var e=t.prototype;return e.parser=function(t){t=Eh(hl(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}(),Tf=t([f({token:{token:Yc,named:w.LENGTH_PERCENTAGE_14}})],Tf),Mf=function(t){function e(){return t.apply(this,arguments)||this}return b(e,t),e.prototype.postProcessor=function(t){var e,n,r;switch(t.nodeName){case M.CIRCLE:case M.ELLIPSE:var i=t.parsedStyle,o=i.cx,i=i.cy;S(o)||(l=o),S(i)||(u=i);break;case M.LINE:var o=t.parsedStyle,i=o.x1,a=o.x2,s=o.y1,o=o.y2,l=Math.min(i,a),u=Math.min(s,o),c=0;break;case M.RECT:case M.IMAGE:case M.GROUP:case M.HTML:case M.TEXT:case M.MESH:S(t.parsedStyle.x)||(l=t.parsedStyle.x),S(t.parsedStyle.y)||(u=t.parsedStyle.y)}t.nodeName!==M.PATH&&t.nodeName!==M.POLYLINE&&t.nodeName!==M.POLYGON&&(t.parsedStyle.defX=l||0,t.parsedStyle.defY=u||0),S(l)&&S(u)&&S(c)||(e=(r=t.getLocalPosition())[0],n=r[1],r=r[2],t.setLocalPosition(S(l)?e:l,S(u)?n:u,S(c)?r:c))},e}(_f),Mf=t([f({token:{token:Yc,named:w.COORDINATE}})],Mf),Sf=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){n=null==(n=n=n instanceof sl?null:n)?void 0:n.cloneNode(!0);return n&&(n.style.isMarker=!0),n},t}(),Sf=t([f({token:{token:Yc,named:w.MARKER}})],Sf),Of=function(){function t(){this.mixer=Mh,this.parser=Th}return t.prototype.calculator=function(t,e,n){return n.value},t}(),Of=t([f({token:{token:Yc,named:w.NUMBER}})],Of),Pf=function(){function t(){this.parser=Th,this.mixer=Sh(0,1)}var e=t.prototype;return e.calculator=function(t,e,n){return n.value},e.postProcessor=function(t){var e;!t.attributes.offsetPath||(e=t.attributes.offsetPath.nodeName)!==M.LINE&&e!==M.PATH&&e!==M.POLYLINE||(e=t.attributes.offsetPath.getPoint(t.parsedStyle.offsetDistance))&&t.setLocalPosition(e.x,e.y)},t}(),Pf=t([f({token:{token:Yc,named:w.OFFSET_DISTANCE}})],Pf),Af=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){var i;return e&&e!==n&&e.style.offsetPathTargets&&(i=e.style.offsetPathTargets.indexOf(r),e.style.offsetPathTargets.splice(i,1)),n&&(n.style.offsetPathTargets||(n.style.offsetPathTargets=[]),n.style.offsetPathTargets.push(r)),n},t}(),Af=t([f({token:{token:Yc,named:w.OFFSET_PATH}})],Af),Nf=function(){function t(){this.parser=Th,this.mixer=Sh(0,1)}return t.prototype.calculator=function(t,e,n){return n.value},t}(),Nf=t([f({token:{token:Yc,named:w.OPACITY_VALUE}})],Nf),Cf=function(){function t(){this.parser=Nh,this.mixer=Ch}var e=t.prototype;return e.calculator=function(t,e,n){return n instanceof sl&&"unset"===n.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:[],totalLength:0,zCommandIndexes:[],rect:new Hc(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}(),Cf=t([f({token:{token:Yc,named:w.PATH}})],Cf),Lf=function(){function t(){this.parser=Lh}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}(),Lf=t([f({token:{token:Yc,named:w.LIST_OF_POINTS}})],Lf),If=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=Sh(0,1/0),t}return b(t,i),t}(_f),If=t([f({token:{token:Yc,named:w.SHADOW_BLUR}})],If),jf=function(){function t(){}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof sl?"unset"===n.value?"":n.value:n},e.postProcessor=function(t){t.nodeValue=""+t.parsedStyle.text||""},t}(),jf=t([f({token:{token:Yc,named:w.TEXT}})],jf),Rf=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){var i,o=r.getAttribute("text");return o&&(i=o,"capitalize"===n.value?i=o.charAt(0).toUpperCase()+o.slice(1):"lowercase"===n.value?i=o.toLowerCase():"uppercase"===n.value&&(i=o.toUpperCase()),r.parsedStyle.text=i),n.value},t}(),Rf=t([f({token:{token:Yc,named:w.TEXT_TRANSFORM}})],Rf),Df=function(){function t(){this.tmpMat4=io(),this.parser=dd,this.mixer=_d}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof sl?[]:n},e.postProcessor=function(l){var u=this,t=l.parsedStyle,e=t.transform,c=t.defX,h=t.defY;e&&e.length&&(l.resetLocalTransform(),l.setLocalPosition(c,h),e.forEach(function(t){var e,n,r,i,o,a,s=t.t,t=t.d;"scale"===s?(a=(null==t?void 0:t.map(function(t){return t.value}))||[1,1],l.scaleLocal(a[0],a[1],1)):"scalex"===s?(a=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(a[0],1,1)):"scaley"===s?(a=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(1,a[0],1)):"scalez"===s?(a=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(1,1,a[0])):"scale3d"===s?(a=(null==t?void 0:t.map(function(t){return t.value}))||[1,1,1],l.scaleLocal(a[0],a[1],a[2])):"translate"===s?(a=t||[Nl,Nl],l.translateLocal(a[0].value,a[1].value,0)):"translatex"===s?(a=t||[Nl],l.translateLocal(a[0].value,0,0)):"translatey"===s?(a=t||[Nl],l.translateLocal(0,a[0].value,0)):"translatez"===s?(a=t||[Nl],l.translateLocal(0,0,a[0].value)):"translate3d"===s?(a=t||[Nl,Nl,Nl],l.translateLocal(a[0].value,a[1].value,a[2].value)):"rotate"===s?(a=t||[Cl],l.rotateLocal(0,0,a[0].value)):"rotatex"===s?(a=t||[Cl],l.rotateLocal(a[0].value,0,0)):"rotatey"===s?(a=t||[Cl],l.rotateLocal(0,a[0].value,0)):"rotatez"===s?(a=t||[Cl],l.rotateLocal(0,0,a[0].value)):"rotate3d"!==s&&("skew"===s?(a=(null==t?void 0:t.map(function(t){return t.value}))||[0,0],l.setLocalSkew($l(a[0]),$l(a[1]))):"skewx"===s?(a=(null==t?void 0:t.map(function(t){return t.value}))||[0],l.setLocalSkew($l(a[0]),l.getLocalSkew()[1])):"skewy"===s?(a=(null==t?void 0:t.map(function(t){return t.value}))||[0],l.setLocalSkew(l.getLocalSkew()[0],$l(a[0]))):"matrix"===s?(e=(a=t.map(function(t){return t.value}))[0],n=a[1],r=a[2],i=a[3],o=a[4],a=a[5],l.setLocalTransform(so(u.tmpMat4,e,n,0,0,r,i,0,0,0,0,1,0,o+c,a+h,0,1))):"matrix3d"===s&&(so.apply(Oo,[u.tmpMat4].concat(t.map(function(t){return t.value}))),u.tmpMat4[12]+=c,u.tmpMat4[13]+=h,l.setLocalTransform(u.tmpMat4)))}))},t}(),Df=t([f({token:{token:Yc,named:w.TRANSFORM}})],Df),Bf=function(){this.parser=kd},Bf=t([f({token:{token:Yc,named:w.TRANSFORM_ORIGIN}})],Bf),Ff=function(){function t(){this.parser=Th}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}(),Ff=t([f({token:{token:Yc,named:w.Z_INDEX}})],Ff),zf={},Vf=[],Gf=function(){function t(){}var e=t.prototype;return e.getByEntity=function(t){return zf[t]},e.getAll=function(){return Object.keys(zf).map(function(t){return zf[t]})},e.add=function(t,e){(zf[t]=e).nodeName===M.HTML&&Vf.push(e)},e.remove=function(t){var e=zf[t];e&&(delete zf[t],e.nodeName===M.HTML&&(t=Vf.indexOf(e),Vf.splice(t,1)))},e.getHTMLs=function(){return Vf},t}(),Gf=t([f()],Gf),c=Ci(function(t){Ct.decorate(yi(),Os.exports.EventEmitter),t(Gf),t(Rp),t({token:Lp,useFactory:function(t){return function(){return t.container.get(Ip)}}}),t(Gp),t(Qp),t(of),t(af),t(sf),t(lf),t(uf),t(cf),t(hf),t(df),t({token:Dc,useFactory:function(e){var n={};return function(t){return n[t]||e.container.isBoundNamed(Bc,t)&&(n[t]=e.container.getNamed(Bc,t)),n[t]}}}),t(Of),t(Ld),t(pf),t(ff),t(yf),t(_f),t(kf),t(Tf),t(Mf),t(Pf),t(Af),t(Nf),t(Cf),t(Lf),t(If),t(jf),t(Rf),t(Df),t(Bf),t(Ff),t(Sf),t({token:Wc,useFactory:function(e){var n={};return function(t){return n[t]||e.container.isBoundNamed(Yc,t)&&(n[t]=e.container.getNamed(Yc,t)),n[t]}}}),t(oh),t(rd),t(id),t(nd),t({token:Qh,useFactory:function(n){return function(t){var e=n.container.createChild();return e.register({token:td,useValue:t}),e.get(nd)}}}),t({token:Vh,useFactory:function(o){return function(t){var e=o.container.createChild(),n=(e.register(Wh),e.register(Jh),e.register({token:Kh,useFactory:function(n){return function(t){var e=n.container.createChild();return e.register({token:$h,useValue:t}),e.get(Jh)}}}),e.register(Zh),e.register({token:Uh,useFactory:function(r){return function(t,e){var n=r.container.createChild();return n.register({token:qh,useValue:t}),n.register({token:Xh,useValue:e}),n.get(Zh)}}}),e.register(sd),e.register({token:od,useFactory:function(n){return function(t){var e=n.container.createChild();return e.register({token:ad,useValue:t}),e.get(sd)}}}),e.get(Kh)),r=e.get(od),i=e.get(Uh);return e.register({token:Gh,useValue:Ks({},t,{layoutChildrenFactory:n,layoutFragmentFactory:r,fragmentResultFactory:i})}),e.get(Wh)}}})}),ie=function(){function t(t){this.plugins=[],this.config=void 0,this.config=Ks({enableDirtyCheck:!0,enableCulling:!1,enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1},t)}var e=t.prototype;return e.registerPlugin=function(t){this.plugins.push(t)},e.unregisterPlugin=function(e){var t=this.plugins.findIndex(function(t){return t===e});-1<t&&this.plugins.splice(t,1)},e.getPlugins=function(){return this.plugins},e.getPlugin=function(e){return this.plugins.find(function(t){return t.name===e})},e.getConfig=function(){return this.config},e.setConfig=function(t){Object.assign(this.config,t)},t}(),Hf=p.defineToken(""),Wf=((Nt=function(){function t(){this.strategyProvider=void 0,this.renderingContext=void 0}return t.prototype.apply=function(t){var n=this,r=this.strategyProvider.getContributions();t.hooks.cull.tap(vf.tag,function(e){var t;return e&&(t=e.cullable,0===r.length?t.visible=-1<n.renderingContext.unculledEntities.indexOf(e.entity):t.visible=r.every(function(t){return t.isVisible(e)}),!t.isCulled()&&e.isVisible()?e:(e.dispatchEvent(new jd(E.CULLED)),null))}),t.hooks.afterRender.tap(vf.tag,function(t){t.cullable.visibilityPlaneMask=-1})},t}()).tag="Culling",vf=Nt),Yf=(t([Ii(Hf),e("design:type",Object)],Wf.prototype,"strategyProvider",void 0),t([y(Wp),e("design:type",Object)],Wf.prototype,"renderingContext",void 0),Wf=vf=t([f({contrib:Kp})],Wf),(Lt=function(){function t(){}return t.prototype.apply=function(e){e.hooks.dirtycheck.tap(bf.tag,function(t){return t&&(t.renderable.dirty||e.disableDirtyRectangleRendering()?t:null)})},t}()).tag="DirtyCheck",bf=Lt),Yf=bf=t([f({contrib:Kp})],Yf),Uf=((Ht=function(){function t(){var o=this;this.canvasConfig=void 0,this.contextService=void 0,this.renderingService=void 0,this.renderingContext=void 0,this.eventService=void 0,this.autoPreventDefault=!1,this.rootPointerEvent=new kp(null),this.rootWheelEvent=new Tp(null),this.onPointerMove=function(t){var e,n=null==(e=o.renderingContext.root)||null==(e=e.ownerDocument)?void 0:e.defaultView;if(!n.supportsTouchEvents||"touch"!==t.pointerType){for(var r=el(o.normalizeToPointerEvent(t,n));!(i=r()).done;){var i=i.value,i=o.bootstrapEvent(o.rootPointerEvent,i,n);o.eventService.mapEvent(i)}o.setCursor(o.eventService.cursor)}}}var e=t.prototype;return e.apply=function(t){var o=this,a=this.renderingContext.root.ownerDocument.defaultView;this.eventService.setPickHandler(function(){var e=qs(k().mark(function t(e){var n;return k().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o.renderingService.hooks.pick.promise({position:e,picked:[],topmost:!0});case 2:return n=t.sent,n=n.picked,t.abrupt("return",n[0]||null);case 5:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}()),t.hooks.pointerWheel.tap(xf.tag,function(t){t=o.normalizeWheelEvent(t);o.eventService.mapEvent(t)}),t.hooks.pointerDown.tap(xf.tag,function(t){if(!a.supportsTouchEvents||"touch"!==t.pointerType){var e=o.normalizeToPointerEvent(t,a);!o.autoPreventDefault||!e[0].isNormalized||!t.cancelable&&"cancelable"in t||t.preventDefault();for(var n=el(e);!(r=n()).done;){var r=r.value,r=o.bootstrapEvent(o.rootPointerEvent,r,a);o.eventService.mapEvent(r)}o.setCursor(o.eventService.cursor)}}),t.hooks.pointerUp.tap(xf.tag,function(t){if(!a.supportsTouchEvents||"touch"!==t.pointerType){for(var e=o.contextService.getDomElement(),n=e&&t.target&&t.target!==e&&e.contains&&!e.contains(t.target)?"outside":"",r=el(o.normalizeToPointerEvent(t,a));!(i=r()).done;){var i=i.value,i=o.bootstrapEvent(o.rootPointerEvent,i,a);i.type+=n,o.eventService.mapEvent(i)}o.setCursor(o.eventService.cursor)}}),t.hooks.pointerMove.tap(xf.tag,this.onPointerMove),t.hooks.pointerOver.tap(xf.tag,this.onPointerMove),t.hooks.pointerOut.tap(xf.tag,this.onPointerMove)},e.bootstrapEvent=function(t,e,n){t.view=n,t.originalEvent=null,t.nativeEvent=e,t.pointerId=e.pointerId,t.width=e.width,t.height=e.height,t.isPrimary=e.isPrimary,t.pointerType=e.pointerType,t.pressure=e.pressure,t.tangentialPressure=e.tangentialPressure,t.tiltX=e.tiltX,t.tiltY=e.tiltY,t.twist=e.twist,this.transferMouseData(t,e);var n=this.eventService.client2Viewport(new Gc(e.clientX,e.clientY)),r=n.x,n=n.y,r=(t.viewport.x=r,t.viewport.y=n,this.eventService.viewport2Canvas(t.viewport)),n=r.x,r=r.y;return t.canvas.x=n,t.canvas.y=r,t.global.copyFrom(t.canvas),t.offset.copyFrom(t.canvas),t.isTrusted=e.isTrusted,"pointerleave"===t.type&&(t.type="pointerout"),t.type.startsWith("mouse")&&(t.type=t.type.replace("mouse","pointer")),t.type.startsWith("touch")&&(t.type=Eu[t.type]||t.type),t},e.normalizeWheelEvent=function(t){var e=this.rootWheelEvent,n=(this.transferMouseData(e,t),e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ,this.eventService.client2Viewport(new Gc(t.clientX,t.clientY))),r=n.x,n=n.y,r=(e.viewport.x=r,e.viewport.y=n,this.eventService.viewport2Canvas(e.viewport)),n=r.x,r=r.y;return e.canvas.x=n,e.canvas.y=r,e.global.copyFrom(e.canvas),e.offset.copyFrom(e.canvas),e.nativeEvent=t,e.type=t.type,e},e.transferMouseData=function(t,e){t.isTrusted=e.isTrusted,t.srcElement=e.srcElement,t.timeStamp=performance.now(),t.type=e.type,t.altKey=e.altKey,t.metaKey=e.metaKey,t.shiftKey=e.shiftKey,t.ctrlKey=e.ctrlKey,t.button=e.button,t.buttons=e.buttons,t.client.x=e.clientX,t.client.y=e.clientY,t.movement.x=e.movementX,t.movement.y=e.movementY,t.page.x=e.pageX,t.page.y=e.pageY,t.screen.x=e.screenX,t.screen.y=e.screenY,t.relatedTarget=null},e.setCursor=function(t){this.contextService.applyCursorStyle(t||this.canvasConfig.cursor||"default")},e.normalizeToPointerEvent=function(t,e){var n=[];if(e.isTouchEvent(t))for(var r=0;r<t.changedTouches.length;r++){var i=t.changedTouches[r];cl(i.button)&&(i.button=0),cl(i.buttons)&&(i.buttons=1),cl(i.isPrimary)&&(i.isPrimary=1===t.touches.length&&"touchstart"===t.type),cl(i.width)&&(i.width=i.radiusX||1),cl(i.height)&&(i.height=i.radiusY||1),cl(i.tiltX)&&(i.tiltX=0),cl(i.tiltY)&&(i.tiltY=0),cl(i.pointerType)&&(i.pointerType="touch"),cl(i.pointerId)&&(i.pointerId=i.identifier||0),cl(i.pressure)&&(i.pressure=i.force||.5),cl(i.twist)&&(i.twist=0),cl(i.tangentialPressure)&&(i.tangentialPressure=0),i.isNormalized=!0,i.type=t.type,n.push(i)}else e.isMouseEvent(t)?(cl((e=t).isPrimary)&&(e.isPrimary=!0),cl(e.width)&&(e.width=1),cl(e.height)&&(e.height=1),cl(e.tiltX)&&(e.tiltX=0),cl(e.tiltY)&&(e.tiltY=0),cl(e.pointerType)&&(e.pointerType="mouse"),cl(e.pointerId)&&(e.pointerId=1),cl(e.pressure)&&(e.pressure=.5),cl(e.twist)&&(e.twist=0),cl(e.tangentialPressure)&&(e.tangentialPressure=0),e.isNormalized=!0,n.push(e)):n.push(t);return n},t}()).tag="Event",xf=Ht),qf=(t([y(hc),e("design:type",Object)],Uf.prototype,"canvasConfig",void 0),t([y(Hp),e("design:type",Object)],Uf.prototype,"contextService",void 0),t([y($p),e("design:type",$p)],Uf.prototype,"renderingService",void 0),t([y(Wp),e("design:type",Object)],Uf.prototype,"renderingContext",void 0),t([y(Jp),e("design:type",Jp)],Uf.prototype,"eventService",void 0),Uf=xf=t([f({contrib:Kp})],Uf),[M.CIRCLE,M.ELLIPSE,M.IMAGE,M.RECT,M.LINE,M.POLYLINE,M.POLYGON,M.TEXT,M.PATH,M.HTML]),Xf=function(){function t(){this.camera=void 0}var e=t.prototype;return e.isVisible=function(t){var e,n,r,i=t.cullable;return!i.enable||(e=t.getRenderBounds(),!Fc.isEmpty(e)&&(n=this.camera.getFrustum(),r=null==(r=t.parentNode)||null==(r=r.cullable)?void 0:r.visibilityPlaneMask,i.visibilityPlaneMask=this.computeVisibilityWithPlaneMask(t,e,r||Rc.INDETERMINATE,n.planes),i.visible=i.visibilityPlaneMask!==Rc.OUTSIDE,i.visible))},e.computeVisibilityWithPlaneMask=function(t,e,n,r){if(n===Rc.OUTSIDE||n===Rc.INSIDE)return n;for(var i=Rc.INSIDE,o=-1<qf.indexOf(t.nodeName),a=0,s=r.length;a<s;++a){var l=1<<a;if(0!=(n&l)&&(!o||4!==a&&5!==a)){var u=r[a],c=u.normal,u=u.distance;if(Do(c,e.getPositiveFarPoint(r[a]))+u<0)return Rc.OUTSIDE;Do(c,e.getNegativeFarPoint(r[a]))+u<0&&(i|=l)}}return i},t}(),Zf=(t([y(Yp),e("design:type",Zp)],Xf.prototype,"camera",void 0),Xf=t([f({contrib:Hf})],Xf),(Kt=function(){function t(){this.renderingContext=void 0,this.styleValueRegistry=void 0,this.sceneGraphService=void 0,this.rBush=void 0,this.toSync=new Set}var e=t.prototype;return e.pushToSync=function(t){var e=this;t.forEach(function(t){e.toSync.add(t)})},e.apply=function(r){function e(t){t.target.renderable.dirty=!0,r.dirtify()}function n(t){var e=t.detail.affectChildren,n=t.target;e&&n.forEach(function(t){a.pushToSync([t])}),a.pushToSync(t.composedPath().slice(0,-2)),r.dirtify()}function i(t){var e=t.target;a.pushToSync(t.composedPath().slice(0,-2)),a.styleValueRegistry.recalc(e),a.sceneGraphService.dirtifyToRoot(e),r.dirtify()}function o(t){var e=t.target,n=e.rBushNode;n.aabb&&a.rBush.remove(n.aabb),a.toSync.delete(e),a.sceneGraphService.dirtifyToRoot(t.target),r.dirtify()}var a=this;r.hooks.init.tapPromise(wf.tag,qs(k().mark(function t(){return k().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:a.renderingContext.root.addEventListener(E.MOUNTED,i),a.renderingContext.root.addEventListener(E.UNMOUNTED,o),a.renderingContext.root.addEventListener(E.ATTR_MODIFIED,e),a.renderingContext.root.addEventListener(E.BOUNDS_CHANGED,n);case 4:case"end":return t.stop()}},t)}))),r.hooks.destroy.tap(wf.tag,function(){a.renderingContext.root.removeEventListener(E.MOUNTED,i),a.renderingContext.root.removeEventListener(E.UNMOUNTED,o),a.renderingContext.root.removeEventListener(E.ATTR_MODIFIED,e),a.renderingContext.root.removeEventListener(E.BOUNDS_CHANGED,n)}),r.hooks.endFrame.tap(wf.tag,function(){a.syncRTree()})},e.syncRTree=function(){var a=this,s=[];Array.from(this.toSync).filter(function(t){return t.isConnected}).forEach(function(t){var e,n,r,i=t.rBushNode,o=(i&&i.aabb&&a.rBush.remove(i.aabb),t.getRenderBounds());o&&(e=(n=o.getMin())[0],n=n[1],r=(o=o.getMax())[0],o=o[1],i.aabb||(i.aabb={}),i.aabb.id=t.entity,i.aabb.minX=e,i.aabb.minY=n,i.aabb.maxX=r,i.aabb.maxY=o),!i.aabb||isNaN(i.aabb.maxX)||isNaN(i.aabb.maxX)||isNaN(i.aabb.minX)||isNaN(i.aabb.minY)||s.push(i.aabb)}),this.rBush.load(s),s.length=0,this.toSync.clear()},t}()).tag="Prepare",wf=Kt),Kf=(t([y(Wp),e("design:type",Object)],Zf.prototype,"renderingContext",void 0),t([y(Yt),e("design:type",Object)],Zf.prototype,"styleValueRegistry",void 0),t([y(It),e("design:type",Object)],Zf.prototype,"sceneGraphService",void 0),t([y(Bd),e("design:type",Gi)],Zf.prototype,"rBush",void 0),Zf=wf=t([f({contrib:Kp})],Zf),Ci(function(t){ji.register(t,Kp,{cache:!1}),ji.register(t,Hf,{cache:!1}),t({token:Bd,useValue:new Gi}),t($p),t(Jp),t(Uf),t(Zf),t(Yf),t(Wf),t(Xf)})),$f=((h=Ef=Ef||{}).READY="ready",h.BEFORE_RENDER="beforerender",h.AFTER_RENDER="afterrender",h.BEFORE_DESTROY="beforedestroy",h.AFTER_DESTROY="afterdestroy",h.RESIZE="resize",h.DIRTY_RECTANGLE="dirtyrectangle",function(w){function t(t){var e=w.call(this)||this,n=(e.container=Bi.createChild(),e.document=void 0,e.customElements=void 0,e.requestAnimationFrame=void 0,e.cancelAnimationFrame=void 0,e.devicePixelRatio=void 0,e.supportsPointerEvents=void 0,e.supportsTouchEvents=void 0,e.isTouchEvent=void 0,e.isMouseEvent=void 0,e.Element=O,e.frameId=void 0,e.eventService=void 0,e.renderingService=void 0,e.inited=!1,e.readyPromise=void 0,e.resolveReadyPromise=void 0,e.mountEvent=new jd(E.MOUNTED),e.unmountEvent=new jd(E.UNMOUNTED),e.beforeRenderEvent=new jd(Ef.BEFORE_RENDER),e.afterRenderEvent=new jd(Ef.AFTER_RENDER),e.document=new Ep,e.document.defaultView=Qs(e),e.customElements=new Cp,t.container),r=t.canvas,i=t.offscreenCanvas,o=t.width,a=t.height,s=t.devicePixelRatio,l=t.renderer,u=t.background,c=t.cursor,h=t.document,d=t.requestAnimationFrame,p=t.cancelAnimationFrame,f=t.createImage,y=t.supportsPointerEvents,g=t.supportsTouchEvents,m=t.isTouchEvent,t=t.isMouseEvent,v=(v=n,b=Qs(e),v&&(v="string"==typeof v?v:v.id||Rl++,jl[v]&&jl[v].destroy(),jl[v]=b),o),b=a,x=s;return r&&(x=1<=(x=s||Bl&&window.devicePixelRatio||1)?Math.ceil(x):1,v=o||("auto"===(o=wu(s=r,"width"))?s.offsetWidth:parseFloat(o))||r.width/x,b=a||("auto"===(o=wu(s=r,"height"))?s.offsetHeight:parseFloat(o))||r.height/x),e.devicePixelRatio=x,e.requestAnimationFrame=null!=d?d:Vs.bind(globalThis),e.cancelAnimationFrame=null!=p?p:Gs.bind(globalThis),e.supportsTouchEvents=null!=g?g:"ontouchstart"in globalThis,e.supportsPointerEvents=null!=y?y:!!globalThis.PointerEvent,e.isTouchEvent=null!=m?m:function(t){return e.supportsTouchEvents&&t instanceof globalThis.TouchEvent},e.isMouseEvent=null!=t?t:function(t){return!globalThis.MouseEvent||t instanceof globalThis.MouseEvent&&(!e.supportsPointerEvents||!(t instanceof globalThis.PointerEvent))},e.initRenderingContext({container:n,canvas:r,width:v,height:b,renderer:l,offscreenCanvas:i,devicePixelRatio:x,cursor:c||"default",background:u||"transparent",createImage:f,document:h}),e.initDefaultCamera(v,b),qs(k().mark(function t(){return k().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.initRenderer(l);case 2:e.dispatchEvent(new jd(Ef.READY)),e.readyPromise&&e.resolveReadyPromise();case 4:case"end":return t.stop()}},t)}))(),e}b(t,w);var e=t.prototype;return e.initRenderingContext=function(t){var e=this;this.container.register({token:hc,useValue:t}),this.container.register({token:Wp,useValue:{root:this.document.documentElement,renderListCurrentFrame:[],unculledEntities:[],renderReasons:new Set,force:!1,dirty:!1}}),this.document.documentElement.addEventListener(E.CHILD_INSERTED,function(t){e.mountChildren(t.detail.child)}),this.document.documentElement.addEventListener(E.CHILD_REMOVED,function(t){e.unmountChildren(t.detail.child)})},e.initDefaultCamera=function(t,e){var t=(new Zp).setPosition(t/2,e/2,500).setFocalPoint(t/2,e/2,0).setOrthographic(t/-2,t/2,e/2,e/-2,.1,1e3),n=(t.canvas=this).container.get(Wp);t.on(Up,function(){n.renderReasons.add(Bp.CAMERA_CHANGED)}),this.container.register({token:Yp,useValue:t})},e.getConfig=function(){return this.container.get(hc)},e.getContainer=function(){return this.container},e.getRoot=function(){return this.document.documentElement},e.getCamera=function(){return this.container.get(Yp)},e.getContextService=function(){return this.container.get(Hp)},e.getEventService=function(){return this.eventService},e.getRenderingService=function(){return this.renderingService},e.getRenderingContext=function(){return this.container.get(Wp)},e.getStats=function(){return this.getRenderingService().getStats()},e.destroy=function(t,e){void 0===t&&(t=!0),(e=void 0===e?!1:e)||this.dispatchEvent(new jd(Ef.BEFORE_DESTROY)),this.frameId&&(this.getConfig().cancelAnimationFrame||cancelAnimationFrame)(this.frameId);var n=this.getRoot();this.unmountChildren(n),t&&this.document.destroy(),this.getContextService().destroy(),this.getRenderingService().destroy(),e||this.dispatchEvent(new jd(Ef.AFTER_DESTROY))},e.changeSize=function(t,e){this.resize(t,e)},e.resize=function(t,e){var n=this.container.get(hc),n=(n.width=t,n.height=e,this.getContextService().resize(t,e),this.container.get(Yp)),r=n.getProjectionMode();n.setPosition(t/2,e/2,500).setFocalPoint(t/2,e/2,0),r===Vp.ORTHOGRAPHIC?n.setOrthographic(t/-2,t/2,e/2,e/-2,n.getNear(),n.getFar()):n.setAspect(t/e),this.dispatchEvent(new jd(Ef.RESIZE,{width:t,height:e}))},e.appendChild=function(t,e){return this.document.documentElement.appendChild(t,e)},e.insertBefore=function(t,e){return this.document.documentElement.insertBefore(t,e)},e.removeChild=function(t,e){return this.document.documentElement.removeChild(t,e=void 0===e?!0:e)},e.removeChildren=function(t){this.document.documentElement.removeChildren(t=void 0===t?!0:t)},e.render=function(){this.dispatchEvent(this.beforeRenderEvent),this.container.isBound($p)&&this.container.get($p).render(this.getConfig()),this.dispatchEvent(this.afterRenderEvent)},e.run=function(){var e=this;(function t(){e.render(),e.frameId=requestAnimationFrame(t)})()},e.initRenderer=function(){var e=qs(k().mark(function t(e){var n;return k().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e){t.next=2;break}throw new Error("Renderer is required.");case 2:return this.inited=!1,this.readyPromise=void 0,this.loadCommonContainerModule(),this.loadRendererContainerModule(e),n=this.container.get(Hp),this.renderingService=this.container.get($p),this.eventService=this.container.get(Jp),t.next=11,n.init();case 11:return t.next=13,this.renderingService.init();case 13:this.inited=!0,this.getRoot().forEach(function(t){t=t.renderable;t&&(t.renderBoundsDirty=!0,t.boundsDirty=!0,t.dirty=!0)}),this.mountChildren(this.getRoot()),e.getConfig().enableAutoRendering&&this.run();case 17:case"end":return t.stop()}},t,this)}));return function(t){return e.apply(this,arguments)}}(),e.loadCommonContainerModule=function(){this.container.unload(Kf),this.container.load(Kf,!0)},e.loadRendererContainerModule=function(t){var e=this;t.getPlugins().forEach(function(t){t.container=e.container,t.init()})},e.setRenderer=function(){var e=qs(k().mark(function t(e){var n,r;return k().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((n=this.getConfig()).renderer===e)return t.abrupt("return");t.next=3;break;case 3:return r=n.renderer,n.renderer=e,this.destroy(!1,!0),[].concat(null==r?void 0:r.getPlugins()).reverse().forEach(function(t){t.destroy()}),t.next=9,this.initRenderer(e);case 9:case"end":return t.stop()}},t,this)}));return function(t){return e.apply(this,arguments)}}(),e.setCursor=function(t){this.container.get(hc).cursor=t,this.getContextService().applyCursorStyle(t)},e.unmountChildren=function(t){var e,n=this;this.inited&&(e=[],t.forEach(function(t){t.isConnected&&e.push(t)}),e.reverse().forEach(function(t){t instanceof Xd&&t.disconnectedCallback&&t.disconnectedCallback(),t.dispatchEvent(n.unmountEvent),t!==n.document.documentElement&&(t.ownerDocument=null),t.isConnected=!1}))},e.mountChildren=function(t){var e=this;this.inited?t.forEach(function(t){t.isConnected||(t.ownerDocument=e.document,t.isConnected=!0,t.dispatchEvent(e.mountEvent),t instanceof Xd&&t.connectedCallback&&t.connectedCallback())}):console.warn("[g]: You are trying to call `canvas.appendChild` before canvas' initialization finished. You can either await `canvas.ready` or listen to `CanvasEvent.READY` manually.","appended child: ",t.nodeName)},e.client2Viewport=function(t){return this.getEventService().client2Viewport(t)},e.viewport2Client=function(t){return this.getEventService().viewport2Client(t)},e.viewport2Canvas=function(t){return this.getEventService().viewport2Canvas(t)},e.canvas2Viewport=function(t){return this.getEventService().canvas2Viewport(t)},e.getPointByClient=function(t,e){return this.client2Viewport({x:t,y:e})},e.getClientByPoint=function(t,e){return this.viewport2Client({x:t,y:e})},Zs(t,[{key:"ready",get:function(){var e=this;return this.readyPromise||(this.readyPromise=new Promise(function(t){e.resolveReadyPromise=function(){t(e)}}),this.inited&&this.resolveReadyPromise()),this.readyPromise}}]),t}(n)),x=(Bi.load(c),Bi.get(It)),Jf=Bi.get(Yt),Qf=Bi.get(id),ty=Bi.get(Gf);function ey(t,e){return(ey=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var ny=p.defineToken(""),ry=p.defineToken("");function iy(t,e){e=e.r;t.arc(e,e,e,0,2*Math.PI,!1)}function oy(t,e){var n,r,i=e.rx,e=e.ry;t.ellipse?t.ellipse(i,e,i,e,0,0,2*Math.PI,!1):(n=e<i?i:e,r=e<i?1:i/e,e=e<i?e/i:1,t.save(),t.scale(r,e),t.arc(0,0,n,0,2*Math.PI))}function ay(t,e){var n,r,i=e.x1,o=e.y1,a=e.x2,s=e.y2,l=e.defX,l=void 0===l?0:l,u=e.defY,u=void 0===u?0:u,c=e.markerStart,h=e.markerEnd,d=e.markerStartOffset,e=e.markerEndOffset,p=0,f=0,y=0,g=0,m=0;c&&c instanceof O&&d&&(n=a-i,r=s-o,m=Math.atan2(r,n),p=Math.cos(m)*(d||0),f=Math.sin(m)*(d||0)),h&&h instanceof O&&e&&(n=i-a,r=o-s,m=Math.atan2(r,n),y=Math.cos(m)*(e||0),g=Math.sin(m)*(e||0)),t.moveTo(i-l+p,o-u+f),t.lineTo(a-l+y,s-u+g)}function sy(t,e){var n,r,i=e.defX,o=void 0===i?0:i,i=e.defY,a=void 0===i?0:i,i=e.markerStart,s=e.markerEnd,l=e.markerStartOffset,u=e.markerEndOffset,e=e.path,c=e.curve,e=e.zCommandIndexes,h=[].concat(c),d=(e.forEach(function(t,e){h.splice(t+e,1,["Z"])}),h.length&&"Z"===h[h.length-1][0]),p=0,f=0,y=0,g=0,c=0;i&&i instanceof O&&l&&(i=(e=i.parentNode.getStartTangent())[0],e=e[1],n=i[0]-e[0],r=i[1]-e[1],c=Math.atan2(r,n),p=Math.cos(c)*(l||0),f=Math.sin(c)*(l||0)),s&&s instanceof O&&u&&(e=(i=s.parentNode.getEndTangent())[0],l=i[1],n=e[0]-l[0],r=e[1]-l[1],c=Math.atan2(r,n),y=Math.cos(c)*(u||0),g=Math.sin(c)*(u||0));for(var m=0;m<h.length;m++){var v=h[m];switch(v[0]){case"M":t.moveTo(v[1]-o+p,v[2]-a+f);break;case"C":var b=m===h.length-(d?2:1)?y:0,x=m===h.length-(d?2:1)?g:0;t.bezierCurveTo(v[1]-o,v[2]-a,v[3]-o,v[4]-a,v[5]-o+b,v[6]-a+x);break;case"Z":t.closePath()}}}function ly(t,e){var n,r,i=e.defX,o=void 0===i?0:i,i=e.defY,a=void 0===i?0:i,i=e.markerStart,s=e.markerEnd,l=e.markerStartOffset,u=e.markerEndOffset,c=e.points.points,h=c.length,e=c[0][0]-o,d=c[0][1]-a,p=c[h-1][0]-o,f=c[h-1][1]-a,y=0,g=0,m=0,v=0,b=0;i&&i instanceof O&&l&&(n=c[1][0]-c[0][0],r=c[1][1]-c[0][1],b=Math.atan2(r,n),y=Math.cos(b)*(l||0),g=Math.sin(b)*(l||0)),s&&s instanceof O&&u&&(n=c[h-1][0]-c[0][0],r=c[h-1][1]-c[0][1],b=Math.atan2(r,n),m=Math.cos(b)*(u||0),v=Math.sin(b)*(u||0)),t.moveTo(e+(y||m),d+(g||v));for(var x=1;x<h-1;x++){var w=c[x];t.lineTo(w[0]-o,w[1]-a)}t.lineTo(p,f)}function uy(t,e){var n,r,i=e.defX,o=void 0===i?0:i,i=e.defY,a=void 0===i?0:i,i=e.markerStart,s=e.markerEnd,l=e.markerStartOffset,u=e.markerEndOffset,c=e.points.points,h=c.length,e=c[0][0]-o,d=c[0][1]-a,p=c[h-1][0]-o,f=c[h-1][1]-a,y=0,g=0,m=0,v=0,b=0;i&&i instanceof O&&l&&(n=c[1][0]-c[0][0],r=c[1][1]-c[0][1],b=Math.atan2(r,n),y=Math.cos(b)*(l||0),g=Math.sin(b)*(l||0)),s&&s instanceof O&&u&&(n=c[h-2][0]-c[h-1][0],r=c[h-2][1]-c[h-1][1],b=Math.atan2(r,n),m=Math.cos(b)*(u||0),v=Math.sin(b)*(u||0)),t.moveTo(e+y,d+g);for(var x=1;x<h-1;x++){var w=c[x];t.lineTo(w[0]-o,w[1]-a)}t.lineTo(p+m,f+v)}function cy(t,e){var n,r,i,o,a=e.radius,s=e.width,e=e.height,l=s,u=e;a&&a.some(function(t){return 0!==t})?(n=(s=0<s?1:-1)+(e=0<e?1:-1)==0,r=(a=a.map(function(t){return Xl(t,0,Math.min(Math.abs(l)/2,Math.abs(u)/2))}))[0],i=a[1],o=a[2],a=a[3],t.moveTo(s*r,0),t.lineTo(l-s*i,0),0!==i&&t.arc(l-s*i,e*i,i,-e*Math.PI/2,0<s?0:Math.PI,n),t.lineTo(l,u-e*o),0!==o&&t.arc(l-s*o,u-e*o,o,0<s?0:Math.PI,0<e?Math.PI/2:1.5*Math.PI,n),t.lineTo(s*a,u),0!==a&&t.arc(s*a,u-e*a,a,0<e?Math.PI/2:-Math.PI/2,0<s?Math.PI:0,n),t.lineTo(0,e*r),0!==r&&t.arc(s*r,e*r,r,0<s?Math.PI:0,0<e?1.5*Math.PI:Math.PI/2,n)):t.rect(0,0,l,u)}var hy=Ci(function(t){t({token:{token:ry,named:M.CIRCLE},useValue:iy}),t({token:{token:ry,named:M.ELLIPSE},useValue:oy}),t({token:{token:ry,named:M.RECT},useValue:cy}),t({token:{token:ry,named:M.LINE},useValue:ay}),t({token:{token:ry,named:M.POLYLINE},useValue:uy}),t({token:{token:ry,named:M.POLYGON},useValue:ly}),t({token:{token:ry,named:M.PATH},useValue:sy}),t({token:ny,useFactory:function(e){return function(t){return e.container.isBoundNamed(ry,t)?e.container.getNamed(ry,t):null}}})}),dy=function(i){var t;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).name="canvas-path-generator",t}t=i,(n=e).prototype=Object.create(t.prototype),ey(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){this.container.load(hy,!0)},n.destroy=function(){this.container.unload(hy)},e}(mf);function py(){py=function(){return a};var a={},t=Object.prototype,l=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function o(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{o({},"")}catch(t){o=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,o,a,s,e=e&&e.prototype instanceof h?e:h,e=Object.create(e.prototype),r=new x(r||[]);return e._invoke=(i=t,o=n,a=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 E()}for(a.method=t,a.arg=e;;){var n=a.delegate;if(n){n=function t(e,n){var r=e.iterator[n.method];if(void 0===r){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method))return c;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}r=u(r,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,c;r=r.arg;return r?r.done?(n[e.resultName]=r.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,c):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,c)}(n,a);if(n){if(n===c)continue;return n}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===s)throw s="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s="executing";n=u(i,o,a);if("normal"===n.type){if(s=a.done?"completed":"suspendedYield",n.arg===c)continue;return{value:n.arg,done:a.done}}"throw"===n.type&&(s="completed",a.method="throw",a.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}}}a.wrap=s;var c={};function h(){}function d(){}function p(){}var e={},f=(o(e,r,function(){return this}),Object.getPrototypeOf),f=f&&f(f(w([]))),y=(f&&f!==t&&l.call(f,r)&&(e=f),p.prototype=h.prototype=Object.create(e));function g(t){["next","throw","return"].forEach(function(e){o(t,e,function(t){return this._invoke(e,t)})})}function m(a,s){var e;this._invoke=function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var o,t=u(a[t],a,n);if("throw"!==t.type)return(n=(o=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){o.value=t,r(o)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}}function v(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 b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(v,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:E}}function E(){return{value:void 0,done:!0}}return o(y,"constructor",d.prototype=p),o(p,"constructor",d),d.displayName=o(p,i,"GeneratorFunction"),a.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,o(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},a.awrap=function(t){return{__await:t}},g(m.prototype),o(m.prototype,n,function(){return this}),a.AsyncIterator=m,a.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var o=new m(s(t,e,n,r),i);return a.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},g(y),o(y,i,"Generator"),o(y,r,function(){return this}),o(y,"toString",function(){return"[object Generator]"}),a.keys=function(n){var t,r=[];for(t in n)r.push(t);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}},a.values=w,x.prototype={constructor:x,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(b),!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 o.type="throw",o.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],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(a&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){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 o=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,c):this.complete(o)},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),c},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),b(n),c}},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,b(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),c}},a}function fy(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function yy(t,e){return(yy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var gy,my="undefined"!=typeof Float32Array?Float32Array:Array;function vy(){var t=new my(16);return my!=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 by(){var t=new my(3);return my!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function xy(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)}),by(),zt=new my(2),my!=Float32Array&&(zt[0]=0,zt[1]=0);var wy=p.defineToken(""),Ey=((jt=function(){function t(){var L=this;this.displayObjectPool=void 0,this.canvasConfig=void 0,this.offscreenCanvas=void 0,this.rBush=void 0,this.pathGeneratorFactory=void 0,this.pathGeneratorFactoryCache={},this.pointInPathPickerFactory=void 0,this.tmpVec3a=by(),this.tmpVec3b=by(),this.tmpVec3c=by(),this.isHit=function(t,e,n){var r,i,o,a,s,l,u,c,h,d,p,f,y,g,m,v,b,x,w,E,_,k,T,M,S,O=L.pointInPathPickerFactory(t.nodeName);if(O){r=vy(),i=(n=n)[0],o=n[1],a=n[2],s=n[3],l=n[4],u=n[5],c=n[6],h=n[7],d=n[8],p=n[9],f=n[10],C=n[11],y=n[12],g=n[13],m=n[14],n=n[15];var P=(S=(v=i*u-o*l)*(P=f*n-C*m)-(b=i*c-a*l)*(M=p*n-C*g)+(A=i*h-s*l)*(T=p*m-f*g)+(x=o*c-a*u)*(k=d*n-C*y)-(N=o*h-s*u)*(_=d*m-f*y)+(w=a*h-s*c)*(E=d*g-p*y))?(r[0]=(u*P-c*M+h*T)*(S=1/S),r[1]=(a*M-o*P-s*T)*S,r[2]=(g*w-m*N+n*x)*S,r[3]=(f*N-p*w-C*x)*S,r[4]=(c*k-l*P-h*_)*S,r[5]=(i*P-a*k+s*_)*S,r[6]=(m*A-y*w-n*b)*S,r[7]=(d*w-f*A+C*b)*S,r[8]=(l*M-u*k+h*E)*S,r[9]=(o*k-i*M-s*E)*S,r[10]=(y*N-g*A+n*v)*S,r[11]=(p*A-d*N-C*v)*S,r[12]=(u*_-l*T-c*E)*S,r[13]=(i*T-o*_+a*E)*S,r[14]=(g*b-y*x-m*v)*S,r[15]=(d*x-p*b+f*v)*S,r):null,A=(w=L.tmpVec3b,h=xy(L.tmpVec3c,e[0],e[1],0),k=P,M=h[0],s=h[1],h=h[2],n=k[3]*M+k[7]*s+k[11]*h+k[15],w[0]=(k[0]*M+k[4]*s+k[8]*h+k[12])/(n=n||1),w[1]=(k[1]*M+k[5]*s+k[9]*h+k[13])/n,w[2]=(k[2]*M+k[6]*s+k[10]*h+k[14])/n,w),N=t.getGeometryBounds().halfExtents,C=t.parsedStyle.anchor;if(A[0]+=(C&&C[0]||0)*N[0]*2,A[1]+=(C&&C[1]||0)*N[1]*2,O(t,new Gc(A[0],A[1]),L.isPointInPath))return!0}return!1},this.isPointInPath=function(t,e){var n=L.offscreenCanvas.getOrCreateContext(L.canvasConfig.offscreenCanvas),r=(void 0===L.pathGeneratorFactoryCache[t.nodeName]&&(L.pathGeneratorFactoryCache[t.nodeName]=L.pathGeneratorFactory(t.nodeName)),L.pathGeneratorFactoryCache[t.nodeName]);return r&&(n.beginPath(),r(n,t.parsedStyle),n.closePath()),n.isPointInPath(e.x,e.y)}}var e=t.prototype;return e.apply=function(t){var j=this;t.hooks.pick.tapPromise(gy.tag,function(){s=py().mark(function t(_){var k,T,M,S,O,P,A,N,C,L,I;return py().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:k=_.topmost,O=_.position,T=O.x,O=O.y,T=xy(j.tmpVec3a,T,O,0),O=j.rBush.search({minX:T[0],minY:T[1],maxX:T[0],maxY:T[1]}),M=O.map(function(t){return t.id}),S=[],O.forEach(function(t){var t=t.id,t=j.displayObjectPool.getByEntity(t),e=t.parsedStyle.pointerEvents,e=["auto","visiblepainted","visiblefill","visiblestroke","visible"].includes(e);e&&!t.isVisible()||t.isCulled()||!t.isInteractive()||t.parentNode&&-1===M.indexOf(t.parentNode.entity)||S.push(t)}),S.sort(function(t,e){return e.sortable.renderOrder-t.sortable.renderOrder}),O=[],P=0,A=S;case 9:if(P<A.length)if(N=A[P],C=N.getWorldTransform(),j.isHit(N,T,C))if(L=j.findClosestClipPath(N))if(I=L.style.clipPath,e=vy(),n=L===N?C:L.getWorldTransform(),r=I.getLocalTransform(),E=w=x=b=v=m=g=y=f=p=d=h=c=u=l=s=a=o=i=void 0,i=n[0],o=n[1],a=n[2],s=n[3],l=n[4],u=n[5],c=n[6],h=n[7],d=n[8],p=n[9],f=n[10],y=n[11],g=n[12],m=n[13],v=n[14],n=n[15],b=r[0],x=r[1],w=r[2],E=r[3],e[0]=b*i+x*l+w*d+E*g,e[1]=b*o+x*u+w*p+E*m,e[2]=b*a+x*c+w*f+E*v,e[3]=b*s+x*h+w*y+E*n,b=r[4],x=r[5],w=r[6],E=r[7],e[4]=b*i+x*l+w*d+E*g,e[5]=b*o+x*u+w*p+E*m,e[6]=b*a+x*c+w*f+E*v,e[7]=b*s+x*h+w*y+E*n,b=r[8],x=r[9],w=r[10],E=r[11],e[8]=b*i+x*l+w*d+E*g,e[9]=b*o+x*u+w*p+E*m,e[10]=b*a+x*c+w*f+E*v,e[11]=b*s+x*h+w*y+E*n,b=r[12],x=r[13],w=r[14],E=r[15],e[12]=b*i+x*l+w*d+E*g,e[13]=b*o+x*u+w*p+E*m,e[14]=b*a+x*c+w*f+E*v,e[15]=b*s+x*h+w*y+E*n,C=e,j.isHit(I,T,C)){if(k)return _.picked=[N],t.abrupt("return",_);t.next=25}else t.next=26;else t.next=28;else t.next=34;else t.next=37;break;case 25:O.push(N);case 26:t.next=34;break;case 28:if(k)return _.picked=[N],t.abrupt("return",_);t.next=33;break;case 33:O.push(N);case 34:P++,t.next=9;break;case 37:return _.picked=O,t.abrupt("return",_);case 39:case"end":return t.stop()}var e,n,r,i,o,a,s,l,u,c,h,d,p,f,y,g,m,v,b,x,w,E},t)});var s,e=function(){var t=this,a=arguments;return new Promise(function(e,n){var r=s.apply(t,a);function i(t){fy(r,e,n,i,o,"next",t)}function o(t){fy(r,e,n,i,o,"throw",t)}i(void 0)})};return function(t){return e.apply(this,arguments)}}())},e.findClosestClipPath=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}()).tag="CanvasPicker",gy=jt);function _y(t,e,n,r){t-=n,n=e-r;return Math.sqrt(t*t+n*n)}function ky(t,e){return Math.abs(t-e)<.001}function Ty(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}}t([y(Gf),e("design:type",Gf)],Ey.prototype,"displayObjectPool",void 0),t([y(hc),e("design:type",Object)],Ey.prototype,"canvasConfig",void 0),t([y(Qp),e("design:type",Qp)],Ey.prototype,"offscreenCanvas",void 0),t([y(Bd),e("design:type",Gi)],Ey.prototype,"rBush",void 0),t([y(ny),e("design:type",Function)],Ey.prototype,"pathGeneratorFactory",void 0),t([y(wy),e("design:type",Function)],Ey.prototype,"pointInPathPickerFactory",void 0);var Ey=gy=t([f({contrib:Kp})],Ey),My={box:function(t,e,n,r){return Ty([t,n],[e,r])},length:_y,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,o){var a=(n-t)*(i-t)+(r-e)*(o-e);return a<0?_y(t,e,i,o):(n-t)*(n-t)+(r-e)*(r-e)<a?_y(n,r,i,o):this.pointToLine(t,e,n,r,i,o)},pointToLine:function(t,e,n,r,i,o){var a,s,l,n=[n-t,r-e];return(r=n)[0]===(a=[0,0])[0]&&r[1]===a[1]?Math.sqrt((i-t)*(i-t)+(o-e)*(o-e)):(s=(n=a=r=[-n[1],n[0]])[0],l=n[1],0<(s=s*s+l*l)&&(s=1/Math.sqrt(s)),a[0]=n[0]*s,a[1]=n[1]*s,l=[i-t,o-e],Math.abs(l[0]*r[0]+l[1]*r[1]))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}};function Sy(t,e,n,r,i){var o=1-i;return o*o*o*t+3*e*i*o*o+3*n*i*i*o+r*i*i*i}function Oy(t,e,n,r,i){var o=1-i;return 3*(o*o*(e-t)+2*o*i*(n-e)+i*i*(r-n))}function Py(t,e,n,r){var i,o,r=-3*t+9*e-9*n+3*r,n=6*t-12*e+6*n,e=3*e-3*t,t=[];return ky(r,0)?ky(n,0)||0<=(i=-e/n)&&i<=1&&t.push(i):ky(e=n*n-4*r*e,0)?t.push(-n/(2*r)):0<e&&(o=(-n-(e=Math.sqrt(e)))/(2*r),0<=(i=(-n+e)/(2*r))&&i<=1&&t.push(i),0<=o&&o<=1&&t.push(o)),t}function Ay(t,e,n,r,i,o,a,s,l){var u=Sy(t,n,i,a,l),c=Sy(e,r,o,s,l),h=My.pointAt(t,e,n,r,l),n=My.pointAt(n,r,i,o,l),r=My.pointAt(i,o,a,s,l),i=My.pointAt(h.x,h.y,n.x,n.y,l),o=My.pointAt(n.x,n.y,r.x,r.y,l);return[[t,e,h.x,h.y,i.x,i.y,u,c],[u,c,o.x,o.y,r.x,r.y,a,s]]}function Ny(t,e,n,r,i,o,a,s,l){if(0===l){for(var u=[t,n,i,a],c=[e,r,o,s],h=0,d=u.length,p=0;p<d;p++)h+=_y(u[p],c[p],u[(p+1)%d],c[(p+1)%d]);return h/2}t=Ay(t,e,n,r,i,o,a,s,.5),e=[].concat(t[0],[l-1]),n=[].concat(t[1],[l-1]);return Ny.apply(void 0,e)+Ny.apply(void 0,n)}var Cy={extrema:Py,box:function(t,e,n,r,i,o,a,s){for(var l=[t,a],u=[e,s],c=Py(t,n,i,a),h=Py(e,r,o,s),d=0;d<c.length;d++)l.push(Sy(t,n,i,a,c[d]));for(var p=0;p<h.length;p++)u.push(Sy(e,r,o,s,h[p]));return Ty(l,u)},length:function(t,e,n,r,i,o,a,s){return Ny(t,e,n,r,i,o,a,s,3)},nearestPoint:function(t,e,n,r,i,o,a,s,l,u,c){for(var h=[t,n,i,a],d=[e,r,o,s],t=l,p=Sy,n=c,f=-1,y=1/0,g=[t,u],m=20,v=1/(m=n&&200<n?n/10:m),b=v/10,x=0;x<=m;x++){var w=x*v,E=[p.apply(void 0,h.concat([w])),p.apply(void 0,d.concat([w]))],E=_y(g[0],g[1],E[0],E[1]);E<y&&(f=w,y=E)}if(0===f)return{x:h[0],y:d[0]};if(1===f)return{x:h[(t=h.length)-1],y:d[t-1]};for(var y=1/0,_=0;_<32&&!(b<1e-4);_++){var k=f-b,T=f+b,M=[p.apply(void 0,h.concat([k])),p.apply(void 0,d.concat([k]))],M=_y(g[0],g[1],M[0],M[1]);0<=k&&M<y?(f=k,y=M):(k=[p.apply(void 0,h.concat([T])),p.apply(void 0,d.concat([T]))],M=_y(g[0],g[1],k[0],k[1]),T<=1&&M<y?(f=T,y=M):b*=.5)}return{x:p.apply(void 0,h.concat([f])),y:p.apply(void 0,d.concat([f]))}},pointDistance:function(t,e,n,r,i,o,a,s,l,u,c){t=this.nearestPoint(t,e,n,r,i,o,a,s,l,u,c);return _y(t.x,t.y,l,u)},interpolationAt:Sy,pointAt:function(t,e,n,r,i,o,a,s,l){return{x:Sy(t,n,i,a,l),y:Sy(e,r,o,s,l)}},divide:Ay,tangentAngle:function(t,e,n,r,i,o,a,s,l){t=Oy(t,n,i,a,l),n=Oy(e,r,o,s,l);return(Math.atan2(n,t)+2*Math.PI)%(2*Math.PI)}};function Ly(t,e,n,r){t-=n,n=e-r;return Math.sqrt(t*t+n*n)}function Iy(t,e,n,r,i,o){return t<=i&&i<=t+n&&e<=o&&o<=e+r}function jy(t,e,n,r,i,o,a,s){var l=(Math.atan2(s-e,a-t)+2*Math.PI)%(2*Math.PI);return!(l<r||i<l)&&Ly((r={x:t+n*Math.cos(l),y:e+n*Math.sin(l)}).x,r.y,a,s)<=o/2}function Ry(t,e,n,r,i,o,a){var s=Math.min(t,n),l=Math.max(t,n),u=Math.min(e,r),c=Math.max(e,r),h=i/2;return s-h<=o&&o<=l+h&&u-h<=a&&a<=c+h&&My.pointToLine(t,e,n,r,o,a)<=i/2}function Dy(t,e,n,r,i){var o=t.length;if(!(o<2)){for(var a=0;a<o-1;a++)if(Ry(t[a][0],t[a][1],t[a+1][0],t[a+1][1],e,n,r))return!0;if(i){var i=t[0],s=t[o-1];if(Ry(i[0],i[1],s[0],s[1],e,n,r))return!0}}return!1}var By=1e-6;function Fy(t){return Math.abs(t)<By?0:t<0?-1:1}function zy(t,e,n){var r=!1,i=t.length;if(i<=2)return!1;for(var o,a,s,l=0;l<i;l++){var u=t[l],c=t[(l+1)%i];if(a=c,((s=[e,n])[0]-(o=u)[0])*(a[1]-o[1])==(a[0]-o[0])*(s[1]-o[1])&&Math.min(o[0],a[0])<=s[0]&&s[0]<=Math.max(o[0],a[0])&&Math.min(o[1],a[1])<=s[1]&&s[1]<=Math.max(o[1],a[1]))return!0;0<Fy(u[1]-n)!=0<Fy(c[1]-n)&&Fy(e-(n-u[1])*(u[0]-c[0])/(u[1]-c[1])-u[0])<0&&(r=!r)}return r}function Vy(t,e,n){for(var r=!1,i=0;i<t.length&&!(r=zy(t[i],e,n));i++);return r}function Gy(t,e){var t=t.parsedStyle,n=t.r,r=t.fill,i=t.stroke,o=t.lineWidth,a=t.increasedLineWidthForHitTesting,s=t.clipPathTargets,t=t.pointerEvents,o=((o||0)+(a||0))/2,a=Ly(n,n,e.x,e.y),e=!(null==s||!s.length),s=fc(t,r,i),t=s[0],r=s[1];return t&&r||e?a<=n+o:t?a<=n:!!r&&(n-o<=a&&a<=n+o)}function Hy(t,e,n,r){return t/(n*n)+e/(r*r)}function Wy(t,e){var n=e.x,e=e.y,t=t.parsedStyle,r=t.rx,i=t.ry,o=t.fill,a=t.stroke,s=t.lineWidth,l=t.increasedLineWidthForHitTesting,u=t.clipPathTargets,t=t.pointerEvents,u=!(null==u||!u.length),t=fc(t,o,a),o=t[0],a=t[1],t=((s||0)+(l||0))/2,s=(n-r)*(n-r),l=(e-i)*(e-i);return o&&a||u?Hy(s,l,r+t,i+t)<=1:o?Hy(s,l,r,i)<=1:!!a&&(1<=Hy(s,l,r-t,i-t)&&Hy(s,l,r+t,i+t)<=1)}function Yy(t,e){var t=t.parsedStyle,n=t.x1,r=t.y1,i=t.x2,o=t.y2,a=t.lineWidth,s=t.increasedLineWidthForHitTesting,l=t.defX,u=t.defY,c=t.clipPathTargets,h=t.pointerEvents,d=t.fill,t=t.stroke,c=!(null==c||!c.length);return!(!fc(h,d,t)[1]&&!c||!a)&&Ry(n,r,i,o,(a||0)+(s||0),e.x+(void 0===l?0:l),e.y+(void 0===u?0:u))}function Uy(t,e,n){var r=t.parsedStyle,i=r.lineWidth,o=r.increasedLineWidthForHitTesting,a=r.stroke,s=r.fill,l=r.defX,l=void 0===l?0:l,u=r.defY,u=void 0===u?0:u,c=r.clipPathTargets,h=r.path,r=fc(r.pointerEvents,s,a),s=r[0],a=r[1],r=h.segments,d=h.hasArc,p=h.polylines,f=h.polygons,h=h.totalLength,c=!(null==c||!c.length),y=!1;return s||c?d?n(t,e):Vy(f,e.x+l,e.y+u)||Vy(p,e.x+l,e.y+u):a||c?function(t,e,n,r,i){for(var o=!1,a=0;a<t.length;a++){var s=t[a],l=s.currentPoint,u=s.params,c=s.prePoint;switch(s.command){case"L":case"Z":o=Ry(c[0],c[1],l[0],l[1],e,n,r);break;case"C":o=Cy.pointDistance(c[0],c[1],u[1],u[2],u[3],u[4],u[5],u[6],n,r,i)<=e/2}if(o)break}return o}(r,(i||0)+(o||0),e.x+l,e.y+u,h):y}function qy(t,e){var t=t.parsedStyle,n=t.stroke,r=t.fill,i=t.lineWidth,o=t.increasedLineWidthForHitTesting,a=t.points,s=t.defX,s=void 0===s?0:s,l=t.defY,l=void 0===l?0:l,u=t.clipPathTargets,t=t.pointerEvents,u=!(null==u||!u.length),t=fc(t,r,n),r=t[0],n=!1;return n=(n=t[1]||u?Dy(a.points,(i||0)+(o||0),e.x+s,e.y+l,!0):n)||!r&&!u?n:zy(a.points,e.x+s,e.y+l)}function Xy(t,e){var t=t.parsedStyle,n=t.lineWidth,r=t.increasedLineWidthForHitTesting,i=t.points,o=t.defX,a=t.defY,s=t.clipPathTargets,l=t.pointerEvents,u=t.fill,t=t.stroke,s=!(null==s||!s.length);return!(!fc(l,u,t)[1]&&!s||!n)&&Dy(i.points,(n||0)+(r||0),e.x+(void 0===o?0:o),e.y+(void 0===a?0:a),!1)}function Zy(t,e,n){var r,i,o,a,s,l,u,c,h,d=t.parsedStyle,p=d.radius,f=d.fill,y=d.stroke,g=d.lineWidth,m=d.increasedLineWidthForHitTesting,v=d.width,b=d.height,x=d.clipPathTargets,d=d.pointerEvents,x=!(null==x||!x.length),d=fc(d,f,y),f=d[0],y=d[1],d=(g||0)+(m||0);return p&&p.some(function(t){return 0!==t})?(g=!1,(y||x)&&(u=m=0,a=v,l=b,p=p.map(function(t){return Xl(t,0,Math.min(Math.abs(v)/2,Math.abs(b)/2))}),h=d,r=e.x,i=e.y,c=p[0],o=p[1],s=p[2],p=p[3],g=Ry(m+c,u,m+a-o,u,h,r,i)||Ry(m+a,u+o,m+a,u+l-s,h,r,i)||Ry(m+a-s,u+l,m+p,u+l,h,r,i)||Ry(m,u+l-p,m,u+c,h,r,i)||jy(m+a-o,u+o,o,1.5*Math.PI,2*Math.PI,h,r,i)||jy(m+a-s,u+l-s,s,0,.5*Math.PI,h,r,i)||jy(m+p,u+l-p,p,.5*Math.PI,Math.PI,h,r,i)||jy(m+c,u+c,c,Math.PI,1.5*Math.PI,h,r,i)),g||!f&&!x?g:n(t,e)):(o=d/2,f&&y||x?Iy(0-o,0-o,v+o,b+o,e.x,e.y):f?Iy(0,0,v,b,e.x,e.y):!!y&&(s=a=0,l=v,p=b,m=d,u=e.x,c=e.y,Iy(a-(h=m/2),s-h,l,m,u,c)||Iy(a+l-h,s-h,m,p,u,c)||Iy(a+h,s+p-h,l,m,u,c)||Iy(a-h,s+h,m,p,u,c)))}var Ky=Ci(function(t){t({token:wy,useFactory:function(t){return function(t){return t===M.CIRCLE?Gy:t===M.ELLIPSE?Wy:t===M.RECT?Zy:t===M.LINE?Yy:t===M.POLYLINE?Xy:t===M.POLYGON?qy:t===M.PATH?Uy:t===M.IMAGE||t===M.TEXT?function(){return!0}:null}}}),t(Ey)}),$y=function(i){var t;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).name="canvas-picker",t}t=i,(n=e).prototype=Object.create(t.prototype),yy(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){this.container.load(Ky,!0)},n.destroy=function(){this.container.unload(Ky)},e}(mf);function Jy(){Jy=function(){return a};var a={},t=Object.prototype,l=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function o(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{o({},"")}catch(t){o=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,o,a,s,e=e&&e.prototype instanceof h?e:h,e=Object.create(e.prototype),r=new x(r||[]);return e._invoke=(i=t,o=n,a=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 E()}for(a.method=t,a.arg=e;;){var n=a.delegate;if(n){n=function t(e,n){var r=e.iterator[n.method];if(void 0===r){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method))return c;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}r=u(r,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,c;r=r.arg;return r?r.done?(n[e.resultName]=r.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,c):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,c)}(n,a);if(n){if(n===c)continue;return n}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===s)throw s="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s="executing";n=u(i,o,a);if("normal"===n.type){if(s=a.done?"completed":"suspendedYield",n.arg===c)continue;return{value:n.arg,done:a.done}}"throw"===n.type&&(s="completed",a.method="throw",a.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}}}a.wrap=s;var c={};function h(){}function d(){}function p(){}var e={},f=(o(e,r,function(){return this}),Object.getPrototypeOf),f=f&&f(f(w([]))),y=(f&&f!==t&&l.call(f,r)&&(e=f),p.prototype=h.prototype=Object.create(e));function g(t){["next","throw","return"].forEach(function(e){o(t,e,function(t){return this._invoke(e,t)})})}function m(a,s){var e;this._invoke=function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var o,t=u(a[t],a,n);if("throw"!==t.type)return(n=(o=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){o.value=t,r(o)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}}function v(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 b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(v,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:E}}function E(){return{value:void 0,done:!0}}return o(y,"constructor",d.prototype=p),o(p,"constructor",d),d.displayName=o(p,i,"GeneratorFunction"),a.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,o(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},a.awrap=function(t){return{__await:t}},g(m.prototype),o(m.prototype,n,function(){return this}),a.AsyncIterator=m,a.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var o=new m(s(t,e,n,r),i);return a.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},g(y),o(y,i,"Generator"),o(y,r,function(){return this}),o(y,"toString",function(){return"[object Generator]"}),a.keys=function(n){var t,r=[];for(t in n)r.push(t);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}},a.values=w,x.prototype={constructor:x,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(b),!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 o.type="throw",o.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],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(a&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){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 o=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,c):this.complete(o)},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),c},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),b(n),c}},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,b(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),c}},a}function Qy(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function t0(s){return function(){var t=this,a=arguments;return new Promise(function(e,n){var r=s.apply(t,a);function i(t){Qy(r,e,n,i,o,"next",t)}function o(t){Qy(r,e,n,i,o,"throw",t)}i(void 0)})}}function e0(t,e){return(e0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var n0,r0=function(){function t(){this.imageCache={},this.gradientCache={},this.patternCache={},this.canvasConfig=void 0}var e=t.prototype;return e.getImageSync=function(t,e){return this.imageCache[t]?e&&e():this.getOrCreateImage(t).then(function(){e&&e()}),this.imageCache[t]},e.getOrCreateImage=function(r){var i,o=this;return this.imageCache[r]?Promise.resolve(this.imageCache[r]):(i=this.canvasConfig.createImage,new Promise(function(t,e){var n;i?n=i(r):Bl&&(n=new window.Image),n&&(n.onload=function(){t(n)},n.onerror=function(t){e(t)},n.crossOrigin="Anonymous",n.src=r,o.imageCache[r]=n)}))},e.getOrCreatePatternSync=function(t,e,n){var r,i=this.generatePatternKey(t);return i&&this.patternCache[i]?this.patternCache[i]:(r=t.image,t=t.repetition,r=(n=ic(r)?this.getImageSync(r,n):r)&&e.createPattern(n,t),i&&r&&(this.patternCache[i]=r),r)},e.getOrCreateGradient=function(t,e){var r,n,i,o,a,s=this.generateGradientKey(t),l=t.type,u=t.steps,c=t.width,h=t.height,d=t.angle,p=t.cx,t=t.cy;return this.gradientCache[s]||(r=null,l===Ml.LinearGradient?(n=c,i=h,d=(d=d)*Math.PI/180,o=0+n/2,a=0+i/2,n=Math.abs(n*Math.cos(d))+Math.abs(i*Math.sin(d)),i={x1:o-Math.cos(d)*n/2,y1:a-Math.sin(d)*n/2,x2:o+Math.cos(d)*n/2,y2:a+Math.sin(d)*n/2},r=e.createLinearGradient(i.x1,i.y1,i.x2,i.y2)):l===Ml.RadialGradient&&(o={x:p*c,y:t*h,r:Math.sqrt(c*c+h*h)/2},r=e.createRadialGradient(a=o.x,d=o.y,0,a,d,o.r)),r&&(u.forEach(function(t){var e,n=t[0],t=t[1];null!=(e=r)&&e.addColorStop(n,t)}),this.gradientCache[s]=r)),this.gradientCache[s]},e.generateGradientKey=function(t){var e=t.type,n=t.width,r=t.height,i=t.steps;return"gradient-"+e+"-"+(t.angle||0)+"-"+(t.cx||0)+"-"+(t.cy||0)+"-"+n+"-"+r+"-"+i.map(function(t){return t.join("")}).join("-")},e.generatePatternKey=function(t){var e=t.image,t=t.repetition;if(ic(e))return"pattern-"+e+"-"+t},t}(),i0=(t([y(hc),e("design:type",Object)],r0.prototype,"canvasConfig",void 0),r0=t([f()],r0),(oe=function(){function t(){this.imagePool=void 0,this.renderingContext=void 0}return t.prototype.apply=function(r){function e(t){var e=t.target,t=e.nodeName,n=e.attributes;t===M.IMAGE&&ic(t=n.img)&&i.imagePool.getImageSync(t,function(){e.renderable.dirty=!0,r.dirtify()})}function n(t){var e=t.target,n=t.attrName,t=t.newValue;e.nodeName===M.IMAGE&&"img"===n&&ic(t)&&i.imagePool.getOrCreateImage(t).then(function(){e.renderable.dirty=!0,r.dirtify()})}var i=this;r.hooks.init.tapPromise(n0.tag,t0(Jy().mark(function t(){return Jy().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:i.renderingContext.root.addEventListener(E.MOUNTED,e),i.renderingContext.root.addEventListener(E.ATTR_MODIFIED,n);case 2:case"end":return t.stop()}},t)}))),r.hooks.destroy.tap(n0.tag,function(){i.renderingContext.root.removeEventListener(E.MOUNTED,e),i.renderingContext.root.removeEventListener(E.ATTR_MODIFIED,n)})},t}()).tag="LoadImage",n0=oe),o0=(t([y(r0),e("design:type",r0)],i0.prototype,"imagePool",void 0),t([y(Wp),e("design:type",Object)],i0.prototype,"renderingContext",void 0),i0=n0=t([f({contrib:Kp})],i0),Ci(function(t){t(r0),t(i0)})),a0=function(i){var t;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).name="image-loader",t}t=i,(n=e).prototype=Object.create(t.prototype),e0(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){this.container.load(o0,!0)},n.destroy=function(){this.container.unload(o0)},e}(mf);function s0(){s0=function(){return a};var a={},t=Object.prototype,l=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function o(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{o({},"")}catch(t){o=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,o,a,s,e=e&&e.prototype instanceof h?e:h,e=Object.create(e.prototype),r=new x(r||[]);return e._invoke=(i=t,o=n,a=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 E()}for(a.method=t,a.arg=e;;){var n=a.delegate;if(n){n=function t(e,n){var r=e.iterator[n.method];if(void 0===r){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method))return c;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}r=u(r,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,c;r=r.arg;return r?r.done?(n[e.resultName]=r.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,c):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,c)}(n,a);if(n){if(n===c)continue;return n}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===s)throw s="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s="executing";n=u(i,o,a);if("normal"===n.type){if(s=a.done?"completed":"suspendedYield",n.arg===c)continue;return{value:n.arg,done:a.done}}"throw"===n.type&&(s="completed",a.method="throw",a.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}}}a.wrap=s;var c={};function h(){}function d(){}function p(){}var e={},f=(o(e,r,function(){return this}),Object.getPrototypeOf),f=f&&f(f(w([]))),y=(f&&f!==t&&l.call(f,r)&&(e=f),p.prototype=h.prototype=Object.create(e));function g(t){["next","throw","return"].forEach(function(e){o(t,e,function(t){return this._invoke(e,t)})})}function m(a,s){var e;this._invoke=function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var o,t=u(a[t],a,n);if("throw"!==t.type)return(n=(o=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){o.value=t,r(o)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}}function v(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 b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(v,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:E}}function E(){return{value:void 0,done:!0}}return o(y,"constructor",d.prototype=p),o(p,"constructor",d),d.displayName=o(p,i,"GeneratorFunction"),a.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,o(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},a.awrap=function(t){return{__await:t}},g(m.prototype),o(m.prototype,n,function(){return this}),a.AsyncIterator=m,a.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var o=new m(s(t,e,n,r),i);return a.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},g(y),o(y,i,"Generator"),o(y,r,function(){return this}),o(y,"toString",function(){return"[object Generator]"}),a.keys=function(n){var t,r=[];for(t in n)r.push(t);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}},a.values=w,x.prototype={constructor:x,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(b),!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 o.type="throw",o.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],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(a&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){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 o=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,c):this.complete(o)},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),c},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),b(n),c}},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,b(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),c}},a}function l0(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function u0(s){return function(){var t=this,a=arguments;return new Promise(function(e,n){var r=s.apply(t,a);function i(t){l0(r,e,n,i,o,"next",t)}function o(t){l0(r,e,n,i,o,"throw",t)}i(void 0)})}}function c0(){return(c0=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 h0(t,e){t.prototype=Object.create(e.prototype),d0(t.prototype.constructor=t,e)}function d0(t,e){return(d0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var p0="undefined"!=typeof Float32Array?Float32Array:Array;function f0(){var t=new p0(16);return p0!=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 y0(t,e){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]}function g0(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],h=e[8],d=e[9],p=e[10],f=e[11],y=e[12],g=e[13],m=e[14],e=e[15],v=n[0],b=n[1],x=n[2],w=n[3];t[0]=v*r+b*s+x*h+w*y,t[1]=v*i+b*l+x*d+w*g,t[2]=v*o+b*u+x*p+w*m,t[3]=v*a+b*c+x*f+w*e,v=n[4],b=n[5],x=n[6],w=n[7],t[4]=v*r+b*s+x*h+w*y,t[5]=v*i+b*l+x*d+w*g,t[6]=v*o+b*u+x*p+w*m,t[7]=v*a+b*c+x*f+w*e,v=n[8],b=n[9],x=n[10],w=n[11],t[8]=v*r+b*s+x*h+w*y,t[9]=v*i+b*l+x*d+w*g,t[10]=v*o+b*u+x*p+w*m,t[11]=v*a+b*c+x*f+w*e,v=n[12],b=n[13],x=n[14],w=n[15],t[12]=v*r+b*s+x*h+w*y,t[13]=v*i+b*l+x*d+w*g,t[14]=v*o+b*u+x*p+w*m,t[15]=v*a+b*c+x*f+w*e}function m0(t,e,n){var r,i,o,a,s,l,u,c,h,d,p,f,y=n[0],g=n[1],n=n[2];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],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],h=e[8],d=e[9],p=e[10],f=e[11],t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t[6]=u,t[7]=c,t[8]=h,t[9]=d,t[10]=p,t[11]=f,t[12]=r*y+s*g+h*n+e[12],t[13]=i*y+l*g+d*n+e[13],t[14]=o*y+u*g+p*n+e[14],t[15]=a*y+c*g+f*n+e[15])}function v0(){var t=new p0(3);return p0!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function b0(t,e,n){var r=new p0(3);return r[0]=t,r[1]=e,r[2]=n,r}function x0(t,e,n){var r=e[0],i=e[1],e=e[2],o=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])/(o=o||1),t[1]=(n[1]*r+n[5]*i+n[9]*e+n[13])/o,t[2]=(n[2]*r+n[6]*i+n[10]*e+n[14])/o,t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)}),v0();var w0=p.defineToken(""),E0=p.defineToken("",{multiple:!1}),_0=p.defineToken("",{multiple:!1}),k0=p.defineToken("",{multiple:!1}),T0=p.defineToken("",{multiple:!1}),M0=p.defineToken("",{multiple:!1}),S0=p.defineToken("",{multiple:!1}),O0=p.defineToken("",{multiple:!1}),P0=p.defineToken("",{multiple:!1}),A0=p.defineToken("",{multiple:!1}),a=function(){function t(){this.imagePool=void 0}var e=t.prototype;return e.render=function(t,e,n,r){var i=e.fill,o=e.opacity,a=e.fillOpacity,s=e.stroke,l=e.strokeOpacity,u=e.lineWidth,c=e.lineCap,h=e.lineJoin,d=e.shadowType,p=e.shadowColor,f=e.shadowBlur,y=e.filter,e=e.miterLimit,g=!S(i)&&!i.isNone,m=!S(s)&&!s.isNone&&0<u,v=0===i.alpha,y=!(!y||!y.length),p=!S(p)&&0<f,f=n.nodeName,d="inner"===d,f=m&&p&&(f===M.PATH||f===M.LINE||f===M.POLYLINE||v||d);g&&(t.globalAlpha=o*a,f||N0(n,t,p),this.fill(t,n,i,r),f||this.clearShadowAndFilter(t,y,p)),m&&(t.globalAlpha=o*l,t.lineWidth=u,S(e)||(t.miterLimit=e),S(c)||(t.lineCap=c),S(h)||(t.lineJoin=h),f&&(d&&(t.globalCompositeOperation="source-atop"),N0(n,t,!0),d&&(this.stroke(t,n,s,r),t.globalCompositeOperation="source-over",this.clearShadowAndFilter(t,y,!0))),this.stroke(t,n,s,r))},e.clearShadowAndFilter=function(t,e,n){n&&(t.shadowColor="transparent",t.shadowBlur=0),e&&!S(n=t.filter)&&-1<n.indexOf("drop-shadow")&&(t.filter=n.replace(/drop-shadow\([^)]*\)/,"").trim()||"none")},e.fill=function(e,n,t,r){var i=this;Array.isArray(t)?t.forEach(function(t){e.fillStyle=i.getColor(t,n,e),e.fill()}):(fh(t)&&(e.fillStyle=this.getPattern(t,n,e,r)),e.fill())},e.stroke=function(e,n,t,r){var i=this;Array.isArray(t)?t.forEach(function(t){e.strokeStyle=i.getColor(t,n,e),e.stroke()}):(fh(t)&&(e.strokeStyle=this.getPattern(t,n,e,r)),e.stroke())},e.getPattern=function(t,e,n,r){return this.imagePool.getOrCreatePatternSync(t,n,function(){e.renderable.dirty=!0,r.dirtify()})},e.getColor=function(t,e,n){var r;return t.type!==Ml.LinearGradient&&t.type!==Ml.RadialGradient||(r=(e=e.getGeometryBounds())&&2*e.halfExtents[0]||1,e=e&&2*e.halfExtents[1]||1,r=this.imagePool.getOrCreateGradient(c0({type:t.type},t.value,{width:r,height:e}),n)),r},t}();function N0(t,e,n){var r=t.parsedStyle,i=r.filter,o=r.shadowColor,a=r.shadowBlur,s=r.shadowOffsetX,r=r.shadowOffsetY;i&&i.length&&(e.filter=t.style.filter),n&&(e.shadowColor=o.toString(),e.shadowBlur=a||0,e.shadowOffsetX=s||0,e.shadowOffsetY=r||0)}t([y(r0),e("design:type",r0)],a.prototype,"imagePool",void 0);var C0,L0,a=t([f()],a),I0=function(){function t(){this.imagePool=void 0}return t.prototype.render=function(t,e,n){var r=e.width,i=e.height,o=e.img,a=e.shadowColor,e=e.shadowBlur,o=ic(o)?this.imagePool.getImageSync(o):(r=r||o.width,i=i||o.height,o);if(o){N0(n,t,!S(a)&&0<e);try{t.drawImage(o,0,0,r,i)}catch(t){}}},t}(),j0=(t([y(r0),e("design:type",r0)],I0.prototype,"imagePool",void 0),I0=t([f({token:A0})],I0),function(){function t(){}var e=t.prototype;return e.render=function(t,e,n){var r=e.lineWidth,i=e.textAlign,o=e.textBaseline,a=e.lineJoin,s=e.miterLimit,l=e.letterSpacing,u=e.stroke,c=e.fill,h=e.fillOpacity,d=e.strokeOpacity,p=e.opacity,f=e.metrics,y=e.dx,g=e.dy,m=e.shadowColor,e=e.shadowBlur,v=f.font,b=f.lines,x=f.height,w=f.lineHeight,E=f.lineMetrics,_=(t.font=v,t.lineWidth=r,t.textAlign=i,t.textBaseline=o,t.lineJoin=a,S(s)||(t.miterLimit=s),0),k=("middle"===o?_=-x/2-w/2:"bottom"===o||"alphabetic"===o||"ideographic"===o?_=-x:"top"!==o&&"hanging"!==o||(_=-w),y||0);_+=g||0,N0(n,t,!S(m)&&0<e);for(var T=0;T<b.length;T++){var M=r/2+k;_+=w,S(u)||u.isNone||!r||this.drawLetterSpacing(t,b[T],E[T],i,M,_,l,h,d,p,!0),S(c)||this.drawLetterSpacing(t,b[T],E[T],i,M,_,l,h,d,p)}},e.drawLetterSpacing=function(t,e,n,r,i,o,a,s,l,u,c){if(void 0===c&&(c=!1),0===a)c?this.strokeText(t,e,i,o,l):this.fillText(t,e,i,o,s,u);else{for(var h=t.textAlign,d=(t.textAlign="left",i),p=("center"===r?d=i-n.width/2:"right"!==r&&"end"!==r||(d=i-n.width),Array.from(e)),f=t.measureText(e).width,y=0;y<p.length;++y){var g=p[y];c?this.strokeText(t,g,d,o,l):this.fillText(t,g,d,o,s,u),d+=f-(g=t.measureText(e.substring(y+1)).width)+a,f=g}t.textAlign=h}},e.fillText=function(t,e,n,r,i,o){var a,s=!S(i)&&1!==i;s&&(a=t.globalAlpha,t.globalAlpha=i*o),t.fillText(e,n,r),s&&(t.globalAlpha=a)},e.strokeText=function(t,e,n,r,i){var o,a=!S(i)&&1!==i;a&&(o=t.globalAlpha,t.globalAlpha=i),t.strokeText(e,n,r),a&&(t.globalAlpha=o)},t}()),j0=t([f({token:P0})],j0),R0=function(t){function e(){return t.apply(this,arguments)||this}return h0(e,t),e}(a),R0=t([f({token:k0})],R0),D0=function(t){function e(){return t.apply(this,arguments)||this}return h0(e,t),e}(a),D0=t([f({token:E0})],D0),B0=function(t){function e(){return t.apply(this,arguments)||this}return h0(e,t),e}(a),B0=t([f({token:_0})],B0),F0=function(t){function e(){return t.apply(this,arguments)||this}return h0(e,t),e}(a),F0=t([f({token:T0})],F0),z0=function(t){function e(){return t.apply(this,arguments)||this}return h0(e,t),e}(a),z0=t([f({token:M0})],z0),V0=function(t){function e(){return t.apply(this,arguments)||this}return h0(e,t),e}(a),V0=t([f({token:S0})],V0),G0=function(t){function e(){return t.apply(this,arguments)||this}return h0(e,t),e}(a),G0=t([f({token:O0})],G0),H0=p.defineToken(""),W0=((d=function(){function t(){this.canvasConfig=void 0,this.camera=void 0,this.contextService=void 0,this.renderingContext=void 0,this.pathGeneratorFactory=void 0,this.pathGeneratorFactoryCache={},this.styleRendererFactory=void 0,this.styleRendererFactoryCache={},this.displayObjectPool=void 0,this.canvasRendererPluginOptions=void 0,this.rBush=void 0,this.removedRBushNodeAABBs=[],this.renderQueue=[],this.restoreStack=[],this.clearFullScreen=!1,this.vpMatrix=f0(),this.dprMatrix=f0(),this.tmpMat4=f0(),this.vec3a=v0(),this.vec3b=v0(),this.vec3c=v0(),this.vec3d=v0()}var e=t.prototype;return e.apply=function(u){function s(t){(t=t.target.rBushNode).aabb&&h.removedRBushNodeAABBs.push(t.aabb)}function l(t){(t=t.target.rBushNode).aabb&&h.removedRBushNodeAABBs.push(t.aabb)}function c(t){t.isVisible()&&!t.isCulled()&&(h.renderDisplayObject(t,u),h.saveDirtyAABB(t)),(t.sortable.sorted||t.childNodes).forEach(function(t){c(t)})}var h=this,d=this.renderingContext.root.ownerDocument.defaultView;u.hooks.init.tapPromise(C0.tag,u0(s0().mark(function t(){var r,i,o,a;return s0().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:h.renderingContext.root.addEventListener(E.UNMOUNTED,s),h.renderingContext.root.addEventListener(E.CULLED,l),r=h.contextService.getDPR(),o=h.canvasConfig,i=o.width,o=o.height,a=h.contextService.getContext(),h.clearRect(a,0,0,i*r,o*r),e=h.dprMatrix,n=b0(r,r,1),e[0]=n[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=n[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1;case 7:case"end":return t.stop()}var e,n},t)}))),u.hooks.destroy.tap(C0.tag,function(){h.renderingContext.root.removeEventListener(E.UNMOUNTED,s),h.renderingContext.root.removeEventListener(E.CULLED,l)}),u.hooks.beginFrame.tap(C0.tag,function(){var t=h.contextService.getContext(),e=h.contextService.getDPR(),n=h.canvasConfig,r=n.width,n=n.height,i=h.canvasRendererPluginOptions,o=i.dirtyObjectNumThreshold,i=i.dirtyObjectRatioThreshold,a=u.getStats(),s=a.total,a=a.rendered,s=a/s;h.clearFullScreen=u.disableDirtyRectangleRendering()||o<a&&i<s,t&&(t.resetTransform(),h.clearFullScreen&&h.clearRect(t,0,0,r*e,n*e))});u.hooks.endFrame.tap(C0.tag,function(){var t=h.contextService.getContext();if(g0(h.vpMatrix,h.dprMatrix,h.camera.getOrthoMatrix()),h.clearFullScreen)c(h.renderingContext.root);else{var e=h.safeMergeAABB.apply(h,[h.mergeDirtyAABBs(h.renderQueue)].concat(h.removedRBushNodeAABBs.map(function(t){var e=t.minX,n=t.minY,r=t.maxX,t=t.maxY,i=new Fc;return i.setMinMax(b0(e,n,0),b0(r,t,0)),i})));if(h.removedRBushNodeAABBs=[],Fc.isEmpty(e))return void(h.renderQueue=[]);var n=h.convertAABB2Rect(e),r=n.x,i=n.y,o=n.width,n=n.height,a=x0(h.vec3a,b0(r,i,0),h.vpMatrix),s=x0(h.vec3b,b0(r+o,i,0),h.vpMatrix),l=x0(h.vec3c,b0(r,i+n,0),h.vpMatrix),r=x0(h.vec3d,b0(r+o,i+n,0),h.vpMatrix),o=Math.min(a[0],s[0],r[0],l[0]),i=Math.min(a[1],s[1],r[1],l[1]),n=Math.max(a[0],s[0],r[0],l[0]),a=Math.max(a[1],s[1],r[1],l[1]),s=Math.floor(o),r=Math.floor(i),l=Math.ceil(n-o),n=Math.ceil(a-i);t.save(),h.clearRect(t,s,r,l,n),t.beginPath(),t.rect(s,r,l,n),t.clip(),t.setTransform(h.vpMatrix[0],h.vpMatrix[1],h.vpMatrix[4],h.vpMatrix[5],h.vpMatrix[12],h.vpMatrix[13]),h.canvasConfig.renderer.getConfig().enableDirtyRectangleRenderingDebug&&d.dispatchEvent(new jd(Ef.DIRTY_RECTANGLE,{dirtyRect:{x:s,y:r,width:l,height:n}})),h.searchDirtyObjects(e).sort(function(t,e){return t.sortable.renderOrder-e.sortable.renderOrder}).forEach(function(t){t&&t.isVisible()&&!t.isCulled()&&h.renderDisplayObject(t,u)}),t.restore(),h.renderQueue.forEach(function(t){h.saveDirtyAABB(t)}),h.renderQueue=[]}h.restoreStack.forEach(function(){t.restore()}),h.restoreStack=[]}),u.hooks.render.tap(C0.tag,function(t){h.clearFullScreen||h.renderQueue.push(t)})},e.clearRect=function(t,e,n,r,i){t.clearRect(e,n,r,i);var o=this.canvasConfig.background;o&&(t.fillStyle=o,t.fillRect(e,n,r,i))},e.renderDisplayObject=function(t,e){var n,r=this.contextService.getContext(),i=t.nodeName,o=this.restoreStack[this.restoreStack.length-1],o=(!o||t.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_CONTAINS||(r.restore(),this.restoreStack.pop()),void 0===this.styleRendererFactoryCache[i]&&(this.styleRendererFactoryCache[i]=this.styleRendererFactory(i)),this.styleRendererFactoryCache[i]),i=(void 0===this.pathGeneratorFactoryCache[i]&&(this.pathGeneratorFactoryCache[i]=this.pathGeneratorFactory(i)),this.pathGeneratorFactoryCache[i]),a=t.parsedStyle.clipPath;a&&(this.applyWorldTransform(r,a,t.getWorldTransform()),void 0===this.pathGeneratorFactoryCache[a.nodeName]&&(this.pathGeneratorFactoryCache[a.nodeName]=this.pathGeneratorFactory(a.nodeName)),(n=this.pathGeneratorFactoryCache[a.nodeName])&&(r.save(),this.restoreStack.push(t),r.beginPath(),n(r,a.parsedStyle),r.closePath(),r.clip())),o&&(this.applyWorldTransform(r,t),r.save(),this.applyAttributesToContext(r,t)),i&&(r.beginPath(),i(r,t.parsedStyle),t.nodeName!==M.LINE&&t.nodeName!==M.PATH&&t.nodeName!==M.POLYLINE&&r.closePath()),o&&(o.render(r,t.parsedStyle,t,e),r.restore()),t.renderable.dirty=!1},e.convertAABB2Rect=function(t){var e=t.getMin(),t=t.getMax(),n=Math.floor(e[0]),e=Math.floor(e[1]);return{x:n,y:e,width:Math.ceil(t[0])-n,height:Math.ceil(t[1])-e}},e.mergeDirtyAABBs=function(t){var n=new Fc;return t.forEach(function(t){var e=t.getRenderBounds(),e=(n.add(e),t.renderable.dirtyRenderBounds);e&&n.add(e)}),n},e.searchDirtyObjects=function(t){var e=this,n=t.getMin(),r=n[0],n=n[1],t=t.getMax(),i=t[0],t=t[1];return this.rBush.search({minX:r,minY:n,maxX:i,maxY:t}).map(function(t){t=t.id;return e.displayObjectPool.getByEntity(t)})},e.saveDirtyAABB=function(t){var e=t.renderable,t=(e.dirtyRenderBounds||(e.dirtyRenderBounds=new Fc),t.getRenderBounds());t&&e.dirtyRenderBounds.update(t.center,t.halfExtents)},e.applyAttributesToContext=function(t,e){var n=e.parsedStyle,r=n.stroke,i=n.fill,o=n.opacity,a=n.lineDash,n=n.lineDashOffset;a&&t.setLineDash(a),S(n)||(t.lineDashOffset=n),S(o)||(t.globalAlpha*=o),S(r)||Array.isArray(r)||r.isNone||(t.strokeStyle=e.attributes.stroke),S(i)||Array.isArray(i)||i.isNone||(t.fillStyle=e.attributes.fill)},e.applyWorldTransform=function(t,e,n){var r=0,i=0,o=(e.parsedStyle||{}).anchor,a=o&&o[0]||0,o=o&&o[1]||0;0===a&&0===o||(r=-a*((a=e.getGeometryBounds())&&2*a.halfExtents[0]||0),i=-o*(a&&2*a.halfExtents[1]||0)),n?(y0(this.tmpMat4,e.getLocalTransform()),this.vec3a[0]=r,this.vec3a[1]=i,this.vec3a[2]=0,m0(this.tmpMat4,this.tmpMat4,this.vec3a),g0(this.tmpMat4,n,this.tmpMat4)):(y0(this.tmpMat4,e.getWorldTransform()),this.vec3a[0]=r,this.vec3a[1]=i,this.vec3a[2]=0,m0(this.tmpMat4,this.tmpMat4,this.vec3a)),g0(this.tmpMat4,this.vpMatrix,this.tmpMat4),t.setTransform(this.tmpMat4[0],this.tmpMat4[1],this.tmpMat4[4],this.tmpMat4[5],this.tmpMat4[12],this.tmpMat4[13])},e.safeMergeAABB=function(){for(var e=new Fc,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach(function(t){e.add(t)}),e},t}()).tag="CanvasRenderer",C0=d),Y0=(t([y(hc),e("design:type",Object)],W0.prototype,"canvasConfig",void 0),t([y(Yp),e("design:type",Zp)],W0.prototype,"camera",void 0),t([y(Hp),e("design:type",Object)],W0.prototype,"contextService",void 0),t([y(Wp),e("design:type",Object)],W0.prototype,"renderingContext",void 0),t([y(ny),e("design:type",Function)],W0.prototype,"pathGeneratorFactory",void 0),t([y(w0),e("design:type",Function)],W0.prototype,"styleRendererFactory",void 0),t([y(Gf),e("design:type",Gf)],W0.prototype,"displayObjectPool",void 0),t([y(H0),e("design:type",Object)],W0.prototype,"canvasRendererPluginOptions",void 0),t([y(Bd),e("design:type",Gi)],W0.prototype,"rBush",void 0),W0=C0=t([f({contrib:Kp})],W0),Ci(function(t){t(D0),t(B0),t(R0),t(I0),t(j0),t(F0),t(z0),t(V0),t(G0),(e={})[M.CIRCLE]=E0,e[M.ELLIPSE]=_0,e[M.RECT]=k0,e[M.IMAGE]=A0,e[M.TEXT]=P0,e[M.LINE]=T0,e[M.POLYLINE]=M0,e[M.POLYGON]=S0,e[M.PATH]=O0;var e,n=e;t({token:w0,useFactory:function(e){return function(t){t=n[t];return t&&e.container.isBound(t)?e.container.get(t):null}}}),t(W0)})),U0=function(n){function t(t){var e;return void 0===t&&(t={}),(e=n.call(this)||this).options=void 0,e.name="canvas-renderer",e.options=t,e}h0(t,n);var e=t.prototype;return e.init=function(){this.container.register(H0,{useValue:c0({dirtyObjectNumThreshold:500,dirtyObjectRatioThreshold:.8},this.options)}),this.container.load(Y0,!0)},e.destroy=function(){this.container.unload(Y0),this.container.remove(H0)},t}(mf);function q0(){q0=function(){return a};var a={},t=Object.prototype,l=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function o(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{o({},"")}catch(t){o=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,o,a,s,e=e&&e.prototype instanceof h?e:h,e=Object.create(e.prototype),r=new x(r||[]);return e._invoke=(i=t,o=n,a=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 E()}for(a.method=t,a.arg=e;;){var n=a.delegate;if(n){n=function t(e,n){var r=e.iterator[n.method];if(void 0===r){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method))return c;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}r=u(r,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,c;r=r.arg;return r?r.done?(n[e.resultName]=r.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,c):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,c)}(n,a);if(n){if(n===c)continue;return n}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===s)throw s="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s="executing";n=u(i,o,a);if("normal"===n.type){if(s=a.done?"completed":"suspendedYield",n.arg===c)continue;return{value:n.arg,done:a.done}}"throw"===n.type&&(s="completed",a.method="throw",a.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}}}a.wrap=s;var c={};function h(){}function d(){}function p(){}var e={},f=(o(e,r,function(){return this}),Object.getPrototypeOf),f=f&&f(f(w([]))),y=(f&&f!==t&&l.call(f,r)&&(e=f),p.prototype=h.prototype=Object.create(e));function g(t){["next","throw","return"].forEach(function(e){o(t,e,function(t){return this._invoke(e,t)})})}function m(a,s){var e;this._invoke=function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var o,t=u(a[t],a,n);if("throw"!==t.type)return(n=(o=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){o.value=t,r(o)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}}function v(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 b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(v,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:E}}function E(){return{value:void 0,done:!0}}return o(y,"constructor",d.prototype=p),o(p,"constructor",d),d.displayName=o(p,i,"GeneratorFunction"),a.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,o(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},a.awrap=function(t){return{__await:t}},g(m.prototype),o(m.prototype,n,function(){return this}),a.AsyncIterator=m,a.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var o=new m(s(t,e,n,r),i);return a.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},g(y),o(y,i,"Generator"),o(y,r,function(){return this}),o(y,"toString",function(){return"[object Generator]"}),a.keys=function(n){var t,r=[];for(t in n)r.push(t);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}},a.values=w,x.prototype={constructor:x,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(b),!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 o.type="throw",o.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],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(a&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){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 o=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,c):this.complete(o)},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),c},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),b(n),c}},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,b(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),c}},a}function X0(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function Z0(s){return function(){var t=this,a=arguments;return new Promise(function(e,n){var r=s.apply(t,a);function i(t){X0(r,e,n,i,o,"next",t)}function o(t){X0(r,e,n,i,o,"throw",t)}i(void 0)})}}function K0(t,e){return(K0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}(u=function(){function t(){this.contextService=void 0,this.renderingContext=void 0}return t.prototype.apply=function(e){function i(t){e.hooks.pointerWheel.call(t)}var o=this,a=this.renderingContext.root.ownerDocument.defaultView,s=function(t){e.hooks.pointerMove.call(t)},l=function(t){e.hooks.pointerUp.call(t)},u=function(t){e.hooks.pointerDown.call(t)},c=function(t){e.hooks.pointerOver.call(t)},h=function(t){e.hooks.pointerOut.call(t)},d=function(t){e.hooks.pointerCancel.call(t)};e.hooks.init.tapPromise(L0.tag,Z0(q0().mark(function t(){var r;return q0().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:r=o.contextService.getDomElement(),globalThis.navigator.msPointerEnabled?(r.style.msContentZooming="none",r.style.msTouchAction="none"):a.supportsPointerEvents&&(r.style.touchAction="none"),a.supportsPointerEvents?(n=r,globalThis.document.addEventListener("pointermove",s,!0),n.addEventListener("pointerdown",u,!0),n.addEventListener("pointerleave",h,!0),n.addEventListener("pointerover",c,!0),globalThis.addEventListener("pointerup",l,!0)):(n=r,globalThis.document.addEventListener("mousemove",s,!0),n.addEventListener("mousedown",u,!0),n.addEventListener("mouseout",h,!0),n.addEventListener("mouseover",c,!0),globalThis.addEventListener("mouseup",l,!0)),a.supportsTouchEvents&&((e=r).addEventListener("touchstart",u,!0),e.addEventListener("touchend",l,!0),e.addEventListener("touchmove",s,!0),e.addEventListener("touchcancel",d,!0)),r.addEventListener("wheel",i,{passive:!0,capture:!0});case 5:case"end":return t.stop()}var e,n},t)}))),e.hooks.destroy.tap(L0.tag,function(){var t,e,n=o.contextService.getDomElement();globalThis.navigator.msPointerEnabled?(n.style.msContentZooming="",n.style.msTouchAction=""):a.supportsPointerEvents&&(n.style.touchAction=""),a.supportsPointerEvents?(t=n,globalThis.document.removeEventListener("pointermove",s,!0),t.removeEventListener("pointerdown",u,!0),t.removeEventListener("pointerleave",h,!0),t.removeEventListener("pointerover",c,!0),globalThis.removeEventListener("pointerup",l,!0)):(t=n,globalThis.document.removeEventListener("mousemove",s,!0),t.removeEventListener("mousedown",u,!0),t.removeEventListener("mouseout",h,!0),t.removeEventListener("mouseover",c,!0),globalThis.removeEventListener("mouseup",l,!0)),a.supportsTouchEvents&&((e=n).removeEventListener("touchstart",u,!0),e.removeEventListener("touchend",l,!0),e.removeEventListener("touchmove",s,!0),e.removeEventListener("touchcancel",d,!0)),n.removeEventListener("wheel",i,!0)})},t}()).tag="DOMInteraction";var $0,J0=L0=u,Q0=(t([y(Hp),e("design:type",Object)],J0.prototype,"contextService",void 0),t([y(Wp),e("design:type",Object)],J0.prototype,"renderingContext",void 0),J0=L0=t([f({contrib:Kp})],J0),Ci(function(t){t(J0)})),tg=function(i){var t;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).name="dom-interaction",t}t=i,(n=e).prototype=Object.create(t.prototype),K0(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){this.container.load(Q0,!0)},n.destroy=function(){this.container.unload(Q0)},e}(mf);function eg(){eg=function(){return a};var a={},t=Object.prototype,l=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function o(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{o({},"")}catch(t){o=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,o,a,s,e=e&&e.prototype instanceof h?e:h,e=Object.create(e.prototype),r=new x(r||[]);return e._invoke=(i=t,o=n,a=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 E()}for(a.method=t,a.arg=e;;){var n=a.delegate;if(n){n=function t(e,n){var r=e.iterator[n.method];if(void 0===r){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method))return c;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}r=u(r,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,c;r=r.arg;return r?r.done?(n[e.resultName]=r.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,c):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,c)}(n,a);if(n){if(n===c)continue;return n}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===s)throw s="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s="executing";n=u(i,o,a);if("normal"===n.type){if(s=a.done?"completed":"suspendedYield",n.arg===c)continue;return{value:n.arg,done:a.done}}"throw"===n.type&&(s="completed",a.method="throw",a.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}}}a.wrap=s;var c={};function h(){}function d(){}function p(){}var e={},f=(o(e,r,function(){return this}),Object.getPrototypeOf),f=f&&f(f(w([]))),y=(f&&f!==t&&l.call(f,r)&&(e=f),p.prototype=h.prototype=Object.create(e));function g(t){["next","throw","return"].forEach(function(e){o(t,e,function(t){return this._invoke(e,t)})})}function m(a,s){var e;this._invoke=function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var o,t=u(a[t],a,n);if("throw"!==t.type)return(n=(o=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){o.value=t,r(o)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}}function v(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 b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(v,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:E}}function E(){return{value:void 0,done:!0}}return o(y,"constructor",d.prototype=p),o(p,"constructor",d),d.displayName=o(p,i,"GeneratorFunction"),a.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,o(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},a.awrap=function(t){return{__await:t}},g(m.prototype),o(m.prototype,n,function(){return this}),a.AsyncIterator=m,a.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var o=new m(s(t,e,n,r),i);return a.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},g(y),o(y,i,"Generator"),o(y,r,function(){return this}),o(y,"toString",function(){return"[object Generator]"}),a.keys=function(n){var t,r=[];for(t in n)r.push(t);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}},a.values=w,x.prototype={constructor:x,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(b),!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 o.type="throw",o.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],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(a&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){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 o=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,c):this.complete(o)},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),c},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),b(n),c}},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,b(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),c}},a}function ng(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function rg(s){return function(){var t=this,a=arguments;return new Promise(function(e,n){var r=s.apply(t,a);function i(t){ng(r,e,n,i,o,"next",t)}function o(t){ng(r,e,n,i,o,"throw",t)}i(void 0)})}}function ig(t,e){return(ig=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}(o=function(){function t(){this.contextService=void 0,this.renderingContext=void 0,this.canvasConfig=void 0,this.$camera=void 0}var e=t.prototype;return e.apply=function(t){function i(t,e){t=t.getWorldTransform(),e.style.transform="matrix("+[t[0],t[1],t[4],t[5],t[12],t[13]].join(",")+")"}function e(t){var e,n,r=t.target;r.nodeName===M.HTML&&(e=a.getOrCreateEl(r),n=r.ownerDocument.documentElement.attributes,Object.keys(n).forEach(function(t){e.style[t]=n[t]}),Object.keys(r.attributes).forEach(function(t){a.updateAttribute(t,r)}),i(r,e))}function n(t){var e;(t=t.target).nodeName===M.HTML&&(t=a.getId(t),(e=a.contextService.getDomElement().parentNode)&&(t=e.querySelector("#"+t))&&e.removeChild(t))}function r(t){var e=t.target;e.nodeName===M.HTML&&(t=t.attrName,a.updateAttribute(t,e))}function o(t){var e;(t=t.target).nodeName===M.HTML&&(e=a.getOrCreateEl(t),i(t,e))}var a=this;t.hooks.init.tapPromise($0.tag,rg(eg().mark(function t(){return eg().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:a.renderingContext.root.addEventListener(E.MOUNTED,e),a.renderingContext.root.addEventListener(E.UNMOUNTED,n),a.renderingContext.root.addEventListener(E.ATTR_MODIFIED,r),a.renderingContext.root.addEventListener(E.BOUNDS_CHANGED,o);case 4:case"end":return t.stop()}},t)}))),t.hooks.destroy.tap($0.tag,function(){a.renderingContext.root.removeEventListener(E.MOUNTED,e),a.renderingContext.root.removeEventListener(E.UNMOUNTED,n),a.renderingContext.root.removeEventListener(E.ATTR_MODIFIED,r),a.renderingContext.root.removeEventListener(E.BOUNDS_CHANGED,o)})},e.getId=function(t){return t.id||"g-html-"+t.entity},e.getOrCreateEl=function(t){var e,n=this.canvasConfig.document,r=this.getId(t),i=this.contextService.getDomElement().parentNode;return i?((e=i.querySelector("#"+r))||(e=(n||document).createElement("div"),(t.parsedStyle.$el=e).id=r,t.name&&e.setAttribute("name",t.name),t.className&&(e.className=t.className),i.appendChild(e),e.style.position="absolute",e.style.left="0",e.style.top="0",e.style["will-change"]="transform",n=t.getWorldTransform(),e.style.transform="matrix("+[n[0],n[1],n[4],n[5],n[12],n[13]].join(",")+")"),e):null},e.updateAttribute=function(t,e){var n=this.getOrCreateEl(e);switch(t){case"innerHTML":var r=e.parsedStyle.innerHTML;ic(r)?n.innerHTML=r:(n.innerHTML="",n.appendChild(r));break;case"transformOrigin":r=e.parsedStyle.transformOrigin;n.style["transform-origin"]=r[0].value+" "+r[1].value;break;case"width":r=e.computedStyleMap().get("width");n.style.width=r.toString();break;case"height":r=e.computedStyleMap().get("height");n.style.height=r.toString();break;case"zIndex":r=e.parsedStyle.zIndex;n.style["z-index"]=""+r;break;case"visibility":r=e.parsedStyle.visibility;n.style.visibility=r;break;case"pointerEvents":r=e.parsedStyle.pointerEvents;n.style.pointerEvents=r;break;case"opacity":r=e.parsedStyle.opacity;n.style.opacity=""+r;break;case"fill":var r=e.parsedStyle.fill,i="";r instanceof Ll?i=r.isNone?"transparent":e.getAttribute("fill"):Array.isArray(r)?i=e.getAttribute("fill"):fh(r),n.style.background=i;break;case"stroke":r=e.parsedStyle.stroke,i="";r instanceof Ll?i=r.isNone?"transparent":e.getAttribute("stroke"):Array.isArray(r)?i=e.getAttribute("stroke"):fh(r),n.style["border-color"]=i,n.style["border-style"]="solid";break;case"lineWidth":r=e.parsedStyle.lineWidth;n.style["border-width"]=(r||0)+"px";break;case"lineDash":n.style["border-style"]="dashed";break;case"filter":i=e.style.filter;n.style.filter=i}},t}()).tag="HTMLRendering";var og=$0=o,ag=(t([y(Hp),e("design:type",Object)],og.prototype,"contextService",void 0),t([y(Wp),e("design:type",Object)],og.prototype,"renderingContext",void 0),t([y(hc),e("design:type",Object)],og.prototype,"canvasConfig",void 0),og=$0=t([f({contrib:Kp})],og),Ci(function(t){t(og)})),sg=function(i){var t;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).name="html-renderer",t}t=i,(n=e).prototype=Object.create(t.prototype),ig(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){this.container.load(ag,!0)},n.destroy=function(){this.container.unload(ag)},e}(mf);function lg(){lg=function(){return a};var a={},t=Object.prototype,l=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function o(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{o({},"")}catch(t){o=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,o,a,s,e=e&&e.prototype instanceof h?e:h,e=Object.create(e.prototype),r=new x(r||[]);return e._invoke=(i=t,o=n,a=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 E()}for(a.method=t,a.arg=e;;){var n=a.delegate;if(n){n=function t(e,n){var r=e.iterator[n.method];if(void 0===r){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method))return c;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}r=u(r,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,c;r=r.arg;return r?r.done?(n[e.resultName]=r.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,c):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,c)}(n,a);if(n){if(n===c)continue;return n}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===s)throw s="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s="executing";n=u(i,o,a);if("normal"===n.type){if(s=a.done?"completed":"suspendedYield",n.arg===c)continue;return{value:n.arg,done:a.done}}"throw"===n.type&&(s="completed",a.method="throw",a.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}}}a.wrap=s;var c={};function h(){}function d(){}function p(){}var e={},f=(o(e,r,function(){return this}),Object.getPrototypeOf),f=f&&f(f(w([]))),y=(f&&f!==t&&l.call(f,r)&&(e=f),p.prototype=h.prototype=Object.create(e));function g(t){["next","throw","return"].forEach(function(e){o(t,e,function(t){return this._invoke(e,t)})})}function m(a,s){var e;this._invoke=function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var o,t=u(a[t],a,n);if("throw"!==t.type)return(n=(o=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){o.value=t,r(o)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}}function v(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 b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(v,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:E}}function E(){return{value:void 0,done:!0}}return o(y,"constructor",d.prototype=p),o(p,"constructor",d),d.displayName=o(p,i,"GeneratorFunction"),a.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,o(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},a.awrap=function(t){return{__await:t}},g(m.prototype),o(m.prototype,n,function(){return this}),a.AsyncIterator=m,a.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var o=new m(s(t,e,n,r),i);return a.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},g(y),o(y,i,"Generator"),o(y,r,function(){return this}),o(y,"toString",function(){return"[object Generator]"}),a.keys=function(n){var t,r=[];for(t in n)r.push(t);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}},a.values=w,x.prototype={constructor:x,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(b),!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 o.type="throw",o.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],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(a&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){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 o=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,c):this.complete(o)},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),c},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),b(n),c}},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,b(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),c}},a}function ug(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function cg(s){return function(){var t=this,a=arguments;return new Promise(function(e,n){var r=s.apply(t,a);function i(t){ug(r,e,n,i,o,"next",t)}function o(t){ug(r,e,n,i,o,"throw",t)}i(void 0)})}}function hg(t,e){t.prototype=Object.create(e.prototype),dg(t.prototype.constructor=t,e)}function dg(t,e){return(dg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var pg=function(){function t(){this.$container=void 0,this.$canvas=void 0,this.dpr=void 0,this.context=void 0,this.canvasConfig=void 0}var e=t.prototype;return e.init=function(){var t=cg(lg().mark(function t(){var e,n,r;return lg().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:e=this.canvasConfig,r=e.container,n=e.canvas,e=e.devicePixelRatio,n?(this.$canvas=n,r&&n.parentElement!==r&&r.appendChild(n),this.$container=n.parentElement,this.canvasConfig.container=this.$container):r&&(this.$container=ic(r)?document.getElementById(r):r,this.$container&&(n=document.createElement("canvas"),this.$container.appendChild(n),this.$container.style.position||(this.$container.style.position="relative"),this.$canvas=n)),this.context=this.$canvas.getContext("2d"),r=1<=(r=e||Bl&&window.devicePixelRatio||1)?Math.ceil(r):1,this.dpr=r,this.resize(this.canvasConfig.width,this.canvasConfig.height);case 7:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),e.getContext=function(){return this.context},e.getDomElement=function(){return this.$canvas},e.getDPR=function(){return this.dpr},e.getBoundingClientRect=function(){if(this.$canvas.getBoundingClientRect)return this.$canvas.getBoundingClientRect()},e.destroy=function(){this.$container&&this.$canvas&&this.$canvas.parentNode&&this.$container.removeChild(this.$canvas)},e.resize=function(t,e){var n;this.$canvas&&(this.$canvas.width=this.dpr*t,this.$canvas.height=this.dpr*e,n=this.$canvas,t=t,e=e,Bl&&n.style&&(n.style.width=t+"px",n.style.height=e+"px"))},e.applyCursorStyle=function(t){this.$container&&this.$container.style&&(this.$container.style.cursor=t)},e.toDataURL=function(){var e=cg(lg().mark(function t(e){var n,r;return lg().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=(r=e=void 0===e?{}:e).type,r=r.encoderOptions,t.abrupt("return",this.context.canvas.toDataURL(n,r));case 3:case"end":return t.stop()}},t,this)}));return function(t){return e.apply(this,arguments)}}(),t}(),fg=(t([y(hc),e("design:type",Object)],pg.prototype,"canvasConfig",void 0),pg=t([f({token:Hp})],pg),Ci(function(t){t(pg)})),yg=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).name="canvas-context-register",t}hg(t,i);var e=t.prototype;return e.init=function(){this.container.load(fg,!0)},e.destroy=function(){this.container.unload(fg)},t}(mf),gg=function(e){function t(t){t=e.call(this,t)||this;return t.registerPlugin(new yg),t.registerPlugin(new a0),t.registerPlugin(new dy),t.registerPlugin(new U0),t.registerPlugin(new tg),t.registerPlugin(new $y),t.registerPlugin(new sg),t}return hg(t,e),t}(ie);function mg(){mg=function(){return a};var a={},t=Object.prototype,l=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function o(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{o({},"")}catch(t){o=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,o,a,s,e=e&&e.prototype instanceof h?e:h,e=Object.create(e.prototype),r=new x(r||[]);return e._invoke=(i=t,o=n,a=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 E()}for(a.method=t,a.arg=e;;){var n=a.delegate;if(n){n=function t(e,n){var r=e.iterator[n.method];if(void 0===r){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method))return c;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}r=u(r,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,c;r=r.arg;return r?r.done?(n[e.resultName]=r.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,c):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,c)}(n,a);if(n){if(n===c)continue;return n}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===s)throw s="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s="executing";n=u(i,o,a);if("normal"===n.type){if(s=a.done?"completed":"suspendedYield",n.arg===c)continue;return{value:n.arg,done:a.done}}"throw"===n.type&&(s="completed",a.method="throw",a.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}}}a.wrap=s;var c={};function h(){}function d(){}function p(){}var e={},f=(o(e,r,function(){return this}),Object.getPrototypeOf),f=f&&f(f(w([]))),y=(f&&f!==t&&l.call(f,r)&&(e=f),p.prototype=h.prototype=Object.create(e));function g(t){["next","throw","return"].forEach(function(e){o(t,e,function(t){return this._invoke(e,t)})})}function m(a,s){var e;this._invoke=function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var o,t=u(a[t],a,n);if("throw"!==t.type)return(n=(o=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){o.value=t,r(o)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}}function v(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 b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(v,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:E}}function E(){return{value:void 0,done:!0}}return o(y,"constructor",d.prototype=p),o(p,"constructor",d),d.displayName=o(p,i,"GeneratorFunction"),a.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,o(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},a.awrap=function(t){return{__await:t}},g(m.prototype),o(m.prototype,n,function(){return this}),a.AsyncIterator=m,a.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var o=new m(s(t,e,n,r),i);return a.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},g(y),o(y,i,"Generator"),o(y,r,function(){return this}),o(y,"toString",function(){return"[object Generator]"}),a.keys=function(n){var t,r=[];for(t in n)r.push(t);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}},a.values=w,x.prototype={constructor:x,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(b),!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 o.type="throw",o.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],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(a&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){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 o=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,c):this.complete(o)},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),c},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),b(n),c}},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,b(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),c}},a}function vg(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function bg(s){return function(){var t=this,a=arguments;return new Promise(function(e,n){var r=s.apply(t,a);function i(t){vg(r,e,n,i,o,"next",t)}function o(t){vg(r,e,n,i,o,"throw",t)}i(void 0)})}}function xg(){return(xg=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 wg(t,e){return(wg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var Eg,_g=p.defineToken(""),kg=((Qt=function(){function t(){this.sceneGraphService=void 0,this.renderingContext=void 0,this.dragndropPluginOptions=void 0}return t.prototype.apply=function(t){function e(t){var e,o,a,s,l,u,n,c=t.target,h=c===p,d=h&&i?p:c.closest&&c.closest("[draggable=true]");d&&(e=function(){var e=bg(mg().mark(function t(e){var n,r,i;return mg().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(o)t.next=8;else{if(n=e.timeStamp-a,r=Ta([e.clientX,e.clientY],s),n<=m||r<=g)return t.abrupt("return");t.next=5}break;case 5:e.type="dragstart",d.dispatchEvent(e),o=!0;case 8:if(e.type="drag",e.dx=e.clientX-u[0],e.dy=e.clientY-u[1],d.dispatchEvent(e),u=[e.clientX,e.clientY],h){t.next=21;break}return n="pointer"===f?[e.canvasX,e.canvasY]:c.getBounds().center,t.next=17,p.elementsFromPoint(n[0],n[1]);case 17:r=t.sent,i=r[r.indexOf(c)+1],i=(null==i?void 0:i.closest("[droppable=true]"))||(y?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)}}(),o=!1,a=t.timeStamp,s=[t.clientX,t.clientY],l=null,u=[t.clientX,t.clientY],r.addEventListener("pointermove",e),c.addEventListener("pointerup",n=function(){o&&(l&&(t.type="drop",(t.target=l).dispatchEvent(t)),t.type="dragend",t.detail={preventClick:!0},d.dispatchEvent(t),o=!1),r.removeEventListener("pointermove",e)},{once:!0}),c.addEventListener("pointerupoutside",n,{once:!0}))}var p=this.renderingContext.root.ownerDocument,r=p.defaultView,n=this.dragndropPluginOptions,f=n.overlap,i=n.isDocumentDraggable,y=n.isDocumentDroppable,g=n.dragstartDistanceThreshold,m=n.dragstartTimeThreshold;t.hooks.init.tapPromise(Eg.tag,bg(mg().mark(function t(){return mg().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:r.addEventListener("pointerdown",e);case 1:case"end":return t.stop()}},t)}))),t.hooks.destroy.tap(Eg.tag,function(){r.removeEventListener("pointerdown",e)})},t}()).tag="Dragndrop",Eg=Qt),Tg=(t([y(It),e("design:type",Object)],kg.prototype,"sceneGraphService",void 0),t([y(Wp),e("design:type",Object)],kg.prototype,"renderingContext",void 0),t([y(_g),e("design:type",Object)],kg.prototype,"dragndropPluginOptions",void 0),kg=Eg=t([f({contrib:Kp})],kg),Ci(function(t){t(kg)})),Mg=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),wg(r.prototype.constructor=r,t);var r=e.prototype;return r.init=function(){this.container.register(_g,{useValue:xg({overlap:"pointer",isDocumentDraggable:!1,isDocumentDroppable:!1,dragstartDistanceThreshold:0,dragstartTimeThreshold:0},this.options)}),this.container.load(Tg,!0)},r.destroy=function(){this.container.remove(_g),this.container.unload(Tg)},e}(mf);const Sg=({width:t,height:e,container:n})=>{const r=new gg;return r.registerPlugin(new Mg),new $f({container:n,width:t,height:e,renderer:r})},Og=(Sg.props={},()=>[["cartesian"]]),Pg=(Og.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]]),Ag=(Pg.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]]),Ng=(Ag.props={},()=>[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]]),Cg=(Ng.props={},()=>[["translate",.5,.5],["reflect"],["translate",-.5,-.5]]),Lg=(Cg.props={},()=>[["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]]),Ig=(Lg.props={},()=>[["translate",.5,.5],["reflect.y"],["translate",-.5,-.5]]),jg=(Ig.props={},({startAngle:t=-Math.PI/2,endAngle:e=3*Math.PI/2,innerRadius:n=0,outerRadius:r=1})=>[...Ng(),...Pg({startAngle:t,endAngle:e,innerRadius:n,outerRadius:r})]),Rg=(jg.props={},()=>[["parallel",0,1,0,1]]),Dg=(Rg.props={},({focusX:t=0,focusY:e=0,distortionX:n=2,distortionY:r=2,isVisual:i=!1})=>[["fisheye",t,e,n,r,i]]),Bg=(Dg.props={},({focusX:t=0,distortionX:e=2,isVisual:n=!1})=>[["fisheye.x",t,e,n]]),Fg=(Bg.props={},({focusY:t=0,distortionY:e=2,isVisual:n=!1})=>[["fisheye.x",t,e,n]]),zg=(Fg.props={},({value:e})=>t=>t.map(()=>e)),Vg=(zg.props={},({value:e})=>t=>t.map(e)),Gg=(Vg.props={},({value:e})=>t=>t.map(t=>t[e])),Hg=(Gg.props={},({value:t})=>()=>t);function Wg(){return[{name:"color"},{name:"shape"},{name:"enterType"},{name:"enterDelay",scaleName:"enter"},{name:"enterDuration",scaleName:"enter"},{name:"enterEasing"},{name:"key",scale:"identity"},{name:"groupKey",scale:"identity"},{name:"label",scale:"identity"}]}function Yg(){return[...Wg(),{name:"title",scale:"identity"},{name:"tooltip",scale:"identity",independent:!0}]}function Ug(){return[{type:"maybeKey"}]}Hg.props={};const qg=()=>(t,e,n,l)=>{const{x:u,y:c,y1:h,series:d}=n,p=e.x,f=e.series;return[t,Array.from(t,t=>{var e=p.getBandWidth(p.invert(+u[t])),n=e*(f?f.getBandWidth(f.invert(+(null===d||void 0===d?void 0:d[t]))):1),e=(+(null===d||void 0===d?void 0:d[t])||0)*e,e=+u[t]+e,n=e+n,r=+c[t],t=+h[t];const i=[e,r],o=[n,r],a=[n,t],s=[e,t];return[i,o,a,s].map(t=>l.map(t))})]};function Xg(t,e){return null==t||null==e?NaN:t<e?-1:e<t?1:e<=t?0:NaN}function Zg(t,e){t=function(e,n){let r=0,i,o=0,a=0;if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(i=t-o,o+=i/++r,a+=i*(t-o));else{let t=-1;for(var s of e)null!=(s=n(s,++t,e))&&(s=+s)>=s&&(i=s-o,o+=i/++r,a+=i*(s-o))}if(1<r)return a/(r-1)}(t,e);return t&&Math.sqrt(t)}function Kg(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 o of e)null!=(o=n(o,++t,e))&&(void 0===r?o>=o&&(r=i=o):(r>o&&(r=o),i<o&&(i=o)))}return[r,i]}qg.props={defaultShape:"rect",defaultLabelShape:"label",channels:[...Yg(),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"}],preInference:[{type:"maybeZeroY1"},{type:"maybeZeroX"},{type:"maybeStackY",series:!0}],postInference:[...Ug(),{type:"maybeTitleX"},{type:"maybeTooltipY"}],shapes:["rect","hollowRect","funnel","pyramid"]};class $g 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(Jg(this,t))}has(t){return super.has(Jg(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 Jg({_intern:t,_key:e},n){e=e(n);return t.has(e)?t.get(e):n}function Qg(t){return t}function tm(t,...e){return h=c=Qg,d=e,function t(e,n){if(n>=d.length)return h(e);const r=new $g,i=d[n++];let o=-1;for(const s of e){var a=i(s,++o,e);const l=r.get(a);l?l.push(s):r.set(a,[s])}for(const[u,e]of r)r.set(u,t(e,n));return c(r)}(t,0);var c,h,d}function em(t,e){return(null==t||!(t<=t))-(null==e||!(e<=e))||(t<e?-1:e<t?1:0)}function nm(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 rm(t,e){let n,r=-1,i=-1;if(void 0===e)for(const a of t)++i,null!=a&&(n<a||void 0===n&&a>=a)&&(n=a,r=i);else for(var o of t)null!=(o=e(o,++i,t))&&(n<o||void 0===n&&o>=o)&&(n=o,r=i);return r}function im(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 om(n,r,i=0,o=n.length-1,a){for(a=void 0===a?em:function(r=Xg){if(r===Xg)return em;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))}}(a);i<o;){600<o-i&&(s=o-i+1,l=r-i+1,c=Math.log(s),u=.5*Math.exp(2*c/3),c=.5*Math.sqrt(c*u*(s-u)/s)*(l-s/2<0?-1:1),om(n,r,Math.max(i,Math.floor(r-l*u/s+c)),Math.min(o,Math.floor(r+(s-l)*u/s+c)),a));var s,l,u,c,h=n[r];let t=i,e=o;for(am(n,i,r),0<a(n[o],h)&&am(n,i,o);t<e;){for(am(n,t,e),++t,--e;a(n[t],h)<0;)++t;for(;0<a(n[e],h);)--e}0===a(n[i],h)?am(n,i,e):am(n,++e,o),e<=r&&(i=e+1),r<=e&&(o=e-1)}return n}function am(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function sm(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)return(e=+e)<=0||n<2?im(t):1<=e?nm(t):(n=(n-1)*e,(r=nm(om(t,e=Math.floor(n)).subarray(0,e+1)))+(im(t.subarray(e+1))-r)*(n-e))}function lm(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 o of e)null!=(o=n(o,++t,e))&&(o=+o)>=o&&(++r,i+=o)}if(r)return i/r}function um(t,e){return sm(t,.5,e)}function cm(e,n=Xg){let r,i=!1;if(1===n.length){let t;for(const a of e){var o=n(a);(i?Xg(o,t)<0:0===Xg(o,o))&&(r=a,t=o,i=!0)}}else for(const t of e)(i?n(t,r)<0:0===n(t,t))&&(r=t,i=!0);return r}function hm(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 dm(t){const e=t.getOptions()["transformations"];return e.map(([t])=>t).filter(t=>"transpose"===t).length%2!=0}function pm(t){const e=t.getOptions()["transformations"];return e.some(([t])=>"polar"===t)}function fm(t){const e=t.getOptions()["transformations"];return e.some(([t])=>"helix"===t)}function ym(t){const e=t.getOptions()["transformations"];return e.some(([t])=>"parallel"===t)}const gm=(t,e,n,r)=>{const{series:i,x:o,y:a}=n;if(void 0===o||void 0===a)throw new Error("Missing encode for x or y channel.");const s=i?Array.from(tm(t,t=>i[t]).values()):[t];return[s.map(t=>t[0]),Array.from(s,t=>t.map(t=>r.map([+o[t],+a[t]]))),s]},mm=(t,e,n,i)=>{const o=Object.entries(n).filter(([t])=>t.startsWith("position")).map(([,t])=>t);if(0===o.length)throw new Error("Missing encode for position channel.");return[t,Array.from(t,e=>{var t=o.map(t=>+t[e]),n=i.map(t);const r=[];for(let t=0;t<n.length;t+=2)r.push([n[t],n[t+1]]);return r})]},vm=()=>(t,e,n,r)=>{const i=ym(r)?mm:gm;return i(t,e,n,r)},bm=(vm.props={defaultShape:"line",defaultLabelShape:"label",channels:[...Yg(),{name:"x"},{name:"y"},{name:"position",independent:!0},{name:"size"},{name:"series",scale:"identity"}],preInference:[{type:"maybeSeries"}],postInference:[...Ug(),{type:"maybeTitleX"},{type:"maybeTooltipY"},{type:"maybeTooltipPosition"}],shapes:["line","smooth"]},()=>(t,e,n,o)=>{const{x:a,y:s,size:l,dx:u,dy:c}=n,[h,d]=o.getSize();return[t,Array.from(t,t=>{var e=+((null===u||void 0===u?void 0:u[t])||0),n=+((null===c||void 0===c?void 0:c[t])||0),e=+a[t]+e,n=+s[t]+n,t=+l[t],r=t/h,t=t/d,i=[e+r,n+t];return[o.map([e-r,n-t]),o.map(i)]})]}),xm=(bm.props={defaultShape:"point",defaultLabelShape:"label",channels:[...Yg(),{name:"x",required:!0},{name:"y",required:!0},{name:"size",required:!0},{name:"dx",scale:"identity"},{name:"dy",scale:"identity"}],preInference:[{type:"maybeZeroY"},{type:"maybeZeroX"},{type:"maybeSize"}],postInference:[...Ug(),{type:"maybeTitleX"},{type:"maybeTooltipY"}],shapes:["bowtie","cross","diamond","hexagon","hollowBowtie","hollowDiamond","hollowHexagon","hollowPoint","hollowSquare","hollowTriangle","hollowTriangleDown","hyphen","linePoint","plus","point","square","tick","triangle","triangleDown"]},()=>(t,e,n,r)=>{const{x:i,y:o}=n,a=e["x"];return[t,Array.from(t,t=>{var e=+i[t],t=+o[t],n=(null==(n=null===a||void 0===a?void 0:a.getBandWidth)?void 0:n.call(a))||0;return[r.map([e+n/2,t])]})]}),wm=(xm.props={defaultShape:"text",defaultLabelShape:"label",channels:[...Yg(),{name:"x",required:!0},{name:"y",required:!0},{name:"text",required:!0,scale:"identity"},{name:"fontSize"},{name:"rotate"}],preInference:[],postInference:[...Ug(),{type:"maybeTitleX"},{type:"maybeTooltipY"}],shapes:["text"]},()=>(t,e,n,l)=>{const{x:u,y:c}=n,h=e.x,d=e.y;return[t,Array.from(t,t=>{var e=h.getBandWidth(h.invert(+u[t])),n=d.getBandWidth(d.invert(+c[t])),r=+u[t],t=+c[t];const i=[r,t],o=[r+e,t],a=[r+e,t+n],s=[r,t+n];return[i,o,a,s].map(t=>l.map(t))})]}),Em=(wm.props={defaultShape:"rect",defaultLabelShape:"label",channels:[...Yg(),{name:"x",required:!0,scale:"band"},{name:"y",required:!0,scale:"band"}],preInference:[{type:"maybeZeroX"},{type:"maybeZeroY"}],postInference:[...Ug(),{type:"maybeTitleX"},{type:"maybeTooltipY"}],shapes:["rect","hollowRect"]},()=>(t,e,n,o)=>{const{x:a,y:s,y1:l,series:r}=n,i=r?Array.from(tm(t,t=>r[t]).values()):[t];return[i.map(t=>t[0]),Array.from(i,e=>{var n=e.length;const r=new Array(2*n);for(let t=0;t<e.length;t++){var i=e[t];r[t]=o.map([+a[i],+s[i]]),r[n+t]=o.map([+a[i],+l[i]])}return r}),i]}),_m=(Em.props={defaultShape:"area",defaultLabelShape:"label",channels:[...Yg(),{name:"x",required:!0},{name:"y",required:!0},{name:"size"},{name:"series",scale:"identity"}],preInference:[{type:"maybeSeries"},{type:"maybeZeroY1"}],postInference:[...Ug(),{type:"maybeTitleX"},{type:"maybeTooltipY"}],shapes:["area","smooth"]},()=>(t,e,n,o)=>{const a=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=>{const n=[];for(let t=0;t<a.length;t++){var r=a[t][e];if(void 0===r)break;var i=s[t][e];n.push(o.map([+r,+i]))}return n});return[t,n]}),km=(_m.props={defaultShape:"polygon",defaultLabelShape:"label",channels:[...Yg(),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...Ug(),{type:"maybeTitleX"},{type:"maybeTooltipY"}],shapes:["polygon"]},(...t)=>_m(...t)),Tm=(km.props={defaultShape:"edge",defaultLabelShape:"label",channels:[...Yg(),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...Ug(),{type:"maybeTitleX"},{type:"maybeTooltipY"}],shapes:["edge","arc","vhv","smoothEdge","ribbon"]},(...t)=>_m(...t)),Mm=(Tm.props={defaultShape:"pointNode",defaultLabelShape:"label",channels:[...Yg(),{name:"x",required:!0},{name:"y",required:!0},{name:"size",required:!0}],preInference:[],postInference:[...Ug(),{type:"maybeTitleX"},{type:"maybeTooltipY"}],shapes:["pointNode","polygonNode"]},()=>(t,e,n,r)=>{const{x:i,y:o,x1:a,y1:s}=n,l=(null==(e=null==(n=e.x)?void 0:n.getBandWidth)?void 0:e.call(n))||0;e=t.map(t=>[r.map([+i[t]+l/2,+o[t]]),r.map([+a[t]+l/2,+s[t]])]);return[t,e]}),Sm=(Mm.props={defaultShape:"link",defaultLabelShape:"label",channels:[...Yg(),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...Ug(),{type:"maybeTitleX"},{type:"maybeTooltipY"}],shapes:["link"]},()=>(t,e,n,r)=>{const{x:i,y:o}=n,a=e["x"];return[t,Array.from(t,t=>{var e=+i[t],t=+o[t],n=(null==(n=null===a||void 0===a?void 0:a.getBandWidth)?void 0:n.call(a))||0;return[r.map([e+n/2,t])]})]}),Om=(Sm.props={defaultShape:"image",defaultLabelShape:"label",channels:[...Yg(),{name:"x",required:!0},{name:"y",required:!0},{name:"src",required:!0,scale:"identity"},{name:"size"}],preInference:[],postInference:[...Ug(),{type:"maybeTitleX"},{type:"maybeTooltipY"}],shapes:["image"]},()=>(t,e,n,l)=>{const{x:u,y:c,y1:h,y2:d,y3:p,y4:f,series:y}=n,g=e.x,m=e.series;return[t,Array.from(t,t=>{var e=g.getBandWidth(g.invert(+u[t])),n=e*(m?m.getBandWidth(m.invert(+(null===y||void 0===y?void 0:y[t]))):1),e=(+(null===y||void 0===y?void 0:y[t])||0)*e,e=+u[t]+e+n/2,[t,r,i,o,a]=[+c[t],+h[t],+d[t],+p[t],+f[t]];const s=[[e-n/2,a],[e+n/2,a],[e,a],[e,o],[e-n/2,o],[e+n/2,o],[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]];return s.map(t=>l.map(t))})]}),Pm=(Om.props={defaultShape:"box",defaultLabelShape:"label",channels:[...Yg(),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"}],preInference:[],postInference:[...Ug(),{type:"maybeTitleX"},{type:"maybeTooltipY"}],shapes:["box"]},()=>(t,e,n,i)=>{const{x:o,y:a,size:s,rotate:l}=n,[u,c]=i.getSize();n=t.map(t=>{var e=+l[t]/180*Math.PI,n=+s[t],r=n/u,n=n/c,r=r*Math.cos(e),n=-n*Math.sin(e);return[i.map([+o[t]-r/2,+a[t]-n/2]),i.map([+o[t]+r/2,+a[t]+n/2])]});return[t,n]}),Am=(Pm.props={defaultShape:"vector",defaultLabelShape:"label",channels:[...Yg(),{name:"x",required:!0},{name:"y",required:!0},{name:"rotate",required:!0,scale:"identity"},{name:"size",required:!0}],preInference:[],postInference:[...Ug(),{type:"maybeTitleX"},{type:"maybeTooltipY"}],shapes:["vector"]},()=>xm()),Nm=(Am.props={defaultShape:"annotation.text",defaultLabelShape:"label",channels:[...Wg(),{name:"x",required:!0},{name:"y",required:!0},{name:"text",required:!0,scale:"identity"},{name:"fontSize"},{name:"rotate"}],preInference:[],postInference:[...Ug()],shapes:["annotation.text","annotation.badge"]},()=>(t,e,n,r)=>{const i=n["y"];return[t,Array.from(t,t=>{const e=[0,i[t]],n=[1,i[t]];return[e,n].map(t=>r.map(t))})]}),Cm=(Nm.props={defaultShape:"annotation.line",defaultLabelShape:"label",channels:[...Wg(),{name:"y",required:!0}],preInference:[],postInference:[...Ug()],shapes:["annotation.line"]},()=>(t,e,n,r)=>{const i=n["x"];return[t,Array.from(t,t=>{const e=[i[t],1],n=[i[t],0];return[e,n].map(t=>r.map(t))})]}),Lm=(Cm.props={defaultShape:"annotation.line",defaultLabelShape:"label",channels:[...Wg(),{name:"x",required:!0}],preInference:[],postInference:[...Ug()],shapes:["annotation.line"]},(...t)=>Mm(...t));function Im(t,e,n,r){if(e)return()=>[0,1];const{[t]:i,[t+"1"]:o}=n;return t=>{var e=(null==(e=r.getBandWidth)?void 0:e.call(r,r.invert(+o[t])))||0;return[i[t],o[t]+e]}}function jm(t={}){const{extendX:r=!1,extendY:i=!1}=t;return(t,e,n,l)=>{const u=Im("x",r,n,e.x),c=Im("y",i,n,e.y);return[t,Array.from(t,t=>{var[e,n]=u(t),[t,r]=c(t);const i=[e,t],o=[n,t],a=[n,r],s=[e,r];return[i,o,a,s].map(t=>l.map(t))})]}}Lm.props={defaultShape:"annotation.connector",defaultLabelShape:"label",channels:[...Wg(),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...Ug()],shapes:["annotation.connector"]};const Rm=()=>jm(),Dm=(Rm.props={defaultShape:"annotation.range",defaultLabelShape:"label",channels:[...Wg(),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...Ug()],shapes:["annotation.range"]},()=>jm({extendY:!0})),Bm=(Dm.props={defaultShape:"annotation.range",defaultLabelShape:"label",channels:[...Wg(),{name:"x",required:!0}],preInference:[],postInference:[...Ug()],shapes:["annotation.range"]},()=>jm({extendX:!0})),Fm=(Bm.props={defaultShape:"annotation.range",defaultLabelShape:"label",channels:[...Wg(),{name:"y",required:!0}],preInference:[],postInference:[...Ug()],shapes:["annotation.range"]},()=>["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"]),zm=(Fm.props={},()=>["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"]);zm.props={};class Vm{constructor(t){this.options=N({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=N({},this.options,t),this.rescale(t)}rescale(t){}}function Gm(e,n,r){for(let t=0;t<n.length;t+=1)e.has(n[t])||e.set(r(n[t]),t)}function Hm(t){const{value:e,from:n,to:r,mapper:i,notFoundReturn:o}=t;let a=i.get(e);if(void 0===a){if(o)return o;a=n.push(e)-1,i.set(e,a)}return r[a%r.length]}function Wm(t){return t instanceof Date?t=>""+t:"object"==typeof t?t=>JSON.stringify(t):t=>t}class Ym extends Vm{constructor(t){super(t)}getDefaultOptions(){return{domain:[],range:[]}}map(t){return 0===this.domainIndexMap.size&&Gm(this.domainIndexMap,this.getDomain(),this.domainKey),Hm({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&Gm(this.rangeIndexMap,this.getRange(),this.rangeKey),Hm({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=Wm(e),this.rangeKey=Wm(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 Ym(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 Um(t){const e=t["domain"];var n=e.length;if(0===n)return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};const{range:r,paddingOuter:i,paddingInner:o,flex:a=[],round:s,align:l}=t;t=a,c=e.length;var u=0<(u=c-t.length)?[...t,...new Array(u).fill(1)]:u<0?t.slice(0,c):t,[c,t]=r,t=t-c,h=t/(2/n*i+1-1/n*o);const d=h*o/n;h-=n*d;const p=function(t){const e=Math.min(...t);return t.map(t=>t/e)}(u),f=h/p.reduce((t,e)=>t+e);u=new Map(e.map((t,e)=>{e=p[e]*f;return[t,s?Math.floor(e):e]}));const y=new Map(e.map((t,e)=>{e=p[e]*f+d;return[t,s?Math.floor(e):e]}));h=Array.from(y.values()).reduce((t,e)=>t+e),c+=(t-(h-h/n*o))*l;let g=s?Math.round(c):c;const m=new Array(n);for(let t=0;t<n;t+=1){m[t]=(v=g,Math.round(1e12*v)/1e12);var v=e[t];g+=y.get(v)}return{valueBandWidth:u,valueStep:y,adjustedRange:m}}class qm extends Ym{constructor(t){super(t)}getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:void 0,flex:[]}}clone(){return new qm(this.options)}getStep(t){return void 0===this.valueStep?1:void 0===t?Array.from(this.valueStep.values())[0]:this.valueStep.get(t)}getBandWidth(t){return void 0===this.valueBandWidth?1: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}=Um({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}}function Xm(t,...e){return e.reduce((e,n)=>t=>e(n(t)),t)}function Zm(e,n){return n-e?t=>(t-e)/(n-e):t=>.5}function Km(t,e,n,r,i){let o=n||0,a=r||t.length;const s=i||(t=>t);for(;o<a;){var l=Math.floor((o+a)/2);s(t[l])>e?a=l:o=l+1}return o}const $m=Math.sqrt(50),Jm=Math.sqrt(10),Qm=Math.sqrt(2);function tv(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>=$m?10:n>=Jm?5:n>=Qm?2:1)*10**t:-(10**-t)/(n>=$m?10:n>=Jm?5:n>=Qm?2:1)}function ev(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>=$m?r*=10:n>=Jm?r*=5:n>=Qm&&(r*=2),e<t?-r:r}const nv=(t,e,n=5)=>{const r=[t,e];let i=0,o=r.length-1,a=r[i],s=r[o],l;return s<a&&([a,s]=[s,a],[i,o]=[o,i]),0<(l=tv(a,s,n))?(a=Math.floor(a/l)*l,s=Math.ceil(s/l)*l,l=tv(a,s,n)):l<0&&(a=Math.ceil(a*l)/l,s=Math.floor(s*l)/l,l=tv(a,s,n)),0<l?(r[i]=Math.floor(a/l)*l,r[o]=Math.ceil(s/l)*l):l<0&&(r[i]=Math.ceil(a*l)/l,r[o]=Math.floor(s*l)/l),r},rv=36e5,iv=864e5,ov=7*iv;iv,iv;function av(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 u=(t,e)=>{t=new Date(+t-1);return l(t,e),s(t,e),l(t),t};return{ceil:u,floor:(t,e)=>{t=new Date(+t);return l(t,e),t},range:(t,e,n,r)=>{const i=[];for(var o=Math.floor(n),a=r?u(t,n):u(t);+a<+e;s(a,o),l(a))i.push(new Date(+a));return i},duration:t}}var s=av(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),re=av(1e3,t=>{t.setMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getSeconds()),l=av(6e4,t=>{t.setSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getMinutes()),r=av(rv,t=>{t.setMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+rv*e)},t=>t.getHours()),w=av(iv,t=>{t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+iv*e)},t=>t.getDate()-1);const sv=av(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());Nt=av(ov,t=>{t.setDate(t.getDate()-t.getDay()%7),t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+ov*e)},t=>{var e=sv.floor(t),t=new Date(+t);return Math.floor((+t-+e)/ov)}),Lt=av(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 lv={millisecond:s,second:re,minute:l,hour:r,day:w,week:Nt,month:sv,year:Lt};Ht=av(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),Kt=av(1e3,t=>{t.setUTCMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getUTCSeconds()),h=av(6e4,t=>{t.setUTCSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getUTCMinutes()),n=av(rv,t=>{t.setUTCMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+rv*e)},t=>t.getUTCHours()),c=av(iv,t=>{t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+iv*e)},t=>t.getUTCDate()-1);const uv=av(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());Yt=av(ov,t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7)%7),t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+ov*e)},t=>{var e=uv.floor(t),t=new Date(+t);return Math.floor((+t-+e)/ov)}),zt=av(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 cv={millisecond:Ht,second:Kt,minute:h,hour:n,day:c,week:Yt,month:uv,year:zt};function hv(t,e,n,r,i){var t=+t,e=+e,{tickIntervals:i,year:o,millisecond:a}=function(t){var{year:t,month:e,week:n,day:r,hour:i,minute:o,second:a,millisecond:s}=t?cv:lv;return{tickIntervals:[[a,1],[a,5],[a,15],[a,30],[o,1],[o,5],[o,15],[o,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,u=i.length,c=Km(i,l,0,u,s);let h;return h=c===u?[o,ev(t/o.duration,e/o.duration,n)]:c?([u,o]=l/s(i[c-1])<s(i[c])/l?i[c-1]:i[c],[u,r?Math.ceil(r/u.duration):o]):[a,Math.max(ev(t,e,n),1)]}const dv=(t,e,n,r,i)=>{var o=e<t,a=o?e:t,t=o?t:e;const[s,l]=hv(a,t,n,r,i),u=[s.floor(a,l),s.ceil(t,l)];return o?u.reverse():u};function pv(t){return!st(t)&&!at(t)&&!Number.isNaN(t)}const fv=e=>t=>-e(-t),yv=(t,e)=>{const n=Math.log(t);t=t===Math.E?Math.log:t=>Math.log(t)/n;return e?fv(t):t},gv=(e,t)=>{var n=e===Math.E?Math.exp:t=>e**t;return t?fv(n):n},mv=(t,e,n,r)=>{var i=t<0;const o=yv(r,i),a=gv(r,i);r=e<t,i=r?t:e;const s=[a(Math.floor(o(r?e:t))),a(Math.ceil(o(i)))];return r?s.reverse():s};var vv,jt={exports:{}},oe={exports:{}},bv=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))},xv=Array.prototype.concat,wv=Array.prototype.slice,Ev=oe.exports=function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];bv(i)?e=xv.call(e,wv.call(i)):e.push(i)}return e},_v=(Ev.wrap=function(t){return function(){return t(Ev(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]}),kv=oe.exports,Tv=Object.hasOwnProperty,Mv=Object.create(null);for(vv in _v)Tv.call(_v,vv)&&(Mv[_v[vv]]=vv);var Sv=jt.exports={to:{},get:{}};function Ov(t,e,n){return Math.min(Math.max(e,t),n)}function Pv(t){t=Math.round(t).toString(16).toUpperCase();return t.length<2?"0"+t:t}Sv.get=function(t){var e,n;switch(t.substring(0,3).toLowerCase()){case"hsl":e=Sv.get.hsl(t),n="hsl";break;case"hwb":e=Sv.get.hwb(t),n="hwb";break;default:e=Sv.get.rgb(t),n="rgb"}return e?{model:n,value:e}:null},Sv.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 o=2*n;i[n]=parseInt(e.slice(o,2+o),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]:Tv.call(_v,e[1])?((i=_v[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]=Ov(i[n],0,255);return i[3]=Ov(i[3],0,1),i},Sv.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,Ov(parseFloat(t[2]),0,100),Ov(parseFloat(t[3]),0,100),Ov(isNaN(e)?1:e,0,1)]):null},Sv.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,Ov(parseFloat(t[2]),0,100),Ov(parseFloat(t[3]),0,100),Ov(isNaN(e)?1:e,0,1)]):null},Sv.to.hex=function(){var t=kv(arguments);return"#"+Pv(t[0])+Pv(t[1])+Pv(t[2])+(t[3]<1?Pv(Math.round(255*t[3])):"")},Sv.to.rgb=function(){var t=kv(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]+")"},Sv.to.rgb.percent=function(){var t=kv(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]+")"},Sv.to.hsl=function(){var t=kv(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},Sv.to.hwb=function(){var t=kv(arguments),e="";return 4<=t.length&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},Sv.to.keyword=function(t){return Mv[t.slice(0,3)]};var Av=jt.exports;function Nv(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 Cv(t){var e,n,r,t=Av.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*Nv(n=2*r-(r=r<.5?r*(1+n):r+n-r*n),r,e+1/3),255*Nv(n,r,e),255*Nv(n,r,e-1/3),t]):null):null}const Lv=(e,n)=>t=>e*(1-t)+n*t,Iv=(t,e)=>{if("number"==typeof t&&"number"==typeof e)return Lv(t,e);if("string"!=typeof t||"string"!=typeof e)return()=>t;{var n=t,r=e;const l=Cv(n),u=Cv(r);return null===l||null===u?l?()=>n:()=>r:e=>{const n=new Array(4);for(let t=0;t<4;t+=1){var r=l[t],i=u[t];n[t]=r*(1-e)+i*e}var[t,o,a,s]=n;return`rgba(${Math.round(t)}, ${Math.round(o)}, ${Math.round(a)}, ${s})`}}},jv=(t,e)=>{const n=Lv(t,e);return t=>Math.round(n(t))};const Rv=(t,e,n)=>{let r,i,o=t,a=e;if(o===a&&0<n)return[o];let s=tv(o,a,n);if(0===s||!Number.isFinite(s))return[];if(0<s){o=Math.ceil(o/s),a=Math.floor(a/s),i=new Array(r=Math.ceil(a-o+1));for(let t=0;t<r;t+=1)i[t]=(o+t)*s}else{s=-s,o=Math.ceil(o*s),a=Math.floor(a*s),i=new Array(r=Math.ceil(a-o+1));for(let t=0;t<r;t+=1)i[t]=(o+t)/s}return i};function Dv(t){return Math.abs(t)<1e-15?t:parseFloat(t.toFixed(15))}const Bv=[1,5,2,2.5,4,3],Fv=100*Number.EPSILON;const zv=(n,r,t=5,i=!0,o=Bv,a=[.25,.2,.5,.05])=>{var s,l,u,c,h,d,p,f=t<0?0:Math.round(t);if(Number.isNaN(n)||Number.isNaN(r)||"number"!=typeof n||"number"!=typeof r||!f)return[];if(r-n<1e-15||1===f)return[n];const y={score:-2,lmin:0,lmax:0,lstep:0};let g=1;for(;g<1/0;){for(let t=0;t<o.length;t+=1){var m=o[t],v=(c=m,h=o,d=g,p=void 0,p=kt(h),1-wt(h,c)/(p-1)-d+1);if(a[0]*v+a[1]+a[2]+a[3]<y.score){g=1/0;break}let e=2;for(;e<1/0;){x=e;var b=(u=f)<=x?2-(x-1)/(u-1):1;if(a[0]*v+a[1]+a[2]*b+a[3]<y.score)break;var x=(r-n)/(e+1)/g/m;let t=Math.ceil(Math.log10(x));for(;t<1/0;){var w=g*m*10**t,E=(k=r,E=w*(e-1),(k-=n)<E?1-((E-k)/2)**2/(.1*k)**2:1);if(a[0]*v+a[1]*E+a[2]*b+a[3]<y.score)break;var _=Math.floor(r/w)*g-(e-1)*g,k=Math.ceil(n/w)*g;if(_<=k){var T=k-_;for(let t=0;t<=T;t+=1){var M=(_+t)*(w/g),S=M+w*(e-1),O=w,P=function(t,e,n,r,i,o){var a=kt(e),e=wt(e,t);let s=0;return t=(r%o+o)%o,1-e/(a-1)-n+(s=(t<Fv||o-t<Fv)&&r<=0&&0<=i?1:s)}(m,o,g,M,S,O),A=1-.5*((r-S)**2+(n-M)**2)/(.1*(r-n))**2,N=(s=e,N=n,s=(s-1)/(S-(C=M)),l=((l=f)-1)/(Math.max(S,r)-Math.min(N,C)),2-Math.max(s/l,l/s)),C=a[0]*P+a[1]*A+a[2]*N+ +a[3];C>y.score&&(!i||M<=n&&r<=S)&&(y.lmin=M,y.lmax=S,y.lstep=O,y.score=C)}}t+=1}e+=1}}g+=1}var t=Dv(y.lmax),e=Dv(y.lmin),L=Dv(y.lstep),I=Math.floor((t=(t-e)/L,Math.round(1e12*t)/1e12))+1;const j=new Array(I);j[0]=Dv(e);for(let t=1;t<I;t+=1)j[t]=Dv(j[t-1]+L);return j};class Vv extends Vm{getDefaultOptions(){return{domain:[0,1],range:[0,1],tickCount:5,unknown:void 0,tickMethod:zv}}map(t){return pv(t)?t:this.options.unknown}invert(t){return this.map(t)}clone(){return new Vv(this.options)}getTicks(){const{domain:t,tickCount:e,tickMethod:n}=this.options;var[r,i]=t;return Q(r)&&Q(i)?n(r,i,e):[]}}const Gv=(t,e,n)=>{var[t,r]=t,[e,i]=e;let o,a;return Xm(a=t<r?(o=Zm(t,r),n(e,i)):(o=Zm(r,t),n(i,e)),o)},Hv=(r,t,e)=>{const i=Math.min(r.length,t.length)-1,o=new Array(i),a=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)o[t]=Zm(s[t],s[t+1]),a[t]=e(l[t],l[t+1]);return t=>{var e=Km(r,t,1,i)-1,n=o[e];return Xm(a[e],n)(t)}},Wv=(t,e,n,r)=>{const i=2<Math.min(t.length,e.length)?Hv:Gv;r=r?jv:n;return i(t,e,r)};class Yv extends Vm{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:Lv,tickCount:5}}map(t){return pv(t)?this.output(t):this.options.unknown}invert(t){return pv(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(){const t=this.options["tickMethod"];var[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 nv}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 xt}composeOutput(t,e){const{domain:n,range:r,round:i,interpolate:o}=this.options;var a=Wv(n.map(t),r,o,i);this.output=Xm(a,e,t)}composeInput(t,e,n){const{domain:r,range:i}=this.options;t=Wv(i,r.map(t),Lv);this.input=Xm(e,n,t)}}class Uv extends Yv{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:Iv,tickMethod:Rv,tickCount:5}}chooseTransforms(){return[xt,xt]}clone(){return new Uv(this.options)}}class qv extends qm{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:void 0,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new qv(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}}const Xv=t=>t<0?-Math.sqrt(-t):Math.sqrt(t);class Zv extends Yv{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,exponent:2,interpolate:Iv,tickMethod:Rv,tickCount:5}}constructor(t){super(t)}chooseTransforms(){var t,e,n,r=this.options["exponent"];return 1===r?[xt,xt]:(t=.5===r?Xv:(e=r,t=>t<0?-((-t)**e):t**e),n=r,[t,t=>t<0?-((-t)**(1/n)):t**(1/n)])}clone(){return new Zv(this.options)}}class Kv extends Vm{constructor(t){super(t)}getDefaultOptions(){return{domain:[.5],range:[0,1]}}map(t){return pv(t)?(t=Km(this.thresholds,t,0,this.n),this.options.range[t]):this.options.unknown}invert(t){const e=this.options["range"];var t=e.indexOf(t),n=this.thresholds;return[n[t-1],n[t]]}clone(){return new Kv(this.options)}rescale(){var{domain:t,range:e}=this.options;this.n=Math.min(t.length,e.length-1),this.thresholds=t}}const $v=(t,e,n,r=10)=>{var i=t<0;const o=gv(r,i),a=yv(r,i);var s=e<t,l=s?e:t,u=s?t:e;let c=a(l),h=a(u),d=[];if(!(r%1)&&h-c<n){if(c=Math.floor(c),h=Math.ceil(h),i)for(;c<=h;c+=1){var p=o(c);for(let t=r-1;1<=t;--t){var f=p*t;if(u<f)break;l<=f&&d.push(f)}}else for(;c<=h;c+=1){var y=o(c);for(let t=1;t<r;t+=1){var g=y*t;if(u<g)break;l<=g&&d.push(g)}}2*d.length<n&&(d=Rv(l,u,n))}else d=Rv(c,h,Math.min(h-c,n)).map(o);return s?d.reverse():d};class Jv extends Yv{getDefaultOptions(){return{domain:[1,10],range:[0,1],base:10,interpolate:Iv,tickMethod:$v,tickCount:5}}chooseNice(){return mv}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[yv(t,e),gv(t,e)]}clone(){return new Jv(this.options)}}class Qv extends Kv{getDefaultOptions(){return{domain:[0,1],range:[.5],nice:!1,tickCount:5,tickMethod:zv}}constructor(t){super(t)}nice(){var t,e,n=this.options["nice"];n&&([n,t,e]=this.getTickMethodOptions(),this.options.domain=nv(n,t,e))}getTicks(){const t=this.options["tickMethod"];var[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 Qv(this.options)}}function t1(t,e,n=!1){const 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 e1 extends Kv{getDefaultOptions(){return{domain:[],range:[],tickCount:5,unknown:void 0,tickMethod:zv}}constructor(t){super(t)}rescale(){var{domain:t,range:e}=this.options;this.n=e.length-1,this.thresholds=t1(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 e1(this.options)}getTicks(){const{tickCount:t,domain:e,tickMethod:n}=this.options;var r=e.length-1,i=e[0],r=e[r];return n(i,r,t)}}var n1=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,r1=/\[([^]*?)\]/gm;function i1(t,e){for(var n=[],r=0,i=t.length;r<i;r++)n.push(t[r].substr(0,e));return n}function o1(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 o,a=i[r];for(o in a)t[o]=a[o]}return t}function a1(t,e){for(void 0===e&&(e=2),t=String(t);t.length<e;)t="0"+t;return t}var a=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],d=["January","February","March","April","May","June","July","August","September","October","November","December"],u=i1(d,3),s1=o1({},{dayNamesShort:i1(a,3),dayNames:a,monthNamesShort:u,monthNames:d,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][3<t%10?0:(t-t%10!=10?1:0)*t%10]}}),l1={D:function(t){return String(t.getDate())},DD:function(t){return a1(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return a1(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 a1(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 a1(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return a1(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return a1(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return a1(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return a1(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return a1(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return a1(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return a1(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?"-":"+")+a1(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4)},Z:function(t){t=t.getTimezoneOffset();return(0<t?"-":"+")+a1(Math.floor(Math.abs(t)/60),2)+":"+a1(Math.abs(t)%60,2)}},u1={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 o=e<t,a=o?e:t,t=o?t:e;const[s,l]=hv(a,t,n,r,i),u=s.range(a,new Date(+t+1),l,!0);return o?u.reverse():u};function h1(t){var e=t.getTimezoneOffset();const n=new Date(t);return n.setMinutes(n.getMinutes()+e,n.getSeconds(),n.getMilliseconds()),n}class d1 extends Yv{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:Lv,mask:void 0,utc:!1}}chooseTransforms(){return[t=>+t,t=>new Date(t)]}chooseNice(){return dv}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:o,utc:t}=this.options,a=t?cv:lv,s=t?h1:xt;return t=>{var e=s(t),t=o||function(t,e){const{second:n,minute:r,hour:i,day:o,week:a,month:s,year:l}=e;return n.floor(t)<t?".SSS":r.floor(t)<t?":ss":i.floor(t)<t?"hh:mm":o.floor(t)<t?"hh A":s.floor(t)<t?a.floor(t)<t?"MMM DD":"ddd DD":l.floor(t)<t?"MMMM":"YYYY"}(t,a),n=void 0;if(void 0===t&&(t=u1.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=u1[t]||t).replace(r1,function(t,e){return r.push(e),"@@@"}),o1(o1({},s1),n));return(t=t.replace(n1,function(t){return l1[t](e,i)})).replace(/@@@/g,function(){return r.shift()})}}clone(){return new d1(this.options)}}const p1=t=>new qm(t),f1=(p1.props={},t=>new Uv(t)),y1=(f1.props={},t=>new Ym(t)),g1=(y1.props={},t=>new Vv(t)),m1=(g1.props={},t=>new qv(t)),v1=(m1.props={},t=>new d1(t)),b1=(v1.props={},t=>new Jv(t)),x1=(b1.props={},t=>new Zv(t)),w1=(x1.props={},t=>new Kv(t)),E1=(w1.props={},t=>new e1(t)),_1=(E1.props={},t=>new Qv(t)),k1=(_1.props={},Math.PI),T1=2*k1,M1=1e-6,S1=T1-M1;function O1(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function P1(){return new O1}function A1(t){return function(){return t}}O1.prototype=P1.prototype={constructor:O1,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,o){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(t,e,n,r,i){var o,a,s=this._x1,l=this._y1,u=(n=+n)-(t=+t),c=(r=+r)-(e=+e),h=s-t,d=l-e,p=h*h+d*d;if((i=+i)<0)throw new Error("negative radius: "+i);null===this._x1?this._+="M"+(this._x1=t)+","+(this._y1=e):p>M1&&(Math.abs(d*u-c*h)>M1&&i?(a=u*u+c*c,r=(n=n-s)*n+(s=r-l)*s,l=Math.sqrt(a),o=Math.sqrt(p),p=(a=i*Math.tan((k1-Math.acos((a+p-r)/(2*l*o)))/2))/o,r=a/l,Math.abs(p-1)>M1&&(this._+="L"+(t+p*h)+","+(e+p*d)),this._+="A"+i+","+i+",0,0,"+ +(h*s<d*n)+","+(this._x1=t+r*u)+","+(this._y1=e+r*c)):this._+="L"+(this._x1=t)+","+(this._y1=e))},arc:function(t,e,n,r,i,o){t=+t,e=+e,o=!!o;var a=(n=+n)*Math.cos(r),s=n*Math.sin(r),l=t+a,u=e+s,c=1^o,o=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+u:(Math.abs(this._x1-l)>M1||Math.abs(this._y1-u)>M1)&&(this._+="L"+l+","+u),n&&((o=o<0?o%T1+T1:o)>S1?this._+="A"+n+","+n+",0,1,"+c+","+(t-a)+","+(e-s)+"A"+n+","+n+",0,1,"+c+","+(this._x1=l)+","+(this._y1=u):o>M1&&(this._+="A"+n+","+n+",0,"+ +(o>=k1)+","+c+","+(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 N1=Math.abs,C1=Math.atan2,L1=Math.cos,I1=Math.max,j1=Math.min,R1=Math.sin,D1=Math.sqrt,B1=1e-12,F1=Math.PI,z1=F1/2,V1=2*F1;function G1(t){return 1<=t?z1:t<=-1?-z1:Math.asin(t)}function H1(t){return t.innerRadius}function W1(t){return t.outerRadius}function Y1(t){return t.startAngle}function U1(t){return t.endAngle}function q1(t){return t&&t.padAngle}function X1(t,e,n,r,i,o,a){var s=t-n,l=e-r,a=(a?o:-o)/D1(s*s+l*l),l=a*l,a=-a*s,s=t+l,t=e+a,e=n+l,n=r+a,r=(s+e)/2,u=(t+n)/2,c=e-s,h=n-t,d=c*c+h*h,o=i-o,s=s*n-e*t,n=(h<0?-1:1)*D1(I1(0,o*o*d-s*s)),e=(s*h-c*n)/d,t=(-s*c-h*n)/d,p=(s*h+c*n)/d,s=(-s*c+h*n)/d,c=e-r,h=t-u,n=p-r,d=s-u;return n*n+d*d<c*c+h*h&&(e=p,t=s),{cx:e,cy:t,x01:-l,y01:-a,x11:e*(i/o-1),y11:t*(i/o-1)}}function Z1(){var O=H1,P=W1,A=A1(0),N=null,C=Y1,L=U1,I=q1,j=null;function e(){var t,e,n,r,i,o,a,s,l,u,c,h,d,p,f,y,g,m,v,b,x,w,E=+O.apply(this,arguments),_=+P.apply(this,arguments),k=C.apply(this,arguments)-z1,T=L.apply(this,arguments)-z1,M=N1(T-k),S=k<T;if(j=j||(t=P1()),_<E&&(e=_,_=E,E=e),_>B1?M>V1-B1?(j.moveTo(_*L1(k),_*R1(k)),j.arc(0,0,_,k,T,!S),E>B1&&(j.moveTo(E*L1(T),E*R1(T)),j.arc(0,0,E,T,k,S))):(r=e=k,i=n=T,a=o=M,d=(c=I.apply(this,arguments)/2)>B1&&(N?+N.apply(this,arguments):D1(E*E+_*_)),w=x=s=j1(N1(_-E)/2,+A.apply(this,arguments)),d>B1&&(h=G1(d/E*R1(c)),d=G1(d/_*R1(c)),(o-=2*h)>B1?(r+=h*=S?1:-1,i-=h):(o=0,r=i=(k+T)/2),(a-=2*d)>B1?(e+=d*=S?1:-1,n-=d):(a=0,e=n=(k+T)/2)),c=_*L1(e),h=_*R1(e),d=E*L1(i),k=E*R1(i),s>B1&&(p=_*L1(n),f=_*R1(n),y=E*L1(r),g=E*R1(r),M<F1&&(T=function(t,e,n,r,i,o,a,s){var l=(s=s-o)*(n=n-t)-(a=a-i)*(r=r-e);if(!(l*l<B1))return[t+(l=(a*(e-o)-s*(t-i))/l)*n,e+l*r]}(c,h,y,g,p,f,d,k))&&(M=c-T[0],v=h-T[1],b=p-T[0],m=f-T[1],v=1/R1((1<(M=(M*b+v*m)/(D1(M*M+v*v)*D1(b*b+m*m)))?0:M<-1?F1:Math.acos(M))/2),b=D1(T[0]*T[0]+T[1]*T[1]),x=j1(s,(E-b)/(v-1)),w=j1(s,(_-b)/(1+v)))),a>B1?w>B1?(l=X1(y,g,c,h,_,w,S),u=X1(p,f,d,k,_,w,S),j.moveTo(l.cx+l.x01,l.cy+l.y01),w<s?j.arc(l.cx,l.cy,w,C1(l.y01,l.x01),C1(u.y01,u.x01),!S):(j.arc(l.cx,l.cy,w,C1(l.y01,l.x01),C1(l.y11,l.x11),!S),j.arc(0,0,_,C1(l.cy+l.y11,l.cx+l.x11),C1(u.cy+u.y11,u.cx+u.x11),!S),j.arc(u.cx,u.cy,w,C1(u.y11,u.x11),C1(u.y01,u.x01),!S))):(j.moveTo(c,h),j.arc(0,0,_,e,n,!S)):j.moveTo(c,h),E>B1&&o>B1?x>B1?(l=X1(d,k,p,f,E,-x,S),u=X1(c,h,y,g,E,-x,S),j.lineTo(l.cx+l.x01,l.cy+l.y01),x<s?j.arc(l.cx,l.cy,x,C1(l.y01,l.x01),C1(u.y01,u.x01),!S):(j.arc(l.cx,l.cy,x,C1(l.y01,l.x01),C1(l.y11,l.x11),!S),j.arc(0,0,E,C1(l.cy+l.y11,l.cx+l.x11),C1(u.cy+u.y11,u.cx+u.x11),S),j.arc(u.cx,u.cy,x,C1(u.y11,u.x11),C1(u.y01,u.x01),!S))):j.arc(0,0,E,i,r,S):j.lineTo(d,k)):j.moveTo(0,0),j.closePath(),t)return j=null,t+""||null}return e.centroid=function(){var t=(+O.apply(this,arguments)+ +P.apply(this,arguments))/2,e=(+C.apply(this,arguments)+ +L.apply(this,arguments))/2-F1/2;return[L1(e)*t,R1(e)*t]},e.innerRadius=function(t){return arguments.length?(O="function"==typeof t?t:A1(+t),e):O},e.outerRadius=function(t){return arguments.length?(P="function"==typeof t?t:A1(+t),e):P},e.cornerRadius=function(t){return arguments.length?(A="function"==typeof t?t:A1(+t),e):A},e.padRadius=function(t){return arguments.length?(N=null==t?null:"function"==typeof t?t:A1(+t),e):N},e.startAngle=function(t){return arguments.length?(C="function"==typeof t?t:A1(+t),e):C},e.endAngle=function(t){return arguments.length?(L="function"==typeof t?t:A1(+t),e):L},e.padAngle=function(t){return arguments.length?(I="function"==typeof t?t:A1(+t),e):I},e.context=function(t){return arguments.length?(j=null==t?null:t,e):j},e}function K1(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function $1(t){this._context=t}function J1(t){return new $1(t)}function Q1(t){return t[0]}function tb(t){return t[1]}function eb(a,s){var l=A1(!0),u=null,c=J1,h=null;function e(t){var e,n,r,i=(t=K1(t)).length,o=!1;for(null==u&&(h=c(r=P1())),e=0;e<=i;++e)!(e<i&&l(n=t[e],e,t))===o&&((o=!o)?h.lineStart():h.lineEnd()),o&&h.point(+a(n,e,t),+s(n,e,t));if(r)return h=null,r+""||null}return a="function"==typeof a?a:void 0===a?Q1:A1(a),s="function"==typeof s?s:void 0===s?tb:A1(s),e.x=function(t){return arguments.length?(a="function"==typeof t?t:A1(+t),e):a},e.y=function(t){return arguments.length?(s="function"==typeof t?t:A1(+t),e):s},e.defined=function(t){return arguments.length?(l="function"==typeof t?t:A1(!!t),e):l},e.curve=function(t){return arguments.length?(c=t,null!=u&&(h=c(u)),e):c},e.context=function(t){return arguments.length?(null==t?u=h=null:h=c(u=t),e):u},e}function nb(c,h,d){var p=null,f=A1(!0),y=null,g=J1,m=null;function e(t){var e,n,r,i,o,a=(t=K1(t)).length,s=!1,l=new Array(a),u=new Array(a);for(null==y&&(m=g(o=P1())),e=0;e<=a;++e){if(!(e<a&&f(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],u[r]);m.lineEnd(),m.areaEnd()}s&&(l[e]=+c(i,e,t),u[e]=+h(i,e,t),m.point(p?+p(i,e,t):l[e],d?+d(i,e,t):u[e]))}if(o)return m=null,o+""||null}function t(){return eb().defined(f).curve(g).context(y)}return c="function"==typeof c?c:void 0===c?Q1:A1(+c),h="function"==typeof h?h:A1(void 0===h?0:+h),d="function"==typeof d?d:void 0===d?tb:A1(+d),e.x=function(t){return arguments.length?(c="function"==typeof t?t:A1(+t),p=null,e):c},e.x0=function(t){return arguments.length?(c="function"==typeof t?t:A1(+t),e):c},e.x1=function(t){return arguments.length?(p=null==t?null:"function"==typeof t?t:A1(+t),e):p},e.y=function(t){return arguments.length?(h="function"==typeof t?t:A1(+t),d=null,e):h},e.y0=function(t){return arguments.length?(h="function"==typeof t?t:A1(+t),e):h},e.y1=function(t){return arguments.length?(d=null==t?null:"function"==typeof t?t:A1(+t),e):d},e.lineX0=e.lineY0=function(){return t().x(c).y(h)},e.lineY1=function(){return t().x(c).y(d)},e.lineX1=function(){return t().x(p).y(h)},e.defined=function(t){return arguments.length?(f="function"==typeof t?t:A1(!!t),e):f},e.curve=function(t){return arguments.length?(g=t,null!=y&&(m=g(y)),e):g},e.context=function(t){return arguments.length?(null==t?y=m=null:m=g(y=t),e):y},e}$1.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 rb=ob(J1);function ib(t){this._curve=t}function ob(e){function t(t){return new ib(e(t))}return t._curve=e,t}function ab(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(ob(t)):e()._curve},t}function sb(){}function lb(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 ub(t,e){this._context=t,this._k=(1-e)/6}function cb(t,e){this._context=t,this._k=(1-e)/6}function hb(t,e,n){var r,i,o=t._x1,a=t._y1,s=t._x2,l=t._y2;t._l01_a>B1&&(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),o=(o*r-t._x0*t._l12_2a+t._x2*t._l01_2a)/i,a=(a*r-t._y0*t._l12_2a+t._y2*t._l01_2a)/i),t._l23_a>B1&&(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(o,a,s,l,t._x2,t._y2)}function db(t,e){this._context=t,this._alpha=e}ib.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))}},ub.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:lb(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:lb(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 ub(t,n)}return t.tension=function(t){return e(+t)},t}(0),cb.prototype={areaStart:sb,areaEnd:sb,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:lb(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 cb(t,n)}return t.tension=function(t){return e(+t)},t}(0),db.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:hb(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 pb=function e(n){function t(t){return n?new db(t,n):new ub(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function fb(t,e){this._context=t,this._alpha=e}fb.prototype={areaStart:sb,areaEnd:sb,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:hb(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 yb=function e(n){function t(t){return n?new fb(t,n):new cb(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function gb(t){this._context=t}function mb(t){return new gb(t)}function vb(t,e){this._context=t,this._t=e}function bb(t){return new vb(t,.5)}function xb(t){return new vb(t,0)}function wb(t){return new vb(t,1)}function Eb(t){return t}function _b(t){return t.reduce((n,r)=>e=>Ot(this,void 0,void 0,function*(){var t=yield n(e);return r(t)}),Eb)}function kb(t=""){throw new Error(t)}function Tb(t,e){var n,r,e=e["attributes"];const i=new Set(["id","className"]);for([n,r]of Object.entries(e))i.has(n)||t.attr(n,r)}function Mb(t){return null!=t&&!Number.isNaN(t)}function Sb(t,e){return t+(e-t)*Math.random()}function Ob(t){return new Pb([t],null,t,t.ownerDocument)}gb.prototype={areaStart:sb,areaEnd:sb,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))}},vb.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 Pb{constructor(t=null,e=null,n=null,r=null,i=[null,null,null,null,null],o=[],a=[]){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=o,this._facetElements=a}selectAll(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new Pb(t,null,this._elements[0],this._document)}selectFacetAll(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new Pb(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 Pb([t],null,t,this._document)}append(t){const e=t=>{if(this._document)return this._document.createElement(t,{});const e=Pb.registry[t];return e?new e:kb("Unknown node type: "+t)},n="function"==typeof t?t:()=>e(t),r=[];if(null!==this._data){for(let t=0;t<this._data.length;t++){var i=this._data[t],[i,o]=Array.isArray(i)?i:[i,null];const s=n(i,t);s.__data__=i,null!==o&&(s.__fromElements__=o),this._parent.appendChild(s),r.push(s)}return new Pb(r,null,this._parent,this._document)}for(let t=0;t<this._elements.length;t++){const l=this._elements[t];var a=l.__data__,a=n(a,t);l.appendChild(a),r.push(a)}return new Pb(r,null,r[0],this._document)}data(e,n=t=>t,r=()=>null){const i=[],o=[],a=new Set(this._elements),s=[],l=new Set,u=new Map(this._elements.map((t,e)=>[n(t.__data__,e),t])),c=new Map(this._facetElements.map((t,e)=>[n(t.__data__,e),t])),h=tm(this._elements,t=>r(t.__data__));for(let t=0;t<e.length;t++){var d=e[t],p=n(d,t),f=r(d,t);if(u.has(p)){const y=u.get(p);y.__data__=d,y.__facet__=!1,o.push(y),a.delete(y),u.delete(p)}else if(c.has(p)){const g=c.get(p);g.__data__=d,g.__facet__=!0,o.push(g),c.delete(p)}else if(h.has(p)){const tm=h.get(p);s.push([d,tm]);for(const m of tm)a.delete(m);h.delete(p)}else if(u.has(f)){const v=u.get(f);v.__toData__?v.__toData__.push(d):v.__toData__=[d],l.add(v),a.delete(v)}else i.push(d)}var t=[new Pb([],i,this._parent,this._document),new Pb(o,null,this._parent,this._document),new Pb(a,null,this._parent,this._document),new Pb([],s,this._parent,this._document),new Pb(l,null,this._parent,this._document)];return new Pb(this._elements,null,this._parent,this._document,t)}merge(t){var e=[...this._elements,...t._elements],t=[...this._transitions,...t._transitions];return new Pb(e,null,this._parent,this._document,void 0,t)}join(t=t=>t,e=t=>t,n=t=>t.remove(),r=t=>t,i=t=>t.remove()){t=t(this._enter);const o=e(this._update);e=n(this._exit),n=r(this._merge),r=i(this._split);return o.merge(t).merge(e).merge(n).merge(r)}remove(){for(let t=0;t<this._elements.length;t++){const e=this._elements[t],n=this._transitions[t];n?n.then(()=>e.remove()):e.remove()}return new Pb([],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 Ab([t,e],[n,r]){return[t-n,e-r]}function Nb([t,e],[n,r]){return Math.sqrt(Math.pow(t-n,2)+Math.pow(e-r,2))}function Cb([t,e]){return Math.atan2(e,t)+Math.PI/2}function Lb(t){let e=1/0,n=-1/0,r=1/0,i=-1/0;for(var[o,a]of t)e=Math.min(o,e),n=Math.max(o,n),r=Math.min(a,r),i=Math.max(a,i);var t=n-e,s=i-r;return[e,r,t,s]}function Ib(t,e){for(var[n,r]of Object.entries(e))t.style(n,r)}function jb(n,t){return t.forEach((t,e)=>0===e?n.moveTo(t[0],t[1]):n.lineTo(t[0],t[1])),n.closePath(),n}function Rb(t,e,n){var n=Object.assign({size:8},n)["size"],n="string"==typeof n?+parseFloat(n)/100*Nb(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 Db(t,e,n,r,i){e=Cb(Ab(r,e))+Math.PI/2,n=Cb(Ab(r,n))+Math.PI/2;t.arc(r[0],r[1],i,e,n,n-e<0)}function Bb(t,n){const r=new Uv({domain:[n[0],n[n.length-1]],range:[0,100]});return`linear-gradient(${t.map((t,e)=>`${t} ${r.map(n[e])}%`).join(",")})`}function Fb(t,e,n){var[e,r,,i]=dm(t)?function(t){var[t,e,n,r]=t;return[r,t,e,n]}(e):e,[n,o]=n,t=t.getCenter(),a=Cb(Ab(e,t)),r=Cb(Ab(r,t)),n=r===a&&n!==o?r+2*Math.PI:r;return{startAngle:a,endAngle:0<=n-a?n:2*Math.PI+n,innerRadius:Nb(i,t),outerRadius:Nb(e,t)}}Pb.registry={g:tp,rect:dp,circle:Kd,path:ap,text:fp,ellipse:Jd,image:np,line:ip,polygon:lp,polyline:cp,html:gp};const zb=t=>{const l=t["colorAttribute"],u=I(t,["colorAttribute"]),c="stroke"===l?1:0;return(t,e,n,r)=>{var{radius:i=0}=u,r=r["defaultColor"],{color:r=r}=e;if(!pm(n)&&!fm(n))return Ob(new ap).style("lineWidth",c).style("d",jb(P1(),t).toString()).style("stroke",r).style(l,r).call(Ib,u).node();var{y:e,y1:o}=e,a=n.getCenter(),n=Fb(n,t,[e,o]);const s=Z1().cornerRadius(i);return Ob(new ap({})).style("path",s(n)).style("transform",`translate(${a[0]}, ${a[1]})`).style("stroke",r).style(l,r).call(Ib,u).node()}},Vb=(zb.props={defaultEnterAnimation:"scaleInY"},t=>zb(Object.assign({colorAttribute:"fill"},t))),Gb=(Vb.props=Object.assign({},zb.props),t=>zb(Object.assign({colorAttribute:"stroke"},t)));Gb.props=Object.assign({},zb.props);const Hb=t=>{const{adjustPoints:s=function(t,e,n){var[t,r,i,o]=t;if(dm(n)){const a=[(e?e[0]:r)[0],r[1]],s=[(e?e[3]:i)[0],i[1]];return[t,a,s,o]}const a=[r[0],(e?e[0]:r)[1]],s=[i[0],(e?e[3]:i)[1]];return[t,a,s,o]}}=t,l=I(t,["adjustPoints"]);return(t,e,n,r,i,...o)=>{var a=e["index"],a=i[a+1],t=s(t,a,n);return zb(Object.assign({colorAttribute:"fill"},l))(t,e,n,r,i,...o)}};function Wb(t,e,n){var[t,r,i,o]=t;if(dm(n)){const a=[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,a,s,o]}const a=[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,a,s,o]}Hb.props={defaultEnterAnimation:"fadeIn"};const Yb=t=>Hb(Object.assign({adjustPoints:Wb},t)),Ub=(Yb.props={defaultEnterAnimation:"fadeIn"},t=>{const{curve:l,gradient:u=!1}=t,c=I(t,["curve","gradient"]);return(t,e,n,r)=>{var{defaultColor:r,defaultSize:i}=r,{color:e=r,size:r=i,transform:i,seriesColor:o,seriesX:a}=e,n=pm(n)?[...t,t[0]]:t;const s=eb().x(t=>t[0]).y(t=>t[1]).curve(l);t=u&&o?Bb(o,a):e;return Ob(new ap({})).style("d",s(n)).style("stroke",t).style("lineWidth",r).style("transform",i).call(Ib,c).node()}}),qb=(Ub.props={defaultEnterAnimation:"fadeIn"},t=>Ub(Object.assign({curve:J1},t))),Xb=(qb.props=Object.assign({},Ub.props),t=>{var{alpha:e=.5}=t,t=I(t,["alpha"]);return Ub(Object.assign({curve:pb.alpha(e)},t))}),Zb=(Xb.props=Object.assign({},Ub.props),t=>Ub(Object.assign({curve:wb},t))),Kb=(Zb.props=Object.assign({},Ub.props),t=>Ub(Object.assign({curve:xb},t))),$b=(Kb.props=Object.assign({},Ub.props),t=>Ub(Object.assign({curve:bb},t)));function Jb(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"]]}$b.props=Object.assign({},Ub.props);var Qb=Object.freeze({__proto__:null,point:Jb,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){return[["M",t-n,e],["L",t,e-n],["L",t+n,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]]}});function tx(t,e,n,r){var i,n=n["size"];return"fixed"!==t&&("normal"===t||function(t){const e=t.getOptions()["transformations"];return e.some(([t])=>"fisheye"===t)}(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}const P=t=>{const{colorAttribute:s,symbol:e,mode:l="auto"}=t,u=I(t,["colorAttribute","symbol","mode"]),c="stroke"===s?1:0,h=Qb[e]||Jb;return(t,e,n,r)=>{var r=r["defaultColor"],{color:r=r,transform:i}=e,[o,a]=function(t){var[[t,e],[n,r]]=t;return[(t+n)/2,(e+r)/2]}(t),t=tx(l,t,e,n);return Ob(new ap).style("d",h(o,a,t)).style("lineWidth",c).style("stroke",r).style("transform",i).style(s,r).call(Ib,u).node()}},ex=(P.props={defaultEnterAnimation:"fadeIn"},t=>P(Object.assign({colorAttribute:"fill",symbol:"bowtie"},t))),nx=(ex.props=Object.assign({},P.props),t=>P(Object.assign({colorAttribute:"stroke",symbol:"cross"},t))),rx=(nx.props=Object.assign({},P.props),t=>P(Object.assign({colorAttribute:"fill",symbol:"diamond"},t))),ix=(rx.props=Object.assign({},P.props),t=>P(Object.assign({colorAttribute:"fill",symbol:"hexagon"},t))),ox=(ix.props=Object.assign({},P.props),t=>P(Object.assign({colorAttribute:"stroke",symbol:"bowtie"},t))),ax=(ox.props=Object.assign({},P.props),t=>P(Object.assign({colorAttribute:"stroke",symbol:"diamond"},t))),sx=(ax.props=Object.assign({},P.props),t=>P(Object.assign({colorAttribute:"stroke",symbol:"hexagon"},t))),lx=(sx.props=Object.assign({},P.props),t=>P(Object.assign({colorAttribute:"stroke",symbol:"point"},t))),ux=(lx.props=Object.assign({},P.props),t=>P(Object.assign({colorAttribute:"stroke",symbol:"square"},t))),cx=(ux.props=Object.assign({},P.props),t=>P(Object.assign({colorAttribute:"stroke",symbol:"triangle"},t))),hx=(cx.props=Object.assign({},P.props),t=>P(Object.assign({colorAttribute:"stroke",symbol:"triangle-down"},t))),dx=(hx.props=Object.assign({},P.props),t=>P(Object.assign({colorAttribute:"stroke",symbol:"hyphen"},t))),px=(dx.props=Object.assign({},P.props),t=>P(Object.assign({colorAttribute:"stroke",symbol:"line"},t))),fx=(px.props=Object.assign({},P.props),t=>P(Object.assign({colorAttribute:"stroke",symbol:"plus"},t))),yx=(fx.props=Object.assign({},P.props),t=>P(Object.assign({colorAttribute:"fill",symbol:"point"},t))),gx=(yx.props=Object.assign({},P.props),t=>P(Object.assign({colorAttribute:"fill",symbol:"square"},t))),mx=(gx.props=Object.assign({},P.props),t=>P(Object.assign({colorAttribute:"stroke",symbol:"tick"},t))),vx=(mx.props=Object.assign({},P.props),t=>P(Object.assign({colorAttribute:"fill",symbol:"triangle"},t))),bx=(vx.props=Object.assign({},P.props),t=>P(Object.assign({colorAttribute:"fill",symbol:"triangle-down"},t))),xx=(bx.props=Object.assign({},P.props),t=>{const l=t["arrow"],u=I(t,["arrow"]);return(t,e,n,r)=>{var r=r["defaultColor"],{color:e=r,transform:r}=e,[t,i]=t,[o,a]=Rb(t,i,l);const s=P1();return s.moveTo(...t),s.lineTo(...i),s.moveTo(...i),s.lineTo(...o),s.moveTo(...i),s.lineTo(...a),Ob(new ap).style("d",s.toString()).style("stroke",e).style("fill",e).style("transform",r).call(Ib,u).node()}}),wx=(xx.props={defaultEnterAnimation:"fadeIn"},t=>{const l=I(t,[]);return(t,e,n,r)=>{var r=r["defaultColor"],{color:e=r,text:r="",fontSize:i=14,rotate:o=0,transform:a=""}=e,[[t,s]]=t;return Ob(new fp).style("x",t).style("y",s).style("text",String(r)).style("stroke",e).style("fill",e).style("fontSize",i).style("transform",a+`rotate(${+o}deg)`).style("lineWidth",0).call(Ib,l).node()}});wx.props={defaultEnterAnimation:"fadeIn"};i(kx,Ex=Xd),kx.prototype.connectedCallback=function(){var t=this.style,e=t.x,t=t.y;this.setLocalPosition([e||0,t||0]),this.update(),this.bindEvents(this.attributes,this)},kx.prototype.update=function(t){this.attr(N({},this.attributes,t=void 0===t?{}:t)),null!=(t=this.render)&&t.call(this,this.attributes,this)},kx.prototype.clear=function(){this.removeChildren(!0)},kx.prototype.destroy=function(){this.removeAllEventListeners(),this.removeChildren(!0),this.remove()},kx.prototype.bindEvents=function(t,e){};var Ex,_x,o=kx;function kx(t){return Ex.call(this,t)||this}function Tx(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,Tx)}function Mx(){this.constructor=_x}_x=Tx,ie=Error,Mx.prototype=ie.prototype,_x.prototype=new Mx,Tx.buildMessage=function(t,e){var o={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],o[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 Sx,Qt=function(s,t){function R(){return j("Z")}function D(t,e){return j(t,e.map(function(t){return{x:t}}))}function B(t,e){return j(t,e.map(function(t){return{y:t}}))}function F(t,e,n){return{x1:t.x,y1:t.y,x2:e.x,y2:e.y,x:n.x,y:n.y}}function z(t,e){return{x2:t.x,y2:t.y,x:e.x,y:e.y}}function V(t,e){return{x1:t.x,y1:t.y,x:e.x,y:e.y}}function G(t,e,n,r,i,o){return{rx:t,ry:e,xAxisRotation:n,largeArc:r,sweep:i,x:o.x,y:o.y}}var l={},e={svg_path:Mt},n=Mt,H=function(t){if(!t)return[];for(var e=[],n=0;n<t.length;n++)e=e.concat.apply(e,t[n]);var r=e[0];return r&&"m"==r.code&&(delete r.relative,r.code="M"),e},a=function(t,e){var n=e;if(!n)return[t];for(var r=[t],i=0,o=n.length;i<o;i++)r[i+1]=n[i][1];return r},W=/^[Mm]/,Y=v(["M","m"],!1,!1),U=function(t,e,n){e=j(t,[e]);return e=n?e.concat(j("M"==t?"L":"l",n[1])):e},q=/^[Zz]/,X=v(["Z","z"],!1,!1),Z=/^[Ll]/,K=v(["L","l"],!1,!1),i=j,$=/^[Hh]/,J=v(["H","h"],!1,!1),Q=/^[Vv]/,tt=v(["V","v"],!1,!1),et=/^[Cc]/,nt=v(["C","c"],!1,!1),rt=/^[Ss]/,it=v(["S","s"],!1,!1),ot=/^[Qq]/,at=v(["Q","q"],!1,!1),st=/^[Tt]/,lt=v(["T","t"],!1,!1),ut=/^[Aa]/,ct=v(["A","a"],!1,!1),ht=function(t,e){return{x:t,y:e}},dt=function(t){return+t},pt=function(t){return+t.join("")},ft=/^[01]/,yt=v(["0","1"],!1,!1),gt=function(t){return"1"==t},o=function(){return""},mt=",",vt=m(",",!1),u=function(t){return t.join("")},c=".",h=m(".",!1),bt=/^[eE]/,xt=v(["e","E"],!1,!1),wt=/^[+\-]/,Et=v(["+","-"],!1,!1),r=/^[0-9]/,d=v([["0","9"]],!1,!1),_t=function(t){return t.join("")},kt=/^[ \t\n\r]/,Tt=v([" ","\t","\n","\r"],!1,!1),p=0,f=[{line:1,column:1}],y=0,g=[];if("startRule"in(t=void 0!==t?t:{})){if(!(t.startRule in e))throw new Error("Can't start parsing from rule \""+t.startRule+'".');n=e[t.startRule]}function m(t,e){return{type:"literal",text:t,ignoreCase:e}}function v(t,e,n){return{type:"class",parts:t,inverted:e,ignoreCase:n}}function b(t){var e,n=f[t];if(n)return n;for(e=t-1;!f[e];)e--;for(n={line:(n=f[e]).line,column:n.column};e<t;)10===s.charCodeAt(e)?(n.line++,n.column=1):n.column++,e++;return f[t]=n}function x(t,e){var n=b(t),r=b(e);return{start:{offset:t,line:n.line,column:n.column},end:{offset:e,line:r.line,column:r.column}}}function w(t){p<y||(y<p&&(y=p,g=[]),g.push(t))}function Mt(){for(var t,e,n=p,r=[],i=C();i!==l;)r.push(i),i=C();if(r!==l)if((i=(i=function(){var t,e,n,r,i,o;if(t=p,(e=E())!==l){for(n=[],r=p,i=[],o=C();o!==l;)i.push(o),o=C();for(r=i!==l&&(o=E())!==l?i=[i,o]:(p=r,l);r!==l;){for(n.push(r),r=p,i=[],o=C();o!==l;)i.push(o),o=C();r=i!==l&&(o=E())!==l?i=[i,o]:(p=r,l)}t=n!==l?e=a(e,n):(p=t,l)}else p=t,t=l;return t}())===l?null:i)!==l){for(t=[],e=C();e!==l;)t.push(e),e=C();n=t!==l?r=H(i):(p=n,l)}else p=n,n=l;else p=n,n=l;return n}function E(){var t,e,n,r,i=p,o=function(){var t,e,n,r,i,o,a;t=p,W.test(s.charAt(p))?(e=s.charAt(p),p++):(e=l,w(Y));if(e!==l){for(n=[],r=C();r!==l;)n.push(r),r=C();t=n!==l&&((r=S())!==l&&(i=p,o=P(),(i=(i=(o=o===l?null:o)!==l&&(a=Ot())!==l?o=[o,a]:(p=i,l))===l?null:i)!==l))?e=U(e,r,i):(p=t,l)}else p=t,t=l;return t}();if(o!==l){for(t=[],e=p,n=[],r=C();r!==l;)n.push(r),r=C();for(e=n!==l&&(r=St())!==l?n=[n,r]:(p=e,l);e!==l;){for(t.push(e),e=p,n=[],r=C();r!==l;)n.push(r),r=C();e=n!==l&&(r=St())!==l?n=[n,r]:(p=e,l)}i=t!==l?a(o,t):(p=i,l)}else p=i,i=l;return i}function St(){var t=function(){var t;q.test(s.charAt(p))?(t=s.charAt(p),p++):(t=l,w(X));t!==l&&(t=R());return t}();return t=t===l&&(t=function(){var t,e,n,r;t=p,Z.test(s.charAt(p))?(e=s.charAt(p),p++):(e=l,w(K));if(e!==l){for(n=[],r=C();r!==l;)n.push(r),r=C();t=n!==l&&(r=Ot())!==l?e=i(e,r):(p=t,l)}else p=t,t=l;return t}())===l&&(t=function(){var t,e,n,r;t=p,$.test(s.charAt(p))?(e=s.charAt(p),p++):(e=l,w(J));if(e!==l){for(n=[],r=C();r!==l;)n.push(r),r=C();t=n!==l&&(r=Pt())!==l?e=D(e,r):(p=t,l)}else p=t,t=l;return t}())===l&&(t=function(){var t,e,n,r;t=p,Q.test(s.charAt(p))?(e=s.charAt(p),p++):(e=l,w(tt));if(e!==l){for(n=[],r=C();r!==l;)n.push(r),r=C();t=n!==l&&(r=Pt())!==l?e=B(e,r):(p=t,l)}else p=t,t=l;return t}())===l&&(t=function(){var t,e,n,r;t=p,et.test(s.charAt(p))?(e=s.charAt(p),p++):(e=l,w(nt));if(e!==l){for(n=[],r=C();r!==l;)n.push(r),r=C();t=n!==l&&(r=function(){var t,e,n,r,i,o;if(t=p,(e=_())!==l){for(n=[],r=p,i=P(),r=(i=i===l?null:i)!==l&&(o=_())!==l?i=[i,o]:(p=r,l);r!==l;)n.push(r),r=p,i=P(),r=(i=i===l?null:i)!==l&&(o=_())!==l?i=[i,o]:(p=r,l);t=n!==l?e=a(e,n):(p=t,l)}else p=t,t=l;return t}())!==l?e=i(e,r):(p=t,l)}else p=t,t=l;return t}())===l&&(t=function(){var t,e,n,r;t=p,rt.test(s.charAt(p))?(e=s.charAt(p),p++):(e=l,w(it));if(e!==l){for(n=[],r=C();r!==l;)n.push(r),r=C();t=n!==l&&(r=function(){var t,e,n,r,i,o;if(t=p,(e=k())!==l){for(n=[],r=p,i=P(),r=(i=i===l?null:i)!==l&&(o=k())!==l?i=[i,o]:(p=r,l);r!==l;)n.push(r),r=p,i=P(),r=(i=i===l?null:i)!==l&&(o=k())!==l?i=[i,o]:(p=r,l);t=n!==l?e=a(e,n):(p=t,l)}else p=t,t=l;return t}())!==l?e=i(e,r):(p=t,l)}else p=t,t=l;return t}())===l&&(t=function(){var t,e,n,r;t=p,ot.test(s.charAt(p))?(e=s.charAt(p),p++):(e=l,w(at));if(e!==l){for(n=[],r=C();r!==l;)n.push(r),r=C();t=n!==l&&(r=function(){var t,e,n,r,i,o;if(t=p,(e=T())!==l){for(n=[],r=p,i=P(),r=(i=i===l?null:i)!==l&&(o=T())!==l?i=[i,o]:(p=r,l);r!==l;)n.push(r),r=p,i=P(),r=(i=i===l?null:i)!==l&&(o=T())!==l?i=[i,o]:(p=r,l);t=n!==l?e=a(e,n):(p=t,l)}else p=t,t=l;return t}())!==l?e=i(e,r):(p=t,l)}else p=t,t=l;return t}())===l&&(t=function(){var t,e,n,r;t=p,st.test(s.charAt(p))?(e=s.charAt(p),p++):(e=l,w(lt));if(e!==l){for(n=[],r=C();r!==l;)n.push(r),r=C();t=n!==l&&(r=function(){var t,e,n,r,i,o;if(t=p,(e=S())!==l){for(n=[],r=p,i=P(),r=(i=i===l?null:i)!==l&&(o=S())!==l?i=[i,o]:(p=r,l);r!==l;)n.push(r),r=p,i=P(),r=(i=i===l?null:i)!==l&&(o=S())!==l?i=[i,o]:(p=r,l);t=n!==l?e=a(e,n):(p=t,l)}else p=t,t=l;return t}())!==l?e=i(e,r):(p=t,l)}else p=t,t=l;return t}())===l?function(){var t,e,n,r;t=p,ut.test(s.charAt(p))?(e=s.charAt(p),p++):(e=l,w(ct));if(e!==l){for(n=[],r=C();r!==l;)n.push(r),r=C();t=n!==l&&(r=function(){var t,e,n,r,i,o;if(t=p,(e=M())!==l){for(n=[],r=p,i=P(),r=(i=i===l?null:i)!==l&&(o=M())!==l?i=[i,o]:(p=r,l);r!==l;)n.push(r),r=p,i=P(),r=(i=i===l?null:i)!==l&&(o=M())!==l?i=[i,o]:(p=r,l);t=n!==l?e=a(e,n):(p=t,l)}else p=t,t=l;return t}())!==l?e=i(e,r):(p=t,l)}else p=t,t=l;return t}():t}function Ot(){var t,e,n,r,i=p,o=S();if(o!==l){for(t=[],e=p,e=(n=(n=P())===l?null:n)!==l&&(r=S())!==l?n=[n,r]:(p=e,l);e!==l;)t.push(e),e=p,e=(n=(n=P())===l?null:n)!==l&&(r=S())!==l?n=[n,r]:(p=e,l);i=t!==l?a(o,t):(p=i,l)}else p=i,i=l;return i}function Pt(){var t,e,n,r,i=p,o=O();if(o!==l){for(t=[],e=p,e=(n=(n=P())===l?null:n)!==l&&(r=O())!==l?n=[n,r]:(p=e,l);e!==l;)t.push(e),e=p,e=(n=(n=P())===l?null:n)!==l&&(r=O())!==l?n=[n,r]:(p=e,l);i=t!==l?a(o,t):(p=i,l)}else p=i,i=l;return i}function _(){var t,e,n=p,r=S();return n=r!==l&&(t=(t=P())===l?null:t)!==l&&(t=S())!==l&&(e=(e=P())===l?null:e)!==l&&(e=S())!==l?F(r,t,e):(p=n,l)}function k(){var t,e=p,n=S();return e=n!==l&&(t=(t=P())===l?null:t)!==l&&(t=S())!==l?z(n,t):(p=e,l)}function T(){var t,e=p,n=S();return e=n!==l&&(t=(t=P())===l?null:t)!==l&&(t=S())!==l?V(n,t):(p=e,l)}function M(){var t,e,n,r,i,o=p,a=At();return o=a!==l&&(t=(t=P())===l?null:t)!==l&&(t=At())!==l&&(e=(e=P())===l?null:e)!==l&&(e=O())!==l&&P()!==l&&(n=Nt())!==l&&(r=(r=P())===l?null:r)!==l&&(r=Nt())!==l&&(i=(i=P())===l?null:i)!==l&&(i=S())!==l?G(a,t,e,n,r,i):(p=o,l)}function S(){var t,e=p,n=O();return e=n!==l&&(t=(t=P())===l?null:t)!==l&&(t=O())!==l?ht(n,t):(p=e,l)}function At(){var t=Lt();return t=(t=t===l?N():t)!==l?dt(t):t}function O(){var t,e=p,n=A();return(e=(n=n===l?null:n)!==l&&(t=Lt())!==l?n=[n,t]:(p=e,l))===l&&(e=p,e=(n=(n=A())===l?null:n)!==l&&(t=N())!==l?n=[n,t]:(p=e,l)),e=e!==l?pt(e):e}function Nt(){var t;return ft.test(s.charAt(p))?(t=s.charAt(p),p++):(t=l,w(yt)),t=t!==l?gt(t):t}function P(){var t,e,n=p,r=[],i=C();if(i!==l)for(;i!==l;)r.push(i),i=C();else r=l;if(r!==l)if((i=(i=Ct())===l?null:i)!==l){for(t=[],e=C();e!==l;)t.push(e),e=C();n=t!==l?r=[r,i,t]:(p=n,l)}else p=n,n=l;else p=n,n=l;if(n===l){if(r=n=p,(i=Ct())!==l){for(t=[],e=C();e!==l;)t.push(e),e=C();r=t!==l?i=[i,t]:(p=r,l)}else p=r,r=l;n=r=r!==l?o():r}return n}function Ct(){var t;return 44===s.charCodeAt(p)?(t=mt,p++):(t=l,w(vt)),t}function Lt(){var t,e=p,n=function(){var t,e,n,r;t=p,(e=N())===l&&(e=null);t=e!==l&&(46===s.charCodeAt(p)?(n=c,p++):(n=l,w(h)),n!==l&&(r=N())!==l)?e=[e,n,r]:(p=t,l);t===l&&(t=p,e=N(),t=e!==l&&(46===s.charCodeAt(p)?(n=c,p++):(n=l,w(h)),n!==l)?e=[e,n]:(p=t,l));t!==l&&(t=u(t));return t}();return(e=n!==l&&(t=(t=It())===l?null:t)!==l?n=[n,t]:(p=e,l))===l&&(e=p,e=(n=N())!==l&&(t=It())!==l?n=[n,t]:(p=e,l)),e=e!==l?u(e):e}function It(){var t,e,n,r=p;return bt.test(s.charAt(p))?(t=s.charAt(p),p++):(t=l,w(xt)),r=(r=t!==l&&(e=(e=A())===l?null:e)!==l&&(n=N())!==l?t=[t,e,n]:(p=r,l))!==l?u(r):r}function A(){var t;return wt.test(s.charAt(p))?(t=s.charAt(p),p++):(t=l,w(Et)),t}function N(){var t,e=[];if(r.test(s.charAt(p))?(t=s.charAt(p),p++):(t=l,w(d)),t!==l)for(;t!==l;)e.push(t),r.test(s.charAt(p))?(t=s.charAt(p),p++):(t=l,w(d));else e=l;return e=e!==l?_t(e):e}function C(){var t;return kt.test(s.charAt(p))?(t=s.charAt(p),p++):(t=l,w(Tt)),t=t!==l?o():t}var L,I={m:"moveto",l:"lineto",h:"horizontal lineto",v:"vertical lineto",c:"curveto",s:"smooth curveto",q:"quadratic curveto",t:"smooth quadratic curveto",a:"elliptical arc",z:"closepath"};for(L in I)I[L.toUpperCase()]=I[L];function j(t,e){for(var n=(e=e||[{}]).length;n--;){var r,i={code:t,command:I[t]};for(r in t==t.toLowerCase()&&(i.relative=!0),e[n])i[r]=e[n][r];e[n]=i}return e}if((e=n())!==l&&p===s.length)return e;throw e!==l&&p<s.length&&w({type:"end"}),t=g,n=y<s.length?s.charAt(y):null,e=y<s.length?x(y,y+1):x(y,y),new Tx(Tx.buildMessage(t,n),t,n,e)};(Qt.parseSVG=Qt).makeAbsolute=function(t){var n,r={x:0,y:0},i={x:"x0",y:"y0",x1:"x0",y1:"y0",x2:"x0",y2:"y0"};return t.forEach(function(t){for(var e in"moveto"===t.command&&(n=t),t.x0=r.x,t.y0=r.y,i)e in t&&(t[e]+=t.relative?t[i[e]]:0);"x"in t||(t.x=r.x),"y"in t||(t.y=r.y),t.relative=!1,t.code=t.code.toUpperCase(),"closepath"==t.command&&(t.x=n.x,t.y=n.y),r=t}),t};function Ox(t,e,n,r){var i,o,a=Px(r=void 0===r?"...":r,n),s=Z(t)?t:ot(t),l=e,u=[];if(Px(t,n)<=e)return t;for(;;){if(i=s.substr(0,16),l<(o=Px(i,n))+a)break;if(u.push(i),l-=o,!(s=s.substr(16)))return u.join("")}for(;;){if(i=s.substr(0,1),l<(o=Px(i,n))+a)break;if(u.push(i),l-=o,!(s=s.substr(1)))return u.join("")}return"".concat(u.join("")).concat(r)}var Px=dt(function(t,e){var n=(e=void 0===e?{}:e).fontSize,r=e.fontFamily,i=e.fontWeight,o=e.fontStyle,e=e.fontVariant;return(Sx=Sx||document.createElement("canvas").getContext("2d")).font=[o,e,i,"".concat(n,"px"),r].join(" "),Sx.measureText(Z(t)?t:"").width},function(t,e){return Pt([t],D(it(e=void 0===e?{}:e)),!1).join("")});function Ax(t,e){return"string"==typeof t?Px(t,e):t}var Nx=function(t){var e=t.style.fontFamily||"sans-serif",n=t.style.fontWeight||"normal",r=t.style.fontStyle||"normal",i=t.style.fontVariant,t=t.style.fontSize;return{fontSize:t="object"==typeof t?t.value:t,fontFamily:e,fontWeight:n,fontStyle:r,fontVariant:i}};function Cx(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 Lx(t,e){e=Math.pow(10,e);return~~(t*e)/e}function Ix(t){return t.toLocaleString()}function jx(t,e){return void 0===e&&(e=0),Math.abs(t)<1e3?String(t):"".concat(Lx(t/1e3,e).toLocaleString(),"K")}var Rx=function(t,e,n){return t<0&&Number.isFinite(t)?e:n},Dx=function(t,e,n){return 0<t&&Number.isFinite(t)?e:n},Bx=function(t,e){return t*e},Fx=Math.PI/180;function zx(t){if(Q(t))return[t,t,t,t];if(G(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 Vx=["default","active","selected","disabled","inactive"],Gx={fontSize:"16px",fontFamily:"sans-serif",fontWeight:"normal",fontVariant:"normal",fontStyle:"normal",textAlign:"start",textBaseline:"alphabetic"};function Hx(t){var e;return t?null==t?void 0:t.default:(e=pt(t)||{},Vx.forEach(function(t){t in e&&delete e[t]}),e)}function Wx(t,e,n){return void 0===n&&(n=!1),e?(e=yt(t,e),n?N({},Hx(t),e):e):Hx(t)||{}}function Yx(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]}qx.prototype.selectAll=function(t){return new qx("string"==typeof t?this.__parent__.querySelectorAll(t):t,null,this.__elements__[0],this.__document__)},qx.prototype.select=function(t){t="string"==typeof t?this.__parent__.querySelectorAll(t)[0]||null:t;return new qx([t],null,t,this.__document__)},qx.prototype.append=function(n){var r=this,t="function"==typeof n?n:function(){return t=n,r.__document__?r.__document__.createElement(t,{}):(e=qx.registry[t])?new e:new Error("Unknown node type: ".concat(t));var t,e},e=[];if(null!==this.__data__){for(var i=0;i<this.__data__.length;i++)(s=t(o=this.__data__[i],i)).__data__=o,this.__parent__.appendChild(s),e.push(s);return new qx(e,null,this.__parent__,this.__document__)}for(i=0;i<this.__elements__.length;i++){var o,a=this.__elements__[i],s=t(o=a.__data__,i);a.appendChild(s),e.push(s)}return new qx(e,null,e[0],this.__document__)},qx.prototype.data=function(t,n){void 0===n&&(n=function(t){return t});for(var e=[],r=[],i=new Map(this.__elements__.map(function(t,e){return[n(t.__data__,e),t]})),o=0;o<t.length;o++){var a,s=t[o],l=n(s,o);i.has(l)?((a=i.get(l)).__data__=s,r.push(a),i.delete(l)):e.push(s)}var u=Array.from(i.values()),u=[new qx([],e,this.__parent__,this.__document__),new qx(r,null,this.__parent__,this.__document__),new qx(u,null,this.__parent__,this.__document__)];return new qx(this.__elements__,null,this.__parent__,this.__document__,u)},qx.prototype.merge=function(t){return new qx(Pt(Pt([],D(this.__elements__),!1),D(t.__elements__),!1),null,this.__parent__,this.__document__)},qx.prototype.join=function(t,e,n){void 0===e&&(e=function(t){return t}),void 0===n&&(n=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__);return e.merge(t).merge(n)},qx.prototype.remove=function(){var n=Pt([],D(this.__elements__),!1);return this.__elements__.forEach(function(t){var e;t.parentNode&&(t.parentNode.removeChild(t),e=n.indexOf(t),n.splice(e,1),null!=(e=t.parentNode)&&e.removeChild(t),t.remove())}),new qx(n,null,this.__parent__,this.__document__)},qx.prototype.each=function(t){for(var e=0;e<this.__elements__.length;e++){var n,r=this.__elements__[e];r&&(n=r.__data__,t.call(r,n,e))}return this},qx.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))}),this},qx.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))}),this},qx.prototype.on=function(t,e){return this.each(function(){this.addEventListener(t,e)}),this},qx.prototype.call=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t.call.apply(t,Pt([this.__parent__,this],D(e),!1)),this},qx.prototype.node=function(){return this.__elements__[0]},qx.prototype.nodes=function(){return this.__elements__},qx.registry={g:tp,rect:dp,circle:Kd,path:ap,text:fp,ellipse:Jd,image:np,line:ip,polygon:lp,polyline:cp,html:gp};var Ux=qx;function qx(t,e,n,r,i){void 0===e&&(e=null),void 0===n&&(n=null),void 0===r&&(r=null),void 0===i&&(i=[null,null,null]),this.__elements__=t=void 0===t?null:t,this.__data__=e,this.__parent__=n,this.__document__=r,this.__enter__=i[0],this.__update__=i[1],this.__exit__=i[2]}function A(t){return new Ux([t],null,t,t.ownerDocument)}function C(t,e){var n,r;if(e)try{for(var i=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.")}(Object.entries(e)),o=i.next();!o.done;o=i.next()){var a=D(o.value,2),s=a[0],l=a[1];t.style(s,l)}}catch(t){n={error:t}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}function B(t,e,n){return t.querySelector(e)?A(t).select(e):A(t).append(n)}function Xx(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 Zx(t){var t=t.getLocalBounds(),t=D([t.min,t.max],2),e=D(t[0],2),n=e[0],e=e[1],t=D(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 Kx(t){var e,n;return"string"==typeof t?(e=t,(n=document.createElement("div")).innerHTML=e,n.firstChild):t}var $x=["year","month","day","hour","minute","second"],Jx=["YYYY","MM","DD","hh","mm","ss"];function Qx(t){return t instanceof Date?t:new Date(t)}function tw(t){for(var e,t=D(t,2),n=t[0],t=t[1],n=$x.indexOf(n),r=$x.indexOf(t),i="",o=n;o<=r;o+=1)i+=Jx[o],o<r&&(e="-",2===o?e=" ":2<o&&(e=":"),i+=e);return i}function ew(t,e){var n={YYYY:t.getFullYear(),MM:t.getMonth()+1,DD:t.getDate(),hh:t.getHours(),mm:t.getMinutes(),ss:t.getSeconds()},r=e;return Object.keys(n).forEach(function(t){var e=n[t];r=r.replace(t,"YYYY"===t?"".concat(e):"0".concat(e).slice(-2))}),r}function nw(t,e){t=new Date(t);return{year:function(t){t.setMonth(0),t.setHours(0,0,0,0)},month:function(t){t.setDate(1),t.setHours(0,0,0,0)},day:function(t){return t.setHours(0,0,0,0)},hour:function(t){return t.setMinutes(0,0,0)},minute:function(t){return t.setSeconds(0,0)},second:function(t){return t.setMilliseconds(0)}}[e](t),ew(t,tw(["year",e]))}function rw(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)iw(t,e[r]);return t}var iw=function(r,i,o,a){void 0===o&&(o=0),void 0===a&&(a=5),Object.entries(i).forEach(function(t){var t=D(t,2),e=t[0],t=t[1],n=r;Object.prototype.hasOwnProperty.call(i,e)&&(t?X(t)?(X(r[e])||(n[e]={}),o<a?iw(r[e],t,o+1,a):n[e]=i[e]):G(t)?(n[e]=[],n[e]=n[e].concat(t)):n[e]=t:n[e]=t)})};function ow(t,e,n,r,i,o){return(t===e||Math.min(t,e)<=i&&i<=Math.max(t,e))&&(n===r||Math.min(n,r)<=o&&o<=Math.max(n,r))}function aw(t,e,n){var r=t;(!t.length||e<t[0]||e===t[0]&&n<t[1])&&(r[0]=e,r[1]=n)}function sw(t,e){var t=D(t,2),n=t[0],t=t[1],e=D(e,2),r=e[0],e=e[1];return Math.pow(Math.pow(n-r,2)+Math.pow(t-e,2),.5)}function lw(o){return void 0===o&&(o=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},o))})}}var uw=function(t){return void 0!==t&&null!=t&&!Number.isNaN(t)};function cw(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"]]}It=cw;function hw(t,e,n){return[["M",t,e+n],["L",t,e-n]]}function dw(t,e,n){return[["M",t-n,e],["L",t+n,e]]}s=dw;function pw(t){n="default",H(e=t)&&e instanceof Image?n="image":z(e)?n="symbol":Z(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}i(gw,fw=o),gw.prototype.render=function(t,e){t.x,t.y;var r=t.symbol,n=t.size,i=void 0===n?16:n,o=I(t,["x","y","symbol","size"]),a=pw(r);a?B(e,".".concat(a,"-marker"),a).attr("className","marker ".concat(a,"-marker")).call(function(t){var e,n;"image"===a?(e=2*i,t.style("img",r).style("width",e).style("height",e).style("x",-i).style("y",-i)):(e=i/2,n=z(r)?r:gw.getSymbol(r),t.style("path",null==n?void 0:n(0,0,e)).call(C,o))}):(null!=(n=this.querySelector(".marker"))&&n.remove(),this.removeChildren())},gw.MARKER_SYMBOL_MAP=new Map,gw.registerSymbol=function(t,e){gw.MARKER_SYMBOL_MAP.set(t,e)},gw.getSymbol=function(t){return gw.MARKER_SYMBOL_MAP.get(t)};var fw,yw=gw;function gw(){return null!==fw&&fw.apply(this,arguments)||this}yw.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]]}),yw.registerSymbol("hyphen",function(t,e,n){return[["M",t-n,e],["L",t+n,e]]}),yw.registerSymbol("line",hw),yw.registerSymbol("plus",function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]}),yw.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]]}),yw.registerSymbol("circle",cw),yw.registerSymbol("point",It),yw.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"]]}),yw.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"]]}),yw.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"]]}),yw.registerSymbol("diamond",function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]}),yw.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"]]}),yw.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"]]}),yw.registerSymbol("line",hw),yw.registerSymbol("dot",dw),yw.registerSymbol("dash",s),yw.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]]}),yw.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]]}),yw.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]]}),yw.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]]}),yw.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]]});i(bw,mw=o),bw.prototype.render=function(t,e){var n,r,i=t.padding,o=t.marker,a=t.text,s=t.textStyle,l=t.radius,u=t.backgroundStyle,c=t.spacing,h=t.align,t=t.verticalAlign,i=D(zx(i),4),d=i[0],p=i[1],f=i[2],i=i[3],y=B(e,".tag-content","g").attr("className","tag-content").node(),g=B(y,".tag-marker",function(){return new yw({})}).attr("className","tag-marker").call(function(t){t.node().clear(),t.node().update(o||{symbol:"triangle",size:0,x:0})}).node(),c=(c=c,{x:(m=(g=g).getLocalBounds()).halfExtents[0]?m.max[0]+(c||0):g.style.x,y:m.halfExtents[1]?(m.min[1]+m.max[1])/2:g.style.y}),m=c.x,g=c.y,g=(B(y,".tag-text","text").attr("className","tag-text").style("fontFamily","sans-serif").style("fontSize",12).style("x",m).style("y",g).style("text",S(a)?"":"".concat(a)).call(C,s).style("textBaseline","middle").call(function(t){a||t.remove()}),c=i,m=d,g=h||"start",s=t||"top",t=(h=y).getLocalBounds(),r=n=0,"start"===g&&(n=c),"center"===g&&(n=-t.halfExtents[0]),"end"===g&&(n=-c-2*t.halfExtents[0]),"top"===s&&(r=m+t.halfExtents[1]),"middle"===s&&(r=0),"bottom"===s&&(r=m-2*t.halfExtents[1]),h.setLocalPosition([n,r]),y.getLocalBounds());B(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]-d).style("width",null!==u?i+p+2*g.halfExtents[0]:0).style("height",null!==u?d+f+2*g.halfExtents[1]:0).style("radius",null!=l?l:2).style("fill","#fafafa").style("stroke","#d9d9d9").style("lineWidth",1).call(C,u)},bw.defaultOptions={type:bw.tag="tag",style:{padding:4,spacing:4}};var mw,vw=bw;function bw(t){return mw.call(this,N({},bw.defaultOptions,t))||this}var xw,ww,Ew={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}}},_w={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"}}}},kw={strict:{textStyle:{fill:"#b8b8b8"},buttonStyle:{},markerStyle:{}},textStyle:{},buttonStyle:{stroke:"#d9d9d9",fill:"#f5f5f5"},markerStyle:{stroke:"#d9d9d9"}},Tw=(i(Mw,xw=o),Object.defineProperty(Mw.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(Mw.prototype,"text",{get:function(){var t,e=this.attributes.text;return""===e?e:(t=this.textAvailableWidth,Ox(e,t))},enumerable:!1,configurable:!0}),Object.defineProperty(Mw.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=st(i)?this.getStyle("buttonStyle").width:i,e?r-2*n-t-this.markerSize:r-2*n):1/0},enumerable:!1,configurable:!0}),Object.defineProperty(Mw.prototype,"buttonHeight",{get:function(){var t=this.attributes.height;return t||this.getStyle("buttonStyle").height},enumerable:!1,configurable:!0}),Mw.prototype.getStyle=function(e){var t=this.attributes,n=t.size,t=t.type,r=this.state,i=N({},yt(Ew,[n,e]),Wx(yt(_w,[t,e]),r),Wx(yt(this.attributes,e),r,!0));return"disabled"===r&&(Object.keys(i).forEach(function(t){t in kw[e]&&(i[t]=yt(kw,[e,t]))}),Object.keys(kw.strict[e]).forEach(function(t){i[t]=yt(kw,["strict",e,t])}),N(i,Wx(yt(this.attributes,e),"disabled"))),i},Mw.prototype.render=function(t,e){var n=t.padding,r=t.marker,t=t.markerSpacing,t=void 0===t?0:t,n=(e.attr("cursor","disabled"===this.state?"not-allowed":"pointer"),D(zx(n),4)),i=(n[0],n[1]),o=(n[2],n[3]),a=this.buttonHeight,s=this.getStyle("markerStyle"),l=this.markerSize,n=B(e,".marker",function(){return new yw({className:"marker",style:{symbol:"circle"}})}).call(function(t){t.node().update(T(T({},s),{symbol:r,x:o+l/2,y:a/2,size:l}))}).node().getLocalBounds(),u=this.text,u=void 0===u?"":u,c=this.getStyle("textStyle"),n=(this.textShape=B(e,".text","text").attr("className","text").style("x",l?n.max[0]+t:o).style("y",a/2).style("text",u).style("textAlign","left").style("textBaseline","middle").call(C,c).node(),this.textShape.getLocalBounds()),u=this.getStyle("buttonStyle");B(e,".background","rect").attr("className","background").style("zIndex",-1).call(C,u).style("height",a).style("width",o+(l?l+t:0)+2*n.halfExtents[0]+i).node()},Mw.prototype.update=function(t){this.attr(N({},this.attributes,t=void 0===t?{}:t));t=this.attributes.state;this.state=void 0===t?"default":t,this.render(this.attributes,this)},Mw.prototype.setState=function(t){this.update({state:t})},Mw.prototype.hide=function(){this.style.visibility="hidden"},Mw.prototype.show=function(){this.style.visibility="visible"},Mw.prototype.bindEvents=function(){this.addEventListener("click",this.clickEvents),this.addEventListener("mouseenter",this.mouseenterEvent),this.addEventListener("mouseleave",this.mouseleaveEvent)},Mw.defaultOptions={type:Mw.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:{}}}},Mw);function Mw(t){var n=xw.call(this,rw({},Mw.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 Sw(t){return ww.call(this,N({},Sw.defaultOptions,t))||this}i(Sw,ww=o),Sw.prototype.render=function(t,e){for(var n=t.x,r=t.y,s=t.items,l=t.textStyle,i=t.padding,u=t.width,c=t.separator,t=D(zx(i),3),i=t[0],h=t[1],t=t[2],d=B(e,".container","g").attr("className","container").style("x",n+t).style("y",r+i),p=0,f=0,y=(d.node().removeChildren(!0),this),o=0;o<s.length;o++)!function(t){var e,n=s[t],r=new vw({className:"breadcrumb-item",style:T(T({x:p,y:f,text:V(n.text)?n.id:n.text,textStyle:l},gt(n,["marker"])),{padding:0,backgroundStyle:null})}),i=(d.append(function(){return r}),r.getLocalBounds()),o=2*i.halfExtents[0],i=2*i.halfExtents[1],o=(p+=o,V(u)||u-h<p&&(r.attr({x:0,y:f+i}),p=o,f+=i),y.bindInnerEvents(r,n),c||{}),n=o.spacing,n=void 0===n?0:n,a=o.text,a=void 0===a?"/":a,o=o.style;t!==s.length-1&&(e=new fp({className:"".concat(Sw.tag,"-separator"),id:"".concat(Sw.tag,"-separator-").concat(t),style:T(T(T(T({},Gx),{x:p+n,y:f+i/2}),o),{text:a,textAlign:"end",textBaseline:"middle"})}),d.append(function(){return e}),t=e.getLocalBounds(),p+=2*t.halfExtents[0]+n)}(o)},Sw.prototype.update=function(t){this.attr(N({},this.attributes,t)),this.render(this.attributes,this)},Sw.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)})},Sw.defaultOptions={type:Sw.tag="breadcrumb",style:{separator:{text:"/",style:{fontSize:14,fill:"rgba(0, 0, 0, 0.45)"},spacing:8},textStyle:{default:T(T({},Gx),{fontSize:14,fill:"rgba(0, 0, 0, 0.45)"}),active:{fill:"#5468ff",cursor:"pointer"}},padding:[8,8,8,8]}};i(Aw,Ow=O),Aw.prototype.render=function(){var t=this.attributes,e=t.lines,t=t.areas;e&&this.createLines(e),t&&this.createAreas(t)},Aw.prototype.clear=function(){this.linesGroup.removeChildren(!0),this.areasGroup.removeChildren(!0)},Aw.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()},Aw.prototype.createLines=function(t){var e=this;t.forEach(function(t){e.linesGroup.appendChild(new ap({name:"line",style:t}))})},Aw.prototype.createAreas=function(t){var e=this;t.forEach(function(t){e.areasGroup.appendChild(new ap({name:"area",style:t}))})};var Ow,Pw=Aw;function Aw(t){var e=this,n=t.style,t=I(t,["style"]);return(e=Ow.call(this,N({},{type:"lines",style:{width:0,height:0}},T({style:n},t)))||this).linesGroup=new tp({name:"lines"}),e.appendChild(e.linesGroup),e.areasGroup=new tp({name:"areas"}),e.appendChild(e.areasGroup),e.render(),e}i(Lw,Nw=O),Lw.prototype.render=function(){var e=this;this.attributes.columns.forEach(function(t){t.forEach(function(t){e.columnsGroup.appendChild(new dp({name:"column",style:t}))})})},Lw.prototype.update=function(t){this.attr(N({},this.attributes,t)),t.columns&&(this.clear(),this.render())},Lw.prototype.clear=function(){this.removeChildren(!0)};var Nw,Cw=Lw;function Lw(t){var e=this,n=t.style,t=I(t,["style"]);return(e=Nw.call(this,N({},{type:"column",style:{width:0,height:0}},T({style:n},t)))||this).columnsGroup=new tp({name:"columns"}),e.appendChild(e.columnsGroup),e.render(),e}function Iw(t){return 0===t.length?[0,0]:[q(rt(t,function(t){return q(t)||0})),U(nt(t,function(t){return U(t)||0}))]}function jw(t){for(var e=pt(t),n=e[0].length,t=D([Array(n).fill(0),Array(n).fill(0)],2),r=t[0],i=t[1],o=0;o<e.length;o+=1)for(var a=e[o],s=0;s<n;s+=1)0<=a[s]?(a[s]+=r[s],r[s]=a[s]):(a[s]+=i[s],i[s]=a[s]);return e}function Rw(t,e,n){void 0===n&&(n=[[0,0],[1,1]]);for(var e=!!(e=void 0===e?!1:e),r=[],i=0,o=t.length;i<o;i+=2)r.push([t[i],t[i+1]]);for(var a,s,l,u=function(t,e,n,r){var i,o=[],a=!!r;if(a){u=r[0],c=r[1];for(var s=0,l=t.length;s<l;s+=1)var u=ia([0,0],u,x=t[s]),c=oa([0,0],c,x)}for(var s=0,h=t.length;s<h;s+=1){var d,p,f,y,g,m,v,b,x=t[s];0!==s||n?s!==h-1||n?(d=t[[s?s-1:h-1,s-1][n?0:1]],p=t[n?(s+1)%h:s+1],m=aa(m=ua([0,0],p,d),m,e),0!==(g=(f=sa(x,d))+(y=sa(x,p)))&&(f/=g,y/=g),g=aa([0,0],m,-f),m=aa([0,0],m,y),v=ra([0,0],x,g),b=ia([0,0],b=ra([0,0],x,m),oa([0,0],p,x)),b=oa([0,0],b,ia([0,0],p,x)),v=ia([0,0],v=ra([0,0],x,g=aa([0,0],g=ua([0,0],b,x),-f/y)),oa([0,0],d,x)),v=oa([0,0],v,ia([0,0],d,x)),b=ra([0,0],x,m=aa([0,0],m=ua([0,0],x,v),y/f)),a&&(v=ia([0,0],v=oa([0,0],v,u),c),b=ia([0,0],b=oa([0,0],b,u),c)),o.push(i),o.push(v),i=b):(v=x,o.push(i),o.push(v)):i=x}return n&&o.push(o.shift()),o}(r,.4,e,n),c=r.length,h=[],i=0;i<c-1;i+=1)a=u[2*i],s=u[2*i+1],l=r[i+1],h.push(["C",a[0],a[1],s[0],s[1],l[0],l[1]]);return e&&(a=u[c],s=u[c+1],l=r[0],h.push(["C",a[0],a[1],s[0],s[1],l[0],l[1]])),h}function Dw(t,e){var n=(e=void 0===e?!1:e)?t.length-1:0,t=t.map(function(t,e){return Pt([e===n?"M":"L"],D(t),!1)});return e?t.reverse():t}function Bw(t,e){if(void 0===e&&(e=!1),t.length<=2)return Dw(t);for(var n=[],r=t.length,i=0;i<r;i+=1){var o=e?t[r-i-1]:t[i];Et(o,n.slice(-2))||n.push.apply(n,Pt([],D(o),!1))}var a=Rw(n,!1);return e?a.unshift(Pt(["M"],D(t[r-1]),!1)):a.unshift(Pt(["M"],D(t[0]),!1)),a}function Fw(t,e,n){t=pt(t);return t.push(["L",e,n],["L",0,n],["Z"]),t}i(Hw,zw=o),Object.defineProperty(Hw.prototype,"rawData",{get:function(){var t=this.attributes.data;return t&&0!==(null==t?void 0:t.length)?(t=pt(t),Q(t[0])?[t]:t):[[]]},enumerable:!1,configurable:!0}),Object.defineProperty(Hw.prototype,"data",{get:function(){return this.attributes.isStack?jw(this.rawData):this.rawData},enumerable:!1,configurable:!0}),Object.defineProperty(Hw.prototype,"scales",{get:function(){return this.createScales(this.data)},enumerable:!1,configurable:!0}),Object.defineProperty(Hw.prototype,"baseline",{get:function(){var t=this.scales.y,e=D(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(Hw.prototype,"containerCfg",{get:function(){var t=this.attributes;return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),Object.defineProperty(Hw.prototype,"linesCfg",{get:function(){var t,n,r,i,o,e,a,s,l,u=this,c=this.attributes,h=c.areaStyle,d=c.isStack,p=c.lineStyle,f=c.smooth,c=this.containerCfg.width,y=this.data;return 0===y[0].length?{lines:[],areas:[]}:(t=this.scales,e=t.x,t=t.y,y=y,n=(e={type:"line",x:e,y:t}).x,r=e.y,i=(e=D(r.getOptions().range||[0,0],2))[0],o=e[1],i<o&&(e=D([i,o],2),o=e[0],i=e[1]),t=y.map(function(t){return t.map(function(t,e){return[n.map(e),J(r.map(t),o,i)]})}),e=[],h&&(y=this.baseline,e=d?(f?function(t,e,n){for(var r=[],i=t.length-1;0<=i;--i){var o,a=t[i],s=Bw(a),l=void 0,l=0===i?Fw(s,e,n):(o=Bw(t[i-1],!0),a=a[0],o[0][0]="L",Pt(Pt(Pt([],D(s),!1),D(o),!1),[Pt(["M"],D(a),!1),["Z"]],!1));r.push(l)}return r}:function(t,e,n){for(var r=[],i=t.length-1;0<=i;--i){var o,a=Dw(t[i]),s=void 0,s=0===i?Fw(a,e,n):((o=Dw(t[i-1],!0))[0][0]="L",Pt(Pt(Pt([],D(a),!1),D(o),!1),[["Z"]],!1));r.push(s)}return r})(t,c,y):(a=f,s=c,l=y,t.map(function(t){return Fw((a?Bw:Dw)(t),s,l)}))),{lines:t.map(function(t,e){return T({stroke:u.getColor(e),path:(f?Bw:Dw)(t)},p)}),areas:e.map(function(t,e){return T({path:t,fill:u.getColor(e)},h)})})},enumerable:!1,configurable:!0}),Object.defineProperty(Hw.prototype,"columnsCfg",{get:function(){var i=this,t=this.attributes,o=t.isStack,a=t.columnStyle,t=this.containerCfg.height,s=this.rawData;if(!s)return{columns:[]};o&&(s=jw(s));var e=this.createScales(s),l=e.x,u=e.y,e=D(Iw(s),2),n=e[0],e=e[1],c=new Uv({domain:[0,e-(0<n?0:n)],range:[0,t]}),h=l.getBandWidth(),d=this.rawData;return{columns:s.map(function(t,r){return t.map(function(t,e){var n=h/s.length;return T(T({fill:i.getColor(r)},a),o?{x:l.map(e),y:u.map(t),width:h,height:c.map(d[r][e])}:{x:l.map(e)+n*r,y:0<=t?u.map(t):u.map(0),width:n,height:c.map(Math.abs(t))})})})}},enumerable:!1,configurable:!0}),Hw.prototype.render=function(t,e){this.containerShape=B(e,".container","rect").attr("className","container").node();var n=this.attributes.type,r="spark".concat(n),i="line"===n?this.linesCfg:this.columnsCfg;this.sparkShape=B(e,".".concat(r),function(){return new("line"===n?Pw:Cw)({className:r,style:i})}).call(C,i).node()},Hw.prototype.update=function(t){this.attr(N({},this.attributes,t)),this.render(this.attributes,this)},Hw.prototype.clear=function(){this.removeChild(this.sparkShape),this.sparkShape.clear(),this.sparkShape.destroy()},Hw.prototype.getColor=function(t){var e=this.attributes.color;return G(e)?e[t%e.length]:z(e)?e.call(null,t):e},Hw.prototype.createScales=function(t){var e=this.attributes,n=e.type,r=e.isGroup,i=e.barPadding,o=e.nice,o=void 0===o||o,a=e.minValue,e=e.maxValue,s=this.containerCfg,l=s.width,s=s.height,u=D(Iw(t),2),c=u[0],u=u[1];return{type:n,x:"line"===n?new Uv({domain:[0,t[0].length-1],range:[0,l]}):new qm({domain:t[0].map(function(t,e){return e}),range:[0,l],paddingInner:r?i:0}),y:new Uv({domain:[null!=a?a:c,null!=e?e:u],range:[s,0],nice:o})}},Hw.tag="sparkline",Hw.defaultOptions={style:{type:"line",width:200,height:20,isStack:!1,color:["#83daad","#edbf45","#d2cef9","#e290b3","#6f63f4"],smooth:!0,lineStyle:{lineWidth:1},isGroup:!1,columnStyle:{lineWidth:1,stroke:"#fff",padding:.1}}};var zw,Vw,Gw=Hw;function Hw(t){return zw.call(this,N({},Hw.defaultOptions,t))||this}function Ww(){return null!==Vw&&Vw.apply(this,arguments)||this}function Yw(e,n){return i(t,r=Xd),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(N({},this.attributes,t=void 0===t?{}:t)),null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)},t;function t(t){t=r.call(this,rw({},{style:n},t))||this;return t.descriptor=e,t}var r}i(Ww,Vw=Xd);var Uw=Yw({render:function(t,e){function n(t,e,n,r,i){B(h,"line-".concat(t),"line").attr("className","line-".concat(t)).style("x1",e).style("y1",n).style("x2",r).style("y2",i).style("stroke",h.style.stroke).style("strokeOpacity",h.style.strokeOpacity).style("lineWidth",h.style.lineWidth)}var r=t.size,i=t.radius,o=t.stroke,a=t.fill,s=t.lineWidth,l=t.orient,u=t.fillOpacity,t=t.strokeOpacity,r=void 0===r?10:r,c=2.4*r,h=B(e,".rect","rect").attr("className","rect").style("x",-r/2).style("y",-c/2).style("width",r).style("height",c).style("fill",a||"#fff").style("fillOpacity",u||1).style("stroke",o||"#bfbfbf").style("lineWidth","number"!=typeof s?1:s).style("strokeOpacity",t).style("radius","number"!=typeof i?r/4:null!=i?i:2).node(),a=1/3*r,u=2/3*r,o=.25*c,s=.75*c;n(0,a,o,a,s),n(0,u,o,u,s),h.setOrigin(r/2,c/2),"vertical"===l?e.setLocalEulerAngles(90):e.setLocalEulerAngles(0)}});i($w,qw=o),$w.prototype.render=function(t,e){var n,r,i,o=t.iconCfg,t=t.textCfg;i=e,o=((n=o)||{}).type,r="handle-icon ".concat(o,"-handle"),A(i).selectAll(".handle-icon").data(o?[o]:[],function(t){return t}).join(function(t){return t.append(function(t){return"symbol"===t?new yw({className:r,name:"icon",style:n}):new Uw({name:"icon",className:r,style:n})})},function(t){return t.each(function(){this.update(n)})},function(t){return t.remove()}),void 0===(i=t)&&(i={}),B(e,".".concat(o="handle-text"),"text").attr("className",o).style("fontSize",12).style("fill","#000").style("fillOpacity",.45).style("textAlign","center").style("textBaseline","middle").call(C,i)};var qw,Xw,Zw,Kw=$w;function $w(){return null!==qw&&qw.apply(this,arguments)||this}function Jw(t){var o=Xw.call(this,N({},Jw.defaultOptions,t))||this;return o.onSelectionMouseenter=function(){o.selectionShape.attr(o.getStyle("selectionStyle"))},o.onSelectionMouseleave=function(){o.selectionShape.attr(o.getStyle("selectionStyle"))},o.onDragStart=function(i){return function(t){t.stopPropagation(),o.target=i,o.prevPos=o.getOrientVal(Yx(t));var t=o.availableSpace,e=t.x,t=t.y,n=o.attributes,r=n.x,n=n.y;o.selectionStartPos=o.getRatio(o.prevPos-o.getOrientVal([e,t])-o.getOrientVal([r,n])),o.selectionWidth=0,o.addEventListener("mousemove",o.onDragging),o.addEventListener("touchmove",o.onDragging),document.addEventListener("mouseup",o.onDragEnd),document.addEventListener("touchend",o.onDragEnd)}},o.onDragging=function(t){t.stopPropagation();var t=o.getOrientVal(Yx(t)),e=t-o.prevPos;if(e){var n=o.getRatio(e);switch(o.target){case"start":o.setValuesOffset(n);break;case"end":o.setValuesOffset(0,n);break;case"selection":o.setValuesOffset(n,n);break;case"background":o.selectionWidth+=n,o.setValues([o.selectionStartPos,o.selectionStartPos+o.selectionWidth].sort())}o.prevPos=t}},o.onDragEnd=function(){o.removeEventListener("mousemove",o.onDragging),o.removeEventListener("mousemove",o.onDragging),document.removeEventListener("mouseup",o.onDragEnd),document.removeEventListener("touchend",o.onDragEnd)},o.onValueChanged=function(t){t=new jd("valueChanged",{detail:{oldValue:t,value:o.getValues()}});o.dispatchEvent(t)},o.selectionStartPos=0,o.selectionWidth=0,o.prevPos=0,o.target="",o}function Qw(t){var a=Zw.call(this,N({},Qw.defaultOptions,t))||this;return a.onValueChanged=function(t){var e=a.style.value;t!==e&&(e=new jd("scroll",t={detail:{oldValue:t,value:e}}),a.dispatchEvent(e),e=new jd("valueChanged",t),a.dispatchEvent(e))},a.onTrackClick=function(t){var e=a.attributes.thumbLen,n=D(a.getLocalPosition(),2),r=n[0],n=n[1],i=D(a.padding,4),o=i[0],i=i[3],r=a.getOrientVal([r+i,n+o]),i=a.getOrientVal(Yx(t))-e/2,n=a.valueOffset(i-r,!0);a.setValue(n)},a.onThumbMouseenter=function(){a.thumbShape.attr(a.getStyle("thumbStyle","active"))},a.onTrackMouseenter=function(){a.trackShape.attr(a.getStyle("trackStyle","active"))},a.onThumbMouseleave=function(){a.thumbShape.attr(a.getStyle("thumbStyle"))},a.onTrackMouseleave=function(){a.trackShape.attr(a.getStyle("trackStyle"))},a.onDragStart=function(t){t.stopPropagation(),a.prevPos=a.getOrientVal(Yx(t)),document.addEventListener("mousemove",a.onDragging),document.addEventListener("mouseup",a.onDragEnd),document.addEventListener("touchmove",a.onDragging),document.addEventListener("touchcancel",a.onDragEnd)},a.onDragging=function(t){t.stopPropagation();var t=a.getOrientVal(Yx(t)),e=t-a.prevPos;a.setOffset(e),a.prevPos=t},a.onDragEnd=function(t){t.preventDefault(),document.removeEventListener("mousemove",a.onDragging),document.removeEventListener("mouseup",a.onDragEnd),document.removeEventListener("touchmove",a.onDragging),document.removeEventListener("touchcancel",a.onDragEnd)},a}i(Jw,Xw=o),Object.defineProperty(Jw.prototype,"values",{get:function(){return this.getAttribute("values")},set:function(t){this.setAttribute("values",this.getSafetyValues(t))},enumerable:!1,configurable:!0}),Object.defineProperty(Jw.prototype,"names",{get:function(){return this.getAttribute("names")},set:function(t){this.setAttribute("names",t)},enumerable:!1,configurable:!0}),Object.defineProperty(Jw.prototype,"backgroundShapeCfg",{get:function(){return T(T({cursor:"crosshair",zIndex:0},this.availableSpace),this.getStyle("backgroundStyle"))},enumerable:!1,configurable:!0}),Object.defineProperty(Jw.prototype,"sparklineShapeCfg",{get:function(){var t=this.attributes,t=(t.orient,t.sparkline),e=t.padding,t=I(t,["padding"]),e=D(zx(e),4),n=e[0],r=e[1],i=e[2],e=e[3],o=this.availableSpace,a=o.width,o=o.height,s=this.getStyle("backgroundStyle").lineWidth,s=void 0===s?0:s;return T(T({x:s/2+e,y:s/2+n},t),{zIndex:0,width:a-s-e-r,height:o-s-n-i})},enumerable:!1,configurable:!0}),Object.defineProperty(Jw.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.padding,n=t.width,t=t.height,e=D(zx(e),4),r=e[0],i=e[1],o=e[2],e=e[3];return{x:e,y:r,width:n-(e+i),height:t-(r+o)}},enumerable:!1,configurable:!0}),Jw.prototype.getValues=function(){return this.values},Jw.prototype.setValues=function(t){this.values=t,this.update({values:t})},Jw.prototype.getNames=function(){return this.names},Jw.prototype.setNames=function(t){this.names=t},Jw.prototype.render=function(t,e){function n(e){var t="slider-".concat(e,"-handle");return B(o,".".concat(t),function(){return new Kw({className:t})}).call(function(t){t.node().update(r.getHandleShapeCfg(e))}).node()}var r=this,i=t.backgroundStyle,t=t.selectionStyle,e=B(e,".slider-background","rect").attr("className","slider-background").style("cursor","crosshair").style("fill","#416180").style("fillOpacity",.05).call(C,this.availableSpace).call(C,Wx(i)).node(),o=(B(this.backgroundShape=e,".slider-sparkline",function(){return new Gw({})}).attr("className","slider-sparkline").call(function(t){t.node().update(r.sparklineShapeCfg)}),B(e,".slider-foreground","g").attr("className","slider-foreground").node());this.selectionShape=B(o,".slider-selection","rect").attr("className","slider-selection").style("cursor","move").style("zIndex",2).style("fill","#5B8FF9").style("fillOpacity",.15).call(C,this.calcMask()).call(C,Wx(t)||{}).node();this.startHandle=n("start"),this.endHandle=n("end")},Jw.prototype.getSafetyValues=function(t,e){void 0===t&&(t=this.getValues()),void 0===e&&(e=4);var n,r=this.attributes,i=r.min,r=r.max,o=D(this.getValues(),2),a=o[0],o=o[1],t=D(t||[a,o],2),s=t[0],t=t[1],l=t-s;return t<s&&(s=(n=D([t,s],2))[0],t=n[1]),r-i<l?[i,r]:s<i?a===i&&o===t?[i,t]:[i,l+i]:r<t?o===r&&a===s?[s,r]:[r-l,r]:[Lx(s,e),Lx(t,e)]},Jw.prototype.getStyle=function(t,e,n){return void 0===e&&(e="default"),n?this.getHandleCfg(n):Wx(yt(this.attributes,t),e,!0)},Jw.prototype.calcMask=function(t){var t=D(this.getSafetyValues(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}])},Jw.prototype.calcHandlePosition=function(t){var e=this.availableSpace,n=e.width,e=e.height,r=D(this.getSafetyValues(),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])}},Jw.prototype.calcHandleText=function(t){var e,n,r=this.attributes,i=r.orient,r=r.names,o=this.getHandleCfg(t),a=o.spacing,s=o.formatter,o=o.textStyle,l=this.getHandleSize(t),u=this.getSafetyValues(),c=this.availableSpace,h=c.width,c=c.height,d=this.calcMask(),p=d.x,f=d.y,y=d.width,d=d.height,r=D("start"===t?[r[0],u[0]]:[r[1],u[1]],2),u=s(r[0],r[1]),s=new fp({style:T(T({},o),{text:u})}),r=Xx(s),o=r.width,r=r.height,s=(s.destroy(),0),g=0,l=l/2,m="center";return"horizontal"===i?(e=(i=a+l)+o/2,m="start"===t?(s=0<(n=p-i-o)?-e:e,0<n?"end":"start"):(s=(n=o<h-p-y-i)?e:-e,n?"start":"end")):(o=a+l,g="start"===t?r<f-l?-o:o:r<c-f-d-l?o:-o),{x:s,y:g,text:u,textAlign:m}},Jw.prototype.getHandleTextShapeCfg=function(t){var e=this.getHandleCfg(t).textStyle;return T(T({},e),this.calcHandleText(t))},Jw.prototype.getHandleIconShapeCfg=function(t){var e,n=this.attributes.orient,r=this.getHandleCfg(t),i=r.handleIcon,r=r.handleStyle,o=this.getOrientVal(["ew-resize","ns-resize"]),t=this.getHandleSize(t),i=i?(e="symbol",T(T({},r),{cursor:o,size:t,symbol:i})):(e="default",T(T({},r),{cursor:o,size:t}));return T({orient:n,type:e},i)},Jw.prototype.getHandleShapeCfg=function(t){var e=this.getHandleCfg(t),n=this.calcHandlePosition(t),r=n.x,n=n.y,i=this.calcHandleText(t);return{x:r,y:n,handleType:t,zIndex:3,visibility:null!=e&&e.show?"visible":"hidden",iconCfg:this.getHandleIconShapeCfg(t),textCfg:T(T({},this.getHandleTextShapeCfg(t)),i)}},Jw.prototype.getHandleCfg=function(t){var e=yt(this.attributes,"handle"),n=e.start,r=e.end,e=I(e,["start","end"]),i={};return"start"===t?i=n:"end"===t&&(i=r),N({},e,i)},Jw.prototype.getHandleSize=function(t){var e,t=this.getHandleCfg(t).size;return t||(e=(t=this.attributes).width,t=t.height,Math.floor((this.getOrientVal([t,e])+4)/2.4))},Jw.prototype.getOrientVal=function(t){var t=D(t,2),e=t[0],t=t[1];return"horizontal"===this.attributes.orient?e:t},Jw.prototype.setValuesOffset=function(t,e){void 0===e&&(e=0);var n=D(this.getValues(),2),r=n[0],n=n[1],t=[r+t,n+e].sort();this.setValues(t),this.onValueChanged([r,n])},Jw.prototype.getRatio=function(t){var e=this.availableSpace,n=e.width,e=e.height;return t/this.getOrientVal([n,e])},Jw.prototype.bindEvents=function(){function r(t){return t&&".handle-text"!==t.className}var i=this,t=this.selectionShape;t.addEventListener("mousedown",this.onDragStart("selection")),t.addEventListener("touchstart",this.onDragStart("selection")),t.addEventListener("mouseenter",this.onSelectionMouseenter),t.addEventListener("mouseleave",this.onSelectionMouseleave);[this.startHandle,this.endHandle].forEach(function(t){var n=t.style.handleType;t.addEventListener("mousedown",function(t){var e=t.target;r(e)&&i.onDragStart(n)(t)}),t.addEventListener("touchstart",function(t){var e=t.target;r(e)&&i.onDragStart(n)(t)})}),this.backgroundShape.addEventListener("mousedown",this.onDragStart("background")),this.backgroundShape.addEventListener("touchstart",this.onDragStart("background"))},Jw.defaultOptions={type:Jw.tag="slider",style:{orient:"horizontal",values:[0,1],names:["",""],min:0,max:1,width:200,height:20,sparkline:{padding:[1,1,1,1]},padding:[0,0,0,0],selectionStyle:{active:{fill:"#ccdaf5"}},handle:{show:!0,formatter:function(t,e){return t},spacing:10}}},i(Qw,Zw=o),Object.defineProperty(Qw.prototype,"padding",{get:function(){return zx(this.attributes.padding)},enumerable:!1,configurable:!0}),Object.defineProperty(Qw.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.width,t=t.height,n=D(this.padding,4),r=n[0],i=n[1],o=n[2],n=n[3];return{x:n,y:r,width:e-(n+i),height:t-(r+o)}},enumerable:!1,configurable:!0}),Object.defineProperty(Qw.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(Qw.prototype,"thumbRadius",{get:function(){var t=this.attributes.isRound,e=this.availableSpace,n=e.width,e=e.height,r=yt(this.attributes,["thumbStyle","default","radius"]);return t?r||this.getOrientVal([e,n])/2:0},enumerable:!1,configurable:!0}),Qw.prototype.render=function(t,e){var n=t.width,r=t.height,i=t.trackStyle,o=t.thumbStyle,a=t.value,s=t.thumbLen,t=t.orient,e=B(e,".track","rect").attr("className","track").style("width",null!=n?n:10).style("height",null!=r?r:200).call(C,Wx(i)).node(),n=this.valueOffset(a||0),r=this.availableSpace;this.thumbShape=B(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(C,Wx(o)).node(),this.trackShape=e},Qw.prototype.getValue=function(){return this.style.value},Qw.prototype.setValue=function(t){var e=this.style,n=e.value,r=e.min,e=e.max;this.update({value:J(t,r,e)}),this.onValueChanged(n)},Qw.prototype.setOffset=function(t){var e=this.getValue();this.setValue(this.valueOffset(t,!0)+e)},Qw.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*J(t,i,n)},Qw.prototype.getStyle=function(t,e){return void 0===e&&(e="default"),Wx(yt(this.attributes,t),e)},Qw.prototype.bindEvents=function(){this.trackShape.addEventListener("click",this.onTrackClick),this.thumbShape.addEventListener("mousedown",this.onDragStart),this.thumbShape.addEventListener("touchstart",this.onDragStart),this.onHover()},Qw.prototype.getOrientVal=function(t){return"horizontal"===this.attributes.orient?t[0]:t[1]},Qw.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)},Qw.defaultOptions={type:Qw.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}}}};Object.defineProperty(e2.prototype,"left",{get:function(){return this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(e2.prototype,"top",{get:function(){return this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(e2.prototype,"right",{get:function(){return this.x2},enumerable:!1,configurable:!0}),Object.defineProperty(e2.prototype,"bottom",{get:function(){return this.y2},enumerable:!1,configurable:!0}),Object.defineProperty(e2.prototype,"width",{get:function(){return this.defined("x2")&&this.defined("x1")?this.x2-this.x1:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(e2.prototype,"height",{get:function(){return this.defined("y2")&&this.defined("y1")?this.y2-this.y1:void 0},enumerable:!1,configurable:!0}),e2.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},e2.prototype.empty=function(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE},e2.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},e2.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])},e2.prototype.rotatedPoints=function(t,e,n){var r=this.x1,i=this.y1,o=this.x2,a=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*a+l,t*r+s*a+e],[s*o-t*a+l,t*o+s*a+e],[s*o-t*i+l,t*o+s*i+e]].flat(1)},e2.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},e2.prototype.intersects=function(t){return t&&!(this.x2<t.x1||this.x1>t.x2||this.y2<t.y1||this.y1>t.y2)},e2.prototype.defined=function(t){return this[t]!==Number.MAX_VALUE&&this[t]!==-Number.MAX_VALUE};var t2=e2;function e2(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 n2(t,u){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=D(e=u,4))[0],r=e[1],i=e[2],e=e[3],o=(t=D(t,4))[0],a=t[1],i-=n,e-=r,s=t[2]-o,t=t[3]-a,0!=(l=i*t-s*e)&&((a=i*(i=r-a)-e*(r=n-o))<0!=(e=0<l)&&((n=s*i-t*r)<0!=e&&(l<a!=e&&l<n!=e)));var e,n,r,i,o,a,s,l})}function r2(t,e,n){void 0===n&&(n=[0,0,0,0]);var r=e.getEulerAngles()||0,i=(e.setEulerAngles(0),e.getLocalBounds()),o=i.min,a=i.max,i=i.halfExtents,s=o[0],l=2*i[0],i=2*i[1],o=o[1],u=a[0],a=a[1],c=0,h=0,d=s,p=o,f=("text"===e.tagName&&(i-=1.5,f=e.style.textAlign,y=e.style.textBaseline,c=+e.style.dx,h=+e.style.dy,"center"===f?d=(s+u)/2:"right"!==f&&"end"!==f||(d=u),"middle"===y?p=(o+a)/2:"bottom"!==y&&"baseline"!==y||(p=a)),D(n,4)),u=f[0],y=void 0===u?0:u,a=f[1],n=void 0===a?0:a,u=f[2],a=f[3];return t.set((c+=s)-(void 0===a?n:a),(h+=o)-y,c+l+n,h+i+(void 0===u?y:u)),e.setEulerAngles(r),t.rotatedPoints(r*Fx,d,p)}function i2(t,e,n){var r,t=r2(new t2,t,n),e=r2(new t2,e,n),n=n2(e,[t[0],t[1],t[2],t[3]])||n2(e,[t[0],t[1],t[4],t[5]])||n2(e,[t[4],t[5],t[6],t[7]])||n2(e,[t[2],t[3],t[6],t[7]]);return localStorage.getItem("__debug__")&&window.canvas&&((r=function(t,e){return void 0===e&&(e="red"),window.canvas.appendChild(new ap({style:{lineWidth:1,stroke:e,path:[["M",t[0],t[1]],["L",t[2],t[3]],["L",t[4],t[5]],["L",t[6],t[7]],["Z"]]}}))})(t),r(e,"blue")),n}function o2(t,e,n){return"top"===t||"bottom"===t?e:n}function a2(t,e,n){return"left"===t||"right"===t?e:n}function s2(t,e,n){return"outside"===t?e:n}var l2=function(t,e,n){return"left"===t?e:n},u2=function(t,e,n){return"right"===t?e:n},c2=function(t,e,n){return"left"===t||"top"===t||"inside"===t?e:n};function h2(t,r){var i;return Pt([],D(t.reduce(function(t,e,n){return n&&i&&i2(i,e,r)?(t.add(i),t.add(e)):i=e,t},new Set)),!1)}var re={style:{title:{content:"",rotate:void 0,maxLength:260},ticks:[],ticksThreshold:100,tickLine:{len:6},subTickLine:{len:4,count:0},label:{type:"text",alignTick:!0,tickPadding:2,margin:[0,0,0,0],overlapOrder:["autoRotate","autoEllipsis","autoHide"],autoRotate:!1,autoEllipsis:!1,autoHide:!1,autoHideTickLine:!0,showLast:!0,showFirst:!0,optionalAngles:[0,45,90],minLabel:0,minLength:14,maxLength:160,ellipsisStep:" "},verticalFactor:1}},d2=(N({},re,{style:{type:"arc"}}),N({},re,{style:{}}),{year:[["year","second"],["year","day"],["month","day"],["day","day"]],month:[["month","day"],["day","day"]],day:[["month","day"],["day","day"]],hour:[["hour","second"],["hour","minute"],["hour","hour"]],minute:[["minute","second"],["second","second"]],second:[["second","second"]]});function p2(t,r){for(var i,o=t.map(function(t,e){return[t.id,{text:t.style.text,value:t.style.tip||t.style.text,idx:e}]}),a=new Map(o),e=rt(o,function(t){t=D(t,2),t[0],t=t[1].value;return new Date(t).getTime()}).text,n=nt(o,function(t){t=D(t,2),t[0],t=t[1].value;return new Date(t).getTime()}).text,s=(n=n,e=D([Qx(e=e),Qx(n)],2),n=e[0],e=e[1],n.getFullYear()!==e.getFullYear()?"year":n.getMonth()!==e.getMonth()?"month":n.getDay()!==e.getDay()?"day":n.getHours()!==e.getHours()?"hour":n.getMinutes()!==e.getMinutes()?"minute":"second"),l=new Date("1970-01-01 00:00:00"),u=Nx(t[0]),c=0;c<d2[s].length;c+=1){var h=d2[s][c];if(At(ew(l,tw(h)),u)<r){i=h;break}i=h}return function(t,e){var n,e=a.get(e.id).idx;return 0===e?t:(e=null==(e=o[e-1])?void 0:e[1].text,t=new Date(t),n=i,nw(new Date(e),s)!==nw(t,s)&&(n=function(t,e,n,r){for(var i=[],o=D(t,2)[1],a=$x.indexOf(o),s=0;s<=a;s+=1){var l=[$x[s],o];if(At(ew(e,tw(l)),r)<n){i=l;break}}return i}(i,t,r,u)),ew(t,tw(n)))}}function f2(a,s,t){if(!(s.length<=1))for(var e=t.ellipsisStep,n=t.minLength,r=t.maxLength,i=t.margin,l=void 0===i?[]:i,u=t.labelType,c=Nx(s[0]),o=Ax(e,c)||1,h=Ax(n,c)||1,i=Ax(r,c),d=(!V(i)&&i!==1/0||(i=Math.max.apply(null,s.map(function(t){return t.getBBox().width}))),Date.now()),p=s.slice(),t=D(l,4),e=(t[0],t[1]),f=void 0===e?0:e,n=(t[2],t[3]),y=void 0===n?f:n,g=function(e){var t,n,r,i,o;return(p=h2(s,l)).length<1||300<Date.now()-d?{value:void 0}:(o=function(t,e){return""},n=o2(a,e-y-f,e),o="time"===u?p2(s,n):"number"===u?(n=n,r=(t=s).map(function(t,e){return{text:t.style.text,value:Number(t.style.tip||t.style.text)}}),r=Number(nt(r,function(t){t=t.text;return(null==t?void 0:t.length)||0}).value),t=Nx(t[0]),i=Ix(r),At(i,t)<=n?function(t,e){return Ix(Number(t))}:(i=jx(r),At(i,t)<=n?function(t,e){return jx(Number(t),1)}:function(t,e){return Number(t).toExponential()})):function(t){return Ox(t,e,c)},void p.forEach(function(t,e){var n=t.style.tip||t.style.text,n=(t.style.tip=n,o.call(null,n,t));t.attr("text",n)}))},m=i;h+o<m;m-=o){var v=g(m);if("object"==typeof v)return v.value}}var y2=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")})};function g2(t,e,n){var r=e.length;if(!(r<=1||2===r&&null!=n&&n.showFirst&&null!=n&&n.showLast)){var i,o,a,s=y2,l=2,u=e.slice(),c=e.slice(),h=Date.now(),d=Math.min.apply(null,e.map(function(t){return t.getBBox().width}))||1;for("top"!==t&&"bottom"!==t||(t=Zx(e[0]).left,e=Zx(e[r-1]).right,e=Math.abs(e-t)||1,l=Math.max(Math.floor(r*d/e),l)),null!=n&&n.showFirst&&(i=u.splice(0,1)[0]),null!=n&&n.showLast&&(o=u.splice(-1,1)[0],u.reverse());h2((o?Pt(Pt([o],D(c),!1),[i],!1):Pt([i],D(c),!1)).filter(function(t){return uw(t)}),null==n?void 0:n.margin).length;)if(o&&!i&&l%2==0?u.splice(0,1).forEach(function(t){return t.style.visibility="hidden"}):o&&i&&u.splice(0,1).forEach(function(t){return t.style.visibility="hidden"}),c=s(((a=u).forEach(function(t){return t.style.visibility="visible"}),a),{seq:l}),l++,200<Date.now()-h)return}}function m2(o,t,e){for(var n=e.optionalAngles,a=void 0===n?[0,45,90]:n,r=e.margin,i=function(i){if(t.forEach(function(t){return e=o,t=t,n=a[i],t.setEulerAngles(n),void(n&&(r=c2(e,-1,1),e=l2(e,"end",u2(e,"start",Dx(Bx(r,n),"left",Rx(Bx(r,n),"right")))),t.style.textAlign=e));var e,n,r}),h2(t,r).length<1)return"break"},s=0;s<a.length&&"break"!==i(s);s++);}var v2=new Map([["autoHide",{getDefault:function(){return g2},equidistance:g2,greedy:function(t,e,n){var r,i=e.length;i<=1||2===i&&null!=n&&n.showFirst&&null!=n&&n.showLast||e.slice().forEach(function(t,e){e&&r&&i2(r,t,null==n?void 0:n.margin)?e===i-1&&null!=n&&n.showLast?r.style.visibility="hidden":t.style.visibility="hidden":r=t})}}],["autoRotate",{getDefault:function(){return m2}}],["autoEllipsis",{getDefault:function(){return f2},ellipsis:f2}]]);function b2(t,e,n){var r,t=Array.from(t||[]).map(function(t,e){return T({id:"".concat(e)},t)}),i=t.length,o=t;return"number"==typeof e&&e<i&&(r=Math.ceil(i/e),o=t.filter(function(t,e){return e%r==0||e===i-1})),n&&1!==o[o.length-1].value&&o.push({value:1,id:"append"}),o}function x2(a,s){return function(i){var t,o;a&&(t=void 0===(t=a.overlapOrder)?[]:t,o=T({labelType:a.type},gt(a,["optionalAngles","minLength","maxLength","ellipsisStep","showFirst","showLast","margin"])),t.forEach(function(t){var e,n=v2.get(t),r=a[t];n&&r&&(t=t,(e=a)&&("autoRotate"!==t||V(e.rotate)))&&(t=n.getDefault(),"function"==typeof r?t=r:"object"==typeof r?(t=n[r.type]||bt,o=T(T({},o),r.cfg)):"string"==typeof r&&(t=n[r]||bt),t(s,i,o))}))}}function w2(t,n,e){e&&t.forEach(function(t,e){e=n[e];e&&(e.style.visibility=t.style.visibility)})}function E2(t,e,n,r,i,o){B(t,".axis-title","text").attr("className","axis-title").style("text",(null==o?void 0:o.content)||"").style("x",e).style("y",n).style("fill","black").style("fontSize",12).style("fontWeight","lighter").style("textAlign",r).style("textBaseline",i).style("transform","rotate(".concat((null==o?void 0:o.rotate)||0,"deg)")).style("visibility",o?"visible":"hidden").call(C,(null==o?void 0:o.style)||{})}function _2(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 k2(t,n,r,e){void 0===e&&(e=""),A(t).selectAll(".axis-".concat(e,"tick")).data(r?n:[],function(t){return t.id}).join(function(t){return t.append(function(t){return new ip({className:"axis-".concat(e,"tick"),style:t})}).style("stroke","#416180").style("lineWidth",.5).style("strokeOpacity","sub"===e?.45:.65).style("visibility","visible").each(function(t,e){this.attr(t),_2(this,e,n,null==r?void 0:r.style)})},function(t){return t.each(function(t,e){this.attr(t),_2(this,e,n,null==r?void 0:r.style)}).style("visibility","visible")},function(t){return t.remove()})}function T2(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 M2(t,e){var n=Nx(t),e=Ax(e,n);t.attr("tip",null),uw(e)&&e<2*t.getBounds().halfExtents[0]&&(e=Ox(t.style.text||"",e,n,"..."),t.attr("tip",t.style.text),t.attr("text",e))}function S2(t,e,n,r,i){A(t).selectAll(".".concat(e)).data(n,function(t){return t.id}).join(function(t){return t.append("text").attr("className",e).style("fontFamily","sans-serif").style("fontSize",12).style("fontWeight","normal").call(C,i||{}).each(function(t,e){this.attr(t),M2(this,(null==r?void 0:r.maxLength)||Number.MAX_SAFE_INTEGER),T2(this,e,n,null==r?void 0:r.style)})},function(t){return t.each(function(t,e){this.attr(t),M2(this,(null==r?void 0:r.maxLength)||Number.MAX_SAFE_INTEGER),T2(this,e,n,null==r?void 0:r.style)})},function(t){return t.remove()})}function O2(t,e,n){S2(t,"axis-label",(n=void 0===n?{}:n)?e:[],n,{fill:"#000",fontWeight:"lighter"})}function P2(t,e,n,r,i,o){B(t,".axis-".concat(e,"-arrow"),function(){return new yw({})}).attr("className","axis-arrow$$ axis-".concat(e,"-arrow")).style("visibility",o?"visible":"hidden").style("symbol","axis-arrow").style("x",n).style("y",r).style("size",8).style("lineWidth",.5).style("fill","grey").style("stroke","grey").style("fillOpacity",.85).style("strokeOpacity",.85).style("transformOrigin","left").style("transform","rotate(".concat(i,"deg)")).call(C,o||{})}function A2(t,e,n,r){var i,o,a,s;void 0===r&&(r={}),B(t,".axis-line","path").attr("className","axis-line").style("visibility",r?"visible":"hidden").style("stroke","grey").style("lineWidth",.5).style("strokeOpacity",.85).style("path",e).call(C,(null==r?void 0:r.style)||{}),n&&(r=(e=(null==r?void 0:r.arrow)||{}).start,e=e.end,n=D(n,2),i=(o=D(n[0],2))[0],o=o[1],a=(n=D(n[1],2))[0],n=n[1],s=Math.atan((n-o)/(a-i))/Math.PI*180/2,i===a?s=n<o?45:-45:o===n&&(s=a<i?0:90),P2(t,"start",i,o,s,r),P2(t,"end",a,n,s+90,e))}function N2(t,e,n,r){var i,o,a,s,l;return e?(o=t[0],a=e,s=(o=D(o,2))[0],o=o[1],s=(a=D(a,2))[0]-s,a=a[1]-o,i=Math.sqrt(s*s+a*a),l=r?0:1,n?"M".concat(e[0],",").concat(e[1]-i," A").concat(i,",").concat(i,",0,0,").concat(l,",").concat(e[0],",").concat(e[1]+i," A").concat(i,",").concat(i,",0,0,").concat(l,",").concat(e[0],",").concat(e[1]-i," Z"):t.reduce(function(t,e,n){return(0===n?"M":"".concat(t,"A").concat(i,",").concat(i,",0,0,").concat(l,",")).concat(e[0],",").concat(e[1])},"")):""}function C2(t,e,n,r,i){return"circle"===e?N2(t,n,r,i):(e=t.reduce(function(t,e,n){return"".concat(t).concat(0===n?"M":" L").concat(e[0],",").concat(e[1])},""),"".concat(e).concat(r?"Z":""))}i(j2,L2=o),j2.prototype.render=function(t,e){var n,r,i,o,a=t.items,s=void 0===a?[]:a,l=t.type,u=t.center,a=t.lineStyle,c=t.alternateColor,h=t.closed,t=s.map(function(t,e){return{id:t.id||"grid-line-".concat(e),path:C2(t.points,l,u,h)}}),d=(n=t,r={style:a},A(e).selectAll(".grid-line").data(n,function(t){return t.id}).join(function(t){return t.append("path").attr("className","grid-line").style("stroke","#D9D9D9").style("lineWidth",1).style("lineDash",[4,4]).each(function(t,e){this.attr(t),_2(this,e,n,null==r?void 0:r.style)})},function(t){return t.each(function(t,e){this.attr(t),_2(this,e,n,null==r?void 0:r.style)})},function(t){return t.remove()}),[]);if(c)for(var p=Array.isArray(c)?c:[c,"transparent"],f=0;f<s.length-1;f++){0===f&&2<s[0].points.length&&(y=C2(s[0].points,l,u),d.push({path:y,fill:p[d.length%2]}));var y=C2(s[f].points,l,u,h),g=C2(s[f+1].points.slice().reverse(),l,u,h,!0),m=void 0,m=h?"".concat(y," ").concat(g):"".concat(y," L").concat(g.slice(1)," Z");d.push({path:m,fill:p[d.length%2]})}i=d,A(e).selectAll(".grid-region").data(i,function(t,e){return e}).join(function(t){return t.append("path").attr("className","grid-region").each(function(t,e){this.attr(t),_2(this,e,i,null==o?void 0:o.style)})},function(t){return t.each(function(t,e){this.attr(t),_2(this,e,i,null==o?void 0:o.style)})},function(t){return t.remove()})};var L2,I2=j2;function j2(){return null!==L2&&L2.apply(this,arguments)||this}function R2(t,e){e?B(t,".axis-grid",function(){return new I2({})}).attr("className","axis-grid").call(function(t){return t.node().update(e)}):(t=t.querySelector(".axis-grid"))&&t.remove()}function D2(t,e,n,r){void 0===r&&(r=0);var t=D(t,2),i=D(t[0],2),o=i[0],i=i[1],t=D(t[1],2),a=t[0],t=t[1],e=D([e*(a-o)+o,e*(t-i)+i],2),s=e[0],e=e[1],a=la([0,0],[Math.abs(a-o),-Math.abs(t-i)]),o=c2(n,-1,1),n=D(aa([0,0],(t=a,!(i=[])?(i[0]=t[1],i[1]=-1*t[0]):(i[0]=-1*t[1],i[1]=t[0]),i),r),2),a=n[0],t=n[1];return[[s,e],[s+Bx(o,a),e+Bx(o,t)]]}function B2(a,s,t,e,n){var l=(null==n?void 0:n.len)||0,u=t,n=e||{},c=n.formatter,t=n.tickPadding,h=void 0===t?0:t,e=n.offset,d=void 0===e?0:e,t=n.alignTick,p=void 0===t||t,e=n.rotate,f=void 0===e?0:e,y=c2(u,-1,1);return Array.from(a).map(function(t,e){var n=t.value,r=(p||(n=((e===a.length-1?1:null==(r=a[e+1])?void 0:r.value)+n)/2+(i||0)/2),D(D2(s,n,u,l+h),2)),i=D(r[1],2),n=i[0],i=i[1],e=c?c(t,e):t.text,o=o2(u,"center",l2(u,"end","start"));return f&&(o=l2(u,"end",u2(u,"start",Dx(Bx(y,f),"left",Rx(Bx(y,f),"right"))))),{id:"label-".concat(t.id),data:t,x:n+o2(u,d,0),y:i+a2(u,d,0),text:e,textAlign:o,textBaseline:a2(u,"middle","top"===u?"bottom":"top"),transform:"rotate(".concat(f||0,"deg)")}})}yw.registerSymbol("axis-arrow",function(t,e,n){var r=t+2*n;return[["M",t,e],["L",r,e],["L",r-n,e-n],["L",r+n,e],["L",r-n,e+n],["L",r,e]]});var F2=Yw({render:function(t,e){var n=t.startPos,r=t.endPos,i=t.verticalFactor,o=t.ticksThreshold,a=t.appendTick,s=t.axisLine,l=t.ticks,l=void 0===l?[]:l,u=t.label,u=void 0===u?{}:u,c=t.tickLine,h=t.subTickLine,d=t.title,t=t.grid,n=[n||[0,0],r||[0,0]],r=D(n,2),p=D(r[0],2),f=p[0],p=p[1],r=D(r[1],2),y=r[0],r=r[1],g=la([0,0],[y-f,r-p]),g=(void 0===(g=g)&&(g=[0,0]),void 0===(i=i||1)&&(i=1),Math.abs(g[0])>Math.abs(g[1])?1===i?"bottom":"top":-1===i?"left":"right"),i=b2(l,o,a);R2(e,t);A2(B(e,".axis-line-group","g").attr("className","axis-line-group").node(),"M".concat(f,",").concat(p," L").concat(y,",").concat(r),n,s);l=B(e,".axis-tick-group","g").attr("className","axis-tick-group").node();m=n,v=g,b=(null==c?void 0:c.len)||0;k2(l,Array.from(i).map(function(t){var e=D(D2(m,t.value,v,b),2),n=D(e[0],2),r=n[0],n=n[1],e=D(e[1],2);return{x1:r,y1:n,x2:e[0],y2:e[1],id:"tick-".concat(t.id),data:t}}),c);var m,v,b,o="axis-subtick-group",a=B(e,".".concat(o),"g").attr("className",o).node();x=i,w=n,E=g,_=null==h?void 0:h.count,k=null==h?void 0:h.len,void 0===_&&(_=0),void 0===k&&(k=0);k2(a,Array.from(x).map(function(a,s){return s===x.length-1?[]:Array(_).fill(null).map(function(t,e){var n=(((null==(n=x[s+1])?void 0:n.value)||1)-a.value)/(_+1),n=a.value+n*(e+1),n=D(D2(w,n,E,k),2),r=D(n[0],2),i=r[0],r=r[1],n=D(n[1],2),o=n[0],n=n[1];return{id:"sub-".concat(a.id,"-").concat(e),x1:i,y1:r,x2:o,y2:n}})}).flat(),h,"sub");var x,w,E,_,k,T,M,S,t="axis-label-group",f=B(e,".".concat(t),"g").attr("className",t).node(),p=(O2(f,B2(i,n,g,u,c),u),f.querySelectorAll(".axis-label")),y=f.querySelectorAll(".axis-tick"),r=(x2(u,g)(p),w2(p,y,null==u?void 0:u.autoHideTickLine),D(l.getBounds().halfExtents,2)),o=r[0],a=r[1],h=D(f.getBounds().halfExtents,2),t=h[0],i=h[1],p=+((null==(c=null==s?void 0:s.style)?void 0:c.lineWidth)||0),u=(y=g,u=2*(o+t)+p,l=2*(a+i)+p,r=d,h=(f=D(f=n,2))[0],f=f[1],s=(h=D(h,2))[0],h=h[1],c=(f=D(f,2))[0],f=f[1],g=Math.min(s,c),o=Math.max(s,c),t=Math.min(h,f),a=Math.max(h,f),i=g,p=t,T=n=0,M="bottom",S="start","left"===y||"right"===y?(n=u+((null==r?void 0:r.titlePadding)||0),"center"===(null==r?void 0:r.titleAnchor)&&(p=(h+f)/2),"end"===(null==r?void 0:r.titleAnchor)&&(p=a,M="top"),"left"===y&&(S="end",n*=-1)):(T=l+((null==r?void 0:r.titlePadding)||0),"center"===(null==r?void 0:r.titleAnchor)&&(i=(s+c)/2,S="center"),"end"===(null==r?void 0:r.titleAnchor)&&(i=o,S="end"),"top"===y&&(T*=-1),"bottom"===y&&(M="top")),void 0!==(null==r?void 0:r.positionX)&&(i=g+r.positionX,S="start"),void 0!==(null==r?void 0:r.positionY)&&(p=t+r.positionY,M="bottom"),{x:i+n,y:p+T,textAlign:S,textBaseline:M});E2(e,u.x,u.y,u.textAlign,u.textBaseline,d)}},re.style),z2=Math.PI,V2=Math.abs,G2=Math.cos,H2=Math.sin,W2=D([2*z2],1)[0];function Y2(t,e,n,r,i){void 0===i&&(i=0);var t=D(t,2),o=t[0],t=t[1],n=n*Fx,a=e*G2(n),s=e*H2(n),r=c2(r,-1,1);return[[o+a,t+s],[o+(e+Bx(r,i))*G2(n),t+(e+Bx(r,i))*H2(n)]]}function U2(t){var e;return et(t[0],0)?e="center":0<t[0]?e="start":t[0]<0&&(e="end"),e}function q2(t,d,p,f,y,e,g,m){void 0===m&&(m=0);var v=e,b=c2(v,-1,1),e=g.tickPadding,x=void 0===e?0:e,w=g.formatter,E=g.align,_=g.rotate;return Array.from(t).map(function(t,e){var n,r=(p-d)*t.value+d,i=m+x,o=270<=(o=r)?(o-360)%360:o,a=D(Y2(y,f,r,v,i),2),a=D(a[1],2),s=a[0],a=a[1],l=w?w(t,e):t.text,u="center",c="baseline",h=[Bx(b,s-y[0]),Bx(b,a-y[1])];return"radial"===E?(c="middle",(90<=o||o<-90)&&(o+=180),u=U2(h),et(o,-90)&&(u=s2(v,"start","end")),et(o,270)&&(u=s2(v,"end","start"))):"tangential"===E?(u="center",c="bottom",0<=o&&o<180?(o+=270,e="function"==typeof(null==g?void 0:g.style)?g.style(t,e):null!=(e=null==(e=null==g?void 0:g.style)?void 0:e.fontSize)?e:14,r=D(Y2(y,f,r,v,i+e),2),s=(i=D(r[1],2))[0],a=i[1]):o+=90):(o=null!=_?_:0,u=U2(h),et((e=h)[1],0)?n="middle":0<e[1]?n="top":e[1]<0&&(n="bottom"),c=n),{id:"label-".concat(t.id),x:s,y:a,text:l,textAlign:u,textBaseline:c,transform:"rotate(".concat((o||0).toFixed(0),"deg)"),data:t}})}var X2,Z2=Yw({render:function(t,e){var n=t.startAngle,n=void 0===n?0:n,r=t.endAngle,r=void 0===r?0:r,i=t.center,o=t.radius,a=t.axisLine,s=t.tickLine,l=t.subTickLine,u=t.label,u=void 0===u?{}:u,c=t.ticks,R=t.title,h=t.grid,d=t.ticksThreshold,p=t.appendTick,t=t.verticalFactor,c=b2(void 0===c?[]:c,d,p),d=-1===t?"inside":"outside",p=(R2(e,h),B(e,".axis-line-group","g").attr("className","axis-line-group").node());t=i,h=o,g=n/180*Math.PI,j=r/180*Math.PI,void 0===h&&(h=0),void 0===g&&(g=0),void 0===j&&(j=0),f=(t=D(t=void 0===t?[0,0]:t,2))[0],t=t[1],L=(I=D([h,h],2))[0],I=I[1],_=(k=D([f+h*G2(g),t+h*H2(g)],2))[0],k=k[1],y=(h=D([f+h*G2(j),t+h*H2(j)],2))[0],h=h[1];A2(p,(p=V2(j-g))===W2?"M".concat(f,",").concat(t-I,", A").concat(L,",").concat(I,",0,1,1,").concat(f,",").concat(t+I,", A").concat(L,",").concat(I,",0,1,1,").concat(f,",").concat(t-I):(p=z2<p?1:0,j=j<g?0:1,"M".concat(f,",").concat(t,",L").concat(_,",").concat(k,",A").concat(L,",").concat(I,",0,").concat(p,",").concat(j,",").concat(y,",").concat(h,",L").concat(f,",").concat(t)),void 0,a);var f,y,g=B(e,".axis-tick-group","g").attr("className","axis-tick-group").node();m=n,v=r,b=o,x=i,w=d,void 0===(E=null==s?void 0:s.len)&&(E=0);k2(g,Array.from(c).map(function(t){var e=(v-m)*t.value+m,e=D(Y2(x,b,e,w,E),2),n=D(e[0],2),r=n[0],n=n[1],e=D(e[1],2);return{x1:r,y1:n,x2:e[0],y2:e[1],id:"tick-".concat(t.id),data:t}}),s);var m,v,b,x,w,E,_="axis-subtick-group",k=B(e,".".concat(_),"g").attr("className",_).node();T=c,M=n,S=r,O=o,P=i,A=d,N=null==l?void 0:l.count,C=null==l?void 0:l.len,void 0===N&&(N=0),void 0===C&&(C=0);k2(k,Array.from(T).map(function(a,s){return Array(N).fill(null).map(function(t,e){var n=(((null==(n=T[s+1])?void 0:n.value)||1+T[0].value)-a.value)/(N+1),n=a.value+n*(e+1),n=D(Y2(P,O,(S-M)*n+M,A,C),2),r=D(n[0],2),i=r[0],r=r[1],n=D(n[1],2),o=n[0],n=n[1];return{id:"sub-".concat(a.id,"-").concat(e),x1:i,y1:r,x2:o,y2:n}})}).flat(),l,"sub");var T,M,S,O,P,A,N,C,L="axis-label-group",I=B(e,".".concat(L),"g").attr("className",L).node(),p=(O2(I,q2(c,n,r,o,i,d,u,null==s?void 0:s.len),u),I.querySelectorAll(".axis-label")),j=I.querySelectorAll(".axis-tick");x2(u,d)(p),w2(p,j,null==u?void 0:u.autoHideTickLine),E2(e,i[0],i[1],"center","middle",R)}},rw({startAngle:-90,endAngle:270,center:[0,0],label:{tickPadding:2,style:{},align:"normal"}},re.style||{})),K2=(i($2,X2=Xd),$2.prototype.connectedCallback=function(){this.render(),this.bindEvents()},$2.prototype.update=function(t){this.attr(N({},this.attributes,t=void 0===t?{}:t)),t.disabled&&(this.active=!1,this.disabled=!0),this.render()},$2.prototype.setState=function(t){"disabled"===t?(this.active=!1,this.disabled=!0):this.disabled=!1,this.render()},$2.prototype.render=function(){var t=this.style,e=t.size,e=void 0===e?8:e,n=t.symbol,r=t.markerStyle,t=t.backgroundStyle,i=D(zx(this.style.margin),4),o=i[0],a=i[1],s=i[2],i=i[3],l=D(zx(this.style.padding),4),u=l[0],c=l[1],h=l[2],l=l[3],c=(e-c-l)/2,h=(e-u-h)/2,a=(B(this,".container","rect").attr("className","container").style("x",-(c+l+i)).style("y",-(h+u+o)).style("width",e+a+i).style("height",e+o+s).style("fill","transparent").style("cursor",this.disabled?"not-allowed":"pointer").style("zIndex",1),t||{}),i=a.active,o=a.disabled,s=I(a,["active","disabled"]),t=(B(this,".background","rect").attr("className","background").style("x",-(c+l)).style("y",-(h+u)).style("width",e).style("height",e).call(C,s).call(C,this.active?i:{}).call(C,this.disabled?o:{}),"function"==typeof n?n:$2.getSymbol(n||"")),a=r||{},l=a.active,u=a.disabled,e=I(a,["active","disabled"]);B(this,".marker","path").attr("className","marker").style("x",0).style("y",0).style("path",null==t?void 0:t(0,0,Math.min(c,h))).call(C,e).call(C,this.active?l:{}).call(C,this.disabled?u:{})},$2.prototype.bindEvents=function(){var e=this,n=A(this).select(".marker"),r=A(this).select(".background");A(this).on("pointerup",function(){e.disabled||(e.active=!0)}),A(this).on("pointermove",function(){var t;e.disabled||(e.active=!0,C(n,null==(t=e.style.markerStyle)?void 0:t.active),C(r,null==(t=e.style.backgroundStyle)?void 0:t.active))}),A(this).on("pointerout",function(){e.disabled||(e.active=!1,C(n,mt(e.style.markerStyle||{},["active"])),C(r,mt(e.style.backgroundStyle||{},["active"])))})},$2.MARKER_SYMBOL_MAP=new Map,$2.registerSymbol=function(t,e){$2.MARKER_SYMBOL_MAP.set(t,e)},$2.getSymbol=function(t){return $2.MARKER_SYMBOL_MAP.get(t)},$2);function $2(t){t=X2.call(this,t)||this;return t.active=!1,t.disabled=!1,t.disabled=t.style.disabled||!1,t}K2.registerSymbol("timeline-prev-button",function(t,e,n){return[["M",t+n,e+n],["L",t,e],["L",t+n,e-n],["M",t,e+n],["L",t-n,e],["L",t,e-n]]}),K2.registerSymbol("timeline-next-button",function(t,e,n){return[["M",t,e+n],["L",t+n,e],["L",t,e-n],["M",t-n,e+n],["L",t,e],["L",t-n,e-n]]}),K2.registerSymbol("timeline-play-button",function(t,e,n){return[["M",t+2,e+3],["L",t+2,e-3],["M",t-2,e+3],["L",t-2,e-3]]}),K2.registerSymbol("timeline-stop-button",function(t,e,n){return[["M",t+3,e],["L",t-1.5,e-1.5*Math.sqrt(3)],["L",t-1.5,e+1.5*Math.sqrt(3)],["Z"]]});var l={margin:[2,4],markerStyle:{stroke:"#bfbfbf",active:{stroke:"#3471F9"}},backgroundStyle:{fill:"transparent"}},J2={x:0,y:0,data:[],width:500,height:40,selection:[0,0],orient:"horizontal",singleModeControl:{width:56,size:12,labelStyle:{text:"单一时间",fontSize:10,dx:4}},speedControl:{width:32,markerSize:4,speeds:[1,2,3,4,5],labelStyle:{fontFamily:"sans-serif",fill:"rgba(0,0,0,0.45)",fontStyle:"normal",fontWeight:500,fontSize:10,textBaseline:"top"},formatter:function(t){return"".concat(t.toFixed(1),"x")}},controlPosition:"bottom",controlButton:{spacing:14,prevBtn:T(T({},l),{symbol:"timeline-prev-btn",padding:0,size:8}),nextBtn:T(T({},l),{symbol:"timeline-next-btn",padding:0,size:8}),playBtn:{margin:4,padding:0,size:20,symbol:"",markerStyle:{stroke:"#bfbfbf",fill:"#bfbfbf",active:{stroke:"#3471F9",fill:"#3471F9"}},backgroundStyle:{stroke:"#bfbfbf",lineWidth:1,fill:"#F7F7F7",active:{fill:"rgba(52, 113, 249, 0.1)",stroke:"#3471F9"}}}},padding:[0,8],playAxis:{appendPadding:[4,0],handleStyle:{r:3,lineWidth:1},label:{position:1,tickPadding:2,tickLine:{len:4,style:{stroke:"rgba(0,0,0,0.25)",lineWidth:1}},style:{fontSize:10,fillOpacity:1,fill:"rgba(0,0,0,0.45)"}},loop:!1},playInterval:2e3,autoPlay:!1},Q2=N({},{x:0,y:0,data:[],length:120,orient:"horizontal",selection:0,selectionStyle:{fill:"#5B8FF9",fillOpacity:.15},loop:!1,playInterval:1e3},J2.playAxis),tE={axisLine:null,label:{autoRotate:!1,rotate:0,autoHide:!0,autoHideTickLine:!1,autoEllipsis:!0,minLength:50,alignTick:!0}};function eE(t,e){void 0===t&&(t=[]);var t=D(Array.of(t).flat(),2),n=t[0],n=void 0===n?0:n,t=t[1];return e?[n,n]:[n,void 0===t?n:t]}i(rE,nE=Xd),rE.prototype.update=function(t){var e=N({},this.attributes,t=void 0===t?{}:t),t=(t.selection&&(this.selection=eE(t.selection,e.singleMode)),t.singleMode&&(this.selection=eE(e.selection,t.singleMode)),this.playTimer);t&&this.stop(),this.attr(e),this.render(),t&&this.play()},rE.prototype.play=function(){var r=this,t=this.style,e=t.data,i=t.loop,o=t.singleMode,a=t.playMode,s=e.length,t=this.style.playInterval;V(t)&&(t=Q2.playInterval),this.playTimer&&clearInterval(this.playTimer),this.playTimer=setInterval(function(){var t,e,n;!i&&r.selection[1]>=s-1?r.stop(!0):o?(t=(r.selection[0]+1)%s,r.setSelection({start:t,end:t})):(t=r.selection[0],n=r.selection[1],e=r.selection[1]-r.selection[0],n=s-1<=n?"increase"===a?t:(t=0,e):("increase"!==a&&(t=(t+1)%s),(n+1)%s),r.setSelection({start:t,end:n}))},t)},rE.prototype.stop=function(t){clearInterval(this.playTimer),this.playTimer=void 0,t&&this.dispatchEvent(new jd("timelineStopped",{selection:this.selection}))},rE.prototype.prev=function(){var t,e=D(this.selection,2),n=e[0],e=e[1],r=this.style.data.length,r=r&&this.style.singleMode?t=(n-1+r)%r:0===n?(t=r-(e-n)-1,r-1):(t=n-1,e-1);this.setSelection({start:null!=t?t:this.selection[0],end:null!=r?r:this.selection[1]})},rE.prototype.next=function(){var t,e=D(this.selection,2),n=e[0],e=e[1],r=this.style.data.length,r=r&&this.style.singleMode?t=(n+1)%r:e===r-1?(t=0,e-n):(t=n+1,e+1);this.setSelection({start:null!=t?t:this.selection[0],end:null!=r?r:this.selection[1]})},rE.prototype.getSelection=function(){return this.selection},Object.defineProperty(rE.prototype,"orient",{get:function(){return this.style.orient||"horizontal"},enumerable:!1,configurable:!0}),rE.prototype.ifH=function(t,e){return"horizontal"===this.orient?"function"==typeof t?t():t:"function"==typeof e?e():e},rE.prototype.destroy=function(){nE.prototype.destroy.call(this),this.playTimer&&clearInterval(this.playTimer),this.playTimer=void 0};var nE,r=rE;function rE(){var t=null!==nE&&nE.apply(this,arguments)||this;return t.selection=[0,0],t}function iE(t,e){return new qv({domain:t.map(function(t,e){return e}),range:e,padding:.1})}function oE(t,e,n){n=iE(n,[0,e]).getStep(),e=0<t?Math.ceil:Math.floor;return 0<n?e(t/n):0}function aE(t,e,n){return iE(n,[0,e]).map(t)}i(uE,sE=r),uE.prototype.connectedCallback=function(){this.render(),this.bindEvents()},Object.defineProperty(uE.prototype,"styles",{get:function(){return N({},uE.defaultOptions.style,this.attributes)},enumerable:!1,configurable:!0}),uE.prototype.setSelection=function(t){var e,n,r=t.start,t=t.end,i=this.styles,o=i.data,o=void 0===o?[]:o,i={duration:i.playInterval/2,easing:"cubic-bezier(0.250, 0.460, 0.450, 0.940)",fill:"both"},a=this.ifH("cx","cy"),s=A(this).select(".slider-start-handle").node();void 0!==r&&(n=aE(r,this.style.length,o),this.startHandleAnimation=s.animate([((e={})[a]=s.style[a],e),((s={})[a]=n,s)],i)),void 0!==t&&(e=A(this).select(".slider-end-handle").node(),n=aE(t,this.style.length,o),this.endHandleAnimation=e.animate([((s={})[a]=e.style[a],s),((o={})[a]=n,o)],i)),this.selection=[null!=r?r:this.selection[0],null!=t?t:this.selection[1]],this.dispatchEvent(new jd("selectionChanged",{detail:{selection:this.selection}}))},uE.prototype.render=function(){var e=this,n=this.styles,t=D(this.ifH([n.length,n.size],[n.size,n.length]),2),r=t[0],i=t[1],t=B(this,".slider-background","line").attr("className","slider-background").style("x1",0).style("y1",0).style("x2",this.ifH(r,0)).style("y2",this.ifH(0,i)).style("lineWidth",n.size).style("lineCap","round").style("stroke",null==(t=n.backgroundStyle)?void 0:t.fill).style("strokeOpacity",null==(t=n.backgroundStyle)?void 0:t.fillOpacity).node(),o=iE(n.data,[0,1]),a=D(this.selection.map(function(t){return o.map(t)}),2),s=a[0],s=void 0===s?0:s,a=a[1],a=void 0===a?s:a,l=this.ifH(s*r,0),u=this.ifH(a*r,0),s=this.ifH(0,s*i),a=this.ifH(0,a*i),c=(B(t,".slider-selection","line").attr("className","slider-selection").style("x1",l).style("y1",s).style("x2",u).style("y2",a).style("lineWidth",n.size).style("lineCap","round").style("stroke",null==(h=n.selectionStyle)?void 0:h.fill).style("strokeOpacity",null==(h=n.selectionStyle)?void 0:h.fillOpacity).style("visibility",n.singleMode?"hidden":"visible").call(C,n.selectionStyle),"running"===(null==(h=this.startHandleAnimation)?void 0:h.playState)&&this.startHandleAnimation.pause(),B(t,".slider-start-handle","circle").attr("className","slider-start-handle").style("cx",l).style("cy",s).call(C,n.handleStyle),"paused"===(null==(h=this.startHandleAnimation)?void 0:h.playState)&&this.startHandleAnimation.play(),"running"===(null==(l=this.endHandleAnimation)?void 0:l.playState)&&this.endHandleAnimation.pause(),B(t,".slider-end-handle","circle").attr("className","slider-end-handle").style("cx",u).style("cy",a).style("visibility",n.singleMode?"hidden":"visible").call(C,n.handleStyle),"paused"===(null==(s=this.endHandleAnimation)?void 0:s.playState)&&this.endHandleAnimation.play(),n.data.map(function(t,e){return{value:o.map(e),text:t.date}})),h=n.label||{},l=h.position,d=void 0===l?-1:l,p=h.tickLine,f=I(h,["position","tickLine"]);B(t,".slider-axis",function(){return new F2({className:"slider-axis"})}).call(function(t){return t.node().update(N({},tE,{startPos:[d*e.ifH(0,r+2),d*e.ifH(i+2,0)],endPos:[e.ifH(r,0)+d*e.ifH(0,r+2),e.ifH(0,i)+d*e.ifH(i+2,0)],ticks:c,verticalFactor:d,tickLine:null===n.label?null:p,label:null===n.label?null:f}))})},uE.prototype.bindEvents=function(){var t=A(this).select(".slider-background"),r=(this.dragHandle(t,"start"),this.dragHandle(t,"end"),this.dragSelection(t),t.select(".slider-selection").node()),e=t.select(".slider-start-handle").node(),t=t.select(".slider-end-handle").node();e.addEventListener(E.ATTR_MODIFIED,function(t){var e=t.attrName,n=t.newValue;t.prevValue,"cx"!==e&&"cy"!==e||(t=parseFloat(n)||0,r.style["cx"===e?"x1":"y1"]=t)}),t.addEventListener(E.ATTR_MODIFIED,function(t){var e=t.attrName,n=t.newValue;t.prevValue,"cx"!==e&&"cy"!==e||(t=parseFloat(n)||0,r.style["cx"===e?"x2":"y2"]=t)})},uE.prototype.dragHandle=function(n,o){function t(t){var e,n,r,i;u&&(u=!1,t=oE(s?l.ifH(t.x-s[0],t.y-s[1]):0,l.style.length,l.style.data),s=void 0,e=(n=D(l.selection,2))[0],n=n[1],r=l.style.data.length-1,"start"===o?e===n&&0<t?(i=J(0,e+t,r),l.setSelection({start:i,end:i})):l.setSelection({start:J(e+t,0,n)}):e===n&&t<0?(i=J(0,n+t,r),l.setSelection({start:i,end:i})):l.setSelection({end:J(n+t,e,r)}),l.playTimer&&l.play())}var a,s,l=this,u=!1;n.on("pointerdown",function(t){l.playTimer&&clearInterval(l.playTimer);var e=n.select(".slider-".concat(o,"-handle")).node();t.target===e&&(u=!0,s=[t.x,t.y],a=[t.x,t.y])}.bind(this)).on("pointerup",t).on("mouseupoutside",t).on("touchendoutside",t).on("pointermove",function(t){var e,n,r,i;u&&(e=l.styles.length,n=A(l).select(".slider-".concat(o,"-handle")).node(),r=l.ifH(t.x-a[0],t.y-a[1]),i=n.getLocalPosition(),"vertical"===l.orient?n.style.cy=J(i[1]+r,0,e):n.style.cx=J(i[0]+r,0,e),a=[t.x,t.y])})},uE.prototype.dragSelection=function(t){function e(t){l.playTimer&&clearInterval(l.playTimer),t.target===o&&(h=!0,i=[t.x,t.y],s=[t.x,t.y])}function n(t){var e;h&&(h=!1,t=oE(i?l.ifH(t.x-i[0],t.y-i[1]):0,l.style.length,l.style.data),i=void 0,e=l.selection[1]-l.selection[0],t=J(l.selection[1]+t,e,l.style.data.length-1),l.setSelection({start:t-e,end:t}),l.playTimer&&l.play())}function r(t){var e,n,r,i,o,a;h&&(e=l.styles.length,n=l.ifH(t.x-s[0],t.y-s[1]),r=(a=D(u.getLocalPosition(),2))[0],a=a[1],i=(o=D(c.getLocalPosition(),2))[0],o=o[1],"vertical"===l.orient?(u.style.cy=J(a+n,0,e-(o=o-a)),c.style.cy=u.style.cy+o):(a=i-r,u.style.cx=J(r+n,0,e),c.style.cx=u.style.cx+a),s=[t.x,t.y])}var s,i,l=this,o=t.select(".slider-selection").node(),u=t.select(".slider-start-handle").node(),c=t.select(".slider-end-handle").node(),h=!1;t.on("mousedown",e.bind(this)).on("touchstart",e.bind(this)).on("mouseup",n.bind(this)).on("mouseupoutside",n.bind(this)).on("touchend",n.bind(this)).on("touchendoutside",n.bind(this)).on("mousemove",r.bind(this)).on("touchmove",r.bind(this))},uE.defaultOptions={style:N({},Q2,{tag:"slider-axis",size:3,handleStyle:{r:3,stroke:"#8AADF3",strokeOpacity:.75,lineWidth:1,fill:"#fff",fillOpacity:1},backgroundStyle:{fill:"#416180",fillOpacity:.1},selectionStyle:{cursor:"grabbing"}})};var sE,lE=uE;function uE(t){t=sE.call(this,N({},uE.defaultOptions,t))||this;return t.startHandleAnimation=null,t.endHandleAnimation=null,t.selection=eE(t.style.selection,t.style.singleMode),t}function cE(t,e){return new qm({domain:t.map(function(t,e){return e}),range:e,paddingOuter:0,paddingInner:0})}i(pE,hE=r),pE.prototype.connectedCallback=function(){this.render(),this.bindEvents()},Object.defineProperty(pE.prototype,"styles",{get:function(){return N({},pE.defaultOptions.style,this.attributes)},enumerable:!1,configurable:!0}),pE.prototype.setSelection=function(t){var e,n=D(this.selection,2),r=n[0],n=n[1];this.selection=eE([null!=(e=t.start)?e:r,null!=(e=t.end)?e:n],this.style.singleMode),this.dispatchEvent(new jd("selectionChanged",{detail:{selection:this.selection}})),this.render()},pE.prototype.render=function(){var i=this,r=this.styles,o=r.size,a=r.spacing,t=D(this.ifH(["x","y","width","height"],["y","x","height","width"]),4),s=t[0],l=t[1],u=t[2],c=t[3],t=B(this,".slider-background","rect").attr("className","slider-background").style("x",0).style("y",0).style(u,r.length).style(c,o+a).call(C,r.backgroundStyle).node(),h=this.getCellScale(),d=h.getBandWidth(),e=r.data.map(function(t,e){var n;return T(((n={})[s]=h.map(e),n[l]=a/2,n[u]=d-r.cellGap,n[c]=o,n),r.cellStyle)}),e=(A(t).selectAll(".cell").data(e).join(function(t){return t.append("rect").attr("className","cell").each(function(t){this.attr(t)})},function(t){return t.each(function(t){this.attr(t)})},function(t){return t.remove()}),e.filter(function(t,e){var n=D(i.selection,2),r=n[0],n=n[1];return r<=e&&e<=n}).map(function(t){return T(T({},t),r.selectionStyle)})),n={duration:this.style.playInterval/2,easing:"cubic-bezier(0.250, 0.460, 0.450, 0.940)",fill:"both"},p=(A(t).selectAll(".selected-cell").data(e).join(function(t){return t.append("rect").attr("className","selected-cell").each(function(t){this.attr(t)})},function(t){return t.each(function(t){this.animate([t],n)})},function(t){return t.remove()}),r.length-2*r.spacing+r.cellGap),f=cE(r.data,[0,p]),y=r.data.map(function(t,e){return{value:(f.map(e)+(d-r.cellGap)/2)/p,text:t.date}}),e=r.label||{},g=e.position,m=void 0===g?-1:g,v=e.tickLine,b=I(e,["position","tickLine"]),g=-1===m?-2:r.spacing+o+2,x=[r.spacing,g],w=[a+p,g];"vertical"===this.orient&&(x=[x[1],x[0]],w=[w[1],w[0]]),B(t,".slider-axis",function(){return new F2({className:"slider-axis",style:tE})}).call(function(t){return t.node().update({startPos:x,endPos:w,ticks:y,verticalFactor:m,tickLine:null===r.label?null:v,label:null===r.label?null:b})})},pE.prototype.bindEvents=function(){this.dragSelection()},pE.prototype.getCellScale=function(){var t=this.styles.cellGap,e=this.styles.length,n=this.styles.spacing;return cE(this.style.data,[n,e-n+t])},pE.prototype.dragSelection=function(){function t(){r=!1,i.playTimer&&i.play()}var n,i=this,o=A(this).select(".slider-background"),r=!1,a=this.styles.spacing,s=function(t){var e=D(o.node().getPosition(),2),n=e[0],e=e[1],n=i.ifH(n+4,e+a),e=i.styles.cellGap,r=i.getCellScale().getStep();return Math.floor((t-n+e)/r)};o.on("pointerdown",function(t){i.playTimer&&clearInterval(i.playTimer),r=!0,n=i.ifH(t.x,t.y);t=s(n);i.setSelection({start:t,end:t})}).on("pointerup",t).on("mouseupoutside",t).on("touchendoutside",t).on("pointermove",function(t){var e;r&&(t=s(i.ifH(t.x,t.y)),e=(t=D((e=n?s(n):t)<t?[e,t]:[t,e],2))[0],t=t[1],i.setSelection({start:e,end:t}))})},pE.defaultOptions={style:N({},Q2,{tag:"cell-axis",backgroundStyle:{fill:"#416180",fillOpacity:.05},size:16,spacing:4,cellGap:2,cellStyle:{fill:"#416180",fillOpacity:.1},selectionStyle:{fillOpacity:.45},label:{autoHideTickLine:!0}})};var hE,dE=pE;function pE(t){t=hE.call(this,N({},pE.defaultOptions,t))||this;return t.selection=eE(t.style.selection,t.style.singleMode),t}function fE(t,e){return[1.43,2.79,4.89,7.57,11.66][t]/11.66*e}var yE,w=N({},J2.speedControl,{markerFill:"#8c8c8c",spacing:1,lineStyle:{stroke:"#bfbfbf",lineWidth:1}}),gE=(i(mE,yE=Xd),mE.prototype.connectedCallback=function(){this.render(),this.bindEvents()},mE.prototype.update=function(t){this.attr(N({},this.attributes,t=void 0===t?{}:t)),this.render()},Object.defineProperty(mE.prototype,"styles",{get:function(){return N({},mE.defaultOptions.style,this.attributes)},enumerable:!1,configurable:!0}),mE.prototype.render=function(){var t=this.styles,e=t.initialSpeed,n=t.markerSize,r=t.markerFill,i=t.lineStyle,o=t.speeds,a=t.labelStyle,s=t.spacing,t=t.formatter,t=void 0===t?function(t){return"".concat(t)}:t,e=o.indexOf(e),l=2*n,u=fE(e=-1===e?0:e,2*l),c=n*Math.tan(Math.PI/6)*2,r=(B(this,".speed-marker","path").attr("className","speed-marker").style("fill",r).style("path",[["M",0,u-c/2],["L",n,u],["L",0,u+c/2],["Z"]]),n-.5),u=B(this,".line-group","rect").attr("className","line-group").style("x",r).style("y",0).style("width",l).style("height",2*l).style("cursor","pointer").style("fill","transparent").node(),c=o.reduce(function(t,e,n){n=fE(n,2*l);return t.push(["M",0,n],["L",l,n]),t},[]);B(u,".speed-path","path").attr("className","speed-path").style("path",c).call(C,i),B(this,".speed-label","text").attr("className","speed-label").style("x",r+l+s).style("y",2).style("text",t(o[e])).call(C,a)},mE.prototype.bindEvents=function(){var e=this,t=this.querySelector(".line-group");t.addEventListener("pointerdown",function(t){return e.onClick(t)}),t.addEventListener("touchmove",function(t){return e.onClick(t)})},mE.prototype.onClick=function(t){var o,e=this.styles,a=e.speeds,n=e.markerSize,e=e.formatter,e=void 0===e?function(t){return"".concat(t)}:e,s=2*n*2,n=this.querySelector(".line-group"),r=A(this).select(".speed-label").node(),i=A(this).select(".speed-marker").node();t.currentTarget===n&&(o=t.y-n.getBBox().y,-1!==(t=a.findIndex(function(t,e){var n=fE(e,s),r=fE(e-1,s),i=fE(e+1,s);return 0===e?o<n+(fE(1,s)-n)/2:e===a.length-1?n-(n-r)/2<o:(e=[n-(n-r)/2,n+(i-n)/2])[0]<=o&&o<e[1]}))&&(r.setAttribute("text",e(a[t])),i.setLocalPosition(0,fE(t,s)-s/8),this.dispatchEvent(new jd("speedChanged",{detail:{speed:a[t]}}))))},mE.tag="speed-control",mE.defaultOptions={style:w},mE);function mE(t){return yE.call(this,N({},mE.defaultOptions,t))||this}i(wE,vE=Xd),wE.prototype.connectedCallback=function(){this.render(),this.bindEvents()},Object.defineProperty(wE.prototype,"styles",{get:function(){return N({},wE.defaultOptions.style,this.attributes)},enumerable:!1,configurable:!0}),wE.prototype.update=function(t){this.attr(N({},this.attributes,t=void 0===t?{}:t)),V(t.active)||(this.active=t.active),this.render()},wE.prototype.render=function(){var t,e=this.styles,n=e.size,r=e.buttonStyle,i=e.labelStyle,e=e.symbol,o=r.active,r=I(r,["active"]),r=B(this,".button","rect").attr("className","button").style("x",0).style("y",0).style("width",n).style("height",n).call(C,r).call(C,this.active?o:{}).node();B(r,".symbol","path").attr("className","symbol").style("x",n/2).style("y",n/2).style("path",[["M",(o=n/2)-(t=r=n/2)/7*4,r-t/14],["L",o-t/7,r+t/7*3],["L",o+t/7*4,r-t/7*3]]).style("lineWidth",1).style("lineCap","round").style("stroke","transparent").style("cursor","pointer").call(C,this.active?null==e?void 0:e.active:{}),B(this,".label","text").attr("className","label").style("x",n).style("y",n/2).call(C,i)},wE.prototype.bindEvents=function(){var t=this;A(this).select(".button").on("pointerdown",function(){t.dispatchEvent(new jd("singleModeChanged",{detail:{active:!t.active}}))})},wE.defaultOptions={style:{size:12,buttonStyle:{fill:"transparent",stroke:"#000",strokeOpacity:.15,cursor:"pointer",lineWidth:1,radius:2,active:{stroke:"#3471F9",fill:"#3471F9",strokeOpacity:1}},symbol:{active:{stroke:"#fff"}},labelStyle:{text:"",textAlign:"left",textBaseline:"middle",fill:"#000",fillOpacity:.65},cursor:"pointer"}};var vE,bE,xE=wE;function wE(t){t=vE.call(this,N({},wE.defaultOptions,t))||this;return t.active=!1,t.active=t.style.active||!1,t}function EE(t,e,n){var r,i,o,a,s,n=N({},J2,n),l=n.type,u=n.playAxis,c=n.controlButton,h=n.speedControl,d=n.singleModeControl,p=(null==(p=null==u?void 0:u.label)?void 0:p.position)||-1,f=null!=(f=null==u?void 0:u.spacing)?f:(null==(f=null==(f=dE.defaultOptions)?void 0:f.style)?void 0:f.spacing)||0,y=(null==u?void 0:u.size)||("cell"===l?null==(y=null==(y=dE.defaultOptions)?void 0:y.style)?void 0:y.size:null==(y=null==(y=lE.defaultOptions)?void 0:y.style)?void 0:y.size)||4,f=(y+="cell"===l?f:0,D(zx(null==u?void 0:u.appendPadding),4)),g=f[0],m=f[1],v=f[2],f=f[3],b=(null==c?void 0:c.spacing)||0,x=at(c)||at(null==c?void 0:c.playBtn)?0:null==(x=null==c?void 0:c.playBtn)?void 0:x.size,w=at(c)||at(null==c?void 0:c.prevBtn)?0:null==(w=null==c?void 0:c.prevBtn)?void 0:w.size,c=at(c)||at(null==c?void 0:c.nextBtn)?0:null==(c=null==c?void 0:c.nextBtn)?void 0:c.size,E=x/2+w/2+b,_=x/2+c/2+b,k=null===h?0:null==h?void 0:h.markerSize,T=2*k,h=null===h?0:null==h?void 0:h.width,M=2*T+k/2,S=null===d?0:null==d?void 0:d.width,d=null===d?0:(null==d?void 0:d.size)+2;return"vertical"===n.orient?{axis:{x:(n=f+(-1===p?30:0))+("cell"===l?0:y/2),y:i=(r=w+b+x/2)+x/2+b+g,length:(o=(s=(a=e-d)-4-M)-b-c/2)-b-c/2-v-i},prevBtn:{x:i=n+y/2,y:w/2,size:w},playBtn:{x:i,y:r,size:x},nextBtn:{x:i,y:o,size:c},speedControl:{x:n-h/2,y:s,size:h},singleModeControl:{x:0,y:a}}:(i=(r=e-S)-8-h,o=u,s=(o=N({},J2.playAxis,o).label)?((null==(n=o.tickLine)?void 0:n.len)||0)+(o.tickPadding||0)+(Number(o.style.fontSize)||0)+2:0,a=(-1===p?s:0)+("cell"===l?0:y/2)+g,"bottom"===t?{axis:{x:f,y:a,length:e-(f+m)},playBtn:{x:S=e/2,y:u=a+(1===p?s:0)+y+x/2+v,size:x},prevBtn:{x:S-E,y:u,size:w},nextBtn:{x:S+_,y:u,size:c},speedControl:{x:i,y:n=a+(1===p?s:0)+y+v,size:h},singleModeControl:{x:r,y:n+T-d/2}}:(g="cell"===l?a+y/2:a,e="cell"===l&&-1===p?s+y-M:1===p?a+k/2:a-M,"left"===t?{axis:{x:n=(v=(u=(S=w/2)+E)+_)+c/2+f,y:a,length:i-m-n},prevBtn:{x:S,y:g,size:w},playBtn:{x:u,y:g,size:x},nextBtn:{x:v,y:g,size:c},speedControl:{x:i,y:e,size:h},singleModeControl:{x:r,y:e+T-d/2}}:{axis:{x:f,y:a,length:(y=(s=(l=i-(c/2+b))-_)-E)-w/2-m-f},playBtn:{x:s,y:g,size:x},prevBtn:{x:y,y:g,size:w},nextBtn:{x:l,y:g,size:c},speedControl:{x:i,y:e,size:h},singleModeControl:{x:r,y:e+T-d/2}}))}function _E(t){t=bE.call(this,N({},{style:J2},t))||this;return t.speed=1,t.singleMode=!1,t.playing=!1,t.selection=[0,0],t.singleMode=t.style.singleMode||!1,t.selection=eE(t.style.selection,t.singleMode),t}function kE(t){var e,n={left:0,top:0,width:0,height:0};return"html"===(null==t?void 0:t.tagName)?n={left:0,top:0,width:(e=t.style).width,height:e.height}:t&&(t=(e=t.getLocalBounds()).min,e=e.halfExtents,n={left:t[0],top:t[1],width:2*e[0],height:2*e[1]}),{left:0,top:0,right:n.width,bottom:n.height}}function TE(t,n){var r,e,i,o;return n?(r=n.useHTML,e=n.style,i="legend-title ".concat(r?"html":"text","-title"),o="<span>".concat((null==n?void 0:n.content)||"","</span>"),B(t,".".concat(i),function(){return r?new gp({className:i,style:{innerHTML:o}}):new fp({className:i,style:e})}).call(function(t){var e;r?t.style("width",null!=(e=n.width)?e:80).style("height",null!=(e=n.height)?e:20).style("innerHTML",o):t.style("fontSize",12).style("textBaseline","top").style("text",n.content||"")}).call(C,e).node()):((t=t.querySelector(".legend-title"))&&t.remove(),null)}function ME(t,e,n,r){return B(t,".".concat(e),"g").attr("className",e).style("x",n).style("y",r).node()}function SE(t,e,n,r,i){B(t,".".concat(e),"rect").attr("className",e).style("zIndex",-1).style("width",n).style("height",r).call(C,i||{}).node()}i(_E,bE=Xd),_E.prototype.connectedCallback=function(){this.render(),this.bindEvents()},_E.prototype.update=function(t){this.attr(N({},this.attributes,t=void 0===t?{}:t)),void 0!==t.singleMode&&(this.singleMode=t.singleMode),t.selection&&(this.selection=eE(t.selection,this.singleMode)),this.render()},Object.defineProperty(_E.prototype,"styles",{get:function(){return N({},J2,this.attributes)},enumerable:!1,configurable:!0}),_E.prototype.render=function(){var e=this,t=this.styles,n=t.width,r=t.height,i=t.controlPosition,o=t.speedControl,a=t.singleModeControl,t=D(zx(this.styles.padding),4),s=t[0],s=void 0===s?0:s,l=t[1],l=void 0===l?0:l,u=t[2],t=t[3],t=void 0===t?l:t,c=B(this,".container","g").attr("className","container").style("x",t).style("y",s).node(),h=EE(i,"vertical"===this.style.orient?r-(s+u):n-(t+l),this.styles);this.renderAxis(c,h),this.renderControlButton(c,h),B(c,".timeline-speed-control",function(){return new gE({})}).attr("className","timeline-speed-control").call(function(t){null===o?t.remove():t.node().update(T(T({x:h.speedControl.x,y:h.speedControl.y},o),{initialSpeed:e.speed}))}),B(c,".timeline-single-control",function(){return new xE({})}).attr("className","timeline-single-control").call(function(t){null===a?t.remove():t.node().update(T(T({x:h.singleModeControl.x,y:h.singleModeControl.y},a),{active:e.singleMode}))})},_E.prototype.renderAxis=function(t,e){var n=this,r=this.styles.data,i=this.styles.type||"slider",o=A(t).select(".timeline-axis").node(),a="cell"===i?dE:lE;o&&o.style.tag!=="".concat(i,"-axis")&&(o.remove(),this.removeChild(o)),B(t,".timeline-axis",function(){return new a({})}).attr("className","timeline-axis").call(function(t){t.node().update(T({x:e.axis.x,y:e.axis.y,length:e.axis.length,data:r,selection:n.selection,orient:n.style.orient,playInterval:n.style.playInterval/n.speed,singleMode:n.singleMode},n.style.playAxis||{})),t.node().update({handleStyle:{cursor:"vertical"===n.style.orient?"ns-resize":"ew-resize"}})}).node()},_E.prototype.renderControlButton=function(t,n){var e,r=this,i=n.playBtn.size||0,o=n.prevBtn.size||0,a=(null==(e=n.nextBtn)?void 0:e.size)||0;B(t,".timeline-prev-btn",function(){return new K2({})}).attr("className","timeline-prev-btn").call(function(t){var e;o?(t.node().update(T(T({},(null==(e=r.style.controlButton)?void 0:e.prevBtn)||{}),{x:n.prevBtn.x,y:n.prevBtn.y,size:o,symbol:"timeline-prev-button"})),t.node().update({markerStyle:{transformOrigin:"center",transform:"vertical"===r.style.orient?"rotate(90deg)":""}})):t.remove()}),B(t,".timeline-play-btn",function(){return new K2({})}).attr("className","timeline-play-btn").call(function(t){var e;i?(t.node().update({backgroundStyle:{radius:(n.playBtn.size||0)/2}}),t.node().update(T(T({},(null==(e=r.style.controlButton)?void 0:e.playBtn)||{}),{x:n.playBtn.x,y:n.playBtn.y,size:i,symbol:r.playing?"timeline-play-button":"timeline-stop-button"}))):t.remove()}),B(t,".timeline-next-btn",function(){return new K2({})}).attr("className","timeline-next-btn").call(function(t){var e;a?(t.node().update(T(T({},(null==(e=r.style.controlButton)?void 0:e.nextBtn)||{}),{x:n.nextBtn.x,y:n.nextBtn.y,size:a,symbol:"timeline-next-button"})),t.node().update({markerStyle:{transformOrigin:"center",transform:"vertical"===r.style.orient?"rotate(90deg)":""}})):t.remove()}),this.style.autoPlay&&!this.playing&&(this.playing=!0,A(this).select(".timeline-axis").call(function(t){return null==(t=t.node())?void 0:t.play()}),A(this).select(".timeline-play-btn").call(function(t){return null==(t=t.node())?void 0:t.update({symbol:"timeline-play-button"})})),!this.style.autoPlay&&this.playing&&(this.playing=!1,A(this).select(".timeline-axis").call(function(t){return null==(t=t.node())?void 0:t.stop()}),A(this).select(".timeline-play-btn").call(function(t){return null==(t=t.node())?void 0:t.update({symbol:"timeline-stop-button"})}))};var Nt={style:{x:0,y:0,padding:0,orient:"horizontal",backgroundStyle:{fill:"transparent",lineWidth:0},title:{content:"",spacing:4,align:"left",style:{fontWeight:"bold",fontFamily:"sans-serif",fontSize:12,textAlign:"top",textBaseline:"top",fill:"#2C3542"}},label:{style:{fill:"#2C3542",fillOpacity:.65,fontSize:12}}}},OE={symbol:"circle",size:8},PE={style:{inactive:{fill:"#d3d2d3",opacity:.5}}},AE={style:{inactive:{fill:"#d3d2d3",opacity:.5}}},NE=N({},Nt,{style:{type:"category",items:[],maxWidth:void 0,maxHeight:void 0,maxCols:void 0,maxRows:void 0,spacing:[8,2],itemBackground:{padding:0,style:{fill:"transparent",active:{cursor:"pointer"}}},reverse:!(_E.prototype.bindEvents=function(){var e=this,n=A(this).select(".timeline-axis").node(),r=A(this).select(".timeline-play-btn").node();r&&A(r).on("pointerdown",function(t){e.playing?(e.playing=!1,n.stop(),r.update({symbol:"timeline-stop-button"})):(e.playing=!0,n.play(),r.update({symbol:"timeline-play-button"}))}),A(this).on("timelineStopped",function(){e.playing=!1,null!=r&&r.update({symbol:"timeline-stop-button"})}),A(this).on("speedChanged",function(t){e.speed=t.detail.speed,n.update({playInterval:e.style.playInterval/e.speed})}),A(this).select(".timeline-prev-btn").on("pointerdown",function(){return n.prev()}),A(this).select(".timeline-next-btn").on("pointerdown",function(){return n.next()}),A(this).on("singleModeChanged",function(t){e.singleMode=t.detail.active,e.selection=eE(e.selection,e.singleMode),e.render()}),A(this).on("selectionChanged",function(t){e.selection=t.detail.selection})}),pageNavigator:{loop:!1}}}),CE={width:100,height:20,type:"color",chunked:!1,ticks:[],isGradient:"auto",backgroundColor:"#c5c5c5"},LE={spacing:4,formatter:function(t){return String(t)},align:"rail",flush:!0,maxLength:30},IE={size:25,stroke:"#c5c5c5",fill:"#fff",lineWidth:1},jE=N({},Nt,{style:{type:"continuous",color:["#d0e3fa","#acc7f6","#8daaf2","#6d8eea","#4d73cd","#325bb1","#5a3e75","#8c3c79","#e23455","#e7655b"],label:LE,rail:CE,slidable:!0,indicator:{size:8,spacing:10,padding:5,backgroundStyle:{fill:"#262626","background-color":"#262626","border-radius":"5px"},text:{style:{color:"white","font-size":"12px"}}}}}),RE="legend-item-";function DE(t,e){t&&(t.setAttribute("tip",t.style.text),null!=t&&t.attr("text",e||""))}function BE(n,t){return void 0===n&&(n={}),(t=void 0===t?"":t).split("-").reduce(function(t,e){return T(T({},t),yt(n,e,{}))},{})}i(VE,FE=o),VE.prototype.setState=function(t,e){void 0===t&&(t=""),void 0===e&&(e=!0);var n=new Set((this.state||"").split("-"));e?n.add(t):n.delete(t),this.state=Pt([],D(n),!1).join("-"),this.update()},VE.prototype.getState=function(){return this.state},VE.prototype.update=function(t){FE.prototype.update.call(this,t=void 0===t?{}:t),t.state&&(this.state=t.state)},Object.defineProperty(VE.prototype,"styles",{get:function(){return N({},VE.defaultOptions.style,this.attributes)},enumerable:!1,configurable:!0}),VE.prototype.render=function(t,e){var n,r,i,o,a,s,l=this,u=this.styles,c=u.backgroundStyle,h=u.itemMarker,d=u.padding,p=u.itemName,f=u.itemValue,u=u.maxItemWidth,y=this.styles.itemHeight,d=D(zx(d),4),g=d[0],m=d[1],v=d[2],d=d[3],b=Number((null==h?void 0:h.size)||0),x=(V(y)&&(y=Math.max.call(null,b,Number((null==(x=null==p?void 0:p.style)?void 0:x.fontSize)||0),Number((null==(x=null==f?void 0:f.style)?void 0:x.fontSize)||0))+(g+v)),B(this,".".concat(RE,"container"),"g").attr("className","".concat(RE,"container")).style("x",d).style("y",y/2).node()),w=(B(x,".".concat(RE,"marker"),function(){return new yw({})}).attr("className","".concat(RE,"marker")).call(function(t){h?t.node().update(T(T({x:b/2,y:0,size:b,symbol:h.symbol},h.style||{}),BE(h.style,l.state))):t.remove()}),b?b+((null==p?void 0:p.spacing)||0):0),g=B(x,".".concat(RE,"name"),"text").attr("className","".concat(RE,"name")).call(function(t){p?t.node().attr(T(T({x:w,y:0,tip:"",text:(null==p?void 0:p.content)||"",textBaseline:"middle",textAlign:"left"},p.style||{}),BE(p.style,l.state))):t.remove()}).node(),E=w,v=(g&&!g.destroyed&&(E=g.getLocalBounds().max[0]),B(x,".".concat(RE,"value"),"text").attr("className","".concat(RE,"value")).call(function(t){f?t.node().attr(T(T(T({x:E+(f.spacing||0),y:0,tip:"",text:(null==f?void 0:f.content)||"",textAlign:"left"},f.style||{}),BE(f.style,l.state)),{textBaseline:"middle"})):t.remove()}).node()),_=(V(u)||(g=null!=g&&g.destroyed?null:g,v=null!=v&&v.destroyed?null:v,n=u-w-(d+m),(g||v)&&"number"==typeof n&&(Number(n)<=0?(DE(g,""),DE(v,"")):g&&v?(a=g.getLocalBounds(),i=v.getLocalBounds(),n<(r=2*a.halfExtents[0])+(_=2*i.halfExtents[0])+(i=r&&_?i.min[0]-a.max[0]:0)&&(o=(a=D([.5*n,.5*n],2))[0],a=a[1],s=k=!0,r<=o?(a=n-(r+i),k=!1):_<=a&&(o=n-(_+i),s=!1),k&&(DE(g,Ox(g.style.text,o,Nx(g))),v.attr("x",Number(g.style.x)+o+i)),s&&DE(v,Ox(v.style.text,a,Nx(v))))):n<2*(r=g||v).getLocalBounds().halfExtents[0]&&DE(r,Ox(r.style.text,n,Nx(r))))),x.getLocalBounds()),k=Math.max(2*_.halfExtents[0]+m+d,this.styles.itemWidth||0);V(u)||(k=Math.min(u,k)),B(this,".".concat(RE,"background"),"rect").attr("className","".concat(RE,"background")).style("x",_.min[0]-d).style("y",0).style("width",k).style("height",y).style("zIndex",-1).call(C,c).call(C,BE(c,this.state))},VE.defaultOptions={style:{id:"",value:{},itemMarker:{size:8,symbol:"circle",style:{fill:"#d3d2d3",fillOpacity:1,lineWidth:0,active:{cursor:"pointer"}}},itemName:{spacing:4,style:{fontFamily:"sans-serif",fill:"#646464",fontSize:12,opacity:1,active:{cursor:"pointer"}}},itemValue:{spacing:4,style:{fontFamily:"sans-serif",fill:"#646464",opacity:1,fontSize:12,active:{cursor:"pointer"}}}}};var FE,zE=VE;function VE(t){t=FE.call(this,N({},VE.defaultOptions,t))||this;return t.state="default",t.state=t.style.state||"selected",t}function GE(t,o,a){void 0===a&&(a=0);var s=0,l=0,u=0;return t.reduce(function(t,e){var n=D(e.getLocalBounds().halfExtents,2),r=n[0],n=n[1],i="horizontal"===o?[t,0]:[0,t];return e.setLocalPosition(i[0],i[1]),l=Math.max(l,2*n),u=Math.max(u,2*r),(s="horizontal"===o?t+2*r:t+2*n)+a},0),{totalSize:s,maxItemWidth:u,maxItemHeight:l}}K2.registerSymbol("left",function(t,e,n){return[["M",t-n*Math.sin(Math.PI/3),e],["L",t+n,e-n],["L",t+n,e+n],["Z"]]}),K2.registerSymbol("right",function(t,e,n){return[["M",t-n,e-n],["L",t+n*Math.sin(Math.PI/3),e],["L",t-n,e+n],["Z"]]}),K2.registerSymbol("up",function(t,e,n){return[["M",t-n,e+n],["L",t,e-n*Math.sin(Math.PI/3)],["L",t+n,e+n],["Z"]]}),K2.registerSymbol("down",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t,e+n*Math.sin(Math.PI/3)],["Z"]]});i(YE,HE=Xd),YE.prototype.connectedCallback=function(){this.container=this.appendChild(new tp),this.clipView=new ap({style:{path:[]}}),this.render(),this.bindEvents()},YE.prototype.update=function(t){this.attr(N({},this.attributes,t=void 0===t?{}:t)),this.render()},Object.defineProperty(YE.prototype,"styles",{get:function(){return N({},YE.defaultOptions.style,this.attributes)},enumerable:!1,configurable:!0}),YE.prototype.render=function(){this.renderButtonGroup();var t=this.style.items,t=void 0===t?[]:t;this.items=A(this.container).selectAll(".legend-item").data(t||[],function(t,e){return t.id||e}).join(function(t){return t.append(function(t){return new zE({id:t.id,className:"legend-item",style:t})})},function(t){return t.each(function(t){this.update(t)})},function(t){return t.remove()}).nodes(),this.adjustLayout()},YE.prototype.bindEvents=function(){this.prevButton.addEventListener("pointerdown",this.prev.bind(this)),this.nextButton.addEventListener("pointerdown",this.next.bind(this))},YE.prototype.ifHorizontal=function(t,e){return"vertical"===this.style.orient?"function"==typeof e?e():e:"function"==typeof t?t():t},YE.prototype.renderButtonGroup=function(){var t=this.styles,e=t.pageButtonStyle,n=void 0===e?{}:e,e=t.pageTextStyle,t=B(this,".page-button-group",function(){return new tp({className:"page-button-group"})}).node(),r="page-prev-button",i="page-next-button";this.prevButton=B(t,"#".concat(r),function(){return new K2({})}).attr("id",r).attr("className","page-button").attr("zIndex",2).call(function(t){t.node().update(n)}).node(),B(t,".page-info","text").attr("className","page-info").call(C,e),this.nextButton=B(t,"#".concat(i),function(){return new K2({})}).attr("id",i).attr("className","page-button").attr("zIndex",2).call(function(t){t.node().update(n)}).node(),this.updatePageButtonSymbol()},Object.defineProperty(YE.prototype,"pageInfoBounds",{get:function(){var t,e,n,r,i=this.querySelector(".page-info");return i?(r=(t=this.styles).pageFormatter,t=t.pageInfoSpacing,e=i.style.visibility,i.style.visibility="hidden",i.style.text=r(1,this.styles.items.length),n=(r=D(i.getLocalBounds().halfExtents,2))[0],r=r[1],i.style.visibility=e,{width:2*(n+t),height:2*(r+t)}):{width:0,height:0}},enumerable:!1,configurable:!0}),YE.prototype.layoutButton=function(t){var e,n=this.style.pageInfoSpacing,r=this.pageInfoBounds.height,n=this.pageInfoBounds.width+2*(void 0===n?0:n),i=D(this.querySelector(".page-button-group").childNodes,3),o=i[0],a=i[1],i=i[2];"horizontal"===t?(t=2*o.getLocalBounds().halfExtents[0],e=2*i.getLocalBounds().halfExtents[0],o.style.x=t/2,i.style.x=t+n+e/2,a.style.x=(Number(o.style.x)+Number(i.style.x))/2,o.style.y=0,i.style.y=0,a.style.y=0):(t=2*o.getLocalBounds().halfExtents[1],n=2*i.getLocalBounds().halfExtents[1],o.style.y=-(r+t)/2,i.style.y=(r+n)/2,a.style.y=0,e=this.pageInfoBounds.width/2,o.style.x=e,i.style.x=e,a.style.x=e)},YE.prototype.showButtonGroup=function(){this.querySelector(".page-button-group").style.visibility="visible"},YE.prototype.resetPageCfg=function(){this.querySelector(".page-button-group").style.visibility="hidden",this.container.style.clipPath=null,this.currPage=void 0,this.maxPages=void 0,this.pageOffsets=[],this.container.style.transform="translate(0,0)",this.clipView&&(this.clipView.style.transform="translate(0,0)")},YE.prototype.adjustLayout=function(){var t,e,n,r;this.resetPageCfg(),this.items.length<=1||(t=(n=D(zx(this.style.spacing),2))[0],n=n[1],t=this.ifHorizontal(t,n),t=(n=GE(this.items,this.style.orient||"horizontal",t)).totalSize,e=n.maxItemWidth,n=n.maxItemHeight,r=this.ifHorizontal(this.style.maxWidth,this.style.maxHeight),!V(r)&&r!==1/0&&r<t&&(this.style.autoWrap&&"vertical"!==this.style.orient?(this.layoutButton("vertical"),this.adjustHorizontalWrap(e,n,r)):(this.layoutButton("horizontal"),this.adjustFlip(e,n,r))))},YE.prototype.adjustFlip=function(t,e,n){this.showButtonGroup();var r=this.querySelector(".page-button-group"),i=this.style.pageSpacing,o=this.prevButton.style.size||YE.defaultOptions.style.pageButtonSize,a=r.getLocalBounds(),s=2*a.halfExtents[0],a=2*a.halfExtents[1],e=D(this.ifHorizontal([n-(s+i),e],[t,n-(a+i)]),2),l=e[0],u=e[1];this.clipView.style.path="M-1,0 L".concat(l,",0 L").concat(l,",").concat(u," L-1,").concat(u," Z"),this.container.style.clipPath=this.clipView,r.style.x=this.ifHorizontal(n-s,0),r.style.y=this.ifHorizontal(u/2-1,u+o+i);for(var c="x"===this.ifHorizontal("x","y")?0:1,h=[0],d=1,p=0;p<this.items.length;p++){var f=this.items[p].getLocalBounds(),y=f.min;f.max[c]-$(h)>this.ifHorizontal(l,u)+4&&(0!==y[c]&&h.push(y[c]),d+=1)}this.maxPages=d,this.currPage=1,this.pageOffsets=h,this.updatePageNavigatorState()},YE.prototype.adjustHorizontalWrap=function(t,u,e){this.showButtonGroup();var n,r=this.querySelector(".page-button-group"),i=this.style,o=i.pageSpacing,o=void 0===o?0:o,a=i.cols,i=this.pageInfoBounds.width,c=this.style.maxRows||2,s=r.getLocalBounds(),s=Math.max(2*s.halfExtents[0],i),i=e-(s+o),l=u*c;function h(t,e){for(var n=1,r=0,i=[0],o=0;o<e.length;o++){var a=e[o],s=a.getLocalBounds(),l=s.min;s.max[0]-r>t&&(n+=1,r=l[0],n%c==1&&i.push((n-1)*u)),a.setLocalPosition(l[0]-r,(n-1)*u)}return i}a&&c&&(a*c<=this.items.length&&(i=e),n=e/a),this.clipView.style.path="M-1,0 L".concat(i,",0 L").concat(i,",").concat(l," L-1,").concat(l," Z"),this.container.style.clipPath=this.clipView;var d=[];if(a&&n)for(var p=D(zx(this.style.spacing),1)[0],f=0,y=0,g=0;g<this.items.length;g+=a){y=0,(f+=1)%c==1&&d.push(Math.floor(f/c)*l);for(var m=0;m<a&&g+m<this.items.length;m++)this.items[g+m].update({x:y,y:(f-1)*u,maxItemWidth:n-p}),y+=n}else 1===(d=h(i,this.items)).length&&(p=(o=D(zx(this.style.spacing),2))[0],i=o[1],y=this.ifHorizontal(p,i),GE(this.items,this.style.orient||"horizontal",y),h(e,this.items));this.maxPages=d.length,this.currPage=1,this.pageOffsets=d,this.maxPages<=1?this.resetPageCfg():(r.style.x=e-s,r.style.y=l/2-2,this.updatePageNavigatorState())},YE.prototype.updatePageNavigatorState=function(){this.updatePageInfo(),this.currPage===this.maxPages?this.nextButton.setState("disabled"):this.nextButton.setState("default"),1===this.currPage?this.prevButton.setState("disabled"):this.prevButton.setState("default")},YE.prototype.updatePageButtonSymbol=function(){var t=this.style.autoWrap,t=this.ifHorizontal(t?1:0,1);this.prevButton.update({symbol:["left","up"][t]}),this.nextButton.update({symbol:["right","down"][t]})},YE.prototype.updatePageInfo=function(){var t=this.styles.pageFormatter;A(this).select(".page-info").style("text",this.currPage&&this.maxPages?t(this.currPage,this.maxPages):"")},YE.prototype.finished=function(){var e=this;return this.finishedPromise||(this.finishedPromise=new Promise(function(t){e.resolveFinishedPromise=function(){e.finishedPromise=null,t(e.currPage)}})),"idle"===this.playState&&this.resolveFinishedPromise(),this.finishedPromise},YE.prototype.prev=function(){var t,e;this.maxPages&&this.currPage&&(t=this.style.loop,(e=this.currPage-1)<1&&(e=t?this.maxPages:1),this.goTo(e))},YE.prototype.next=function(){var t,e,n;this.maxPages&&this.currPage&&(t=this.style.loop,e=this.maxPages,n=this.currPage+1,this.goTo(n=e<n?t?1:e:n))},YE.prototype.goTo=function(t){var e,n,r,i,o=this;t!==this.currPage&&"idle"===this.playState&&(e=(i=this.style).effect,n=i.duration,i=i.autoWrap,r=(i=D(this.ifHorizontal(i?[0,-this.pageOffsets[t-1]]:[-this.pageOffsets[t-1],0],[0,-this.pageOffsets[t-1]]),2))[0],i=i[1],this.playState="running",this.clipView.animate([{transform:this.clipView.style.transform},{transform:"translate(".concat(-r,"px,").concat(-i,"px)")}],{duration:n,easing:e,fill:"both"}),this.container.animate([{transform:this.container.style.transform},{transform:"translate(".concat(r,"px,").concat(i,"px)")}],{duration:n,easing:e,fill:"both"}),Promise.all(this.clipView.getAnimations().map(function(t){return t.finished})).then(function(){o.currPage=t,o.updatePageNavigatorState(),o.resolveFinishedPromise(),o.playState="idle"}),this.finished())},YE.defaultOptions={style:{spacing:[4,0],effect:"easeQuadInOut",duration:320,maxRows:2,maxCols:2,pageButtonSize:10,pageInfoSpacing:2,pageFormatter:function(t,e){return"".concat(t,"/").concat(e)},pageButtonStyle:{size:10,margin:0,padding:0,markerStyle:{fill:"black",cursor:"pointer",disabled:{fill:"#d9d9d9",cursor:"not-allowed"}},backgroundStyle:{cursor:"pointer",fill:"transparent",disabled:{cursor:"not-allowed"}}},pageTextStyle:{fontSize:12,textBaseline:"middle",textAlign:"center"}}};var HE,WE=YE;function YE(t){t=HE.call(this,N({},YE.defaultOptions,t))||this;return t.items=[],t.maxPages=void 0,t.currPage=void 0,t.pageOffsets=[],t.playState="idle",t}function UE(t){var e=t.items,i=t.maxWidth,o=t.maxItemWidth,a=t.itemMarker,s=t.itemName,l=t.itemValue,n=t.reverse,u=t.itemWidth,c=t.itemHeight,h=t.itemPadding,d=t.itemBackgroundStyle,p=e.slice();return n&&p.reverse(),p.map(function(t,e){return{id:t.id||"legend-item-".concat(e),state:t.state||"default",value:t,maxItemWidth:q([null!=o?o:Number.MAX_VALUE,null!=i?i:Number.MAX_VALUE]),itemMarker:(r=z(a)?a(t,e,p):a,N({},OE,{symbol:t.marker,style:{fill:t.color,stroke:t.color}},r)),itemName:(r=N({},{formatter:function(){return t.name}},s),n=r.formatter,r=I(r,["formatter"]),N({},PE,{content:n(t,e,p)},r)),itemValue:(n=N({},{formatter:function(){return t.value}},l),r=n.formatter,n=I(n,["formatter"]),N({},AE,{content:r(t,e,p)},n)),itemWidth:u,itemHeight:c,padding:h,backgroundStyle:d};var n,r})}i(ZE,qE=o),ZE.prototype.render=function(e,t){var n=e.padding,r=e.title,i=e.inset,o=e.orient,a=void 0===o?"horizontal":o,s=e.spacing,l=e.autoWrap,u=e.maxRows,c=e.maxWidth,h=e.maxHeight,d=e.cols,p=e.pageNavigator,o=e.backgroundStyle,o=void 0===o?{}:o,n=D(zx(n),4),f=n[0],y=n[1],g=n[2],n=n[3],m=ME(t,"legend-container",n,f),v=TE(m,r),r=(null==r?void 0:r.spacing)||0,i=D(zx(i),4),b=i[0],i=i[3],v=kE(v),i=(B(ME(m,"legend-inner-group",v.left+i,v.bottom+b+r),".category-items",function(){return new WE({})}).attr("className","category-items").call(function(t){t.node().update(T({orient:a,items:UE(e),spacing:s,autoWrap:l,maxRows:u,maxWidth:c,maxHeight:h,cols:d},p||{}))}).node(),m.getLocalBounds()),v=i.min,b=i.max,r=b[0]-v[0],m=b[1]-v[1];SE(t,"legend-background",Math.min(r+y+n,c||Number.MAX_VALUE),Math.min(m+f+g,h||Number.MAX_VALUE),o)},ZE.prototype.getItem=function(t){return this.querySelector("[id=".concat(t,"]"))},ZE.prototype.setItemState=function(t,e,n){void 0===n&&(n=!0),null!=(t=this.getItem(t))&&t.setState(e,n)},ZE.prototype.getItemsStates=function(){return this.querySelectorAll(".legend-item").map(function(t){return{id:t.id,state:t.getState()}})};var qE,XE=ZE;function ZE(t){return qE.call(this,N({},NE,t))||this}function KE(t,e,n){return"horizontal"===(t=void 0===t?"horizontal":t)?e:n}yw.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"]]}),yw.registerSymbol("verticalHandle",function(t,e,n){var r=1.4*n,i=n/2,o=t+.4*r;return[["M",t,e],["L",o,e+i],["L",t+r,e+i],["L",t+r,e-i],["L",o,e-i],["Z"],["M",o,e+(n=n/6)],["L",t+r-2,e+n],["M",o,e-n],["L",t+r-2,e-n]]}),yw.registerSymbol("horizontalHandle",function(t,e,n){var r=1.4*n,i=n/2,o=e+.4*r;return[["M",t,e],["L",t-i,o],["L",t-i,e+r],["L",t+i,e+r],["L",t+i,o],["Z"],["M",t-(n=n/6),o],["L",t-n,e+r-2],["M",t+n,o],["L",t+n,e+r-2]]});i(QE,$E=Xd),QE.prototype.connectedCallback=function(){this.draw()},QE.prototype.attributeChangedCallback=function(){this.draw()},QE.prototype.draw=function(){this.updateBackground(),this.updateTrack()},QE.prototype.updateBackground=function(){var t=this.style.backgroundColor;this.path.style.path=this.getRailPath(),this.path.attr({fill:t,fillOpacity:.45})},QE.prototype.updateTrack=function(){var t=this.style.fill;this.track.style.path=this.getRailPath(),this.track.style.clipPath=this.getClipPath(),this.track.style.fill=t},Object.defineProperty(QE.prototype,"box",{get:function(){var t=this.style,e=t.orient,n=t.size,t=t.length;return KE(e,[t,n],[n,t])},enumerable:!1,configurable:!0}),QE.prototype.getRailPath=function(){var t=this.style.type,e=D(this.box,2),n=e[0],e=e[1];return"size"===t?[["M",0,e],["L",0+n,0],["L",0+n,e]]:[["M",0,e],["L",0,0],["L",0+n,0],["L",0+n,e]]},QE.prototype.getClipPath=function(){var t,e,n,r,i=this.style,o=i.orient,i=i.selection;return i?(r=(t=D(this.box,2))[0],t=t[1],n=(i=D(i,2))[0],i=i[1],e=KE(o,n*r,0),n=KE(o,0,n*t),r=KE(o,i*r,r),o=KE(o,t,i*t),new ap({style:{path:[["M",e,n],["L",e,o],["L",r,o],["L",r,n]]}})):null};var $E,JE=QE;function QE(t){t=$E.call(this,rw({},{style:CE},t=void 0===t?{}:t))||this;return t.path=t.appendChild(new ap({className:"rail-path"})),t.track=t.appendChild(new ap({className:"rail-path"})),t}i(n_,t_=o),n_.prototype.render=function(t,e){var n=t.textStyle,r=t.visibility,i=t.symbol,o=t.size,a=t.fill,s=t.stroke,l=t.lineWidth;i&&"hidden"!==r?(B(e,".handle",function(){return new yw({})}).attr("className","handle").call(function(t){t.node().update({symbol:i,size:o,fill:a,stroke:s,lineWidth:l})}),B(e,".handle-text","text").attr("className","handle-text").call(C,n)):(null!=(t=e.querySelector(".handle"))&&t.remove(),null!=(r=e.querySelector(".handle-text"))&&r.remove())};var t_,e_=n_;function n_(){return null!==t_&&t_.apply(this,arguments)||this}i(o_,r_=Xd),o_.prototype.connectedCallback=function(){this.init(),this.bindEvents()},o_.prototype.attributeChangedCallback=function(t,e,n){"textStyle"!==t&&"padding"!==t&&"position"!==t||this.init()},o_.prototype.hide=function(){this.style.visibility="hidden"},o_.prototype.show=function(){this.style.visibility="visible"},o_.prototype.init=function(){var t=this.style,e=t.textStyle;"top"===t.position?this.text.attr(T({textAlign:"center"},e)):this.text.attr(T({textAlign:"left"},e))},o_.prototype.updateBackground=function(){var t,e,n=this.text.getLocalBounds(),r=n.min,n=n.max,i=Math.min(n[0]-r[0],40),r=[r[0]-4,r[1]-2,r[0]+i+4,n[1]+2],o=(i=this.style.position,r=(n=D(n=r,4))[0],e=n[1],o=n[2],n=n[3],"top"===i?[["M",r,n],["L",r,e],["L",o,e],["L",o,n],["L",r+(i=o-r)/2+(t=J(10,i/3,i/2))/2,n],["L",r+i/2,n+4],["L",r+i/2-t/2,n],["L",r,n]]:[["M",r,e],["L",o,e],["L",o,n],["L",r,n],["L",r,e+(i=n-e)/2+(t=J(6,i/3,i/2))/2],["L",r-4,e+i/2],["L",r,e+i/2-t/2],["L",r,e]]);this.background.style.path=o},o_.prototype.bindEvents=function(){var t=this;this.text.addEventListener(E.BOUNDS_CHANGED,function(){t.updateBackground()})};var r_,i_=o_;function o_(t){t=r_.call(this,rw({},{style:{visibility:"hidden"}},t=void 0===t?{}:t))||this;return t.background=t.appendChild(new ap({style:{lineCap:"round",fill:"#262626",lineWidth:1,stroke:"#333"}})),t.text=t.appendChild(new fp({style:{text:"",fill:"#fff",fontSize:10,textBaseline:"middle"}})),t}function a_(t,e){var t=D(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]}}function s_(t,e,n,r,i){var o=D(KE(t,["dx","dy"],["dy","dx"]),2),a=o[0],o=o[1],s={};return s[a]=e,s[o]="start"===n?-i:r+i,s.textAlign=KE(t,"center","start"===n?"right":"left"),s.textBaseline=KE(t,"start"===n?"bottom":"top","middle"),s}function l_(t,e){var n,s,l,u,r,i,o,c=t.min,h=t.max,a=t.handle,d=t.orient,p=void 0===d?"horizontal":d;return null===t.label||a?[]:(s=rw({size:24,length:200},CE,t.rail||{}),d=rw({},LE,t.label||{}),l=d.align,u=d.spacing,"rail"===l?(t=(a=D(KE(p,["dx","dy"],["dy","dx"]),2))[0],d=a[1],r=(a=D(KE(p,["right","left"],["center","center"]),2))[0],a=a[1],i=(o=D(KE(p,["middle","middle"],["bottom","top"]),2))[0],o=o[1],[((n={id:"legend-label-0",text:"".concat(c)})[t]=-u,n[d]=s.size/2,n.textAlign=r,n.textBaseline=i,n),((r={id:"legend-label-1",text:"".concat(h)})[t]=s.length+u,r[d]=s.size/2,r.textAlign=a,r.textBaseline=o,r)]):e.map(function(t,e){a=t,n=c,r=h,i=s;var n,r,i,o=(o=void 0!==o&&o)?a*(r-n)/i.length:Lx((a-n)*(n<r?i.length/(r-n):0),2),a=s_(p,o,l,s.size,u);return T({id:"legend-label-".concat(e),text:"".concat(t)},a)}))}var u_=dt(function(t){return t.sort(function(t,e){return t-e})},function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return JSON.stringify(t)});i(y_,c_=o),y_.prototype.render=function(t,e){var n=t.padding,r=t.title,i=t.inset,o=(t.orient,t.backgroundStyle),o=void 0===o?{}:o,a=t.maxWidth,s=t.maxHeight,l=t.label,n=D(zx(n),4),u=n[0],c=n[1],h=n[2],n=n[3],d=ME(e,"legend-container",n,u),p=TE(d,r),r=(null==r?void 0:r.spacing)||0,i=D(zx(i),4),f=i[0],i=i[3],p=kE(p),i=ME(d,"legend-inner-group",p.left+i,p.bottom+f+r),p=l_(t,this.ticks),f=(S2(i,"legend-label",p,l,{fill:"#2C3542",fillOpacity:.65,fontWeight:"normal"}),this.drawInner(),d.getLocalBounds()),r=f.min,t=f.max,i=t[0]-r[0],p=t[1]-r[1];SE(e,"legend-background",Math.min(i+c+n,a||Number.MAX_VALUE),Math.min(p+u+h,s||Number.MAX_VALUE),o)},y_.prototype.drawInner=function(){this.drawRail(),this.drawHandles(),this.createIndicator()},Object.defineProperty(y_.prototype,"orient",{get:function(){return this.style.orient||"horizontal"},enumerable:!1,configurable:!0}),Object.defineProperty(y_.prototype,"selection",{get:function(){var t=this.style,e=t.min,n=t.max;return[t.start||e,t.end||n]},enumerable:!1,configurable:!0}),Object.defineProperty(y_.prototype,"labelsCfg",{get:function(){var t=this.style.label;return rw({},LE,t||{})},enumerable:!1,configurable:!0}),Object.defineProperty(y_.prototype,"railCfg",{get:function(){var t=this.style.rail;return rw({size:24,length:200},CE,t||{})},enumerable:!1,configurable:!0}),Object.defineProperty(y_.prototype,"handleCfg",{get:function(){var t=this.style,e=t.handle,t=t.label;return rw({},IE,e||{},{textStyle:this.labelsCfg.style,spacing:this.labelsCfg.spacing,visibility:e&&null!==t?"visible":"hidden"})},enumerable:!1,configurable:!0}),y_.prototype.ifHorizontal=function(t,e){return KE(this.orient,"function"==typeof t?t():t,"function"==typeof e?e():e)},Object.defineProperty(y_.prototype,"color",{get:function(){var t,e,i,o,a,n=this.style.color,n=Array.from(void 0===n?[]:n),r=n.length;return r?this.railCfg.chunked?(t=this.ticks,e=this.orient,i=Array.from(n),o=i.length,a=t.length,t.reduce(function(t,e,n){var r=i[n%o];return t+" ".concat(n/(a-1),":").concat(r).concat(n<a-1?" ".concat((n+1)/(a-1),":").concat(r):"")},"l(".concat("horizontal"===e?"0":"270",")"))):n.reduce(function(t,e,n){return t+" ".concat(n/(r-1),":").concat(e)},"l(".concat(this.ifHorizontal("0","270"),")")):""},enumerable:!1,configurable:!0}),Object.defineProperty(y_.prototype,"slidable",{get:function(){return!!this.style.handle},enumerable:!1,configurable:!0}),Object.defineProperty(y_.prototype,"ticks",{get:function(){var t=this.style,e=t.min,t=t.max;return u_(Pt(Pt([e],D(this.railCfg.ticks||[]),!1),[t],!1))},enumerable:!1,configurable:!0}),y_.prototype.drawRail=function(){var t=this.style,e=t.orient,n=t.min,t=t.max,r=D(this.selection,2),i=r[0],r=r[1],o=this.querySelector(".legend-inner-group");this.rail=A(this.rail||o.appendChild(new JE)).attr("className","legend-rail").call(C,T(T({},this.railCfg),{fill:this.color,orient:e})).style("selection",this.slidable?[(i-n)/(t-n),(r-n)/(t-n)]:void 0).node()},y_.prototype.drawHandles=function(){var t=D(this.selection,2),e=t[0],t=t[1];this.startHandle=this.drawHandle("start",e),this.endHandle=this.drawHandle("end",t)},y_.prototype.drawHandle=function(t,e){var n=this,r=this.labelsCfg,i=r.align,r=r.spacing,o=this.railCfg.size,a=this.handleCfg.size,s=this.getOffset(e),l=s_(this.orient,s,i,o,-a/3),u=l.dx,c=l.dy,h=s_(this.orient,s,i,o,"start"===i?r:a/3+r),l="start"===t?this.startHandle:this.endHandle,s=this.querySelector(".legend-inner-group");return A(l||s.appendChild(new e_({}))).attr("className","legend-handle-".concat(t)).call(function(t){return t.node().update(T(T({},n.handleCfg),{x:u,y:c,symbol:n.ifHorizontal("horizontalHandle","verticalHandle"),textStyle:T({text:"".concat(null!=e?e:""),x:+h.dx-+u,y:+h.dy-+c,textAlign:h.textAlign,textBaseline:h.textBaseline},n.handleCfg.textStyle)}))}).node()},y_.prototype.createIndicator=function(){this.indicator=this.appendChild(new i_({zIndex:2,className:"legend-indicator",style:{position:this.ifHorizontal("top","right")}}))},y_.prototype.bindEvents=function(){var n=this,t=new Map;t.set("rail",this.rail),t.set("start",this.startHandle),t.set("end",this.endHandle),t.forEach(function(t,e){t.addEventListener("mousedown",n.onDragStart(e)),t.addEventListener("touchstart",n.onDragStart(e))}),this.startHandle.addEventListener("mouseover",function(){return n.updateMouse()}),this.endHandle.addEventListener("mouseover",function(){return n.updateMouse()}),this.rail.addEventListener("mousemove",this.onHovering),this.addEventListener("mouseout",this.hideIndicator)},y_.prototype.showIndicator=function(t,e){var n,r,i,o,a,s,l;void 0===e&&(e="".concat(t)),"number"!=typeof t?this.hideIndicator():(this.indicator.show(),l=this.querySelector(".legend-container"),t=Xl(t,(t=this.style).min,t.max),n=this.ifHorizontal(this.getOffset(t),this.railCfg.size+12),t=this.ifHorizontal(-14,this.getOffset(t)),r=(i=this.rail.getBBox()).x,i=i.y,o=(a=l.getBBox()).x,a=a.y,s=(l=D(l.getLocalPosition(),2))[0],l=l[1],this.indicator.style.x=r-o+s+n,this.indicator.style.y=i-a+l+t,this.indicator.style.textStyle={text:e})},y_.prototype.hideIndicator=function(){var t;null!=(t=this.indicator)&&t.hide()},y_.prototype.onDragEnd=function(){this.style.cursor="default",this.removeEventListener("mousemove",this.onDragging),this.removeEventListener("touchmove",this.onDragging),document.removeEventListener("mouseup",this.onDragEnd),document.removeEventListener("touchend",this.onDragEnd)},y_.prototype.updateMouse=function(){this.style.slidable&&(this.style.cursor="grabbing")},y_.prototype.setSelection=function(t,e){this.updateSelection(t,e)},y_.prototype.updateSelection=function(t,e,n){void 0===n&&(n=!1);var r,i,o,a,s,l=D(this.selection,2),u=l[0],l=l[1],t=D([t,e],2),e=t[0],t=t[1],n=(n&&(e+=u,t+=l),this.style),u=n.min,l=n.max,c=D((n=[u,l],u=[e,t],l=this.selection,void 0===r&&(r=4),i=(n=D(n,2))[0],n=n[1],o=(u=D(u,2))[0],u=u[1],a=(l=D(l,2))[0],l=l[1],u=(o=D([o,u],2))[0],s=(o=o[1])-u,o<u&&(u=(c=D([o,u],2))[0],o=c[1]),n-i<s?[i,n]:u<i?a===i&&l===o?[i,o]:[i,s+i]:n<o?l===n&&a===u?[u,n]:[n-s,n]:[Lx(u,r),Lx(o,r)]),2),e=c[0],t=c[1];this.update({start:e,end:t}),this.dispatchSelection()},Object.defineProperty(y_.prototype,"step",{get:function(){var t=this.attributes,e=t.step,n=t.min,t=t.max;return st(e)?Lx(.01*(t-n),0):e},enumerable:!1,configurable:!0}),y_.prototype.getTickValue=function(t){return this.railCfg.chunked?a_(this.ticks,t).tick:(e=this.step,(n=this.style.min)+Math.round((t-n)/e)*e);var e,n},y_.prototype.getValueByCanvasPoint=function(t,e){var n=this.style,r=n.min,n=n.max,i=D(this.rail.getPosition(),2),o=i[0],i=i[1],o=this.ifHorizontal(o,i),i=this.ifHorizontal.apply(this,Pt([],D(Yx(t)),!1));return Xl(this.getOffset(i-o,!0)+r,r,n)},y_.prototype.getOffset=function(t,e){var n=this.style,r=n.min,n=n.max;return(e=void 0!==e&&e)?t*(n-r)/this.railCfg.length:Lx((t-r)*(r<n?this.railCfg.length/(n-r):0),2)},y_.prototype.dispatchSelection=function(){var t=new jd("valueChanged",{detail:{value:this.selection}});this.dispatchEvent(t)},y_.prototype.dispatchIndicated=function(t,e){t=new jd("onIndicated",{detail:{value:t,range:e}});this.dispatchEvent(t)},t([lw(20)],y_.prototype,"dispatchSelection",null),t([lw(20)],y_.prototype,"dispatchIndicated",null);var c_,h_,d_,p_,f_=y_;function y_(t){var o=c_.call(this,rw({type:"continuous-legend"},jE,t))||this;return o.onHovering=function(t){t.stopPropagation();var e,t=o.getValueByCanvasPoint(t);yt(o.attributes,["rail","chunked"])?(e=a_(o.ticks,t).range,o.showIndicator((e[0]+e[1])/2,"".concat(e[0],"-").concat(e[1])),o.dispatchIndicated(t,e)):(e=o.getTickValue(t),o.showIndicator(e),o.dispatchIndicated(e))},o.onDragStart=function(e){return function(t){t.stopPropagation(),o.slidable&&(o.target=e,o.prevValue=o.getTickValue(o.getValueByCanvasPoint(t)),o.addEventListener("mousemove",o.onDragging),o.addEventListener("touchmove",o.onDragging),o.addEventListener("mouseleave",o.onDragEnd),o.addEventListener("mouseup",o.onDragEnd),document.addEventListener("mouseup",o.onDragEnd),document.addEventListener("touchend",o.onDragEnd))}},o.onDragging=function(t){var e=o.target,n=(o.updateMouse(),D(o.selection,2)),r=n[0],n=n[1],t=o.getTickValue(o.getValueByCanvasPoint(t)),i=t-o.prevValue;"start"===e?r!==t&&o.updateSelection(t,n):"end"===e?n!==t&&o.updateSelection(r,t):"rail"===e&&0!=i&&(o.prevValue=t,o.updateSelection(i,i,!0))},o}function g_(t){h_||(h_=document.createElement("table"),p_=document.createElement("tr"),d_=/^\s*<(\w+|!)[^>]*>/,p_={tr:document.createElement("tbody"),tbody:h_,thead:h_,tfoot:h_,td:p_,th:p_,"*":document.createElement("div")});var e=d_.test(t)&&RegExp.$1,e=(e&&e in p_||(e="*"),p_[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 m_,Lt="tooltip",v_="tooltip-title",b_="tooltip-list",Ht="tooltip-list-item",Kt="tooltip-list-item-name",h="tooltip-list-item-marker",n="tooltip-list-item-name-label",c="tooltip-list-item-value",Yt="tooltip-crosshair-x",zt="tooltip-crosshair-y",oe={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"},a=((jt={})[".".concat(Lt)]={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"},jt[".".concat(v_)]={color:"rgba(0, 0, 0, 0.45)"},jt[".".concat(b_)]={margin:"0px","list-style-type":"none",padding:"0px"},jt[".".concat(Ht)]={"list-style-type":"none","margin-top":"12px",display:"flex","line-height":"1em","align-items":"center","justify-content":"space-between","white-space":"nowrap"},jt[".".concat(h)]={width:"8px",height:"8px","border-radius":"50%",display:"inline-block","margin-right":"4px"},jt[".".concat(Kt)]={display:"flex","align-items":"center","max-width":"216px"},jt[".".concat(n)]=T({flex:1},oe),jt[".".concat(c)]=T({display:"inline-block",float:"right",flex:1,"text-align":"right","min-width":"28px","margin-left":"30px",color:"rgba(0, 0, 0, 0.85)"},oe),jt[".".concat(Yt)]={position:"absolute",width:"1px","background-color":"rgba(0, 0, 0, 0.25)"},jt[".".concat(zt)]={position:"absolute",height:"1px","background-color":"rgba(0, 0, 0, 0.25)"},jt),x_=(i(w_,m_=o),Object.defineProperty(w_.prototype,"HTMLTooltipElement",{get:function(){return this.element},enumerable:!1,configurable:!0}),Object.defineProperty(w_.prototype,"position",{set:function(t){var t=D(t,2),e=t[0],t=t[1];this.attr({x:e,y:t}),this.updatePosition()},enumerable:!1,configurable:!0}),Object.defineProperty(w_.prototype,"elementSize",{get:function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},enumerable:!1,configurable:!0}),Object.defineProperty(w_.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,o=t.index,t=I(t,["name","value","color","index"]);return T({name:n,value:r,color:i,index:void 0===o?e:o},t)})))},enumerable:!1,configurable:!0}),Object.defineProperty(w_.prototype,"HTMLTooltipItemsElements",{get:function(){var e=this.attributes.template.item,r=[];return this.items.forEach(function(t){var n;r.push(g_((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(w_.prototype,"customContent",{get:function(){var t=this.attributes.customContent;return Z(t)?Kx(t):lt(t)?t:z(t)?Kx(t(this.attributes.items)):void 0},enumerable:!1,configurable:!0}),w_.prototype.render=function(t,e){this.updateHTMLTooltipElement(),this.updatePosition()},w_.prototype.update=function(t){this.attr(N({},this.attributes,t)),this.render(this.attributes,this)},w_.prototype.clear=function(){this.element.innerHTML=""},w_.prototype.destroy=function(){var t;null!=(t=this.element)&&t.remove(),null!=(t=this.customContent)&&t.remove()},w_.prototype.show=function(){this.visibility="visible",this.element.style.visibility="visible"},w_.prototype.hide=function(){this.visibility="hidden",this.element.style.visibility="hidden"},w_.prototype.initShape=function(){var t=this.attributes.template.container;this.element=g_(t),!this.id&&""===this.id||this.element.setAttribute("id",this.id)},w_.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(v_)[0].innerHTML=t,i=this.HTMLTooltipItemsElements,(e=document.createElement("ul")).className=b_,i.forEach(function(t){e.appendChild(t)}),this.element.appendChild(e)),this.attributes.style);r=n,Object.entries(t).forEach(function(t){var t=D(t,2),e=t[0],n=t[1];Pt([r],D(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},w_.prototype.getRelativeOffsetFromCursor=function(t){var e=this.attributes,n=e.position,e=D(e.offset,2),i=e[0],o=e[1],e=(t||n).split("-"),a={left:[-1,0],right:[1,0],top:[0,-1],bottom:[0,1]},t=this.elementSize,s=t.width,l=t.height,u=[-s/2,-l/2];return e.forEach(function(t){var e=D(u,2),n=e[0],e=e[1],t=D(a[t],2),r=t[0],t=t[1];u=[n+(s/2+i)*r,e+(l/2+o)*t]}),u},w_.prototype.setOffsetPosition=function(t){var t=D(t,2),e=t[0],t=t[1],n=this.attributes,r=n.x,i=n.y,n=n.container,o=n.x,n=n.y;this.element.style.left="".concat(r+o+e,"px"),this.element.style.top="".concat(i+n+t,"px")},w_.prototype.updatePosition=function(){this.throttleUpdatePosition()},w_.prototype.autoPosition=function(t){var e,n,r,i,o,a,s,t=D(t,2),l=t[0],t=t[1],u=this.attributes,c=u.x,h=u.y,d=u.autoPosition,u=u.bounding;return d?(e=(d=this.element).offsetWidth,d=d.offsetHeight,h=(c=D([c+l,h+t],2))[0],c=c[1],n=this.attributes.position,r={left:"right",right:"left",top:"bottom",bottom:"top"},s=u.x,i=u.y,o={left:h<s,right:s+u.width<h+e,top:c<i,bottom:i+u.height<c+d},a=[],n.split("-").forEach(function(t){o[t]?a.push(r[t]):a.push(t)}),s=a.join("-"),this.getRelativeOffsetFromCursor(s)):[l,t]},w_.prototype.filter=function(t){var e=this.attributes.filterBy;return e?t.filter(e):t},w_.prototype.sort=function(t){var e=this.attributes.sortBy;return e?t.sort(e):t},w_.tag="tooltip",w_.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(Lt,'"></div>'),title:'<div class="'.concat(v_,'"></div>'),item:'<li class="'.concat(Ht,'" data-index={index}>\n <span class="').concat(Kt,'">\n <span class="').concat(h,'" style="background:{color}"></span>\n <span class="').concat(n,'" title="{name}">{name}</span>\n </span>\n <span class="').concat(c,'" title="{value}">{value}</span>\n </li>')},style:a}},w_);function w_(t){var e=m_.call(this,N({},w_.defaultOptions,t))||this;return e.visibility="visible",e.throttleUpdatePosition=vt(function(){e.setOffsetPosition(e.autoPosition(e.getRelativeOffsetFromCursor()))},e.attributes.throttleFrequency,{}),e.visibility=e.attributes.visibility,e.initShape(),e.render(e.attributes,e),e}var E_,__={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 k_(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 T_(t){return E_.call(this,N({},T_.defaultOptions,t))||this}i(T_,E_=o),T_.prototype.render=function(t,e){var i=this,n=t.size,n=void 0===n?"default":n,o=t.spacing,r=t.disabled,a=t.checked,s=t.unCheckedChildren,t=t.checkedChildren,e=B(e,".switch-content","g").attr("className","switch-content").node(),l=e.getLocalBounds(),n=yt(__,n,__.default),u=n.sizeStyle,c=n.tagStyle,h=r?"no-drop":"pointer",n=a?"#1890FF":"#00000040",d=u,p=a?t:s,f=((t||s)&&B(e,".switch-tag",function(){return new vw({})}).attr("className","switch-tag").call(function(t){var e,t=t.node(),n=(t.update(N({cursor:h,backgroundStyle:null,text:!1,marker:!1},c,p)),null==t?void 0:t.getLocalBounds()),r=n.max,n=n.min,i=r[0]-n[0]+u.radius,r=r[1]-n[1],n=Math.max(i+u.height+2,u.width);d=T(T({},u),{width:n}),t.update((t={x:l.min[0],y:l.min[1],width:n,height:d.height},n={width:i,height:r},i=d.radius,r=a,e=n.width,n=n.height,void 0===i&&(i=0),{x:(r=void 0===a?!0:r)?Number(t.x)+i:Number(t.width)+Number(t.x)-e,y:Number(t.y)+(Number(t.height)-n)/2}))}),B(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",h).style("fillOpacity",r?.4:1).call(C,d).node()),y=B(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(C,d).node();B(e,".switch-handle","rect").attr("className","switch-handle").style("fill","#fff").style("cursor",h).call(function(t){var e,t=t.node(),n=k_(f,o,a),r=k_(f,o,!a);t.attr("x")&&!Et(n,r)&&i.checked!==a?(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=!!a},T_.defaultOptions={type:T_.tag="switch",style:{x:0,y:0,spacing:2,checked:!0,disabled:!1}};var M_,u={text:"",type:"primary",height:20,width:20,buttonStyle:{default:{lineWidth:0,fill:"#fff"},active:{fill:"#fff"},disabled:{fill:"#fff"}},markerStyle:{default:{fill:"black",size:10},disabled:{fill:"#8c8c8c"}}};function S_(t){var t=M_.call(this,N({},S_.defaultOptions,t))||this,e=(t.playState="idle",t.attributes),n=e.view,e=e.initPageNum;return t.currPage=e,t.view=n,t.init(),t}i(S_,M_=o),Object.defineProperty(S_.prototype,"finished",{get:function(){var e=this;return this.finishedPromise||(this.finishedPromise=new Promise(function(t){e.resolveFinishedPromise=function(){e.finishedPromise=null,t(e.currPage)}})),"idle"===this.playState&&this.resolveFinishedPromise(),this.finishedPromise},enumerable:!1,configurable:!0}),Object.defineProperty(S_.prototype,"maxPages",{get:function(){var t=this.attributes,e=t.pageWidth,n=t.pageHeight,r=t.orient,i=t.pageLimit;return t.pageCallback||i!==1/0?i:"horizontal"===r?Math.ceil(this.width/e):Math.ceil(this.height/n)},enumerable:!1,configurable:!0}),Object.defineProperty(S_.prototype,"view",{get:function(){return this.fullView},set:function(t){var e=this.attributes,n=e.width,e=e.height;t.setLocalPosition(0,0),this.fullView=t,n&&e||(e=(n=Xx(t)).width,t=n.height,this.width=e,this.height=t)},enumerable:!1,configurable:!0}),Object.defineProperty(S_.prototype,"width",{get:function(){var t=this.attributes.width;return t||this.viewWidth},set:function(t){this.viewWidth=t},enumerable:!1,configurable:!0}),Object.defineProperty(S_.prototype,"height",{get:function(){var t=this.attributes.height;return t||this.viewHeight},set:function(t){this.viewHeight=t},enumerable:!1,configurable:!0}),Object.defineProperty(S_.prototype,"btnPosition",{get:function(){var t;return null!=(t=this.style.button)&&t.position?this.style.button.position:"horizontal"===this.style.orient?"right":"bottom"},enumerable:!1,configurable:!0}),Object.defineProperty(S_.prototype,"defaultShape",{get:function(){return["left","right","left-right"].includes(this.btnPosition)?["left","right"]:["up","down"]},enumerable:!1,configurable:!0}),Object.defineProperty(S_.prototype,"buttonCfg",{get:function(){var t=D(this.defaultShape,2),e=t[0],t=t[1],n=this.attributes.button,r=n.prev,n=n.next;return{prev:T({marker:e},r),next:T({marker:t},n)}},enumerable:!1,configurable:!0}),S_.prototype.render=function(t,e){},S_.prototype.init=function(){this.initShape(),this.updateView(),this.updateButton(),this.updateButtonState(),this.adjustLayout()},S_.prototype.update=function(t){var e=t.view;e&&(this.view&&(this.view.style.clipPath=null,this.removeChild(this.view,!1)),this.currPage=this.attributes.initPageNum,this.view=e,this.view.style.clipPath=this.clipView,this.appendChild(this.view),this.view.toBack()),this.attr(N({},this.attributes,t)),this.updateView(),this.updateButton(),this.updateButtonState(),this.adjustLayout()},S_.prototype.clear=function(){this.view&&(this.view.style.clipPath=null,this.removeChild(this.view,!1)),this.fullView=void 0,this.removeChildren(!0)},S_.prototype.destroy=function(){this.removeChildren(!0),M_.prototype.destroy.call(this)},S_.prototype.goTo=function(t){var e,n,r,i,o,a,s,l,u,c,h=this;return"idle"===this.playState&&(e=(n=this.attributes).effect,n=n.duration,r=(u=this.calcRelativePagingOffset(t)).viewFromX,i=u.viewFromY,o=u.viewToX,a=u.viewToY,c=u.clipFromX,s=u.clipFromY,l=u.clipToX,u=u.clipToY,this.playState="running",this.clipView.animate([{transform:"translate(".concat(c,"px, ").concat(s,"px)")},{transform:"translate(".concat(l,"px, ").concat(u,"px)")}],{duration:n,easing:e,fill:"both"}),null!=(c=this.view.animate([{transform:"translate(".concat(r,"px, ").concat(i,"px)")},{transform:"translate(".concat(o,"px, ").concat(a,"px)")}],{duration:n,easing:e,fill:"both"}))&&c.finished.then(function(){h.currPage=t,h.updateButtonState(),h.resolveFinishedPromise(),h.playState="idle"})),this.finished},S_.prototype.prev=function(){var t=this.attributes.loop,e=this.currPage-1;return e<1&&(e=t?this.maxPages:1),this.goTo(e)},S_.prototype.next=function(){var t=this.attributes.loop,e=this.maxPages,n=this.currPage+1;return this.goTo(n=e<n?t?1:e:n)},S_.prototype.initShape=function(){this.clipView=new dp({name:"clipView",style:{x:0,y:0,width:0,height:0}}),this.view.style.clipPath=this.clipView,this.appendChild(this.view),this.view.toBack();var t=D(this.defaultShape,2),e=t[0],t=t[1];this.prevButton=new Tw({name:"prevButton",style:T(T({},S_.defaultOptions.style.button.prev),{marker:e,onClick:this.prev.bind(this)})}),this.appendChild(this.prevButton),this.nextButton=new Tw({name:"nextButton",style:T(T({},S_.defaultOptions.style.button.next),{marker:t,onClick:this.next.bind(this)})}),this.appendChild(this.nextButton),this.paginationGroup=new tp({name:"paginationGroup"}),this.appendChild(this.paginationGroup)},S_.prototype.updateView=function(){var t=this.getClipViewSpace(this.currPage),e=t.width,t=t.height;this.clipView.attr({width:e,height:t}),this.view.setLocalPosition(0,0),this.clipView.setLocalPosition(0,0)},S_.prototype.updateButton=function(){var t=this.buttonCfg,e=t.prev,t=t.next;e&&this.prevButton.update(e),t&&this.nextButton.update(t)},S_.prototype.updateButtonState=function(){this.attributes.loop?(this.nextButton.setState("default"),this.prevButton.setState("default")):(this.nextButton.setState(this.currPage===this.maxPages?"disabled":"default"),this.prevButton.setState(1===this.currPage?"disabled":"default"))},S_.prototype.getClipViewSpace=function(t){var e=this.attributes,n=e.orient,r=e.pageWidth,i=e.pageHeight,e=e.pageCallback,o={x:0,y:0,width:r,height:i},a=this.maxPages;return e?T(T({},o),e(t)):(a<t||t<1||("vertical"===n?o.y=(t-1)*i:"horizontal"===n&&(o.x=(t-1)*r)),o)},S_.prototype.absolute2Relative=function(t,e){var n=this.currPage,n=this.getClipViewSpace(n);return[t+n.x,e+n.y]},S_.prototype.getViewPosition=function(t){var e=this.getClipViewSpace(1),n=e.x,e=e.y,t=this.getClipViewSpace(t),n=D([-t.x+n,-t.y+e],2);return{x:n[0],y:n[1]}},S_.prototype.getRelativeViewPosition=function(t){var t=this.getViewPosition(t),e=t.x,t=t.y,e=D(this.absolute2Relative(e,t),2);return{x:e[0],y:e[1]}},S_.prototype.calcRelativePagingOffset=function(t){var e=D(this.absolute2Relative.apply(this,Pt([],D(this.view.getLocalPosition().slice(0,2)),!1)),2),n=e[0],e=e[1],t=this.getRelativeViewPosition(t),r=t.x,t=t.y,i=D([-n,-e],2),o=i[0],i=i[1],a=D([-r,-t],2);return{viewFromX:n,viewFromY:e,viewToX:r,viewToY:t,clipFromX:o,clipFromY:i,clipToX:a[0],clipToY:a[1]}},S_.prototype.adjustLayout=function(){this.adjustButton()},S_.prototype.adjustButton=function(){var t,e=this.attributes,n=e.button,r=e.pageWidth,e=e.pageHeight,i=this.btnPosition,n=(null==n?void 0:n.spacing)||0,o=Xx(this.prevButton),a=o.width,o=o.height,s=Xx(this.nextButton),l=s.width,s=s.height,u=0,c=0,h=0,d=0;"left-right"===i?(u=-(n+a),c=(e-o)/2,h=n+r,d=(e-s)/2):"top-bottom"===i?(u=(r-a)/2,c=-(n+o),h=(r-l)/2,d=n+e):"top"===i?(u=(r-n)/2-a,c=-(n+(t=U([o,s]))),h=(r+n)/2,d=-(n+t)):"bottom"===i?(u=(r-n)/2-a,h=(r+n)/2,d=c=n+e):"left"===i?(u=(h=-(n+l))-(n+a),d=c=(e-(t=U([o,s])))/2):"right"===i&&(h=(u=n+r)+a,d=c=(e-(t=U([o,s])))/2),this.prevButton.setLocalPosition(u,c),this.nextButton.setLocalPosition(h,d)},S_.defaultOptions={type:S_.tag="page-navigator",style:{x:0,y:0,effect:"linear",duration:200,orient:"horizontal",initPageNum:1,pageLimit:1/0,loop:!1,button:{prev:T({spacing:0},u),next:T({spacing:0},u),style:{default:{},active:{},disabled:{}},spacing:5},pagination:{type:"currTotal",style:{default:{},active:{}},separator:"/",spacing:5}}},yw.registerSymbol("left",function(t,e,n){return[["M",t-n,e],["L",t+n,e-n],["L",t+n,e+n],["Z"]]}),yw.registerSymbol("right",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e],["L",t-n,e+n],["Z"]]}),yw.registerSymbol("up",function(t,e,n){return[["M",t-n,e+n],["L",t,e-n],["L",t+n,e+n],["Z"]]}),yw.registerSymbol("down",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t,e+n],["Z"]]});var O_,d={text:{text:""},lineStyle:{stroke:"#416180",strokeOpacity:.45,lineWidth:1,lineDash:[5,5]}},ie=rw({},d,{type:"line",text:{position:"start",align:"center",verticalAlign:"bottom"}}),Qt=rw({},d,{type:"circle",defaultRadius:0}),It=rw({},d,{type:"polygon",defaultRadius:0,startAngle:0}),s=(i(P_,O_=o),Object.defineProperty(P_.prototype,"localPointer",{get:function(){var t=D(this.getPosition(),2),e=t[0],t=t[1],n=D(this.pointer,2);return[n[0]-e,n[1]-t]},enumerable:!1,configurable:!0}),Object.defineProperty(P_.prototype,"tagCfg",{get:function(){var t=this.attributes.text;return t.position,I(t,["position"])},enumerable:!1,configurable:!0}),Object.defineProperty(P_.prototype,"crosshairCfg",{get:function(){var t=this.attributes.lineStyle;return T(T({},t),{path:this.crosshairPath})},enumerable:!1,configurable:!0}),P_.prototype.render=function(t,e){var n=this,e=B(e,".crosshair-group","g").attr("className","crosshair-group").node();this.shapesGroup=e,this.tagShape=B(e,".crosshair-tag",function(){return new vw({className:"crosshair-tag",style:n.tagCfg})}).node(),this.crosshairShape=B(e,".crosshair-path","path").attr("className","crosshair-path").call(C,this.crosshairCfg).node(),this.adjustLayout()},P_.prototype.update=function(t){this.attr(N({},this.attributes,t=void 0===t?{}:t)),this.render(this.attributes,this)},P_.prototype.setPointer=function(t){this.pointer=t},P_.defaultOptions={type:P_.tag="crosshair-base",style:d},P_);function P_(t){return O_.call(this,N({},P_.defaultOptions,t))||this}i(C_,A_=s),Object.defineProperty(C_.prototype,"crosshairPath",{get:function(){var t=this.attributes,e=D(t.startPos,2),n=e[0],e=e[1],t=D(t.endPos,2);return[["M",0,0],["L",t[0]-n,t[1]-e],["Z"]]},enumerable:!1,configurable:!0}),Object.defineProperty(C_.prototype,"localPointer",{get:function(){var t,e,n;return this.pointer?(t=(e=D(this.getPosition(),2))[0],e=e[1],[(n=D(this.pointer,2))[0]-t,n[1]-e]):this.attributes.startPos},enumerable:!1,configurable:!0}),Object.defineProperty(C_.prototype,"isVertical",{get:function(){var t=this.attributes,e=D(t.startPos,2),n=e[0],e=e[1],t=D(t.endPos,2),r=t[0],t=t[1];return n===r&&e!==t},enumerable:!1,configurable:!0}),Object.defineProperty(C_.prototype,"tagShapeSpace",{get:function(){var t=Xx(this.tagShape);return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),C_.prototype.update=function(t){A_.prototype.update.call(this,t)},C_.prototype.setPointer=function(t){A_.prototype.setPointer.call(this,t),this.adjustPosition()},C_.prototype.setText=function(t){this.tagShape.update({text:t}),this.adjustTag()},C_.prototype.adjustLayout=function(){this.adjustPosition(),this.adjustTag()},C_.prototype.adjustPosition=function(){var t=D(this.localPointer,2),e=t[0],t=t[1],n=D(this.attributes.startPos,2),r=n[0],n=n[1],r=this.getOrientVal([r,t],[e,n]);this.shapesGroup.setLocalPosition(r)},C_.prototype.adjustTag=function(){var t,e,n=this.attributes,r=n.text,i=D(n.startPos,2),o=i[0],i=i[1],n=D(n.endPos,2),a=n[0],n=n[1];r&&""!==r?(this.tagShape.show(),r=r.position,e=(t=this.tagShapeSpace).width,t=t.height,o=(a=D(this.getOrientVal({start:[-e/2,t/2],end:[a-o+e/2,t/2]},{start:[0,0],end:[0,n-i+t]})[r],2))[0],e=a[1],this.tagShape.setLocalPosition(o,e)):this.tagShape.hide()},C_.prototype.getOrientVal=function(t,e){return this.isVertical?e:t},C_.defaultOptions={type:C_.tag="line-crosshair",style:ie},t([lw(20)],C_.prototype,"setPointer",null);var A_,N_=C_;function C_(t){return A_.call(this,rw({},C_.defaultOptions,t))||this}i(R_,L_=s),Object.defineProperty(R_.prototype,"crosshairPath",{get:function(){return this.createCirclePath()},enumerable:!1,configurable:!0}),R_.prototype.update=function(t){L_.prototype.update.call(this,t)},R_.prototype.setPointer=function(t){var t=D(t,2),e=t[0],t=t[1],e=(L_.prototype.setPointer.call(this,[e,t]),D(this.localPointer,2)),t=e[0],e=e[1],n=D(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})},R_.prototype.adjustLayout=function(){this.tagShape.hide()},R_.prototype.createCirclePath=function(t){var e=this.attributes,n=D(e.center,2),r=n[0],n=n[1],e=e.defaultRadius;return cw(r,n,t||e)},R_.defaultOptions={type:R_.tag="circle-crosshair",style:Qt},t([lw(20)],R_.prototype,"setPointer",null);var L_,I_,j_=R_;function R_(t){return L_.call(this,rw({},R_.defaultOptions,t))||this}function D_(t){return I_.call(this,rw({},D_.defaultOptions,t))||this}i(D_,I_=s),Object.defineProperty(D_.prototype,"crosshairPath",{get:function(){return this.createPolygonPath()},enumerable:!1,configurable:!0}),D_.prototype.update=function(t){I_.prototype.update.call(this,t)},Object.defineProperty(D_.prototype,"points",{get:function(){for(var t,e,n,r,i,o,a=this.attributes,s=a.startAngle,l=a.sides,u=2*Math.PI/l,c=[1,0],h=[],d=0;d<l;d+=1)h.push((t=[0,0],e=c,n=[0,0],r=s/180*Math.PI+u*d,o=i=void 0,i=e[0]-n[0],e=e[1]-n[1],o=Math.sin(r),r=Math.cos(r),t[0]=i*r-e*o+n[0],t[1]=i*o+e*r+n[1],t));return h},enumerable:!1,configurable:!0}),D_.prototype.setPointer=function(t){var t=D(t,2),e=t[0],t=t[1],e=(I_.prototype.setPointer.call(this,[e,t]),D(this.localPointer,2)),t=e[0],e=e[1],n=this.attributes.center,r=D(this.intersection([t,e]),2),i=r[0],r=r[1];i&&r&&(t=sw(n,[t,e])/sw(n,[i,r]),e=this.createPolygonPath(t),this.crosshairShape.attr({path:e}))},D_.prototype.adjustLayout=function(){this.tagShape.hide()},D_.prototype.createPolygonPath=function(r){var t=this.attributes,i=t.defaultRadius,t=D(t.center,2),o=t[0],a=t[1],t=this.points.map(function(t,e){var t=D(t,2),t=D(aa([0,0],[t[0],t[1]],r||i),2),n=t[0],t=t[1];return[0===e?"M":"L",o+n,a+t]});return t.push(["Z"]),t},D_.prototype.intersection=function(t){for(var e,n,r,i,o,a,s,l,t=D(t,2),u=t[0],c=t[1],h=this.points,t=D(this.attributes.center,2),d=t[0],p=t[1],f=1;f<=h.length;f+=1){var y=D(h[f-1],2),g=y[0],y=y[1],m=D(h[f%h.length],2),v=m[0],m=m[1],g=(i=[d,p],g=[g+d,y+p],y=[v+d,m+p],l=s=a=o=m=v=void 0,m=(r=D(r=[u,c],2))[0],r=r[1],o=(i=D(i,2))[0],i=i[1],a=(g=D(g,2))[0],g=g[1],s=(y=D(y,2))[0],y=y[1],l=[],(y-g)*(o-m)==(i-r)*(s-a)?(i-r)*(a-m)==(g-r)*(o-m)&&(ow(m,o,r,i,a,g)&&aw(l,a,g),ow(m,o,r,i,s,y)&&aw(l,s,y),ow(a,s,g,y,m,r)&&aw(l,m,r),ow(a,s,g,y,o,i)&&aw(l,o,i)):(v=(m*(i-r)+g*(o-m)-r*(o-m)-a*(i-r))/((s-a)*(i-r)-(o-m)*(y-g)),0<=(y=(a*(y-g)+r*(s-a)-g*(s-a)-m*(y-g))/((o-m)*(y-g)-(s-a)*(i-r)))&&y<=1&&0<=v&&v<=1&&(l[0]=m+y*(o-m),l[1]=r+y*(i-r))),l);0!==g.length&&(e=(s=D(g,2))[0],n=s[1])}return[e,n]},D_.defaultOptions={type:D_.tag="polygon-crosshair",style:It},t([lw(20)],D_.prototype,"setPointer",null);i(V_,B_=O),Object.defineProperty(V_.prototype,"decorationType",{get:function(){var t=this.attributes.type;return t&&"none"!==t&&G(t)?t.map(function(t){return G(t)?t:[t,"solid"]}):"none"},enumerable:!1,configurable:!0}),Object.defineProperty(V_.prototype,"doubleSpacing",{get:function(){return 2*this.attributes.style.lineWidth},enumerable:!1,configurable:!0}),Object.defineProperty(V_.prototype,"hangingRate",{get:function(){return this.attributes.hangingRate},enumerable:!1,configurable:!0}),Object.defineProperty(V_.prototype,"dashedCfg",{get:function(){var t=this.attributes.style.lineWidth;return{lineDash:[2*t,t]}},enumerable:!1,configurable:!0}),Object.defineProperty(V_.prototype,"dottedCfg",{get:function(){var t=this.attributes.style.lineWidth;return{lineDash:[t,t]}},enumerable:!1,configurable:!0}),Object.defineProperty(V_.prototype,"solidCfg",{get:function(){return{lineDash:[0,0]}},enumerable:!1,configurable:!0}),Object.defineProperty(V_.prototype,"decorationCfg",{get:function(){var r=this,i=this.attributes.style,t=this.decorationType;return"none"===t?[]:t.map(function(t){var e,t=D(t,2),n=t[0],t=t[1];return"wavy"===t?T({path:r.getWavyPath(n)},i):"double"===t?T({path:r.getDoubleLinePath(n)},i):(e={solid:r.solidCfg,dashed:r.dashedCfg,dotted:r.dottedCfg},T(T({path:r.getLinePath(n)},i),e[t]))})},enumerable:!1,configurable:!0}),V_.prototype.update=function(t){var e=this;this.attr(rw({},this.attributes,t)),this.clear(),this.decorationCfg.forEach(function(t){e.appendChild(new ap({style:t}))})},V_.prototype.clear=function(){this.removeChildren(!0)},V_.prototype.getLinePos=function(t){var e=D(this.hangingRate,3),n=e[0],r=e[1],e=e[2],i=this.attributes,o=i.height,i=i.fontSize,a=D([0,0],2),s=a[0],a=a[1],a=("overline"===t?(s=(n=D([0,o*n-i/2],2))[0],n):"line-through"===t?(s=(n=D([0,o*r],2))[0],n):(s=(t=D([0,o*e+i/2],2))[0],t))[1];return[s,a]},V_.prototype.getLinePath=function(t){var e=this.attributes.width,t=D(this.getLinePos(t),2),n=t[0],t=t[1];return[["M",n,t],["L",n+e,t]]},V_.prototype.getDoubleLinePath=function(t){var e,n=this.doubleSpacing,r=this.attributes.width,i=D(this.getLinePos(t),2),o=i[0],i=i[1],a=D([0,0],2),s=a[0],a=a[1];return"line-through"===t&&(s=(e=D([-.5,.5],2))[0],a=e[1]),"underline"===t?(s=(e=D([0,1],2))[0],a=e[1]):"overline"===t&&(s=(e=D([1,0],2))[0],a=e[1]),[["M",o,i+n*s],["L",o+r,i+n*s],["M",o,i+n*a],["L",o+r,i+n*a]]},V_.prototype.getWavyPath=function(t){return[]},V_.tag="decoration",V_.defaultOptions={style:{width:0,height:0,type:"none",hangingRate:[.5,.55,.5],style:{lineWidth:1,stroke:"#000"}}};var B_,F_,z_=V_;function V_(t){t=B_.call(this,rw({},V_.defaultOptions,t))||this;return t.update({}),t}function G_(t){t=F_.call(this,rw({},G_.defaultOptions,t))||this;return t.init(),t}i(G_,F_=o),Object.defineProperty(G_.prototype,"textWidth",{get:function(){var e=this;return U(this.renderText.split("\n").map(function(t){return Px(t,e.font)}))||0},enumerable:!1,configurable:!0}),Object.defineProperty(G_.prototype,"textHeight",{get:function(){return Xx(this.textShape).height},enumerable:!1,configurable:!0}),Object.defineProperty(G_.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(G_.prototype,"height",{get:function(){var t=this.attributes.height;return Q(t)&&0!==t?t:Xx(this.textShape).height},enumerable:!1,configurable:!0}),Object.defineProperty(G_.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(G_.prototype,"capitalizeWord",{get:function(){return this.attributes.text.split("\n").map(function(t){return t.split(" ").map(function(t){return Cx(t,"capitalize")}).join(" ")}).join("\n")},enumerable:!1,configurable:!0}),Object.defineProperty(G_.prototype,"text",{get:function(){var t=this.attributes,e=t.transform,t=t.text;return"capitalize"===e?this.capitalizeWord:Cx(t,e)},enumerable:!1,configurable:!0}),Object.defineProperty(G_.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 Ox(t,Q(r)?r:1/0,e.font,i)}).join("\n")},enumerable:!1,configurable:!0}),Object.defineProperty(G_.prototype,"renderText",{get:function(){var t=this.attributes.width,e=this.attributes.overflow;return e&&!["none","clip","wrap"].includes(e)&&Q(t)?this.ellipsisText:this.text},enumerable:!1,configurable:!0}),Object.defineProperty(G_.prototype,"verticalAlign",{get:function(){return this.attributes.verticalAlign},enumerable:!1,configurable:!0}),Object.defineProperty(G_.prototype,"font",{get:function(){return gt(this.attributes,["fontSize","fontFamily","fontWeight","fontStyle","fontVariant","letterSpacing","leading"])},enumerable:!1,configurable:!0}),Object.defineProperty(G_.prototype,"fontColor",{get:function(){return this.attributes.fontColor},enumerable:!1,configurable:!0}),Object.defineProperty(G_.prototype,"wordWrap",{get:function(){return"wrap"===this.attributes.overflow},enumerable:!1,configurable:!0}),Object.defineProperty(G_.prototype,"wordWrapWidth",{get:function(){var t=this.width;return this.wordWrap?t:1/0},enumerable:!1,configurable:!0}),Object.defineProperty(G_.prototype,"textCfg",{get:function(){var t=this.renderText,e=this.lineHeight,n=this.wordWrap,r=this.wordWrapWidth,i=this.fontColor;return T(T(T({},Gx),this.font),{fill:i,wordWrap:n,lineHeight:e,wordWrapWidth:r,text:t,textAlign:"start",textBaseline:"middle"})},enumerable:!1,configurable:!0}),Object.defineProperty(G_.prototype,"backgroundCfg",{get:function(){var t=this.width,e=this.height,n=this.attributes.backgroundStyle;return T({x:0,y:0,width:t,height:e},n)},enumerable:!1,configurable:!0}),Object.defineProperty(G_.prototype,"decorationLineWidth",{get:function(){var t=this.attributes.fontSize;return Math.floor(2*Math.log10(t))},enumerable:!1,configurable:!0}),Object.defineProperty(G_.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 rw({},{fontSize:n,style:{stroke:i,lineWidth:r}},e,t)})},enumerable:!1,configurable:!0}),Object.defineProperty(G_.prototype,"clipRectCfg",{get:function(){var t=this.height;return{width:this.attributes.width,height:t}},enumerable:!1,configurable:!0}),G_.prototype.init=function(){this.initShape(),this.update({})},G_.prototype.update=function(t){this.attr(rw({},this.attributes,t)),this.render()},G_.prototype.render=function(){var e=this;this.clear(),this.backgroundShape.attr(this.backgroundCfg),this.textShape.attr(this.textCfg),this.layout(),this.decorationGroup.removeChildren(!0),this.decorationCfg.forEach(function(t){e.decorationGroup.appendChild(new z_({style:t}))})},G_.prototype.clear=function(){var t;(this.backgroundShape.style.clipPath=null)!=(t=this.clipRect)&&t.destroy()},G_.prototype.initShape=function(){this.backgroundShape=new dp({name:"background",style:{width:0,height:0}}),this.decorationGroup=new tp({name:"decoration-group"}),this.textShape=new fp({name:"text",style:this.textCfg}),this.textShape.appendChild(this.decorationGroup),this.backgroundShape.appendChild(this.textShape),this.appendChild(this.backgroundShape)},G_.prototype.overflow=function(){var t=this.wordWrap,e=this.attributes,n=e.width,e=e.overflow;e&&"none"!==e&&!t&&Q(n)&&"clip"===e&&(this.clipRect=new dp({name:"clip-rect",style:this.clipRectCfg}),this.backgroundShape.style.clipPath=this.clipRect)},G_.prototype.adjustTextAlign=function(){var t=this.textWidth,e=this.attributes,n=e.width,e=e.textAlign;Q(n)&&(n=0,n="start"===e?0:"center"===e?(this.width-t)/2:this.width-t,this.textShape.attr({x:n}))},G_.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})},G_.prototype.layout=function(){this.adjustTextAlign(),this.adjustVerticalAlign(),this.overflow()},G_.defaultOptions={type:G_.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 H_,re=T(T({},Gx),{fill:"rgba(0,0,0,0.45)",fontSize:10,textAlign:"start",textBaseline:"middle",overflow:"clip"}),W_={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"}},Y_={path:[["M",3,6],["L","5","8.5"],["L","8.5","4"]],lineWidth:1,cursor:"pointer"};function U_(t){return H_.call(this,N({},U_.defaultOptions,t))||this}i(U_,H_=o),U_.prototype.render=function(t,e){var n=t.label,r=t.boxStyle,i=t.checkedStyle,o=t.checked,t=t.spacing,o=(this.checked=!!o,B(e,".checkbox-content","g").attr("className","checkbox-content").node()),e=ht({},this.checked?W_.selected:W_.default,r),r=ht({},Y_,i),t=(this.checkboxBoxShape=B(o,".checkbox-box","rect").attr("className","checkbox-box").style("zIndex",(o.style.zIndex||0)-1).call(C,e).node(),B(this.checkboxBoxShape,".checkbox-checked","path").attr("className","checkbox-box-checked").style("stroke","#ffffff").call(C,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;B(o,".checkbox-label","text").attr("className","checkbox-label").style("x",e).style("y",r).call(C,n)},U_.defaultOptions={type:U_.tag="checkbox",style:{x:0,y:0,label:T({text:""},re),spacing:4,checked:!1}};var q_="gui-poptip",X_="gui-poptip-arrow",Z_="gui-poptip-text",K_=((l={})[".".concat(q_)]={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"},l[".".concat(Z_)]={"text-align":"center"},l[".".concat(q_,"[data-position='top']")]={transform:"translate(-50%, -100%)"},l[".".concat(q_,"[data-position='left']")]={transform:"translate(-100%, -50%)"},l[".".concat(q_,"[data-position='right']")]={transform:"translate(0, -50%)"},l[".".concat(q_,"[data-position='bottom']")]={transform:"translate(-50%, 0)"},l[".".concat(q_,"[data-position='top-left']")]={transform:"translate(0,-100%)"},l[".".concat(q_,"[data-position='top-right']")]={transform:"translate(-100%,-100%)"},l[".".concat(q_,"[data-position='left-top']")]={transform:"translate(-100%, 0)"},l[".".concat(q_,"[data-position='left-bottom']")]={transform:"translate(-100%, -100%)"},l[".".concat(q_,"[data-position='right-top']")]={transform:"translate(0, 0)"},l[".".concat(q_,"[data-position='right-bottom']")]={transform:"translate(0, -100%)"},l[".".concat(q_,"[data-position='bottom-left']")]={transform:"translate(0, 0)"},l[".".concat(q_,"[data-position='bottom-right']")]={transform:"translate(-100%, 0)"},l[".".concat(X_)]={width:"4px",height:"4px",transform:"rotate(45deg)","background-color":"rgba(0, 0, 0)",position:"absolute","z-index":-1},l[".".concat(q_,"[data-position='top']")]={transform:"translate(-50%, calc(-100% - 5px))"},l["[data-position='top'] .".concat(X_)]={bottom:"-2px"},l[".".concat(q_,"[data-position='left']")]={transform:"translate(calc(-100% - 5px), -50%)"},l["[data-position='left'] .".concat(X_)]={right:"-2px"},l[".".concat(q_,"[data-position='right']")]={transform:"translate(5px, -50%)"},l["[data-position='right'] .".concat(X_)]={left:"-2px"},l[".".concat(q_,"[data-position='bottom']")]={transform:"translate(-50%, 5px)"},l["[data-position='bottom'] .".concat(X_)]={top:"-2px"},l[".".concat(q_,"[data-position='top-left']")]={transform:"translate(0, calc(-100% - 5px))"},l["[data-position='top-left'] .".concat(X_)]={left:"10px",bottom:"-2px"},l[".".concat(q_,"[data-position='top-right']")]={transform:"translate(-100%, calc(-100% - 5px))"},l["[data-position='top-right'] .".concat(X_)]={right:"10px",bottom:"-2px"},l[".".concat(q_,"[data-position='left-top']")]={transform:"translate(calc(-100% - 5px), 0)"},l["[data-position='left-top'] .".concat(X_)]={right:"-2px",top:"8px"},l[".".concat(q_,"[data-position='left-bottom']")]={transform:"translate(calc(-100% - 5px), -100%)"},l["[data-position='left-bottom'] .".concat(X_)]={right:"-2px",bottom:"8px"},l[".".concat(q_,"[data-position='right-top']")]={transform:"translate(5px, 0)"},l["[data-position='right-top'] .".concat(X_)]={left:"-2px",top:"8px"},l[".".concat(q_,"[data-position='right-bottom']")]={transform:"translate(5px, -100%)"},l["[data-position='right-bottom'] .".concat(X_)]={left:"-2px",bottom:"8px"},l[".".concat(q_,"[data-position='bottom-left']")]={transform:"translate(0, 5px)"},l["[data-position='bottom-left'] .".concat(X_)]={top:"-2px",left:"8px"},l[".".concat(q_,"[data-position='bottom-right']")]={transform:"translate(-100%, 5px)"},l["[data-position='bottom-right'] .".concat(X_)]={top:"-2px",right:"8px"},l),$_=void 0;var J_;function Q_(t){var e=t&&document.getElementById(t);return e||((e=document.createElement("div")).setAttribute("id",t),document.body.appendChild(e)),e}function tk(t){var n,r;return n=Q_,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r=r||n.apply($_,t)}(t)}function ek(t){t=J_.call(this,N({style:{id:"gui-poptip"}},ek.defaultOptions,t))||this;return t.visibility="visible",t.map=new Map,t.domStyles="",t.initShape(),t.render(t.attributes,t),t}i(ek,J_=o),Object.defineProperty(ek.prototype,"visible",{get:function(){return"visible"===this.visibility},enumerable:!1,configurable:!0}),ek.prototype.render=function(t,e){this.visibility=this.style.visibility,this.updatePoptipElement()},ek.prototype.update=function(t){this.attr(N({},this.style,t)),this.render(this.attributes,this)},ek.prototype.bind=function(s,l){var u,t,e,c=this;s&&(u=this.style.text,e=function(){c.hideTip()},s.addEventListener("mousemove",t=function(t){var e=s,n=c.style,r=u,i=(l&&(a=(i="function"==typeof l?l.call(null,t):l).html,o=i.target,i=I(i,["html","target"]),n=ht({},c.style,i),!o&&!1!==o||(e=o),"string"==typeof a&&(r=a)),n.position),o=n.arrowPointAtCenter,a=n.follow,n=n.offset;e?(e=(t=D(function(t,e,n,r,i,o){if(void 0===i&&(i=!1),o=void 0===o?!1:o)return[t,e];var a=(o=n.getBoundingClientRect()).x,s=o.y,l=o.width,u=o.height;switch(r){case"top":return i?[a+l/2,s]:[t,s];case"left":return i?[a,s+u/2]:[a,e];case"bottom":return i?[a+l/2,s+u]:[t,s+u];case"right":return i?[a+l,s+u/2]:[a+l,e];case"top-right":case"right-top":return[a+l,s];case"left-bottom":case"bottom-left":return[a,s+u];case"right-bottom":case"bottom-right":return[a+l,s+u];default:return[a,s]}}(t.clientX,t.clientY,e,i,o,a),2))[0],o=t[1],c.showTip(e,o,{text:r,position:i,offset:n})):c.hideTip()}),s.addEventListener("mouseleave",e),this.map.set(s,[t,e]))},ek.prototype.unbind=function(t){var e,n;this.map.has(t)&&(e=(n=D(this.map.get(t)||[],2))[0],n=n[1],e&&t.removeEventListener("mousemove",e),n&&t.removeEventListener("mouseleave",n),this.map.delete(t))},ek.prototype.clear=function(){this.container.innerHTML=""},ek.prototype.destroy=function(){var t,e=this;Pt([],D(this.map.keys()),!1).forEach(function(t){return e.unbind(t)}),null!=(t=this.container)&&t.remove()},ek.prototype.showTip=function(t,e,n){var r,i=yt(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(Z_)))&&(n.innerHTML=i),this.visibility="visible",this.container.style.visibility="visible"))},ek.prototype.hideTip=function(){this.visibility="hidden",this.container.style.visibility="hidden"},ek.prototype.getContainer=function(){return this.container},ek.prototype.getClassName=function(){var t=this.style.containerClassName;return"".concat(q_).concat(t?" ".concat(t):"")},ek.prototype.initShape=function(){var t=this,e=this.style.id;this.container=tk(e),this.container.setAttribute("class",this.getClassName()),this.container.addEventListener("mousemove",function(){return t.showTip()}),this.container.addEventListener("mouseleave",function(){return t.hideTip()})},ek.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(X_,'"></span>'));t.innerHTML=n,Z(r)?t.innerHTML+=r:r&<(r)&&t.appendChild(r),e&&(t.getElementsByClassName(Z_)[0].textContent=e),this.applyStyles(),this.container.style.visibility=this.visibility},ek.prototype.applyStyles=function(){var t,e=rw({},K_,this.style.domStyles),e=Object.entries(e).reduce(function(t,e){var e=D(e,2),n=e[0],e=e[1],e=Object.entries(e).reduce(function(t,e){var e=D(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))},ek.prototype.setOffsetPosition=function(t,e,n){var n=D(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")},ek.tag="poptip",ek.defaultOptions={style:{x:0,y:0,width:0,height:0,target:null,visibility:"hidden",text:"",position:"top",follow:!1,offset:[0,0],domStyles:K_,template:'<div class="'.concat(Z_,'"></div>')}};class nk extends Xd{constructor(t){super(t)}connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){this.drawText(),this.drawBackground(),this.drawConnector(),this.drawPoints()}get endPoint(){const t=this.style["connector"];var e,n;return Array.isArray(null===t||void 0===t?void 0:t.path)&&t.path.length?([[,e,n]]=t.path.slice(-1),{x:e,y:n}):{x:0,y:0}}drawText(){var t=this.attributes,e=t["textAlign"],t=I(t,["class","connector","startMarker","endMarker","background","transform","textAlign"]),{x:n,y:r}=this.endPoint;this.textShape=Ob(this.textShape||this.appendChild(new fp({}))).call(Ib,t).style("x",+n).style("y",+r).style("textAlign",e||(n<0?"right":0<n?"left":"center")).node()}drawBackground(){var t,e,n,r,i,o,a,s,l,u=this.style["background"];u?(t=u.padding,u=I(u,["padding"]),[t=0,e=0,n=t,r=e]=t||[],i=this.getEulerAngles(),{min:[o,a],halfExtents:[s,l]}=(this.setEulerAngles(0),this.textShape.getLocalBounds()),this.setEulerAngles(i),this.background=Ob(this.background||this.appendChild(new dp({}))).style("zIndex",-1).style("x",o-r).style("y",a-t).style("width",2*s+r+e).style("height",2*l+t+n).call(Ib,u).node()):(this.background&&this.removeChild(this.background,!0),this.background=void 0)}drawConnector(){var t,e=this.style["connector"];e?(t=e.path||function(t){var{min:[t,e],max:[n,r]}=t.getLocalBounds();let i=0,o=0;return 0<t&&(i=t),n<0&&(i=n),0<e&&(o=e),r<0&&(o=r),[["M",0,0],["L",i,o]]}(this.background||this.textShape),this.connector=Ob(this.connector||this.appendChild(new ap({}))).style("zIndex",-1).style("stroke","black").style("lineWidth",1).call(Ib,e).style("path",t).node()):(this.connector&&this.removeChild(this.connector,!0),this.connector=void 0)}drawPoints(){var{startMarker:t,endMarker:e}=this.style;this.drawStartMarker(t),this.drawEndMarker(e&&Object.assign(Object.assign({},e),this.endPoint))}drawStartMarker(t){var e=this.startMarkerPoint;t?(e||(this.startMarkerPoint=this.appendChild(new yw({style:{symbol:"circle",size:4}}))),this.startMarkerPoint.update(t)):(e&&this.removeChild(e,!0),this.startMarkerPoint=void 0)}drawEndMarker(t){var e=this.endMarkerPoint;t?(e||(this.endMarkerPoint=this.appendChild(new yw({style:{symbol:"circle",size:4}}))),this.endMarkerPoint.update(t)):(e&&this.removeChild(e,!0),this.endMarkerPoint=void 0)}}const rk=t=>{const l=I(t,[]);return(t,e,n,r)=>{var r=r["defaultColor"],{color:e=r,text:r="",fontSize:i=12,rotate:o=0,transform:a=""}=e,[[t,s]]=t;return Ob(new nk({})).style("x",t).style("y",s).style("text",String(r)).style("stroke",e).style("fill",e).style("fontSize",i).style("transform",a+`rotate(${+o}deg)`).call(Ib,l).node()}};rk.props={defaultEnterAnimation:"fadeIn"};class ik extends Xd{constructor(t){super(t)}connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){this.drawMarker(),this.drawText()}drawMarker(){const t=this.attributes,{size:s=24}=t,e=I(t,["class","size"]);this.badgeMarker=this.badgeMarker||this.appendChild(new yw({})),this.badgeMarker.className="badge-marker",this.badgeMarker.update(Object.assign(Object.assign({symbol:()=>{var t=s/2,e=t/Math.sqrt(2),n=t*Math.sqrt(2),[r,i]=[-e,e-n],[o,a]=[0,0],[e,n]=[e,e-n];return[["M",r,i],["A",t,t,0,1,1,e,n],["L",o,a],["Z"]]},size:s},e),{x:0,y:0}))}drawText(){var t=function(t){var{min:t,max:e}=t.getLocalBounds();return{x:(t[0]+e[0])/2,y:(t[1]+e[1])/2}}(this.badgeMarker),{content:e="",textStyle:n}=this.style,{fontSize:n=10,fill:r="#333"}=n||{};this.badgeText=this.badgeText||this.appendChild(new fp({})),Ob(this.badgeText).attr("className","badge-text").style("x",t.x).style("y",t.y).style("textAlign","center").style("textBaseline","middle").call(Ib,{fill:r,fontSize:n,text:e}).node()}}const ok=t=>{const o=I(t,[]);return(t,e,n,r)=>{var r=r["defaultColor"],{color:e=r,text:r=""}=e,[[t,i]]=t;return Ob(new ik({})).style("x",t).style("y",i).style("text",String(r)).style("stroke",e).style("fill",e).call(Ib,o).node()}};function ak(t,e,n,r){const i=t.slice(0,t.length/2),o=t.slice(t.length/2);var a,s,l,u,c;if(pm(r)){const h=r.getCenter();t=e["transform"];return r=nb().curve(rb),a=r.curve,s=r.lineX0,l=r.lineX1,u=r.lineY0,c=r.lineY1,r.angle=r.x,delete r.x,r.startAngle=r.x0,delete r.x0,r.endAngle=r.x1,delete r.x1,r.radius=r.y,delete r.y,r.innerRadius=r.y0,delete r.y0,r.outerRadius=r.y1,delete r.y1,r.lineStartAngle=function(){return ab(s())},delete r.lineX0,r.lineEndAngle=function(){return ab(l())},delete r.lineX1,r.lineInnerRadius=function(){return ab(u())},delete r.lineY0,r.lineOuterRadius=function(){return ab(c())},delete r.lineY1,r.curve=function(t){return arguments.length?a(ob(t)):a()._curve},[r.angle((t,e)=>Cb(Ab(i[e],h))).outerRadius((t,e)=>Nb(i[e],h)).innerRadius((t,e)=>Nb(o[e],h)).curve(n)(o),`translate(${h[0]}, ${h[1]}) `+(t||"")]}return[nb().x((t,e)=>i[e][0]).y1((t,e)=>i[e][1]).y0((t,e)=>o[e][1]).curve(n)(i),""]}ok.props={defaultEnterAnimation:"fadeIn"};const sk=t=>{const{curve:a,gradient:s=!1}=t,l=I(t,["curve","gradient"]);return(t,e,n,r)=>{var r=r["defaultColor"],{color:r=r,seriesColor:i,seriesX:o}=e,[t,e]=ak(t,e,a,n),n=s&&i?Bb(i,o):r;return Ob(new ap({})).style("d",t).style("fill",n).style("stroke",n).style("transform",e).call(Ib,l).node()}},lk=(sk.props={defaultEnterAnimation:"fadeIn"},o=>(t,e,n,r)=>{var i=pm(n)?mb:J1;return sk(Object.assign({curve:i},o))(t,e,n,r)}),uk=(lk.props=Object.assign({},sk.props),t=>{const{alpha:o=.5}=t,a=I(t,["alpha"]);return(t,e,n,r)=>{const i=pm(n)?yb:pb;return sk(Object.assign({curve:i.alpha(o)},a))(t,e,n,r)}}),ck=(uk.props=Object.assign({},sk.props),t=>{const s=t["arrow"],l=I(t,["arrow"]);return(t,e,n,r)=>{var i,r=r["defaultColor"],{color:e=r,transform:r}=e,[t,o]=t;const a=P1();return a.moveTo(...t),a.lineTo(...o),s&&([t,i]=Rb(t,o,s),a.moveTo(...o),a.lineTo(...t),a.moveTo(...o),a.lineTo(...i)),Ob(new ap).style("d",a.toString()).style("stroke",e).style("transform",r).call(Ib,l).node()}}),hk=(ck.props={defaultEnterAnimation:"fadeIn"},t=>{const s=I(t,[]);return(t,e,n,r)=>{var r=r["defaultColor"],{color:e=r,src:r="",size:i=32,transform:o=""}=e,[[t,a]]=t,t=t-Number(i)/2,a=a-Number(i)/2;return Ob(new np).style("x",t).style("y",a).style("width",i).style("height",i).style("img",r).style("stroke",e).style("transform",o).call(Ib,s).node()}});hk.props={defaultEnterAnimation:"fadeIn"};const dk=t=>{const o=I(t,[]);return(t,e,n,r)=>{var r=r["defaultColor"],{color:e=r,transform:r}=e;const i=function(i,t){const o=P1();if(pm(t)){const a=t.getCenter(),e=[...i,i[0]],s=e.map(t=>Nb(t,a));return e.forEach((t,e)=>{var n,r;0===e?o.moveTo(t[0],t[1]):(n=s[e],r=i[e-1],void 0!==(e=s[e-1])&&Math.abs(n-e)<1e-10?Db(o,r,t,a,n):o.lineTo(t[0],t[1]))}),o.closePath(),o}return jb(o,i)}(t,n);return Ob(new ap).style("d",i.toString()).style("stroke",e).style("fill",e).style("transform",r).call(Ib,o).node()}};dk.props={defaultEnterAnimation:"fadeIn"};const pk=t=>{const o=I(t,[]);return(t,e,n,r)=>{var r=r["defaultColor"],{color:e=r,transform:r}=e;const i=function(t,e){const n=P1();var r,i,o,a,s,l,u,c;return pm(e)?([r,i]=e=e.getCenter(),o=Cb(Ab(t[0],e)),a=Cb(Ab(t[1],e)),s=Nb(e,t[2]),l=Nb(e,t[3]),u=Nb(e,t[8]),c=Nb(e,t[10]),e=Nb(e,t[11]),n.moveTo(...t[0]),n.arc(r,i,s,o,a),n.arc(r,i,s,a,o,!0),n.moveTo(...t[2]),n.lineTo(...t[3]),n.moveTo(...t[4]),n.arc(r,i,l,o,a),n.lineTo(...t[6]),n.arc(r,i,c,a,o,!0),n.closePath(),n.moveTo(...t[8]),n.arc(r,i,u,o,a),n.arc(r,i,u,a,o,!0),n.moveTo(...t[10]),n.lineTo(...t[11]),n.moveTo(...t[12]),n.arc(r,i,e,o,a),n.arc(r,i,e,a,o,!0)):(n.moveTo(...t[0]),n.lineTo(...t[1]),n.moveTo(...t[2]),n.lineTo(...t[3]),n.moveTo(...t[4]),n.lineTo(...t[5]),n.lineTo(...t[6]),n.lineTo(...t[7]),n.closePath(),n.moveTo(...t[8]),n.lineTo(...t[9]),n.moveTo(...t[10]),n.lineTo(...t[11]),n.moveTo(...t[12]),n.lineTo(...t[13])),n}(t,n);return Ob(new ap).style("d",i.toString()).style("stroke",e).style("fill",e).style("transform",r).call(Ib,o).node()}},fk=(pk.props={defaultEnterAnimation:"fadeIn"},a=>(t,e,n,r)=>{var r=r["defaultColor"],{color:e=r,transform:r,size:i}=e,[t,o]=t[0];return Ob(new ap).style("d",Jb(t,o,+i)).style("lineWidth",0).style("stroke",e).style("transform",r).style("fill",e).call(Ib,a).node()}),yk=(fk.props={defaultEnterAnimation:"fadeIn"},(...t)=>dk(...t)),gk=(yk.props={defaultEnterAnimation:"fadeIn"},(...t)=>ck(...t)),mk=(gk.props={defaultEnterAnimation:"fadeIn"},t=>{const a=I(t,[]);return(t,e,n,r)=>{var r=r["defaultColor"],{color:e=r,transform:r}=e,[t,i]=t;const o=P1();return 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]),Ob(new ap).style("d",o.toString()).style("stroke",e).style("transform",r).call(Ib,a).node()}});mk.props={defaultEnterAnimation:"fadeIn"};const vk=t=>{const{cornerRatio:a=1/3}=t,s=I(t,["cornerRatio"]);return(t,e,n,r)=>{var r=r["defaultColor"],{color:e=r,transform:r}=e,[t,i]=t;const o=function(t,e,n,r){const i=P1();var o,a;return pm(n)?(a=Nb(t,o=n.getCenter()),a=(Nb(e,o)-a)*r+a,i.moveTo(t[0],t[1]),Db(i,t,e,o,a),i.lineTo(e[0],e[1])):(dm(n)?(i.moveTo(t[0],t[1]),i.lineTo(t[0]+(e[0]-t[0])*r,t[1]),i.lineTo(t[0]+(e[0]-t[0])*r,e[1])):(i.moveTo(t[0],t[1]),i.lineTo(t[0],t[1]+(e[1]-t[1])*r),i.lineTo(e[0],t[1]+(e[1]-t[1])*r)),i.lineTo(e[0],e[1])),i}(t,i,n,a);return Ob(new ap).style("d",o.toString()).style("stroke",e).style("transform",r).call(Ib,s).node()}},bk=(vk.props={defaultEnterAnimation:"fadeIn"},t=>{const u=I(t,[]);return(t,e,n,r)=>{var i,o,a,r=r["defaultColor"],{color:e=r,transform:r}=e,[t,s]=t;const l=P1();return l.moveTo(t[0],t[1]),pm(n)?(n=n.getCenter(),l.quadraticCurveTo(n[0],n[1],s[0],s[1])):([[n,i],[o,a]]=[t,s],n=[(n+o)/2,(i+a)/2],o=Nb(t,s)/2,Db(l,t,s,n,o)),Ob(new ap).style("d",l.toString()).style("stroke",e).style("transform",r).call(Ib,u).node()}});bk.props={defaultEnterAnimation:"fadeIn"};const xk=t=>{const o=I(t,[]);return(t,e,n,r)=>{var r=r["defaultColor"],{color:e=r,transform:r}=e;const i=function(t,e){var n,[t,r,i,o]=t;const a=P1();return pm(e)?(n=Nb(e=e.getCenter(),t),a.moveTo(t[0],t[1]),a.quadraticCurveTo(e[0],e[1],i[0],i[1]),Db(a,i,o,e,n),a.quadraticCurveTo(e[0],e[1],r[0],r[1]),Db(a,r,t,e,n),a.closePath()):(a.moveTo(t[0],t[1]),a.bezierCurveTo(t[0]/2+i[0]/2,t[1],t[0]/2+i[0]/2,i[1],i[0],i[1]),a.lineTo(o[0],o[1]),a.bezierCurveTo(o[0]/2+r[0]/2,o[1],o[0]/2+r[0]/2,r[1],r[0],r[1]),a.lineTo(t[0],t[1]),a.closePath()),a}(t,n);return Ob(new ap).style("d",i.toString()).style("fill",e).style("stroke",e).style("transform",r).call(Ib,o).node()}};xk.props={defaultEnterAnimation:"fadeIn"};const wk=t=>{const a=I(t,[]);return(t,e,n,r)=>{var{defaultColor:r,defaultSize:i}=r,{color:r=r,size:i=i}=e,o=(t=t,pm(o=n)?(o=o.getCenter(),Z1()({startAngle:0,endAngle:2*Math.PI,outerRadius:Nb(t[0],o),innerRadius:Nb(t[1],o)})):eb().x(t=>t[0]).y(t=>t[1])(t)),t=(t=n,n=e.transform,pm(t)?([t,e]=t.getCenter(),`translate(${t}, ${e}) `+(n||"")):n);return Ob(new ap({})).style("d",o).style("stroke",r).style("lineWidth",i).style("transform",t).call(Ib,a).node()}};wk.props={defaultEnterAnimation:"fadeIn"};class Ek extends Xd{constructor(t){super(t)}connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){this.drawPath(),this.drawEndMarker()}drawPath(){var t=this.attributes,e=t["connectorPath"],t=I(t,["connectorPath","class"]);this.connector=Ob(this.connector||this.appendChild(new ap({}))).style("path",e).call(Ib,t).node()}drawEndMarker(){var{stroke:t,endMarker:e}=this.style;this.endMarker=this.endMarker||this.appendChild(new yw({})),this.endMarker.update(Object.assign({size:8,fill:t},e))}}function _k(t,e,n){return[["M",t-n,e+2*n],["L",t,e],["L",t+n,e+2*n],["Z"]]}function kk(t,e,n){return[["M",t,e],["L",t-n,e-2*n],["L",t+n,e-2*n],["Z"]]}function Tk(t,e,n){return[["M",t,e],["L",t+2*n,e-n],["L",t+2*n,e+n],["Z"]]}const Mk=t=>{const{direction:o="upward",offset:a=12,endMarker:s}=t,l=I(t,["direction","offset","endMarker"]);return(t,e,n,r)=>{var r=r["defaultColor"],{color:e=r,transform:r}=e,n=function(t,e,n,r){var[e,i]=e;return dm(t)?[e,[t="downward"===n?Math.min(e[0],i[0])-r:Math.max(e[0],i[0])+r,e[1]],[t,i[1]],i]:(t="downward"===n?Math.max(e[1],i[1])+r:Math.min(e[1],i[1])-r,[e,[e[0],t],[i[0],t],i])}(n,t,o,a),t=(t=n,eb().x(t=>t[0]).y(t=>t[1])(t)),[,,,i]=n;return Ob(new Ek({})).style("connectorPath",t).style("stroke",e).style("transform",r).style("endMarker",Object.assign({x:i[0],y:i[1],symbol:function(t){var[,,t,e]=t;return e[0]<t[0]?Tk:t[1]>e[1]?_k:kk}(n)},s)).call(Ib,l).node()}};function Sk(t,e,n,r){var i,o,{min:a,halfExtents:s}=function(t){const e=t.cloneNode(),n=t.getAnimations();return e.style.visibility="hidden",n.forEach(t=>{t=t.effect.getKeyframes();e.attr(t[t.length-1])}),t.parentNode.appendChild(e),t=e.getLocalBounds(),e.destroy(),t}(e.element),[a,l]=a;return pm(n)||fm(n)?({y:e,y1:o}=e,{startAngle:t,endAngle:e,innerRadius:o,outerRadius:i}=Fb(n,t,[e,o]),t=(t+e)/2,e=("inside"===r?(o+i)/2:i)+("inside"===r?0:12),{x:(o=n.getCenter())[0]+Math.sin(t)*e-a,y:o[1]-Math.cos(t)*e-l}):(i=2*s[0],n=2*s[1],"left"===r?{x:0,y:n/2}:"right"===r?{x:i,y:n/2}:"bottom"===r?{x:i/2,y:n}:"inside"===r?{x:i/2,y:n/2}:{x:i/2,y:0})}Mk.props={defaultEnterAnimation:"fadeIn"};const Ok=t=>{const{label:a={}}=t;return(t,e,n,r)=>{var i=a["position"],o=I(a,["position"]),r=r["labelFill"],{x:t,y:n}=Sk(t,e,n,i),e=e["label"],i="left"===(i=i)||"right"===i||"inside"===i||"outside"===i?{textBaseline:"middle"}:{dy:"-2px"};return Ob(new fp).style("x",t).style("y",n).style("text",""+e).style("fontSize",12).style("textAlign","center").style("fill",r).call(Ib,i).call(Ib,o).node()}},Pk=(Ok.props={},t=>{return Object.assign({},{defaultColor:"#5B8FF9",defaultCategory10:"category10",defaultCategory20:"category20",defaultSize:1,elementActiveStroke:"black",labelFill:"#595959",enter:{duration:300,fill:"both",delay:0},title:{fill:"rgba(0,0,0,0.85)",fontSize:14,fontWeight:"bold"},subtitle:{fill:"rgba(0,0,0,0.65)",fontSize:10}},t)});function Ak(r,t,e,i,o){var n;const a=(null==(n=r.getTicks)?void 0:n.call(r))||t,s=(null==(n=r.getFormatter)?void 0:n.call(r))||e;return pm(o)||dm(o)?a.map(t=>{var e,n=(null==(n=r.getBandWidth)?void 0:n.call(r,t))/2||0,n=r.map(t)+n;return{value:dm(o)&&null!=(e=r.getTicks)&&e.call(r)?1-n:n,text:s(t)}}):a.map(t=>{var e=(null==(e=r.getBandWidth)?void 0:e.call(r,t))/2||0,e=r.map(t)+e;n=e;var n=function(t,e,n){var{width:n,height:r}=n.getOptions();if("bottom"===e){const i=t[0],o=new Uv({domain:[0,n],range:[0,1]});return o.map(i)}const i=t[1],o=new Uv({domain:[0,r],range:[0,1]});return o.map(i)}(o.map("bottom"===i?[n,1]:[0,n]),i,o);return{value:ym(o)?e:n,text:s(t)}})}function Nk(t,e,n,r,i){return pm(n)||ym(n)?[]:t.map(t=>{return{points:function(t,e,n,r,i){var[r,o]=r,[i,a]=i,[n,s]=n.getSize();let l,u,c,h;return"bottom"===e||"top"===e?(l=u=r+(i-r)*t,c=o,h="bottom"===e?o-s:o+s):(c=h=o+(a-o)*t,l=r,u="left"===e?r+n:r-n),[[l,c],[u,h]]}(t.value,e,n,r,i)}})}Pk.props={};const Ck=t=>{const{position:s,formatter:l=t=>""+t}=t;return(t,e,n,r)=>{var[i,o]=n.getCenter(),{domain:e,bbox:a}=e,i=[i+a.x,o+a.y],o=Ak(t,e,l,s,n),e=Math.min(a.width,a.height)/2,n=t.getOptions().guide||{},a=n["grid"],t=a?function(t,e,n,r,i){const[o,a]=e;return t.map(({value:t})=>{t=(r-n)*t+n;return{points:[[o,a],[o+i*Math.cos(t*Math.PI/180),a+i*Math.sin(t*Math.PI/180)]]}})}(o,i,-90,270,e):[];return new Z2({style:N({},{center:i,radius:e,startAngle:-90,endAngle:270,ticks:o,axisLine:{style:{lineWidth:0,strokeOpacity:0}},grid:{items:t,lineStyle:{stroke:"#1b1e23",strokeOpacity:.1,lineDash:[0,0]}},tickLine:{len:4,style:{lineWidth:1,stroke:"#BFBFBF"}},label:{align:"tangential",tickPadding:2}},n)})}},Lk=t=>{const{position:m,title:v=!0,formatter:b=t=>""+t}=t;return(t,e,n,r)=>{var{domain:e,field:i,bbox:o}=e,{startPos:o,endPos:a,labelOffset:s,titlePosition:l,titlePadding:u,titleRotate:c,verticalFactor:h,titleOffsetY:d,label:p=!0,axisLine:f,tickLine:y=!0}=function(t,e,n){var r,{x:i,y:o,width:a,height:s}=e;return"bottom"===t?{startPos:[i,o],endPos:[i+a,o],labelOffset:8,titlePosition:"end",titlePadding:2,titleRotate:0,verticalFactor:1}:"left"===t||"centerHorizontal"===t?{startPos:[i+a,o],endPos:[i+a,o+s],titlePosition:"center",titlePadding:6,titleRotate:-90,labelAlign:"end",labelOffset:4,verticalFactor:-1}:"right"===t?{startPos:[i,o],endPos:[i,o+s],titlePosition:"center",titlePadding:16,titleRotate:-90,labelAlign:"start",labelOffset:4,verticalFactor:1}:"arcY"===t?([t,n]=n.getCenter(),r=Math.min(e.width,e.height)/2,{startPos:[t+e.x,n+e.y-r],endPos:[t+e.x,n+e.y],titlePosition:"start",titlePadding:4,titleOffsetY:0,titleRotate:-90,labelOffset:4,verticalFactor:-1,axisLine:!1}):{startPos:[i,o+s],endPos:[i+a,o+s],titlePosition:"end",titlePadding:2,titleRotate:0,labelOffset:4,verticalFactor:-1}}(m,o,n),e=Ak(t,e,b,m,n),l=t.getTicks?l:"center",g=t.getOptions().guide||{},{grid:t=!!t.getTicks}=g,t=t?Nk(e,m,n,o,a):[];return new F2({style:N(Object.assign({startPos:o,endPos:a,verticalFactor:h,ticks:e,label:p?{tickPadding:s,autoHide:!1,style:{}}:null,axisLine:f?{stroke:"#BFBFBF"}:null,grid:{items:t,lineStyle:{stroke:"#1b1e23",strokeOpacity:.05,lineDash:[0,0]}},tickLine:y?{len:4,style:{lineWidth:1,stroke:"#BFBFBF"}}:null},i&&v&&{title:{content:Array.isArray(i)?i[0]:i,titleAnchor:l,style:{fontWeight:"bold",fillOpacity:1,dy:d,textAnchor:l},titlePadding:u,rotate:c}}),g)})}},Ik=i=>{const o=i["position"];return(t,e,n,r)=>("arc"===o?Ck:Lk)(i)(t,e,n,r)},jk=(Ik.props={defaultPosition:"left",defaultSize:45,defaultOrder:0},t=>Ik(t)),Rk=(jk.props=Object.assign(Object.assign({},Ik.props),{defaultPosition:"bottom"}),t=>Ik(t)),Dk=(Rk.props=Object.assign(Object.assign({},Ik.props),{defaultPosition:"left"}),t=>{const{position:f,formatter:y=t=>""+t}=t;return(e,t,n,r)=>{const{domain:i,field:o,bbox:a}=t;var{x:t,y:s,width:l,height:u}=a,c=i.map(t=>({id:t,name:y(t),color:e.map(t)})),h=e.getOptions().guide||{},{cols:d,autoWrap:p}=h,h=I(h,["cols","autoWrap"]),d=p&&d?l/d:void 0,c=N({},Object.assign(Object.assign({items:c,x:t,y:s,orient:["right","left"].includes(f)?"vertical":"horizontal",maxWidth:l,maxHeight:u,autoWrap:p,maxItemWidth:d,itemWidth:d,spacing:[8,0],itemName:{style:{fontSize:12,fillOpacity:1,fill:"#000",fontWeight:"lighter",active:{fillOpacity:.8},inactive:{fill:"#d8d8d8"},unchecked:{fill:"#d8d8d8"}}}},o&&{title:{content:Array.isArray(o)?o[0]:o,style:{fontSize:12,fontWeight:"bold",fillOpacity:1}}}),{itemMarker:{size:8,symbol:"circle",style:{fillOpacity:1,inactive:{fillOpacity:.2},unchecked:{fill:"#d8d8d8",stroke:"#d8d8d8"}}},itemBackgroundStyle:{fill:"transparent"}}),h);return new XE({className:"category-legend",style:c})}}),Bk=(Dk.props={defaultPosition:"top",defaultOrder:1,defaultSize:40},t=>(e,t,n,r)=>{const{field:i,domain:o,bbox:a}=t;var{x:t,y:s}=a,l=(null==(l=e.getTicks)?void 0:l.call(e))||[],[u,c]=o;return new f_({style:Object.assign(Object.assign({x:t,y:s,rail:{length:120,size:12,ticks:l},min:u,max:c,indicator:null,handle:null},i&&{title:{content:Array.isArray(i)?i[0]:i,style:{fontSize:12}}}),{color:o.map(t=>e.map(t))})})});function Fk(e){return class extends Xd{constructor(t){super(t),this.descriptor=e}connectedCallback(){var t,e;null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)}update(t={}){var e;this.attr(N({},this.attributes,t)),null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)}}}function zk(t,e,n){return t.querySelector(e)?Ob(t).select(e):Ob(t).append(n)}Bk.props={defaultPosition:"top",defaultOrder:1,defaultSize:40};const Vk=Fk({render(t,e){const{text:n,style:r,subtitle:i,subtitleStyle:o}=t,a=zk(e,".title","text").attr("className","title").style("fontSize",14).style("textBaseline","top").style("text",n).call(Ib,r||{}).node();t=a.getLocalBounds();zk(e,".sub-title","text").attr("className","sub-title").style("y",t.max[1]+((null===o||void 0===o?void 0:o.spacing)||0)).style("fontSize",12).style("textBaseline","top").call(t=>{if(!i)return t.node().remove();t.node().attr(Object.assign({text:i},o))})}}),Gk=t=>{const{text:o,style:a,subtitle:s,subtitleStyle:l}=t;return(t,e,n,r)=>{var{x:e,y:i}=e.bbox;return new Vk({style:N({},{style:r.title,subtitleStyle:r.subtitle},{x:e,y:i,style:a,text:o,subtitle:s,subtitleStyle:l})})}};Gk.props={defaultPosition:"top",defaultOrder:2,defaultSize:30};class Hk{constructor(t){this.$value=t}static of(t){return new Hk(t)}call(t,...e){return this.$value=t(this.$value,...e),this}value(){return this.$value}}function Wk(t,e,n){return Hk.of({}).call(Yk,t).call(Yk,e).call(Yk,n).value()}function Yk(t,e){for(var[n,r]of Object.entries(e))void 0!==r&&(t[n]=e[n]);return t}const Uk=h=>{return(t,e,n,r,i)=>{const[o]=t;var t=o.getBoundingClientRect()["height"],{transform:a,fillOpacity:s,strokeOpacity:l,opacity:u}=o.style,[r,t]=dm(r)?[[0,t],"scale(1, 0.0001)"]:[[0,0],"scale(0.0001, 1)"],t=[{transform:(a+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(a+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:u,offset:.01},{transform:(a+" scale(1, 1)").trimStart()}];o.setOrigin(r);const c=o.animate(t,Wk(i,n,h));return c.finished.then(()=>o.setOrigin(0,0)),c}},qk=h=>{return(t,e,n,r,i)=>{const[o]=t;var t=o.getBoundingClientRect()["height"],{transform:a,fillOpacity:s,strokeOpacity:l,opacity:u}=o.style,[r,t]=dm(r)?[[0,t],"scale(1, 0.0001)"]:[[0,0],"scale(0.0001, 1)"],s=[{transform:(a+" scale(1, 1)").trimStart()},{transform:(a+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:u,offset:.99},{transform:(a+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}];o.setOrigin(r);const c=o.animate(s,Wk(i,n,h));return c.finished.then(()=>o.setOrigin(0,0)),c}},Xk=h=>{return(t,e,n,r,i)=>{const[o]=t;var t=o.getBoundingClientRect()["height"],{transform:a,fillOpacity:s,strokeOpacity:l,opacity:u}=o.style,[r,t]=dm(r)?[[0,0],"scale(0.0001, 1)"]:[[0,t],"scale(1, 0.0001)"],t=[{transform:(a+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(a+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:u,offset:.01},{transform:(a+" scale(1, 1)").trimStart()}];o.setOrigin(r);const c=o.animate(t,Wk(i,n,h));return c.finished.then(()=>o.setOrigin(0,0)),c}},Zk=h=>{return(t,e,n,r,i)=>{const[o]=t;var t=o.getBoundingClientRect()["height"],{transform:a,fillOpacity:s,strokeOpacity:l,opacity:u}=o.style,[r,t]=dm(r)?[[0,0],"scale(0.0001, 1)"]:[[0,t],"scale(1, 0.0001)"],s=[{transform:(a+" scale(1, 1)").trimStart()},{transform:(a+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:u,offset:.99},{transform:(a+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}];o.setOrigin(r);const c=o.animate(s,Wk(i,n,h));return c.finished.then(()=>o.setOrigin(0,0)),c}},Kk=l=>(t,e,n,r,i)=>{const[o]=t;var{fillOpacity:t,strokeOpacity:a,opacity:s}=o.style;return o.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:t,strokeOpacity:a,opacity:s}],Wk(i,n,l))},$k=(Kk.props={},l=>(t,e,n,r,i)=>{const[o]=t;var{fillOpacity:t,strokeOpacity:a,opacity:s}=o.style;return o.animate([{fillOpacity:t,strokeOpacity:a,opacity:s},{fillOpacity:0,strokeOpacity:0,opacity:0}],Wk(i,n,l))});function Jk(t,e){const n={};for(const i of e){var r=t.style[i];r&&(n[i]=r)}return n}function Qk(t,e){var[n,r,i,t]=function(t){var{min:t,max:e}=t.getLocalBounds(),[t,n]=t,[e,r]=e;return[t,n,e-t,r-n]}(t),o=Math.ceil(Math.sqrt(e/(t/i)));const a=[];var s=t/Math.ceil(e/o);let l=0,u=e;for(;0<u;){var c=Math.min(u,o),h=i/c;for(let t=0;t<c;t++){var d=n+t*h,p=r+l*s;a.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
|
-
`}([d,f,h,s]))}u-=c,l+=1}return a}function P_(t,e,n,r){var i=su(e),o=su(n);if(void 0===i||void 0===o)return null;var a=["fill","stroke","fillOpacity","strokeOpacity","opacity","lineWidth"],i=[Object.assign({path:i},T_(e,a)),Object.assign({path:o},T_(n,a))],e=t.animate(i,r);return t.style.transform="scale(1, 1)",t.style.transform="none",e}M_.props={};const A_=y=>(t,e,n,r,i)=>{[o="pack"]=[y.split];var o="function"==typeof o?o:O_,i=b_(i,n,y),n=t["length"],a=e["length"];if(1===n&&1===a||1<n&&1<a)return[s]=t,[u]=e,P_(s,s,u,i);if(1===n&&1<a){var[s]=t;{var l=s,u=e,c=i,s=o;l.style.visibility="hidden";const f=s(l,u.length);return u.map((t,e)=>{return P_(t,new Zh({style:{path:f[e],fill:l.style.fill}}),t,c)})}}if(1<n&&1===a){var[n]=e;{var a=t,h=n,d=i;const p=(e=o)(h,a.length);var{fillOpacity:e,strokeOpacity:t,opacity:n}=h.parsedStyle,e=[{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:0,strokeOpacity:0,opacity:0,offset:.99},{fillOpacity:e.value,strokeOpacity:t.value,opacity:n.value}],t=h.animate(e,d);return[...a.map((t,e)=>{return P_(t,t,new Zh({style:{path:p[e],fill:h.style.fill}}),d)}),t]}}return null},C_=(A_.props={},()=>t=>{const{event:e,shared:n}=t;var{target:r,offsetX:i,offsetY:o}=e;const a=(r||{})["className"];return n.mouseX=i,n.mouseY=o,a&&a.includes("element")?n.selectedElements=[r]:n.selectedElements=[],t}),N_=(C_.props={},t=>{const a=t["multiple"];return t=>{const{event:e,shared:n}=t,r=e.composedPath();var i=r.find(t=>"legend-item"===t.className);const o=a&&n.triggerInfo||[];return i&&o.push({id:i.id,scaleType:"color"}),n.triggerInfo=o,t}});function L_(t){return t.selectAll(".element").nodes().map(n=>{const r=n["__data__"],{seriesX:i=[],seriesY:o=[],seriesTooltip:a=[],seriesTitle:s=[]}=r;return i.length?i.map((t,e)=>Object.assign(Object.assign({},n),{__data__:Object.assign(Object.assign({},r),{x:i[e],y:o[e],title:s[e],tooltip:a[e]})})):n}).flat()}function I_(t,e,n,r="x"){let i=n;if(e.getRange){var o=e.getRange();for(let t=0;t<o.length;t++){var a=o[t],s=e.invert(a),l=e.getBandWidth(s),s=(e.getStep(s)-l)/2;if(a-s<=n&&n<a+l+s){i=a;break}}}return i?jg(t,({__data__:t})=>Math.pow(t[r]-i,2)):null}N_.props={};const R_=t=>{const{trigger:E,filterBy:_,multiple:S,toggle:M}=t;return t=>{const{event:e,shared:n,selection:r,scale:i,transientLayer:o,coordinate:a}=t,s=L_(r),{selectedElements:l=[]}=n;n.selectedElements=[];let u=[];if("axis"===E){const m=r.select(".plot").node();var[c,h]=m.getBounds().min,{offsetX:d,offsetY:f}=e,[d]=a.invert([d-c,f-h]);const b=I_(s,i.x,d);u=b?s.filter(({__data__:{x:t}})=>t===b.__data__.x):[]}else if("triggerInfo"===E){var{triggerInfo:c=[]}=n;u=(f=s,p=i,y=c,f.filter(t=>{var e=t["__data__"];for(const n of y){const r=p[n.scaleType];if(r&&r.invert(e[n.scaleType])===n.id)return!0}}))}else if("rect-mask"===E){const x=o.selectAll(".mask").nodes();u=s.filter(n=>x.some(t=>{var e=n.getRenderBounds(),t=t.getRenderBounds();return!(t.min[0]>e.max[0]||t.max[0]<e.min[0]||t.min[1]>e.max[1]||t.max[1]<e.min[1])}))}else if("polygon-mask"===E){const w=o.selectAll(".mask").nodes();u=s.filter(l=>w.some(({__data__:{points:t}})=>{var{min:e,max:n}=l.getLocalBounds(),n=[e,[e[0],n[1]],n,[n[0],e[1]]],r=t,i=n;if(r.length<2||i.length<2)return!1;e=dw(r),t=dw(i);if(e=e,(t=t).minX>e.maxX||t.maxX<e.minX||t.minY>e.maxY||t.maxY<e.minY)return!1;var o=!1;if($f(i,function(t){if(uw(r,t[0],t[1]))return!(o=!0)}),o)return!0;if($f(r,function(t){if(uw(i,t[0],t[1]))return!(o=!0)}),o)return!0;var a=cw(r),t=cw(i),s=!1;return $f(t,function(t){if(hw(a,t))return!(s=!0)}),s}))}else{h=e["target"];const k=(h||{})["className"];k&&k.includes("element")&&(d=ib(h).node()["__data__"],u=_?((e,n)=>{const t=r.selectAll(".element").nodes();return t.filter(({__data__:t})=>t[e]===n)})(_,d[_]):[h])}var p,y,g;[g,c=[]]=[u,l];const v=c.filter(e=>g.find(({__data__:{key:t}})=>t===e.__data__.key)).map(t=>t.__data__.key);return n.selectedElements=u,S&&l.forEach(t=>{v.includes(t.__data__.key)||n.selectedElements.push(t)}),M&&(n.selectedElements=n.selectedElements.filter(t=>!v.includes(t.__data__.key))),t}},D_=(R_.props={},t=>{const a=t["from"];return t=>{const{shared:e,selection:n,scale:r}=t,i=n.select(".category-legend").node();if("triggerInfo"===a)e.selectedLegendItems=e.triggerInfo.map(({id:t})=>i.getItem(t));else if("selectedElements"===a){const o=e.selectedElements.map(({__data__:{color:t}})=>r.color.invert(t));e.selectedLegendItems=o.map(t=>i.getItem(t))}return t}}),j_=(D_.props={},t=>{const n=t["state"];return t=>{const e=t["shared"];return e.currentState=n,t}}),B_=(j_.props={},t=>{const{clear:d,start:f}=t;return t=>{const{shared:e,selection:n,event:r}=t,i=n.select(".plot").node();var[o,a]=i.getBounds().min,{offsetX:s,offsetY:l}=r;if(d)e.points=[];else{var{points:u=[]}=e;const c=[...u];u=[s-o,l-a];if(f)e.points=[...c,[u]];else{const h=c.splice(-1,1)[0]||[];h.push(u),e.points=[...c,h]}}return t}}),F_=(B_.props={},t=>{const o=t["clear"];return t=>{const{shared:e,event:n}=t;var{offsetX:r,offsetY:i}=n;return o?e.currentPoint=null:e.currentPoint=[r,i],t}});F_.props={};const z_=t=>{const u=t["dim"];return t=>{const{shared:e,coordinate:l}=t,{points:n=[]}=e;return e.regions=n.map(i=>{{var o=l,a=u,o=o.getOptions(),s=rp(i),i=ip(i);let t=Math.min(s[0],i[0]),e=Math.min(s[1],i[1]),n=Math.abs(i[0]-s[0]),r=Math.abs(i[1]-s[1]);return"x"===a?(e=o.y,r=o.height):"y"===a&&(t=o.x,n=o.width),{x1:t,y1:e,x2:t+n,y2:e+r}}}),t}},V_=(z_.props={},l=>t=>{const{shared:e,theme:n,selectionLayer:r}=t,{selectedElements:i=[]}=e;var o=n["elementActiveStroke"];const{color:a=o,border:s}=l;o=i.map(t=>t.__data__);return r.selectAll(".highlight-element").remove(),r.selectAll(".highlight-element").data(o,t=>t.key).join(t=>t.append((t,e)=>i[e].cloneNode()).style("lineWidth",function(){return void 0!==s?s:+this.style.lineWidth||1}).style("stroke",a).attr("className","highlight-element")),t});function G_(t,e,n,r){n.includes(e)?(t.style.fillOpacity=1,t.style.lineWidth=+t.style.lineWidth||1,t.style.stroke=r):(t.style.fillOpacity=.45,t.style.stroke="transparent")}V_.props={};const H_=c=>{const h=c["clear"];return t=>{const{shared:e,selection:n,theme:r,selectionLayer:i}=t,{selectedElements:o=[]}=e;var a=r["elementActiveStroke"];const{color:s=a}=c,l=o.map(t=>t.__data__),u=n.selectAll(".element").each(function(){this.style.originVisibility||(this.style.originVisibility=this.style.visibility||"visible"),this.style.visibility=l.length?"hidden":this.style.originVisibility}).nodes();a=l.length?u.map(t=>t.__data__):[];return i.selectAll(".highlight-element").data(h?[]:a,(t,e)=>e).join(t=>t.append((t,e)=>u[e].cloneNode(!0)).attr("className","highlight-element").style("visibility","visible").each(function(t){G_(this,t,l,s)}),t=>t.each(function(t){G_(this,t,l,s)}),t=>t.remove()),t}};function W_(t){t.selectAll(".tooltip-crosshairs").each(function(){this.hide()})}function U_(t){t.selectAll(".tooltip-markers").each(function(){this.hide()})}function Y_(t){t.selectAll(".tooltip").each(function(){this.hide()}),W_(t),U_(t)}function q_(t,e,n={}){const{transientLayer:r,coordinate:i}=t;var o,a;e?(t=n.follow,n=I(n,["follow"]),{x:e,y:o,items:a}=e,t=function(t,e,n){let r,i;var o,a,s,{type:n="y",line:l={lineDash:[4,4],lineWidth:1},text:u=!1}=n;return zg(t)?(o=Z1(a=t.getCenter(),e),i={id:"circle-y",center:a,defaultRadius:o,type:"circle",text:u,lineStyle:l},r={id:"line-x",startPos:[a[0],a[1]],endPos:e,text:u,lineStyle:l}):({x:o,y:a,width:t,height:s}=t.getOptions(),r={id:"line-x",startPos:[o,e[1]],endPos:[o+t,e[1]],text:u,lineStyle:l},i={id:"line-y",startPos:[e[0],a],endPos:[e[0],a+s],text:u,lineStyle:l}),"x"===n?[r]:"xy"===n?[r,i]:[i]}(i,t?[e,o]:[a[0].x,a[0].y],n),r.selectAll(".tooltip-crosshairs").data(t,(t,e)=>e).join(t=>t.append(t=>{var e=t["type"],t=I(t,["type"]);const n="circle"===e?hE:sE;return new n({className:"tooltip-crosshairs",style:t})}),t=>t.each(function(t){this.update(t),this.show()}),t=>t.remove())):W_(r)}function X_(t,e){return Object.entries(t).filter(([t])=>t.startsWith(e)).map(([,t])=>t)}function Z_(t,e){var n;return(null==(n=null==t?void 0:t.getBandWidth)?void 0:n.call(t,t.invert(e)))||0}function K_(t,e,n,r){const{shared:i,scale:u,coordinate:c}=t;var{mouseX:t,mouseY:o,selectedElements:a}=i;const s=r["defaultColor"],l=u["x"],h=a,d=h.map(t=>{const i=t["__data__"],{seriesX:o=[],seriesY:a=[],seriesTooltip:s=[],seriesTitle:l=[]}=i;var e;return o.length?o.map((t,e)=>{var[n,r]=c.map([o[e],a[e]]);return{x:n,y:r,datum:Object.assign(Object.assign({},i),{x:o[e],title:l[e],tooltip:s[e]})}}):([t,e]=function(t,e,n){const r=X_(t,"x"),i=(t=X_(t,"y"),e["x"]);return e=r.reduce((t,e)=>t+e+Z_(i,e)/2,0),n.map([e/r.length,Math.min.apply(null,t)])}(i,u,c),{x:t,y:e,datum:i})}).flat(),f=c.invert([e,n])[0],p=jg(d,({datum:{x:t}})=>Math.pow(t+Z_(l,t)/2-f,2));if(!p)return null;r=d.filter(({datum:{x:t}})=>t===p.datum.x).map(t=>{const{datum:e,x:r,y:i}=t,{color:o=s,title:a}=e;return Object.entries(e).filter(([t])=>t.startsWith("tooltip")).map(([t,e])=>{var{field:t,title:t=t}=u[t].getOptions(),n="object"==typeof e&&!(e instanceof Date);return{x:r,y:i,title:a,color:o,name:t,value:n?e.value:void 0===e?e:""+e}}).filter(({value:t})=>void 0!==t)}).flat();return r.length?{x:t,y:o,title:r[0].title,items:r}:null}H_.props={};const $_=t=>{const{showCrosshairs:w,showMarkers:k}=t,E=I(t,["showCrosshairs","showMarkers"]);return t=>{const{scale:e,coordinate:n,theme:r,selection:i,shared:o,transientLayer:a}=t;var s=e["tooltip"];if(void 0===s)Y_(a);else{var{mouseX:s,mouseY:l}=o;const v=i.select(".plot").node();var u=v.getRootNode().defaultView.getConfig().container,{x:c,y:h,width:d,height:f}=n.getOptions(),[p,y]=v.getBounds().min;const m=function(t,e,n){let r=t.select(".tooltip").node();return r||(r=new Kk({className:"tooltip",style:{container:{x:0,y:0},items:[],bounding:n,position:"bottom-right",offset:[10,10],style:{".tooltip":{"max-width":"170px"},".tooltip-title":{overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"}}}}),t.append(()=>r),e.appendChild(r.HTMLTooltipElement)),r}(a,u,{x:p+c,y:y+h,width:d,height:f});u=K_(t,s-p,l-y,r);u?({title:c,items:h}=u,m.update({x:s,y:l,title:c,position:"bottom-right",offset:[14,10],items:h}),m.show()):Y_(a);{var[d,f,g={}]=[t,k?u:null,E.markers];const b=d["transientLayer"];if(f){const x=f["items"];d=x.map(t=>{var{x:t,y:e,color:n}=t;return Object.assign({cx:t,cy:e,fill:n,r:3,stroke:"#fff",lineWidth:1.5,zIndex:1},g)});b.selectAll(".tooltip-markers").data(d,(t,e)=>e).join(t=>t.append(t=>new Fh({className:"tooltip-markers",style:t})),t=>t.each(function(t){this.attr(t),this.show()}),t=>t.remove())}else U_(b)}q_(t,w?u:null,E.crosshairs)}return t}},J_=($_.props={},()=>t=>{const{shared:e,update:n}=t;var r=e["updatedOptions"];return n(r),t}),Q_=(J_.props={},t=>{const c=t["reset"];return t=>{const{shared:n,scale:e,options:r}=t,i=n["selectedElements"],o=(n.originTransform||(n.originTransform=r.marks[0].transform||[]),e)["x"],a=!!o.getBandWidth,s=i.map(t=>t.__data__.title),l=Math.min.apply(null,s),u=Math.max.apply(null,s);return n.updatedOptions=(()=>{if(c)r.marks[0].transform=n.originTransform;else if(0<s.length){const e=[...n.originTransform];var t=o.getOptions()["field"];e.push({type:"filterBy",fields:[t],callback:t=>a?s.includes(t):t>=l&&t<=u}),r.marks[0].transform=e}return r})(),t}});function tS(t,e,n){n.includes(e)?t.style.visibility=t.style.originVisibility:t.style.visibility="hidden"}Q_.props={};const eS=()=>t=>{const{shared:e,selection:n,selectionLayer:r}=t,{selectedElements:i=[]}=e,o=i.map(t=>t.__data__),a=n.selectAll(".element").each(function(){this.style.originVisibility||(this.style.originVisibility=this.style.visibility||"visible"),this.style.visibility=o.length?"hidden":this.style.originVisibility}).nodes();var s=o.length?a.map(t=>t.__data__):[];return r.selectAll(".filtered-element").data(s,(t,e)=>e).join(t=>t.append((t,e)=>a[e].cloneNode(!0)).attr("className","filtered-element").each(function(t){tS(this,t,o)}),t=>t.each(function(t){tS(this,t,o)}),t=>t.remove()),t};eS.props={};const nS=t=>{const{items:u,state:c="active"}=t;return t=>{const{shared:e,selection:n}=t;if(u.includes("legendItem")){const{selectedLegendItems:o=[]}=e,a=n.select(".category-legend").node();if("highlight"===c){var r=a;var i=o;const s=(null==r?void 0:r.getItemsStates())||[];i.length?(s.forEach(({id:t})=>r.setItemState(t,"inactive",!0)),i.forEach(t=>t.setState("inactive",!1))):s.forEach(({id:t})=>r.setItemState(t,"inactive",!1))}else{const l=(null===a||void 0===a?void 0:a.getItemsStates())||[];l.forEach(({id:t})=>a.setItemState(t,c,!1)),o.forEach(t=>t.setState(c,!0))}}return t}},rS=(nS.props={},y=>t=>{const{event:e,selection:n,shared:r,options:i}=t;var{updatedOptions:o={}}=r,{offsetX:a,offsetY:s}=e;const l=n.select(".main").node();var{min:[u,c],max:[h,d]}=l.getBounds();if(a<u||h<a||(s<c||d<s))r.updatedOptions=C({},i);else{const f=a-u,p=s-c;r.updatedOptions=C(o,(()=>{const{coordinate:t=[]}=i;var e=t.findIndex(t=>"fisheye"===t.type);if(-1===e)return Object.assign(Object.assign({},i),{coordinate:[...t,{type:"cartesian"},Object.assign(Object.assign({type:"fisheye"},y),{focusX:f,focusY:p})]});{var n=t[e],n=Object.assign(Object.assign(Object.assign({},n),y),{focusX:f,focusY:p});const r=[...t];return r.splice(e,1,n),Object.assign(Object.assign({},i),{coordinate:r})}})())}return t}),iS=(rS.props={},t=>{const a=t["cursor"];return t=>{const{selection:e,event:n}=t;var r=n["target"];const i=e.node().getRootNode().defaultView,o=i.getContextService().getDomElement();return o.style.cursor=a||(null==(r=r.style)?void 0:r.cursor),t}});iS.props={};const oS={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",se:"nwse-resize",ne:"nesw-resize",sw:"nesw-resize"};const aS=t=>{const{maskType:l,fill:u="#C5D4EB",fillOpacity:c=.3}=t;return t=>{const{shared:e,transientLayer:n}=t,{regions:r=[],points:i=[]}=e,o="polygon"===l?i:r.map(t=>{var{x1:t,y1:e,x2:n,y2:r}=t;return[[t,e],[n,e],[n,r],[t,r]]});var a=o.map((t,e)=>({draggable:!0,d:sb(e1(),t).toString(),fill:u,fillOpacity:c,stroke:u,lineWidth:.5,points:t,cursor:"move",index:e}));n.selectAll(".mask").data(a,(t,e)=>e).join(t=>t.append(t=>new Zh({className:"mask",style:t})),t=>t.each(function(t){this.attr(t),this.dispatchEvent(new Th("maskChange"))}),t=>t.remove());const s="polygon"===(a=l)?[]:"rectX"===a?["w","e"]:"rectY"===a?["n","s"]:["n","e","s","w","ne","se","sw","nw"];a=r.map((t,e)=>{const{x1:n,y1:r,x2:i,y2:o}=t;return s.map(t=>({draggable:!0,x:t.includes("e")?i-3:n-3,y:t.includes("s")?o-3:r-3,width:"n"===t||"s"===t?i-n+6:6,height:"e"===t||"w"===t?o-r+6:6,className:"handle handle-"+t,fill:"transparent",type:t,cursor:oS[t],index:e}))}).flat();return n.selectAll(".handle").data(a,(t,e)=>e).join(t=>t.append(t=>{var e=t["className"],t=I(t,["className"]);return new ed({className:e,style:t})}),t=>t.each(function(t){this.attr(t)}),t=>t.remove()),t}},sS=(aS.props={},p_({render(t,e){var{text:t,textStyle:n,fill:r,stroke:i,padding:o=[],radius:a}=t,[o,s=o,l=o,u=s]=o;const c=y_(e,".button-text","text").attr("className","button-text").style("x",u).style("y",o+(n.fontSize||12)/2).style("fontSize",12).style("textAlign","end").style("textBaseline","middle").style("fill","#3080d0").style("text",t).style("z-index",1).call(ab,n).node();var{min:t,halfExtents:n}=c.getLocalBounds(),h=2*n[0],n=2*n[1];y_(e,".button-rect","rect").attr("className","button-rect").style("x",t[0]-u).style("y",t[1]-o).style("width",h+u+s).style("height",n+o+l).style("radius",a).style("fill",r).style("stroke",i).style("z-index",0)}}));const lS=t=>{const{hide:o,fill:a="#f7f7f7",stroke:s="#ccc",padding:l=[4,5,4,5],text:u="Reset",radius:c=4,textStyle:h={},position:d}=t;return t=>{const{transientLayer:e,coordinate:n}=t;var r={text:u,fill:a,stroke:s,textStyle:h,padding:l,radius:c},i=function(t,e,n){var{x:e,y:r,width:i}=e.getOptions(),[n,n=n]=n,o=[8,4];return"top-left"===t?{x:e+o[0],y:r+o[1],textStyle:{textAlign:"start"}}:{x:e+i-o[0]-n,y:r+o[1],textStyle:{textAlign:"end"}}}(d,n,l),r=C({},r,i);return e.selectAll(".button").data(o?[]:[r],(t,e)=>e).join(t=>t.append(t=>new sS({className:"button",style:t})),t=>t.each(function(t){this.update(t)}),t=>t.remove()),t}},uS=(lS.props={},{selection:1,n:0,e:1,s:0,w:-1,nw:-1,ne:1,se:1,sw:-1}),cS={selection:1,n:-1,e:0,s:1,w:0,nw:-1,ne:-1,se:1,sw:1},hS=()=>t=>{const{shared:i,event:e}=t,{target:o,offsetX:n,offsetY:r}=e;var[a=n,s=r]=i.currentPoint||[];if(o){const u=n-a,c=r-s;a=o.style["index"];if(2<=(null==(s=i.points[a])?void 0:s.length)&&0<=a){const h=i.points[a];if(o.className.includes("handle")){var s=o.style["type"],l=uS[s],s=cS[s];let[t,e]=rp(h),[n,r]=ip(h);l<0&&(n=Math.max(t+=u,n)),0<l&&(t=Math.min(t,n+=u)),s<0&&(r=Math.max(e+=c,r)),0<s&&(e=Math.min(e,r+=c)),i.points[a]=[[t,e],[n,r]]}else i.points[a]=h.map(([t,e])=>[t+u,e+c])}}return t},dS=(hS.props={},t=>{const{clear:f,fill:p="#CCD6EC",fillOpacity:y=.3}=t;return t=>{const{coordinate:n,event:e,scale:r,selection:i,transientLayer:o}=t;if(!zg(n)){const c=r.x,h=i.select(".plot").node();var[a,s]=h.getBounds().min,{offsetX:l,offsetY:u}=e,[l]=n.invert([l-a,u-s]);const d=[];a=I_(L_(i),c,l);if(!f&&a){u=a.__data__["x"],s=c.invert(u);let t=.01,e=.01;c.getBandWidth&&(l=c.getBandWidth(s),a=(c.getStep(s)-l)/2,t=a,e=l+a);var[s,l]=n.map([u-t,0]),[a,u]=n.map([u+e,1]);d.push({x:s,y:l,width:a-s,height:u-l})}return o.style("zIndex",-1).selectAll(".active-region").data(d,(t,e)=>e).join(t=>t.append("rect").attr("className","active-region").style("fill",p).style("fillOpacity",y).each(function(t){this.attr(t)}),t=>t.each(function(t){this.attr(t)}),t=>t.remove()),t}}}),fS=(dS.props={},t=>{const i=t["tip"];return t=>{const{shared:e,event:n}=t;var r=n["target"];return e.tip=null!==i&&void 0!==i?i:r.style.tip,t}}),pS=(fS.props={},(t="",e="")=>`<div style="
|
|
7
|
+
`}([d,p,h,s]))}u-=c,l+=1}return a}function tT(t,e,n,r){var i,o=pc(e),a=pc(n);return void 0===o||void 0===a?null:(i=["fill","stroke","fillOpacity","strokeOpacity","opacity","lineWidth"],o=[Object.assign({path:o},Jk(e,i)),Object.assign({path:a},Jk(n,i))],e=t.animate(o,r),t.style.transform="scale(1, 1)",t.style.transform="none",e)}$k.props={};const eT=y=>(t,e,n,r,i)=>{[o="pack"]=[y.split];var o="function"==typeof o?o:Qk,i=Wk(i,n,y),n=t["length"],a=e["length"];if(1===n&&1===a||1<n&&1<a)return[s]=t,[u]=e,tT(s,s,u,i);if(1===n&&1<a){var[s]=t;{var l=s,u=e,c=i,s=o;l.style.visibility="hidden";const p=s(l,u.length);return u.map((t,e)=>{return tT(t,new ap({style:{path:p[e],fill:l.style.fill}}),t,c)})}}if(1<n&&1===a){var[n]=e;{var a=t,h=n,d=i;const f=(e=o)(h,a.length);var{fillOpacity:e,strokeOpacity:t,opacity:n}=h.style,e=h.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:0,strokeOpacity:0,opacity:0,offset:.99},{fillOpacity:e,strokeOpacity:t,opacity:n}],d);return[...a.map((t,e)=>{return tT(t,t,new ap({style:{path:f[e],fill:h.style.fill}}),d)}),e]}}return null},nT=(eT.props={},()=>t=>{const{event:e,shared:n}=t;var{target:r,offsetX:i,offsetY:o}=e;const a=(r||{})["className"];return n.mouseX=i,n.mouseY=o,a&&a.includes("element")?n.selectedElements=[r]:n.selectedElements=[],t}),rT=(nT.props={},t=>{const a=t["multiple"];return t=>{const{event:e,shared:n}=t,r=e.composedPath();var i=r.find(t=>"legend-item"===t.className);const o=a&&n.triggerInfo||[];return i&&o.push({id:i.id,scaleType:"color"}),n.triggerInfo=o,t}});rT.props={};var r="object"==typeof jr&&jr&&jr.Object===Object&&jr,w="object"==typeof self&&self&&self.Object===Object&&self,Nt=r||w||Function("return this")(),oe=Nt.Symbol,Yt=Object.prototype,iT=Yt.hasOwnProperty,oT=Yt.toString,aT=oe?oe.toStringTag:void 0;var sT=Object.prototype.toString;var lT="[object Null]",uT="[object Undefined]",cT=oe?oe.toStringTag:void 0;function hT(t){if(null==t)return void 0===t?uT:lT;if(cT&&cT in Object(t)){var e=t,n=iT.call(e,aT),r=e[aT];try{var i=!(e[aT]=void 0)}catch(t){}var o=oT.call(e);return i&&(n?e[aT]=r:delete e[aT]),o}return sT.call(t)}function dT(t){return null!=t&&"object"==typeof t}var pT=Array.isArray;function fT(t){return t}var yT="[object AsyncFunction]",gT="[object Function]",mT="[object GeneratorFunction]",vT="[object Proxy]";function bT(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}var xT=/^(?:0|[1-9]\d*)$/;var wT=9007199254740991;function ET(t){return"number"==typeof t&&-1<t&&t%1==0&&t<=wT}function _T(t){return null!=t&&ET(t.length)&&!function(t){var e;if(e=typeof t,null!=t&&("object"==e||"function"==e))return(e=hT(t))==gT||e==mT||e==yT||e==vT}(t)}var kT=Object.prototype;function TT(t){return dT(t)&&"[object Arguments]"==hT(t)}var zt=Object.prototype,MT=zt.hasOwnProperty,ST=zt.propertyIsEnumerable,OT=TT(function(){return arguments}())?TT:function(t){return dT(t)&&MT.call(t,"callee")&&!ST.call(t,"callee")};var jt="object"==typeof L&&L&&!L.nodeType&&L,Lt=jt&&"object"==typeof module&&module&&!module.nodeType&&module,Ht=Lt&&Lt.exports===jt?Nt.Buffer:void 0,PT=(Ht?Ht.isBuffer:void 0)||function(){return!1},AT={};AT["[object Float32Array]"]=AT["[object Float64Array]"]=AT["[object Int8Array]"]=AT["[object Int16Array]"]=AT["[object Int32Array]"]=AT["[object Uint8Array]"]=AT["[object Uint8ClampedArray]"]=AT["[object Uint16Array]"]=AT["[object Uint32Array]"]=!0,AT["[object Arguments]"]=AT["[object Array]"]=AT["[object ArrayBuffer]"]=AT["[object Boolean]"]=AT["[object DataView]"]=AT["[object Date]"]=AT["[object Error]"]=AT["[object Function]"]=AT["[object Map]"]=AT["[object Number]"]=AT["[object Object]"]=AT["[object RegExp]"]=AT["[object Set]"]=AT["[object String]"]=AT["[object WeakMap]"]=!1;var NT,Kt="object"==typeof L&&L&&!L.nodeType&&L,CT=Kt&&"object"==typeof module&&module&&!module.nodeType&&module,LT=CT&&CT.exports===Kt&&r.process,h=function(){try{var t=CT&&CT.require&&CT.require("util").types;return t?t:LT&<.binding&<.binding("util")}catch(t){}}(),n=h&&h.isTypedArray,IT=n?(NT=n,function(t){return NT(t)}):function(t){return dT(t)&&ET(t.length)&&!!AT[hT(t)]},jT=Object.prototype.hasOwnProperty;function RT(t,e){var n,r,i,o,a=pT(t),s=!a&&OT(t),l=!a&&!s&&PT(t),u=!a&&!s&&!l&&IT(t),c=a||s||l||u,h=c?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],d=h.length;for(n in t)!e&&!jT.call(t,n)||c&&("length"==n||l&&("offset"==n||"parent"==n)||u&&("buffer"==n||"byteLength"==n||"byteOffset"==n)||(o=void 0,o=typeof(r=n),(i=null==(i=d)?9007199254740991:i)&&("number"==o||"symbol"!=o&&xT.test(r))&&-1<r&&r%1==0&&r<i))||h.push(n);return h}DT=Object.keys,BT=Object;var DT,BT,FT=function(t){return DT(BT(t))},zT=Object.prototype.hasOwnProperty;function VT(t){if(n=(e=t)&&e.constructor,e!==("function"==typeof n&&n.prototype||kT))return FT(t);var e,n,r,i=[];for(r in Object(t))zT.call(t,r)&&"constructor"!=r&&i.push(r);return i}function GT(t){return(_T(t)?RT:VT)(t)}var HT,WT=function(t,e,n){for(var r=-1,i=Object(t),o=n(t),a=o.length;a--;){var s=o[HT?a:++r];if(!1===e(i[s],s,i))break}return t};YT=function(t,e){return t&&WT(t,e,GT)};var YT,UT,qT=function(t,e){if(null!=t){if(!_T(t))return YT(t,e);for(var n=t.length,r=UT?n:-1,i=Object(t);(UT?r--:++r<n)&&!1!==e(i[r],r,i););}return t};function XT(t,e){(pT(t)?bT:qT)(t,"function"==typeof(t=e)?t:fT)}function ZT(t,e,n){return e<=t&&t<=n}function KT(t){return Math.abs(t)<1e-6?0:t<0?-1:1}function $T(t,e,n){var r=!1,i=t.length;if(!(i<=2)){for(var o,a,s,l=0;l<i;l++){var u=t[l],c=t[(l+1)%i];if(a=c,((s=[e,n])[0]-(o=u)[0])*(a[1]-o[1])==(a[0]-o[0])*(s[1]-o[1])&&Math.min(o[0],a[0])<=s[0]&&s[0]<=Math.max(o[0],a[0])&&Math.min(o[1],a[1])<=s[1]&&s[1]<=Math.max(o[1],a[1]))return 1;0<KT(u[1]-n)!=0<KT(c[1]-n)&&KT(e-(n-u[1])*(u[0]-c[0])/(u[1]-c[1])-u[0])<0&&(r=!r)}return r}}function JT(t){for(var e,n,r=[],i=t.length,o=0;o<i-1;o++){var a=t[o],s=t[o+1];r.push({from:{x:a[0],y:a[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 QT(t,u){var c=!1;return XT(t,function(t){if(e=t.from,t=t.to,n=u.from,r=u.to,i=n.x-e.x,o=n.y-e.y,a=t.x-e.x,t=t.y-e.y,s=r.x-n.x,r=r.y-n.y,l=null,.001*(a*a+t*t)*(s*s+r*r)<(n=a*r-t*s)*n&&(ZT(r=(i*r-o*s)/n,0,1)&&ZT((i*t-o*a)/n,0,1)&&(l={x:e.x+r*a,y:e.y+r*t})),l)return!(c=!0);var e,n,r,i,o,a,s,l}),c}function tM(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 eM(e,n){var t,r,i,o,a;return!(e.length<2||n.length<2)&&(t=tM(e),o=tM(n),t=t,!((o=o).minX>t.maxX||o.maxX<t.minX||o.minY>t.maxY||o.maxY<t.minY)&&(r=!1,XT(n,function(t){if($T(e,t[0],t[1]))return!(r=!0)}),!!r||(XT(e,function(t){if($T(n,t[0],t[1]))return!(r=!0)}),!!r||(i=JT(e),o=JT(n),a=!1,XT(o,function(t){if(QT(i,t))return!(a=!0)}),a))))}function nM(t){return t.selectAll(".element").nodes().map(n=>{const r=n["__data__"],{seriesX:i=[],seriesY:o=[],seriesTooltip:a=[],seriesTitle:s=[]}=r;return i.length?i.map((t,e)=>Object.assign(Object.assign({},n),{__data__:Object.assign(Object.assign({},r),{x:i[e],y:o[e],title:s[e],tooltip:a[e]})})):n}).flat()}function rM(t,e,n,r="x"){let i=n;if(e.getRange){var o=e.getRange();for(let t=0;t<o.length;t++){var a=o[t],s=e.invert(a),l=e.getBandWidth(s),s=(e.getStep(s)-l)/2;if(a-s<=n&&n<a+l+s){i=a;break}}}return i?cm(t,({__data__:t})=>Math.pow(t[r]-i,2)):null}const iM=t=>{const{trigger:_,filterBy:k,multiple:T,toggle:M}=t;return t=>{const{event:e,shared:n,selection:r,scale:i,transientLayer:o,coordinate:a}=t,s=nM(r),{selectedElements:l=[]}=n;n.selectedElements=[];let u=[];if("axis"===_){const v=r.select(".plot").node();var[c,h]=v.getBounds().min,{offsetX:d,offsetY:p}=e,[d]=a.invert([d-c,p-h]);const b=rM(s,i.x,d);u=b?s.filter(({__data__:{x:t}})=>t===b.__data__.x):[]}else if("triggerInfo"===_){var{triggerInfo:c=[]}=n;u=(p=s,f=i,y=c,p.filter(t=>{var e=t["__data__"];for(const n of y){const r=f[n.scaleType];if(r&&r.invert(e[n.scaleType])===n.id)return!0}}))}else if("rect-mask"===_){const x=o.selectAll(".mask").nodes();u=s.filter(n=>x.some(t=>{var e=n.getRenderBounds(),t=t.getRenderBounds();return!(t.min[0]>e.max[0]||t.max[0]<e.min[0]||t.min[1]>e.max[1]||t.max[1]<e.min[1])}))}else if("polygon-mask"===_){const w=o.selectAll(".mask").nodes();u=s.filter(r=>w.some(({__data__:{points:t}})=>{var{min:e,max:n}=r.getLocalBounds();return eM(t,[e,[e[0],n[1]],n,[n[0],e[1]]])}))}else{h=e["target"];const E=(h||{})["className"];E&&E.includes("element")&&(d=Ob(h).node()["__data__"],u=k?((e,n)=>{const t=r.selectAll(".element").nodes();return t.filter(({__data__:t})=>t[e]===n)})(k,d[k]):[h])}var f,y,g;[g,c=[]]=[u,l];const m=c.filter(e=>g.find(({__data__:{key:t}})=>t===e.__data__.key)).map(t=>t.__data__.key);return n.selectedElements=u,T&&l.forEach(t=>{m.includes(t.__data__.key)||n.selectedElements.push(t)}),M&&(n.selectedElements=n.selectedElements.filter(t=>!m.includes(t.__data__.key))),t}},oM=(iM.props={},t=>{const a=t["from"];return t=>{const{shared:e,selection:n,scale:r}=t,i=n.select(".category-legend").node();if("triggerInfo"===a)e.selectedLegendItems=e.triggerInfo.map(({id:t})=>i.getItem(t));else if("selectedElements"===a){const o=e.selectedElements.map(({__data__:{color:t}})=>r.color.invert(t));e.selectedLegendItems=o.map(t=>i.getItem(t))}return t}}),aM=(oM.props={},t=>{const n=t["state"];return t=>{const e=t["shared"];return e.currentState=n,t}}),sM=(aM.props={},t=>{const{clear:d,start:p}=t;return t=>{const{shared:e,selection:n,event:r}=t,i=n.select(".plot").node();var[o,a]=i.getBounds().min,{offsetX:s,offsetY:l}=r;if(d)e.points=[];else{var{points:u=[]}=e;const c=[...u];u=[s-o,l-a];if(p)e.points=[...c,[u]];else{const h=c.splice(-1,1)[0]||[];h.push(u),e.points=[...c,h]}}return t}}),lM=(sM.props={},t=>{const o=t["clear"];return t=>{const{shared:e,event:n}=t;var{offsetX:r,offsetY:i}=n;return o?e.currentPoint=null:e.currentPoint=[r,i],t}});lM.props={};const uM=t=>{const u=t["dim"];return t=>{const{shared:e,coordinate:l}=t,{points:n=[]}=e;return e.regions=n.map(i=>{{var o=l,a=u,o=o.getOptions(),s=K(i),i=$(i);let t=Math.min(s[0],i[0]),e=Math.min(s[1],i[1]),n=Math.abs(i[0]-s[0]),r=Math.abs(i[1]-s[1]);return"x"===a?(e=o.y,r=o.height):"y"===a&&(t=o.x,n=o.width),{x1:t,y1:e,x2:t+n,y2:e+r}}}),t}},cM=(uM.props={},l=>t=>{const{shared:e,theme:n,selectionLayer:r}=t,{selectedElements:i=[]}=e;var o=n["elementActiveStroke"];const{color:a=o,border:s}=l;o=i.map(t=>t.__data__);return r.selectAll(".highlight-element").remove(),r.selectAll(".highlight-element").data(o,t=>t.key).join(t=>t.append((t,e)=>i[e].cloneNode()).style("lineWidth",function(){return void 0!==s?s:+this.style.lineWidth||1}).style("stroke",a).attr("className","highlight-element")),t});function hM(t,e,n,r){n.includes(e)?(t.style.fillOpacity=1,t.style.lineWidth=+t.style.lineWidth||1,t.style.stroke=r):(t.style.fillOpacity=.45,t.style.stroke="transparent")}cM.props={};const dM=c=>{const h=c["clear"];return t=>{const{shared:e,selection:n,theme:r,selectionLayer:i}=t,{selectedElements:o=[]}=e;var a=r["elementActiveStroke"];const{color:s=a}=c,l=o.map(t=>t.__data__),u=n.selectAll(".element").each(function(){this.style.originVisibility||(this.style.originVisibility=this.style.visibility||"visible"),this.style.visibility=l.length?"hidden":this.style.originVisibility}).nodes();a=l.length?u.map(t=>t.__data__):[];return i.selectAll(".highlight-element").data(h?[]:a,(t,e)=>e).join(t=>t.append((t,e)=>u[e].cloneNode(!0)).attr("className","highlight-element").style("visibility","visible").each(function(t){hM(this,t,l,s)}),t=>t.each(function(t){hM(this,t,l,s)}),t=>t.remove()),t}};function pM(t){t.selectAll(".tooltip-crosshairs").each(function(){this.hide()})}function fM(t){t.selectAll(".tooltip-markers").each(function(){this.hide()})}function yM(t){t.selectAll(".tooltip").each(function(){this.hide()}),pM(t),fM(t)}function gM(t,e,n={}){const{transientLayer:r,coordinate:i}=t;var o,a;e?(t=n.follow,n=I(n,["follow"]),{x:e,y:o,items:a}=e,t=function(t,e,n){let r,i;var o,a,s,{type:n="y",line:l={lineDash:[4,4],lineWidth:1},text:u=!1}=n;return pm(t)?(o=Nb(a=t.getCenter(),e),i={id:"circle-y",center:a,defaultRadius:o,type:"circle",text:u,lineStyle:l},r={id:"line-x",startPos:[a[0],a[1]],endPos:e,text:u,lineStyle:l}):({x:o,y:a,width:t,height:s}=t.getOptions(),r={id:"line-x",startPos:[o,e[1]],endPos:[o+t,e[1]],text:u,lineStyle:l},i={id:"line-y",startPos:[e[0],a],endPos:[e[0],a+s],text:u,lineStyle:l}),"x"===n?[r]:"xy"===n?[r,i]:[i]}(i,t?[e,o]:[a[0].x,a[0].y],n),r.selectAll(".tooltip-crosshairs").data(t,(t,e)=>e).join(t=>t.append(t=>{var e=t["type"],t=I(t,["type"]);const n="circle"===e?j_:N_;return new n({className:"tooltip-crosshairs",style:t})}),t=>t.each(function(t){this.update(t),this.show()}),t=>t.remove())):pM(r)}function mM(t,e){return Object.entries(t).filter(([t])=>t.startsWith(e)).map(([,t])=>t)}function vM(t,e){var n;return(null==(n=null==t?void 0:t.getBandWidth)?void 0:n.call(t,t.invert(e)))||0}function bM(t,e,n,r){const{shared:i,scale:u,coordinate:c}=t;var{mouseX:t,mouseY:o,selectedElements:a}=i;const s=r["defaultColor"],l=u["x"],h=a,d=h.map(t=>{const i=t["__data__"],{seriesX:o=[],seriesY:a=[],seriesTooltip:s=[],seriesTitle:l=[]}=i;var e;return o.length?o.map((t,e)=>{var[n,r]=c.map([o[e],a[e]]);return{x:n,y:r,datum:Object.assign(Object.assign({},i),{x:o[e],title:l[e],tooltip:s[e]})}}):([t,e]=function(t,e,n){const r=mM(t,"x"),i=(t=mM(t,"y"),e["x"]);return e=r.reduce((t,e)=>t+e+vM(i,e)/2,0),n.map([e/r.length,Math.min.apply(null,t)])}(i,u,c),{x:t,y:e,datum:i})}).flat(),p=c.invert([e,n])[0],f=cm(d,({datum:{x:t}})=>Math.pow(t+vM(l,t)/2-p,2));return f&&(r=d.filter(({datum:{x:t}})=>t===f.datum.x).map(t=>{const{datum:e,x:r,y:i}=t,{color:o=s,title:a}=e;return Object.entries(e).filter(([t])=>t.startsWith("tooltip")).map(([t,e])=>{var{field:t,title:t=t}=u[t].getOptions(),n="object"==typeof e&&!(e instanceof Date);return{x:r,y:i,title:a,color:o,name:t,value:n?e.value:void 0===e?e:""+e}}).filter(({value:t})=>void 0!==t)}).flat()).length?{x:t,y:o,title:r[0].title,items:r}:null}dM.props={};const xM=t=>{const{showCrosshairs:w,showMarkers:E}=t,_=I(t,["showCrosshairs","showMarkers"]);return t=>{const{scale:e,coordinate:n,theme:r,selection:i,shared:o,transientLayer:a}=t;var s=e["tooltip"];if(void 0===s)yM(a);else{var{mouseX:s,mouseY:l}=o;const m=i.select(".plot").node();var u=m.getRootNode().defaultView.getConfig().container,{x:c,y:h,width:d,height:p}=n.getOptions(),[f,y]=m.getBounds().min;const v=function(t,e,n){let r=t.select(".tooltip").node();return r||(r=new x_({className:"tooltip",style:{container:{x:0,y:0},items:[],bounding:n,position:"bottom-right",offset:[10,10],style:{".tooltip":{"max-width":"170px"},".tooltip-title":{overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"}}}}),t.append(()=>r),e.appendChild(r.HTMLTooltipElement)),r}(a,u,{x:f+c,y:y+h,width:d,height:p});u=bM(t,s-f,l-y,r);u?({title:c,items:h}=u,v.update({x:s,y:l,title:c,position:"bottom-right",offset:[14,10],items:h}),v.show()):yM(a);{var[d,p,g={}]=[t,E?u:null,_.markers];const b=d["transientLayer"];if(p){const x=p["items"];d=x.map(t=>{var{x:t,y:e,color:n}=t;return Object.assign({cx:t,cy:e,fill:n,r:3,stroke:"#fff",lineWidth:1.5,zIndex:1},g)});b.selectAll(".tooltip-markers").data(d,(t,e)=>e).join(t=>t.append(t=>new Kd({className:"tooltip-markers",style:t})),t=>t.each(function(t){this.attr(t),this.show()}),t=>t.remove())}else fM(b)}gM(t,w?u:null,_.crosshairs)}return t}},wM=(xM.props={},()=>t=>{const{shared:e,update:n}=t;var r=e["updatedOptions"];return n(r),t}),EM=(wM.props={},t=>{const c=t["reset"];return t=>{const{shared:n,scale:e,options:r}=t,i=n["selectedElements"],o=(n.originTransform||(n.originTransform=r.marks[0].data.transform||[]),e)["x"],a=!!o.getBandWidth,s=i.map(t=>t.__data__.title),l=Math.min.apply(null,s),u=Math.max.apply(null,s);return n.updatedOptions=(()=>{if(c)r.marks[0].data.transform=n.originTransform;else if(0<s.length){const e=[...n.originTransform];var t=o.getOptions()["field"];e.push({type:"filterBy",fields:[t],callback:t=>a?s.includes(t):t>=l&&t<=u});const s=r.marks[0]["data"];Array.isArray(s)?r.marks[0].data={value:s,transform:e}:r.marks[0].data.transform=e}return r})(),t}});function _M(t,e,n){n.includes(e)?t.style.visibility=t.style.originVisibility:t.style.visibility="hidden"}EM.props={};const kM=()=>t=>{const{shared:e,selection:n,selectionLayer:r}=t,{selectedElements:i=[]}=e,o=i.map(t=>t.__data__),a=n.selectAll(".element").each(function(){this.style.originVisibility||(this.style.originVisibility=this.style.visibility||"visible"),this.style.visibility=o.length?"hidden":this.style.originVisibility}).nodes();var s=o.length?a.map(t=>t.__data__):[];return r.selectAll(".filtered-element").data(s,(t,e)=>e).join(t=>t.append((t,e)=>a[e].cloneNode(!0)).attr("className","filtered-element").each(function(t){_M(this,t,o)}),t=>t.each(function(t){_M(this,t,o)}),t=>t.remove()),t};kM.props={};const TM=t=>{const{items:u,state:c="active"}=t;return t=>{const{shared:e,selection:n}=t;if(u.includes("legendItem")){const{selectedLegendItems:o=[]}=e,a=n.select(".category-legend").node();if("highlight"===c){var r=a;var i=o;const s=(null==r?void 0:r.getItemsStates())||[];i.length?(s.forEach(({id:t})=>r.setItemState(t,"inactive",!0)),i.forEach(t=>t.setState("inactive",!1))):s.forEach(({id:t})=>r.setItemState(t,"inactive",!1))}else{const l=(null===a||void 0===a?void 0:a.getItemsStates())||[];l.forEach(({id:t})=>a.setItemState(t,c,!1)),o.forEach(t=>t.setState(c,!0))}}return t}},MM=(TM.props={},y=>t=>{const{event:e,selection:n,shared:r,options:i}=t;var{updatedOptions:o={}}=r,{offsetX:a,offsetY:s}=e;const l=n.select(".main").node();var{min:[u,c],max:[h,d]}=l.getBounds();if(a<u||h<a||(s<c||d<s))r.updatedOptions=N({},i);else{const p=a-u,f=s-c;r.updatedOptions=N(o,(()=>{const{coordinate:t=[]}=i;var e=t.findIndex(t=>t.type.startsWith("fisheye"));if(-1===e)return Object.assign(Object.assign({},i),{coordinate:[...t,Object.assign(Object.assign({type:"fisheye"},y),{focusX:p,focusY:f,isVisual:!0}),{type:"cartesian"}]});{var n=t[e],n=Object.assign(Object.assign(Object.assign({},n),y),{type:"fisheye",focusX:p,focusY:f,isVisual:!0});const r=[...t];return r.splice(e,1,n),t[e]=n,Object.assign(Object.assign({},i),{coordinate:r})}})())}return t}),SM=(MM.props={},t=>{const a=t["cursor"];return t=>{const{selection:e,event:n}=t;var r=n["target"];const i=e.node().getRootNode().defaultView,o=i.getContextService().getDomElement();return o.style.cursor=a||(null==(r=r.style)?void 0:r.cursor),t}});SM.props={};const OM={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",se:"nwse-resize",ne:"nesw-resize",sw:"nesw-resize"};const PM=t=>{const{maskType:l,fill:u="#C5D4EB",fillOpacity:c=.3}=t;return t=>{const{shared:e,transientLayer:n}=t,{regions:r=[],points:i=[]}=e,o="polygon"===l?i:r.map(t=>{var{x1:t,y1:e,x2:n,y2:r}=t;return[[t,e],[n,e],[n,r],[t,r]]});var a=o.map((t,e)=>({draggable:!0,d:jb(P1(),t).toString(),fill:u,fillOpacity:c,stroke:u,lineWidth:.5,points:t,cursor:"move",index:e}));n.selectAll(".mask").data(a,(t,e)=>e).join(t=>t.append(t=>new ap({className:"mask",style:t})),t=>t.each(function(t){this.attr(t),this.dispatchEvent(new jd("maskChange"))}),t=>t.remove());const s="polygon"===(a=l)?[]:"rectX"===a?["w","e"]:"rectY"===a?["n","s"]:["n","e","s","w","ne","se","sw","nw"];a=r.map((t,e)=>{const{x1:n,y1:r,x2:i,y2:o}=t;return s.map(t=>({draggable:!0,x:t.includes("e")?i-3:n-3,y:t.includes("s")?o-3:r-3,width:"n"===t||"s"===t?i-n+6:6,height:"e"===t||"w"===t?o-r+6:6,className:"handle handle-"+t,fill:"transparent",type:t,cursor:OM[t],index:e}))}).flat();return n.selectAll(".handle").data(a,(t,e)=>e).join(t=>t.append(t=>{var e=t["className"],t=I(t,["className"]);return new dp({className:e,style:t})}),t=>t.each(function(t){this.attr(t)}),t=>t.remove()),t}},AM=(PM.props={},Fk({render(t,e){var{text:t,textStyle:n,fill:r,stroke:i,padding:o=[],radius:a}=t,[o,s=o,l=o,u=s]=o;const c=zk(e,".button-text","text").attr("className","button-text").style("x",u).style("y",o+(n.fontSize||12)/2).style("fontSize",12).style("textAlign","end").style("textBaseline","middle").style("fill","#3080d0").style("text",t).style("z-index",1).call(Ib,n).node();var{min:t,halfExtents:n}=c.getLocalBounds(),h=2*n[0],n=2*n[1];zk(e,".button-rect","rect").attr("className","button-rect").style("x",t[0]-u).style("y",t[1]-o).style("width",h+u+s).style("height",n+o+l).style("radius",a).style("fill",r).style("stroke",i).style("z-index",0)}}));const NM=t=>{const{hide:o,fill:a="#f7f7f7",stroke:s="#ccc",padding:l=[4,5,4,5],text:u="Reset",radius:c=4,textStyle:h={},position:d}=t;return t=>{const{transientLayer:e,coordinate:n}=t;var r={text:u,fill:a,stroke:s,textStyle:h,padding:l,radius:c},i=function(t,e,n){var{x:e,y:r,width:i}=e.getOptions(),[n,n=n]=n,o=[8,4];return"top-left"===t?{x:e+o[0],y:r+o[1],textStyle:{textAlign:"start"}}:{x:e+i-o[0]-n,y:r+o[1],textStyle:{textAlign:"end"}}}(d,n,l),r=N({},r,i);return e.selectAll(".button").data(o?[]:[r],(t,e)=>e).join(t=>t.append(t=>new AM({className:"button",style:t})),t=>t.each(function(t){this.update(t)}),t=>t.remove()),t}},CM=(NM.props={},{selection:1,n:0,e:1,s:0,w:-1,nw:-1,ne:1,se:1,sw:-1}),LM={selection:1,n:-1,e:0,s:1,w:0,nw:-1,ne:-1,se:1,sw:1},IM=()=>t=>{const{shared:i,event:e}=t,{target:o,offsetX:n,offsetY:r}=e;var[a=n,s=r]=i.currentPoint||[];if(o){const u=n-a,c=r-s;a=o.style["index"];if(2<=(null==(s=i.points[a])?void 0:s.length)&&0<=a){const h=i.points[a];if(o.className.includes("handle")){var s=o.style["type"],l=CM[s],s=LM[s];let[t,e]=K(h),[n,r]=$(h);l<0&&(n=Math.max(t+=u,n)),0<l&&(t=Math.min(t,n+=u)),s<0&&(r=Math.max(e+=c,r)),0<s&&(e=Math.min(e,r+=c)),i.points[a]=[[t,e],[n,r]]}else i.points[a]=h.map(([t,e])=>[t+u,e+c])}}return t},jM=(IM.props={},t=>{const{clear:p,fill:f="#CCD6EC",fillOpacity:y=.3}=t;return t=>{const{coordinate:n,event:e,scale:r,selection:i,transientLayer:o}=t;if(!pm(n)){const c=r.x,h=i.select(".plot").node();var[a,s]=h.getBounds().min,{offsetX:l,offsetY:u}=e,[l]=n.invert([l-a,u-s]);const d=[];a=rM(nM(i),c,l);if(!p&&a){u=a.__data__["x"],s=c.invert(u);let t=.01,e=.01;c.getBandWidth&&(l=c.getBandWidth(s),a=(c.getStep(s)-l)/2,t=a,e=l+a);var[s,l]=n.map([u-t,0]),[a,u]=n.map([u+e,1]);d.push({x:s,y:l,width:a-s,height:u-l})}return o.style("zIndex",-1).selectAll(".active-region").data(d,(t,e)=>e).join(t=>t.append("rect").attr("className","active-region").style("fill",f).style("fillOpacity",y).each(function(t){this.attr(t)}),t=>t.each(function(t){this.attr(t)}),t=>t.remove()),t}}}),RM=(jM.props={},t=>{const i=t["tip"];return t=>{const{shared:e,event:n}=t;var r=n["target"];return e.tip=null!==i&&void 0!==i?i:r.style.tip,t}}),DM=(RM.props={},(t="",e="")=>`<div style="
|
|
8
8
|
background-color:rgba(0,0,0,0.75);color:#fff;width:max-content;padding:4px;font-size:12px;border-radius:2.5px;
|
|
9
9
|
box-shadow:0 3px 6px -4px rgba(0,0,0,0.12), 0 6px 16px 0 rgba(0,0,0,0.08), 0 9px 28px 8px rgba(0,0,0,0.05);${e||""}
|
|
10
|
-
">${t||""}</div>`),yS=(y={})=>{const g=y["htmlStyle"];return t=>{const{transientLayer:e,selection:n,shared:r}=t;var{mouseX:i,mouseY:o,tip:a}=r;const s=n.select(".plot").node();var[l,u]=s.getBounds().min,[c,h]=[8,8];let d=i-l+c,f=o-u+h;void 0!==y.x&&(d=y.x-l),void 0!==y.y&&(f=y.y-u);const p=e.node();return a?y_(p,".tip-popover",()=>new od({className:"tip-popover",style:{innerHTML:pS("",g)}})).style("x",d).style("y",f).style("innerHTML",pS(a,g)):null!=(i=p.querySelector(".tip-popover"))&&i.remove(),t}},gS=(yS.props={},()=>({actions:[{action:"enter",events:["plot:mouseenter"]},{action:"hover",events:["plot:mousemove"]},{action:"leave",events:["plot:mouseleave"]}]})),vS=()=>({actions:[{action:"enter",events:["plot:touchstart"]},{action:"hover",events:["plot:touchmove"]},{action:"leave",events:["plot:touchend"]}]});function mS(o,t={"action.surfacePointSelection":C_,"action.elementSelection":R_,"action.recordState":j_,"action.recordPoint":B_,"action.recordCurrentPoint":F_,"action.recordRegion":z_,"action.activeElement":V_,"action.highlightElement":H_,"action.filterElement":eS,"action.legendItemSelection":D_,"action.triggerInfoSelection":N_,"action.setItemState":nS,"action.tooltip":$_,"action.fisheyeFocus":rS,"action.plot":J_,"action.filter":Q_,"action.cursor":iS,"action.mask":aS,"action.button":lS,"action.move":hS,"action.activeRegion":dS,"action.recordTip":fS,"action.poptip":yS,"interactor.mousePosition":gS,"interactor.touchPosition":vS}){const[a]=bS("interactor",t),[g]=bS("action",t);return t=>{const{start:e=[],end:n=[],interactors:r=[]}=o(t),p=[...e,...n],i=r.map(a),y=Tg(i.flatMap(({actions:t})=>t.flatMap(({action:e,events:t})=>t.map(t=>[t,e]))),t=>t[1]);return(t,e)=>{const n=function(t,e){const{view:n,update:r,container:i,options:o}=t,a=ib(i),s=a.select(".plot").append("g").attr("className","selection").style("fill","transparent"),l=a.select(".plot").append("g").attr("className","transient").style("fill","transparent");return Object.assign(Object.assign({},n),{update:r,options:o,selection:a,selectionLayer:s,transientLayer:l,viewInstances:e,shared:{}})}(t,e),r=n["selection"];for(const{trigger:l,isEnable:u=()=>!0,action:c,throttle:h}of p){var i,o=[c].flat(1).map(t=>"object"==typeof t?t:{type:t}).map(g);const d=h?t=>Sp(t,h.wait,h):t=>t,f=d(Q1(o));for([i]of y.get(l)||[[l]]){var[a,s]=i.includes(":")?i.split(":"):[null,i];(a?r.selectAll("."+a):r).on(s,t=>{t=Object.assign({event:t},n);u(t)&&f(t)})}}}}}function bS(e,n){const r=t=>{if("string"!=typeof t)return t;t=e+"."+t;return n[t]||tb("Unknown Component: "+t)};return[t=>{var e=t["type"],t=I(t,["type"]);return r(e)(Object.assign({},t))},r]}const xS=mS(t=>({interactors:[{type:"mousePosition"},{type:"touchPosition"}],start:[{trigger:"hover",action:[{type:"elementSelection"},Object.assign({type:"activeElement"},t)]}],end:[{trigger:"leave",action:[{type:"elementSelection"},Object.assign({type:"activeElement"},t)]}]}));xS.props={};const wS=mS((t={})=>{var{singleMode:e=!1}=t;return{start:[{trigger:"plot:pointerdown",action:[{type:"elementSelection",multiple:!e,toggle:!0},Object.assign({type:"activeElement",border:2},t)]}]}});wS.props={};const kS=mS(t=>({interactors:[{type:"mousePosition"},{type:"touchPosition"}],start:[{trigger:"hover",action:[{type:"surfacePointSelection"},{type:"elementSelection",trigger:null!=t&&t.shared?"axis":"item"},Object.assign({type:"tooltip"},t)],throttle:{wait:50,leading:!0,trailing:!1}},{trigger:"leave",action:[{type:"elementSelection",clear:!0},Object.assign({type:"tooltip",hide:!0},t)]}]}));kS.props={};const ES=mS(t=>({interactors:[{type:"mousePosition"},{type:"touchPosition"}],start:[{trigger:"hover",throttle:{wait:50,leading:!0,trailing:!1},action:[Object.assign({type:"fisheyeFocus"},t),{type:"plot"}]}],end:[{trigger:"leave",action:[Object.assign({type:"fisheyeFocus"},t),{type:"plot"}]}]}));ES.props={};const _S=mS(t=>({start:[{trigger:"plot:pointermove",action:[{type:"elementSelection"},Object.assign({type:"highlightElement"},t)]}],end:[{trigger:"plot:pointerleave",action:[{type:"elementSelection"},Object.assign({type:"highlightElement"},t)]}]}));_S.props={};const SS=mS(t=>({start:[{trigger:"plot:pointermove",action:[{type:"elementSelection"},Object.assign({type:"highlightElement"},t),{type:"legendItemSelection",from:"selectedElements"},{type:"setItemState",items:["legendItem"],state:"highlight"}]}],end:[{trigger:"plot:pointerleave",action:[{type:"elementSelection"},Object.assign({type:"highlightElement"},t),{type:"legendItemSelection",from:"selectedElements"},{type:"setItemState",items:["legendItem"],state:"highlight"}]}]}));SS.props={};const MS=mS(t=>({start:[{trigger:"plot:pointermove",action:[{type:"elementSelection",filterBy:"x"},Object.assign({type:"highlightElement"},t)]}],end:[{trigger:"plot:pointerleave",action:[{type:"elementSelection"},Object.assign({type:"highlightElement"},t)]}]}));MS.props={};const TS=mS(t=>({start:[{trigger:"plot:pointermove",action:[{type:"elementSelection",filterBy:"color"},Object.assign({type:"highlightElement"},t)]}],end:[{trigger:"plot:pointerleave",action:[{type:"elementSelection"},Object.assign({type:"highlightElement"},t)]}]}));TS.props={};const OS=mS(t=>({start:[{trigger:"legend-item:pointermove",action:[{type:"triggerInfoSelection"},{type:"legendItemSelection",trigger:"triggerInfo"},{type:"setItemState",items:"legendItem",state:"active"},{type:"elementSelection",trigger:"triggerInfo"},{type:"activeElement"}]}],end:[{trigger:"legend-item:pointerleave",action:[{type:"triggerInfoSelection"},{type:"legendItemSelection",trigger:"triggerInfo"},{type:"setItemState",items:"legendItem",state:"active"},{type:"elementSelection",trigger:"triggerInfo"},{type:"activeElement"}]}]}));OS.props={};const PS=mS(t=>({start:[{trigger:"legend-item:pointermove",action:[{type:"triggerInfoSelection"},{type:"legendItemSelection",trigger:"triggerInfo"},{type:"setItemState",items:"legendItem",state:"highlight"},{type:"elementSelection",trigger:"triggerInfo"},{type:"highlightElement"}]}],end:[{trigger:"legend-item:pointerleave",action:[{type:"triggerInfoSelection"},{type:"legendItemSelection",trigger:"triggerInfo"},{type:"setItemState",items:"legendItem",state:"highlight"},{type:"elementSelection",trigger:"triggerInfo"},{type:"highlightElement"}]}]}));function AS(t){var t=t["event"],t=t["target"];return t&&(null==(t=t.className)?void 0:t.includes("button"))}PS.props={};const CS=mS(t=>{var t=t["brushType"],e="polygon"===t?"polygon":"rect",n="rectX"===t?"x":"rectY"===t?"y":"";return{start:[{trigger:"plot:pointermove",isEnable:t=>!AS(t),action:[{type:"cursor",cursor:"crosshair"}]},{trigger:"plot:pointermove",isEnable:t=>AS(t),action:[{type:"cursor",cursor:"pointer"},{type:"button"}]},{trigger:"plot:pointermove",isEnable:t=>"filtered"===t.shared.currentState&&!AS(t),action:[{type:"button",fill:"#f7f7f7"}]},{trigger:"plot:pointerdown",isEnable:t=>!AS(t),action:[{type:"recordPoint",clear:!0},{type:"recordPoint",start:!0},{type:"recordRegion",dim:n},{type:"recordState",state:"brushing"}]},{trigger:"plot:pointermove",isEnable:t=>"brushing"===t.shared.currentState,action:[{type:"recordPoint"},{type:"recordRegion",dim:n},{type:"mask",maskType:t}]},{trigger:"plot:maskChange",action:[{type:"elementSelection",trigger:e+"-mask"},{type:"highlightElement"}]},{trigger:"plot:pointerup",isEnable:t=>!AS(t),action:[{type:"recordState",state:null},{type:"elementSelection",trigger:e+"-mask"},{type:"filter"},{type:"plot"},{type:"recordState",state:"filtered"},{type:"recordPoint",clear:!0},{type:"recordRegion"},{type:"mask"},{type:"elementSelection",trigger:e+"-mask"},{type:"highlightElement"},{type:"button"}]},{trigger:"plot:click",isEnable:t=>AS(t),action:[{type:"button",hide:!0},{type:"filter",reset:!0},{type:"plot"},{type:"recordState",state:null}]}],end:[{trigger:"plot:pointerleave",action:[{type:"cursor",cursor:"default"}]}]}});function NS(t){var t=t["event"],t=t["target"];return t&&(null==(t=t.className)?void 0:t.includes("mask"))}function LS(t){var t=t["event"],t=t["target"];return t&&(null==(t=t.className)?void 0:t.includes("handle"))}function IS(t){return!NS(t)&&!LS(t)}function RS(t){return NS(t)||LS(t)}CS.props={};const DS=mS(t=>{var{brushType:t,multiple:e}=t,n="polygon"===t?"polygon":"rect";const r="rectX"===t?"x":"rectY"===t?"y":"";return{start:[{trigger:"plot:pointermove",isEnable:t=>IS(t),action:[{type:"cursor",cursor:"crosshair"}]},{trigger:"plot:pointermove",isEnable:t=>!IS(t),action:[{type:"cursor"}]},{trigger:"plot:pointerdown",isEnable:t=>IS(t),action:[e?null:{type:"recordPoint",clear:!0},{type:"recordPoint",start:!0},{type:"recordRegion",dim:r},{type:"recordState",state:"brushing"}].filter(t=>!!t)},{trigger:"plot:pointermove",isEnable:t=>"brushing"===t.shared.currentState&&!NS(t),action:[{type:"recordPoint"},{type:"recordRegion",dim:r},{type:"mask",maskType:t}]},{trigger:"plot:maskChange",action:[{type:"elementSelection",trigger:n+"-mask"},{type:"highlightElement"}]},{trigger:"plot:pointerup",isEnable:t=>"brushing"===t.shared.currentState,action:[{type:"recordState",state:null}]},{trigger:"plot:dragstart",isEnable:t=>RS(t),action:[{type:"recordCurrentPoint"}]},{trigger:"plot:drag",isEnable:t=>RS(t)&&t.shared.currentPoint,action:[{type:"move"},{type:"recordRegion",dim:r},{type:"mask",maskType:t},{type:"recordCurrentPoint"}]},{trigger:"plot:dragend",isEnable:t=>RS(t),action:[{type:"recordCurrentPoint",clear:!0}]}],end:[{trigger:"plot:pointerleave",action:[{type:"cursor",cursor:"default"}]},{trigger:"plot:click",isEnable:t=>2===t.event.detail&&!NS(t),action:[{type:"recordPoint",clear:!0},{type:"recordRegion"},{type:"mask"},{type:"elementSelection",trigger:n+"-mask"},{type:"highlightElement"}]}]}});DS.props={};const jS=mS(t=>{var t=t["brushType"],e="polygon"===t?"polygon":"rect",n="rectX"===t?"x":"rectY"===t?"y":"";return{start:[{trigger:"plot:pointerenter",action:[{type:"cursor",cursor:"crosshair"}]},{trigger:"plot:pointerdown",action:[{type:"recordPoint",clear:!0},{type:"recordPoint",start:!0},{type:"recordRegion",dim:n},{type:"recordState",state:"brushing"}]},{trigger:"plot:pointermove",isEnable:t=>"brushing"===t.shared.currentState,action:[{type:"recordPoint"},{type:"recordRegion",dim:n},{type:"mask",maskType:t}]},{trigger:"plot:maskChange",action:[{type:"elementSelection",trigger:e+"-mask"},{type:"highlightElement"}]},{trigger:"plot:pointerup",action:[{type:"recordState",state:null},{type:"elementSelection",trigger:e+"-mask"},{type:"filterElement"},{type:"highlightElement",clear:!0},{type:"recordPoint",clear:!0},{type:"recordRegion"},{type:"mask"}]}],end:[{trigger:"plot:pointerleave",action:[{type:"cursor",cursor:"default"}]}]}});jS.props={};const BS=mS((t={})=>({start:[{trigger:"plot:mousemove",action:[Object.assign({type:"activeRegion"},t)]},{trigger:"plot:mouseleave",action:[{type:"activeRegion",clear:!0}]}]}));BS.props={};const FS=mS(t=>({start:[{trigger:"mousemove",throttle:{wait:50,leading:!0,trailing:!1},action:[{type:"surfacePointSelection"},{type:"recordTip"},Object.assign({type:"poptip"},t)]}]})),zS=(FS.props={},()=>t=>{const e=t["children"];if(!Array.isArray(e))return[];const{x:n=0,y:r=0,width:i,height:o,data:a}=t;return e.map(t=>{var{data:e=a}=t,t=I(t,["data"]);return Object.assign(Object.assign({},t),{data:e,x:n,y:r,width:i,height:o})})}),VS=(zS.props={},()=>e=>{const n=e["children"];if(!Array.isArray(n))return[];const{direction:t="row",ratio:r=n.map(()=>1),padding:i=0,data:o}=e;var[a,s,l,u]="col"===t?["y","height","width","x"]:["x","width","height","y"];const c=r.reduce((t,e)=>t+e),h=e[s]-i*(n.length-1);var d=r.map(t=>h*(t/c));const f=[];let p=e[a]||0;for(let t=0;t<d.length;t+=1){var y=n[t],{data:g=o}=y,y=I(y,["data"]);f.push(Object.assign({[a]:p,[s]:d[t],[u]:e[u]||0,[l]:e[l],data:g},y)),p+=d[t]+i}return f}),GS=(VS.props={},()=>t=>{const e=t["children"],n=I(t,["children"]);if(!Array.isArray(e))return[];const{data:r,scale:i={}}=n,o=I(n,["data","scale"]);t=e.map(t=>{var{data:e=r,scale:n}=t,t=I(t,["data","scale"]);return Object.assign({data:e,scale:C({},i,n)},t)});return[Object.assign(Object.assign({},o),{marks:t,type:"standardView"})]}),HS=(GS.props={},()=>t=>{var{width:e,height:n,paddingLeft:r,paddingRight:i,paddingTop:o,paddingBottom:a,data:s,coordinate:l,theme:u,component:c,interaction:h,x:d,y:f,key:p,frame:y,title:g}=t,t=I(t,["width","height","paddingLeft","paddingRight","paddingTop","paddingBottom","data","coordinate","theme","component","interaction","x","y","key","frame","title"]);return[{type:"standardView",x:d,y:f,key:p,width:e,height:n,paddingLeft:r,paddingRight:i,paddingTop:o,paddingBottom:a,theme:u,coordinate:l,component:c,interaction:h,frame:y,title:g,marks:[Object.assign(Object.assign({},t),{key:p+"-0",data:s})]}]});function WS(t){return t.map((t,e)=>e)}function US(n){return(t,...e)=>C({},n(t,...e),t)}function YS(n){return(t,...e)=>C({},t,n(t,...e))}HS.props={};const qS=US(t=>{const{encode:e,data:i,scale:o,shareSize:a=!1}=t;var{x:t,y:n}=e,r=(e,t)=>{if(void 0===e||!a)return{};const n=Tg(i,t=>t[e]),r=(null==(t=null===o||void 0===o?void 0:o[t])?void 0:t.domain)||Array.from(n.keys());t=r.map(t=>n.has(t)?n.get(t).length:1);return{domain:r,flex:t}};return{scale:{x:Object.assign(Object.assign({paddingOuter:0,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,guide:void 0===n?null:{position:"right"}},void 0===n&&{paddingInner:0}),r(n,"y"))}}}),XS=US(t=>{const{data:e,scale:n}=t,r=[t];let i,o;for(;r.length;){const{children:l,encode:u={},scale:n={}}=r.shift();var a=u["color"],s=n["color"];void 0!==a&&(i=a),void 0!==s&&(o=s),Array.isArray(l)&&r.push(...l)}var t=Object.assign({},o);o&&(o.guide=null);return{encode:{color:i},scale:{color:C({},t,{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,field:i,type:"ordinal"})}}}),ZS=US(()=>({animate:{enter:{type:"fadeIn"}}})),KS=YS(()=>({frame:!1,encode:{shape:"hollowRect"},style:{lineWidth:0}})),$S=YS(()=>({type:"grid"})),JS=YS(u=>{var{transform:t=[]}=u;return{transform:[...t,{type:"connector",callback:()=>{const{data:t,encode:e}=u,{x:n,y:r}=e,i=n?Array.from(new Set(t.map(t=>t[n]))):[],o=r?Array.from(new Set(t.map(t=>t[r]))):[];if(i.length&&o.length){const a=[];for(const s of i)for(const l of o)a.push({[n]:s,[r]:l});return a}return i.length?i.map(t=>({[n]:t})):o.length?o.map(t=>({[r]:t})):void 0}}]}}),QS=YS((t,d=function(t){t=t.points;return $1(t)},w=function(o){return(t,e)=>{var{rowIndex:t,rowValuesLength:n,columnIndex:r,columnValuesLength:i}=t;if(t!==n-1)return tM(o,e);t=e.length?void 0:null;return C({title:r===i-1&&void 0,grid:t},o)}},k=function(r){return(t,e)=>{var{rowIndex:t,columnIndex:n}=t;if(0!==n)return tM(r,e);n=e.length?void 0:null;return C({title:0===t&&void 0,grid:n},r)}},E={})=>{const{data:_,encode:e,children:f,scale:n,x:S=0,y:M=0,shareData:T=!1}=t,{x:O,y:P}=e;t=n.color;const A=t["domain"];return{children:(t,e,n)=>{const{x:r,y:i}=e,{paddingLeft:p,paddingTop:y}=n,{domain:o,field:a}=r.getOptions(),{domain:s,field:l}=i.getOptions(),u=WS(t),g=t.map(d),c=t.map(({x:t,y:e})=>[r.invert(t),i.invert(e)]),h=c.map(([n,r])=>t=>{var{[a]:t,[l]:e}=t,t=void 0===O||t===n,e=void 0===P||e===r;return t&&e}),v=h.map(t=>_.filter(t)),m=T?Pg(v,t=>t.length):void 0,b=c.map(([t,e])=>({columnField:a,columnIndex:o.indexOf(t),columnValue:t,columnValuesLength:o.length,rowField:l,rowIndex:s.indexOf(e),rowValue:e,rowValuesLength:s.length})),x=b.map(t=>Array.isArray(f)?f:[f(t)].flat(1));return u.flatMap(s=>{const[l,u,c,h]=g[s],d=b[s],f=v[s],t=x[s];return t.map(t=>{var{scale:e,key:n,facet:r=!0}=t,t=I(t,["scale","key","facet"]),i=null==(i=null==e?void 0:e.y)?void 0:i.guide,o=null==(o=null==e?void 0:e.x)?void 0:o.guide,a={x:{tickCount:O?5:void 0},y:{tickCount:P?5:void 0}},r=r?f:_,o={x:{guide:eM(o,w)(d,r)},y:{guide:eM(i,k)(d,r)},color:{guide:null,domain:A}};return Object.assign(Object.assign({key:n+"-"+s,data:r,x:l+p+S,y:u+y+M,width:c,height:h,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!!r.length,dataDomain:m,scale:C(a,e,o)},t),E)})})}}});function tM(t,e){return e.length?C({title:!1,tickLine:null,label:null,subTickLine:null},t):null}function eM(t,e){return"function"==typeof t?t:null===t?()=>null:e(t)}const nM=()=>t=>{return[m_.of(t).call($S).call(XS).call(ZS).call(qS).call(KS).call(JS).call(QS).value()]},rM=(nM.props={},US(t=>({scale:{x:{guide:null,paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}}))),iM=YS(t=>{const{data:k,children:c,x:E=0,y:_=0}=t;return{children:(t,e,n)=>{const{x:r,y:i}=e,{paddingLeft:g,paddingTop:v}=n,{domain:o,field:a}=r.getOptions(),{domain:s,field:l}=i.getOptions(),u=WS(t),m=t.map(({points:t})=>$1(t)),b=t.map(({x:t,y:e})=>[r.invert(t),i.invert(e)]),x=b.map(([t,e])=>({columnField:a,columnIndex:o.indexOf(t),columnValue:t,columnValuesLength:o.length,rowField:l,rowIndex:s.indexOf(e),rowValue:e,rowValuesLength:s.length})),w=x.map(t=>Array.isArray(c)?c:[c(t)].flat(1));return u.flatMap(l=>{const[u,c,h,d]=m[l],[f,p]=b[l],y=x[l],t=w[l];return t.map(t=>{var n,r,{scale:e,key:i,encode:o}=t,t=I(t,["scale","key","encode"]),a=null==(a=null==e?void 0:e.y)?void 0:a.guide,s=null==(s=null==e?void 0:e.x)?void 0:s.guide,s={x:{guide:("function"==typeof(r=s)?r:null===r?()=>null:(t,e)=>{var{rowIndex:t,rowValuesLength:n}=t;if(t!==n-1)return tM(r,e)})(y,k)},y:{guide:("function"==typeof(n=a)?n:null===n?()=>null:(t,e)=>{t=t.columnIndex;if(0!==t)return tM(n,e)})(y,k)}};return Object.assign({data:k,key:i+"-"+l,x:u+g+E,y:c+v+_,width:h,height:d,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!0,scale:C({color:{guide:null},x:{guide:{title:{titleAnchor:"center"}},tickCount:5,facet:!1},y:{guide:{title:{titleAnchor:"center"}},tickCount:5,facet:!1}},e,s),encode:C({},o,{x:f,y:p})},t)})})}}}),oM=t=>{var e=t["encode"],t=I(t,["encode"]);const{position:n=[],x:r=n,y:i=[...n].reverse()}=e,o=I(e,["position","x","y"]),a=[];for(const s of[r].flat(1))for(const l of[i].flat(1))a.push({$x:s,$y:l});return Object.assign(Object.assign({},t),{data:a,encode:Object.assign(Object.assign({},o),{x:"$x",y:"$y"})})};const aM=()=>t=>{return[m_.of(t).call($S).call(XS).call(iM).call(oM).call(ZS).call(KS).call(rM).value()]},sM=US(t=>({scale:{x:{guide:{type:"axisX"},paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),lM=US(t=>({coordinate:[{type:"polar"}]})),uM=t=>{var e=t["encode"],t=I(t,["encode"]),e=e["position"];return Object.assign(Object.assign({},t),{encode:{x:e}})};function cM(t){return t=>null}function hM(t){var t=t["points"],[t,e,n,r]=t,i=Z1(t,r),t=X1(t,r),r=X1(e,n),r=(e=r,r=K1(r=t),e=K1(e),r<e?e-r:2*Math.PI-(r-e)),e=1/Math.sin(r/2),i=i/(1+e),o=i*Math.sqrt(2),[n,a]=n,t=K1(t)+r/2,r=i*e;return[n+r*Math.sin(t)-o/2,a+r*Math.cos(t)-o/2,o,o]}const dM=()=>t=>{return[m_.of(t).call($S).call(uM).call(XS).call(lM).call(QS,hM,cM,cM,{frame:!1}).call(JS).call(ZS).call(KS).call(sM).value()]};const fM=()=>t=>{const{children:e=[],duration:a=1e3,iterationCount:l=1,direction:u="normal",easing:s="ease-in-out-sine"}=t,c=e.length;if(!Array.isArray(e)||0===c)return[];const n=e[0]["key"],h=e.map(t=>Object.assign(Object.assign({},t),{key:n})).map(t=>{{var e=a,n=s;const i=[t];for(;i.length;){const o=i.pop();o.animate=C({enter:{duration:e},update:{duration:e,type:"morphing",easing:n,fill:"both"},exit:{duration:e}},o.animate||{});var r=o["children"];Array.isArray(r)&&i.push(...r)}return t}});return function*(){let t=0,e;for(;"infinite"===l||t<l;){n=u,o=t,a=c,s=void 0,s=[0,a],a=[1-a,1];var[n,r]="normal"===n?s:"reverse"===n?a:"alternate"===n?o%2==0?s:a:"reverse-alternate"===n?o%2==0?a:s:void 0;for(let t=n;t<r;t+=1){var i=Math.abs(t);e!==i&&(yield h[i]),e=i}t++}var o,a,s}},pM=(fM.props={},()=>(t,e,n)=>{var r=t.length;if(0===r)return[];var{innerWidth:i,innerHeight:o}=n;let l=Math.ceil(Math.sqrt(e/(o/i))),u=i/l,c=Math.ceil(e/l),a=c*u;for(;a>o;)l+=1,u=i/l,c=Math.ceil(e/l),a=c*u;const h=o-c*u,d=c<=1?0:h/(c-1),[f,p]=c<=1?[(i-r*u)/(r-1),(o-u)/2]:[0,0];return t.map((t,e)=>{var[t,n,r,i]=$1(t),o=e%l,e=Math.floor(e/l),a=o*u,s=(c-e-1)*u+h,r=u/r,i=u/i;return`translate(${a-t+f*o}, ${s-n-d*e-p}) scale(${r}, ${i})`})});function yM(t,e){var n,r,i;const o=Object.assign({},t);for([r,i]of Object.entries(e))o[r]=null!=(n=o[r])?n:i;return o}function gM(i){return r=>F(this,void 0,void 0,function*(){var t=yield i(r),e=t["encode"],n=r["encode"];return Object.assign(Object.assign(Object.assign({},r),t),e&&{encode:Object.assign(Object.assign({},n),e)})})}function vM(t){if(null!==t)return{type:"column",value:t}}function mM(t){return{type:"constant",value:t}}function bM(t,e,n){return e&&(t.field=n?n(e.field):e.field),t}pM.props={};const xM=()=>gM(({encode:t})=>({encode:yM(t,{y1:mM(0)})}));function wM(t,e){const{columnOf:n,encode:r,data:i,I:o}=e,a=(e=t,(Array.isArray(e)?e:[e]).map(t=>[t,n(i,r[t])]).filter(([,t])=>null!==t));return Array.from(Tg(o,e=>a.map(([,t])=>t[e]).join("-")).values())}function kM(t){return Array.isArray(t)?(o=t,(i,t,e)=>(n,r)=>o.reduce((t,e)=>0!==t?t:wg(i[n][e],i[r][e]),0)):"function"==typeof t?(r=t,(e,t,n)=>PM(t=>r(e[t]))):"series"===t?SM:"value"===t?MM:"sum"===t?TM:"maxIndex"===t?OM:()=>null;var o,r}function EM(t,e){for(const n of t)n.sort(e)}function _M(t,e){return(null==e?void 0:e.domain)||Array.from(new Set(t))}function SM(t,e,n){return PM(t=>n[t])}function MM(t,e,n){return PM(t=>e[t])}function TM(t,n,e){t=WS(t);const r=Array.from(Tg(t,t=>e[+t]).entries()),i=new Map(r.map(([t,e])=>[t,e.reduce((t,e)=>t+ +n[e])]));return PM(t=>i.get(e[t]))}function OM(t,n,e){t=WS(t);const r=Array.from(Tg(t,t=>e[+t]).entries()),i=new Map(r.map(([t,e])=>[t,Ag(e,t=>n[t])]));return PM(t=>i.get(e[t]))}function PM(n){return(t,e)=>wg(n(t),n(e))}xM.props={category:"inference"};const AM=(t={})=>{const{groupBy:m="x",orderBy:b,reverse:x=!1,y:w="y"}=t;return gM(t=>{const{data:e,I:n,columnOf:r,encode:i}=t,{y:o,y1:a,series:s,color:l}=i;var u=r(e,o),c=r(e,a),h=r(e,s||l),t=wM(m,t);const d=kM(b);h=d(e,u,h);h&&EM(t,h);const f=new Array(n.length),p=new Array(n.length);for(const g of t){x&&g.reverse();var y=c?+c[g[0]]:0;let t=y,e=y;for(const v of g){const o=+u[v]-y;o<0?e=f[v]=(p[v]=e)+o:0<o?t=f[v]=(p[v]=t)+o:f[v]=p[v]=t}}return{encode:{y:vM(bM("y"===w?f:p,u)),y1:vM(bM(p,c))}}})};function CM(t){t=t.type;return"string"==typeof t&&["stackY","dodgeX","groupX"].includes(t)}AM.props={category:"statistic"};const NM=o=>gM(t=>{const{encode:e,transform:n}=t;var{x:r,y:i}=e;if(n.some(CM))return{};if(void 0===r||void 0===i)return{};r=o.series,i=r?["x","series"]:"x";return AM({groupBy:i})(t)}),LM=(NM.props={category:"inference"},()=>gM(({encode:t,columnOf:e,data:n})=>{var{x:t,title:r}=t;if(void 0!==r)return{};r=e(n,t);return{encode:{x:vM(r),title:vM(r)}}})),IM=(LM.props={category:"inference"},t=>{const a=t["channel"];return gM(({encode:t,data:i,columnOf:o})=>{var e=t["tooltip"];if(void 0!==e)return{};e=Object.entries(t).filter(([t])=>t.startsWith(a)).flatMap(([t,e])=>{var n=new RegExp(a+"(\\d*)").exec(t)[1],e=o(i,e);const r=[[t,vM(e)]];return e&&null!==e.field&&r.push(["tooltip"+n,vM(e)]),r});return{encode:Object.fromEntries(e)}})}),RM=(IM.props={category:"inference"},()=>IM({channel:"position"})),DM=(RM.props={category:"inference"},()=>IM({channel:"y"})),jM=(DM.props={category:"inference"},()=>gM(({encode:t})=>({encode:yM(t,{x:mM(0)})}))),BM=(jM.props={category:"inference"},()=>gM(({encode:t})=>({encode:yM(t,{y:mM(0)})}))),FM=(BM.props={category:"inference"},()=>gM(({encode:t})=>({encode:yM(t,{size:mM(3)})}))),zM=(FM.props={category:"inference"},()=>gM(({encode:t,columnOf:n,data:r,I:a})=>{const e=Object.entries(t).filter(([t])=>t.startsWith("x")||t.startsWith("y")||t.startsWith("position")).map(([t,e])=>[t,vM(n(r,e))]);t=e.filter(([,t])=>{t=t.value;return Array.isArray(t[0])}).flatMap(([n,t])=>{const r=[[n,new Array(a.length).fill(void 0)]],i=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++){const vM=r[t]||[""+n+t,new Array(a).fill(void 0)];vM[1][e]=o[t],r[t]=vM}}return r.map(([t,e])=>[t,vM(bM(e,i))])});return{encode:Object.fromEntries([...e,...t])}})),VM=(zM.props={category:"inference"},()=>gM(({encode:t,data:e,I:n,columnOf:r})=>{var i=t["key"],t=I(t,["key"]);if(void 0!==i)return{};const o=Object.values(t).map(t=>r(e,t));return{encode:{key:vM(n.map(e=>o.filter(t=>null!==t).map(t=>t[e]).join("-")))}}})),GM=(VM.props={category:"inference"},()=>gM(({encode:t,data:e,columnOf:n})=>{var{series:t,color:r}=t;if(void 0!==t)return{};t=n(e,r);return{encode:{color:vM(t),series:vM(t)}}})),HM=(GM.props={category:"inference"},(t={})=>{const{groupBy:p="x",reverse:y=!1,orderBy:g}=t,v=I(t,["groupBy","reverse","orderBy"]);return gM(t=>{const{data:e,encode:n,columnOf:r,I:i,scale:o}=t;var{series:a,color:s,y:l}=n,u=o["series"],l=r(e,l),a=r(e,a||s),c=_M(a,u),s=wM(p,t);const h=kM(g);u=h(e,l,a);u&&EM(s,u);const d=new Array(i.length);for(const f of s){y&&f.reverse();for(let t=0;t<f.length;t++)d[f[t]]=c[t]}return{scale:C({},o,{series:Object.assign({domain:c},v)}),encode:{series:vM(d)}}})}),WM=(HM.props={category:"statistic"},t=>{const{by:g=["x"]}=t;return gM(({encode:e,I:n,data:r,columnOf:i})=>{var{enterDuration:t,enterDelay:o}=e;if(void 0===t)return{};var a=g.map(t=>[t,i(r,e[t])]);if(0===a.length)return{};let s=[n];for(const[,f]of a){const p=[];for(const n of s){var l=Array.from(Tg(n,t=>f[t]).values());p.push(...l)}s=p}const u=i(r,t);var c=i(r,o)||new Array(n.length).fill(0);const h=new Array(n.length);for(let t=0,e=0;t<s.length;t++){const n=s[t];var d=Pg(n,t=>+u[t]);for(const y of n)h[y]=c[y]+e;e+=d}return{encode:{enterDuration:vM(u),enterDelay:vM(h)}}})});WM.props={category:"statistic"};const UM=(t={})=>{const{groupBy:p="x",basis:y="max"}=t;return gM(t=>{const{data:n,encode:e,columnOf:r,I:i}=t;var o=I(e,["x"]);const a=Object.entries(o).filter(([t])=>t.startsWith("y")).map(([t,e])=>[t,r(n,e)]),s=a.map(([t,e])=>{return[t,bM(new Array(i.length),e)]});o=wM(p,t);const l={min:Cg,max:Pg,first:t=>t[0],last:t=>t[t.length-1],mean:Rg,extent:Eg,median:Dg,sum:Bg,deviation:kg}[y]||Pg;for(const i of o){var u=i.flatMap(e=>a.map(([,t])=>+t[e])),c=l(u);for(const d of i)for(let t=0;t<a.length;t++){var[,h]=a[t];const[,f]=s[t];f[d]=+h[d]/c}}return{encode:Object.fromEntries(s.map(([t,e])=>[t,vM(e)]))}})};function YM(t,e,n){if(null===t)return[-.5,.5];t=_M(t,e);const r=new bv({domain:t,range:[0,1],padding:n});e=r.getBandWidth();return[-e/2,e/2]}UM.props={category:"statistic"};const qM=(t={})=>{const{paddingX:h=0,paddingY:d=0}=t;return gM(t=>{const{data:e,I:n,columnOf:r,encode:i,scale:o}=t;var{x:t,y:a}=i,{x:s,y:l}=o,t=r(e,t),a=r(e,a);const u=YM(t,s,h),c=YM(a,l,d);t=n.map(()=>rb(...c)),s=n.map(()=>rb(...u));return{encode:{dy:vM(t),dx:vM(s)}}})},XM=(qM.props={category:"statistic"},(t={})=>{const{padding:l=0}=t;return gM(t=>{const{data:e,I:n,columnOf:r,encode:i,scale:o}=t;var t=i["y"],a=o["y"];const s=YM(r(e,t),a,l);return{encode:{dy:vM(n.map(()=>rb(...s)))}}})}),ZM=(XM.props={category:"statistic"},(t={})=>{const{groupBy:v="x"}=t;return gM(t=>{const{I:n,data:r,encode:e,columnOf:i}=t;var o=I(e,["x"]);const a=Object.entries(o).filter(([t])=>t.startsWith("y")).map(([t,e])=>[t,i(r,e)]),s=a.map(([t,e])=>{return[t,bM(new Array(n.length),e)]});var l=wM(v,t);const u=new Array(l.length);for(let t=0;t<l.length;t++){const n=l[t];var[c,h]=Eg(n.flatMap(e=>a.map(([,t])=>+t[e])));u[t]=(c+h)/2}var d=Math.max(...u);for(let t=0;t<l.length;t++){var f=d-u[t];const n=l[t];for(const y of n)for(let t=0;t<a.length;t++){var[,p]=a[t];const[,g]=s[t];g[y]=+p[y]+f}}return{encode:Object.fromEntries(s.map(([t,e])=>[t,vM(e)]))}})});function KM(t,e){return[t[0]]}function $M(t,e){return[t[t.length-1]]}function JM(t,e){return[t[Ag(t,t=>e[t])]]}function QM(t,e){return[t[function(t,e){let n,r=-1,i=-1;if(void 0===e)for(const a of t)++i,null!=a&&(n>a||void 0===n&&a>=a)&&(n=a,r=i);else for(var o of t)null!=(o=e(o,++i,t))&&(n>o||void 0===n&&o>=o)&&(n=o,r=i);return r}(t,t=>e[t])]]}ZM.props={category:"statistic"};const tT=(t={})=>{const{groupBy:l="series"}=t,u=I(t,["groupBy"]);return gM(t=>{const{data:e,columnOf:n,encode:r}=t,i=wM(l,t);var[t,o]=Object.entries(u)[0],{[t]:t}=r;const a=n(e,t),s="function"==typeof(t=o)?t:{first:KM,last:$M,max:JM,min:QM}[t]||KM;return{I:i.flatMap(t=>s(t,a))}})},eT=(tT.props={category:"statistic"},(t={})=>{var e=t["selector"],t=I(t,["selector"]);return tT(Object.assign({x:e},t))}),nT=(eT.props={category:"statistic"},(t={})=>{var e=t["selector"],t=I(t,["selector"]);return tT(Object.assign({y:e},t))});function rT(){return[(t,e)=>Rg(t,t=>+e[t]),t=>"mean of "+t]}function iT(){return[(t,e)=>Pg(t,t=>+e[t]),t=>"max of "+t]}function oT(){return[(t,e)=>t.length,t=>"count of "+t]}function aT(){return[(t,e)=>Bg(t,t=>+e[t]),t=>"sum of "+t]}function sT(){return[(t,e)=>e[0],t=>"first of "+t]}function lT(){return[(t,e)=>e[t[t.length-1]],t=>"last of "+t]}nT.props={category:"statistic"};const uT=(t={})=>{const o=I(t,["orderBy","reverse"]);return gM(t=>{const{data:a,encode:s,columnOf:l,I:e}=t;t=s.x;const n=l(a,t),u=n?Array.from(Tg(e,t=>n[t]).values()):[e];var t=Object.entries(o).map(([t,e])=>{var{[t]:n}=s;const r=l(a,n),[i,o]=function(t){if("function"==typeof t)return[t,null];const e={mean:rT,max:iT,count:oT,first:sT,last:lT,sum:aT}[t];if(e)return e();throw new Error(`Unknown reducer: ${t}.`)}(e);return[t,vM(bM(u.map(t=>i(t,null!==r&&void 0!==r?r:a)),r,o))]}),r=u.map(t=>a[t[0]]),i=u.map(t=>n[t[0]]);return{I:WS(u),data:r,encode:Object.assign({x:vM(bM(i,n))},Object.fromEntries(t))}})};uT.props={category:"statistic"};var cT={},hT={},dT=34,fT=10,pT=13;function yT(t){return new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'}).join(",")+"}")}function gT(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 vT(t,e){var t=t+"",n=t.length;return n<e?new Array(e-n+1).join(0)+t:t}function mT(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),o=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+vT(-e,6):9999<e?"+"+vT(e,6):vT(e,4))+"-"+vT(t.getUTCMonth()+1,2)+"-"+vT(t.getUTCDate(),2)+(o?"T"+vT(n,2)+":"+vT(r,2)+":"+vT(i,2)+"."+vT(o,3)+"Z":i?"T"+vT(n,2)+":"+vT(r,2)+":"+vT(i,2)+"Z":r||n?"T"+vT(n,2)+":"+vT(r,2)+"Z":"")}function bT(r){var e=new RegExp('["'+r+"\n\r]"),h=r.charCodeAt(0);function n(r,t){var e,n=[],i=r.length,o=0,a=0,s=i<=0,l=!1;function u(){if(s)return hT;if(l)return l=!1,cT;var t,e,n=o;if(r.charCodeAt(n)===dT){for(;o++<i&&r.charCodeAt(o)!==dT||r.charCodeAt(++o)===dT;);return(t=o)>=i?s=!0:(e=r.charCodeAt(o++))===fT?l=!0:e===pT&&(l=!0,r.charCodeAt(o)===fT&&++o),r.slice(n+1,t-1).replace(/""/g,'"')}for(;o<i;){if((e=r.charCodeAt(t=o++))===fT)l=!0;else if(e===pT)l=!0,r.charCodeAt(o)===fT&&++o;else if(e!==h)continue;return r.slice(n,t)}return s=!0,r.slice(n,i)}for(r.charCodeAt(i-1)===fT&&--i,r.charCodeAt(i-1)===pT&&--i;(e=u())!==hT;){for(var c=[];e!==cT&&e!==hT;)c.push(e),e=u();t&&null==(c=t(c,a++))||n.push(c)}return n}function i(t,n){return t.map(function(e){return n.map(function(t){return a(e[t])}).join(r)})}function o(t){return t.map(a).join(r)}function a(t){return null==t?"":t instanceof Date?mT(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,o){var a,s;return(t=n(t,function(t,e){if(a)return a(t,e-1);var n,r,i;s=t,a=o?(r=o,i=yT(n=t),function(t,e){return r(i(t),e,n)}):yT(t)})).columns=s||[],t},parseRows:n,format:function(t,e){return[(e=null==e?gT(t):e).map(a).join(r)].concat(i(t,e)).join("\n")},formatBody:function(t,e){return i(t,e=null==e?gT(t):e).join("\n")},formatRows:function(t){return t.map(o).join("\n")},formatRow:o,formatValue:a}}const xT=t=>{const{url:r,callback:i=J1,format:o,delimiter:a=","}=t;return gM(()=>F(void 0,void 0,void 0,function*(){const t=yield fetch(r);var e;if("csv"===o)return e=yield t.text(),{data:bT(a).parse(e,i)};const n=yield t.json();return{data:Array.isArray(n)?n.map(i):n}}))},wT=(xT.props={category:"preprocessor"},Math.PI/180),kT=64,ET=2048;function _T(t){return t.text}function ST(){return"serif"}function MT(){return"normal"}function TT(t){return t.value}function OT(){return 90*~~(2*Math.random())}function PT(){return 1}function AT(){}function CT(t,a,r,s){if(!a.sprite){const g=t.context,v=t.ratio;g.clearRect(0,0,(kT<<5)/v,ET/v);let i=0,o=0,n=0;var l,u,c,h,e=r.length;for(--s;++s<e;){a=r[s],g.save(),g.font=a.style+" "+a.weight+" "+~~((a.size+1)/v)+"px "+a.font;let t=g.measureText(a.text+"m").width*v,e=a.size<<1;if(a.rotate?(h=Math.sin(a.rotate*wT),c=Math.cos(a.rotate*wT),l=t*c,u=t*h,c=e*c,h=e*h,t=Math.max(Math.abs(l+h),Math.abs(l-h))+31>>5<<5,e=~~Math.max(Math.abs(u+c),Math.abs(u-c))):t=t+31>>5<<5,e>n&&(n=e),i+t>=kT<<5&&(i=0,o+=n,n=0),o+e>=ET)break;g.translate((i+(t>>1))/v,(o+(e>>1))/v),a.rotate&&g.rotate(a.rotate*wT),g.fillText(a.text,0,0),a.padding&&(g.lineWidth=2*a.padding,g.strokeText(a.text,0,0)),g.restore(),a.width=t,a.height=e,a.xoff=i,a.yoff=o,a.x1=t>>1,a.y1=e>>1,a.x0=-a.x1,a.y0=-a.y1,a.hasText=!0,i+=t}const m=g.getImageData(0,0,(kT<<5)/v,ET/v).data,b=[];for(;0<=--s;)if((a=r[s]).hasText){var d=a.width,f=d>>5;let n=a.y1-a.y0;for(let t=0;t<n*f;t++)b[t]=0;if(null==(i=a.xoff))return;o=a.yoff;let r=0,t=-1;for(let e=0;e<n;e++){for(let t=0;t<d;t++){var p=f*e+(t>>5),y=m[(o+e)*(kT<<5)+(i+t)<<2]?1<<31-t%32:0;b[p]|=y,r|=y}r?t=e:(a.y0++,n--,e--,o++)}a.y1=a.y0+t,a.sprite=b.slice(0,(a.y1-a.y0)*f)}}}function NT(t){const e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function LT(t){const e=[];let n=-1;for(;++n<t;)e[n]=0;return e}function IT(){return document.createElement("canvas")}function RT(t){return"function"==typeof t?t:function(){return t}}const DT={archimedean:NT,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 jT(){let b=[256,256],r=_T,i=ST,o=TT,y=MT,g=OT,v=PT,x=NT,w=Math.random,m=AT,e=[],n=null,k=1/0;const E=MT,_=IT,S={};return S.start=function(){const[a,s]=b,l=function(t){t.width=t.height=1;const e=Math.sqrt(t.getContext("2d").getImageData(0,0,1,1).data.length>>2),n=(t.width=(kT<<5)/e,t.height=ET/e,t.getContext("2d"));return n.fillStyle=n.strokeStyle="red",n.textAlign="center",{context:n,ratio:e}}(_()),u=S.board||LT((b[0]>>5)*b[1]),c=e.length,h=[],d=e.map(function(t,e,n){return t.text=r.call(this,t,e,n),t.font=i.call(this,t,e,n),t.style=E.call(this,t,e,n),t.weight=y.call(this,t,e,n),t.rotate=g.call(this,t,e,n),t.size=~~o.call(this,t,e,n),t.padding=v.call(this,t,e,n),t}).sort(function(t,e){return e.size-t.size});let f=-1,p=S.board?[{x:0,y:0},{x:a,y:s}]:void 0;function t(){for(var t=Date.now();Date.now()-t<k&&++f<c;){const r=d[f];if(r.x=a*(w()+.5)>>1,r.y=s*(w()+.5)>>1,CT(l,r,d,f),r.hasText&&function(i,t,e){const n=t.x,r=t.y,o=Math.sqrt(b[0]*b[0]+b[1]*b[1]),a=x(b),s=w()<.5?1:-1;let l,u=-s,c,h;for(;(l=a(u+=s))&&(c=~~l[0],h=~~l[1],!(Math.min(Math.abs(c),Math.abs(h))>=o));)if(t.x=n+c,t.y=r+h,!(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,o=t.width>>5,e=t.x-(o<<4),a=127&e,s=32-a,l=t.y1-t.y0;let u=(t.y+t.y0)*(r>>=5)+(e>>5),c;for(let e=0;e<l;e++){for(let t=c=0;t<=o;t++)if((c<<s|(t<o?(c=i[e*o+t])>>>a:0))&n[u+t])return 1;u+=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 d=t.sprite,f=t.width>>5,p=b[0]>>5,y=t.x-(f<<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<=f;t++)i[r+t]|=n<<v|(t<f?(n=d[e*f+t])>>>g:0);r+=p}return delete t.sprite,1}return}(u,r,p)){if(m.call(null,"word",{cloud:S,word:r}),h.push(r),p){if(!S.hasImage){e=void 0;n=void 0;var e=p;var n=r;const i=e[0],o=e[1];n.x+n.x0<i.x&&(i.x=n.x+n.x0),n.y+n.y0<i.y&&(i.y=n.y+n.y0),n.x+n.x1>o.x&&(o.x=n.x+n.x1),n.y+n.y1>o.y&&(o.y=n.y+n.y1)}}else p=[{x:r.x+r.x0,y:r.y+r.y0},{x:r.x+r.x1,y:r.y+r.y1}];r.x-=b[0]>>1,r.y-=b[1]>>1}}S._tags=h,S._bounds=p,f>=c&&(S.stop(),m.call(null,"end",{cloud:S,words:h,bounds:p}))}return n&&clearInterval(n),n=setInterval(t,0),t(),S},S.stop=function(){return n&&(clearInterval(n),n=null),S},S.createMask=t=>{const e=document.createElement("canvas");var[n,r]=b;if(n&&r){var i=n>>5;const l=LT((n>>5)*r),u=(e.width=n,e.height=r,e.getContext("2d"));u.drawImage(t,0,0,t.width,t.height,0,0,n,r);var o=u.getImageData(0,0,n,r).data;for(let e=0;e<r;e++)for(let t=0;t<n;t++){var a=i*e+(t>>5),s=e*n+t<<2,s=250<=o[s]&&250<=o[1+s]&&250<=o[2+s]?1<<31-t%32:0;l[a]|=s}S.board=l,S.hasImage=!0}},S.timeInterval=function(t){k=null==t?1/0:t},S.words=function(t){e=t},S.size=function(t=[]){b=[+t[0],+t[1]]},S.text=function(t){r=RT(t)},S.font=function(t){i=RT(t)},S.fontWeight=function(t){y=RT(t)},S.rotate=function(t){g=RT(t)},S.spiral=function(t){x=DT[t]||t},S.fontSize=function(t){o=RT(t)},S.padding=function(t){v=RT(t)},S.random=function(t){w=RT(t)},S.on=function(t){m=RT(t)},S}const BT={size:[500,500],fontSize:[14,28]};function FT(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 zT=y=>gM(({data:p})=>F(void 0,void 0,void 0,function*(){var i,o,t=Object.assign({},BT,y);const e=jT();i=e,o=t,yield{set(t,e,n){return void 0!==o[t]&&(e=e?e.call(null,o[t]):o[t],n?n.call(null,e):"function"==typeof i[t]?i[t](e):i[t]=e),this},setAsync(e,n,r){return F(this,void 0,void 0,function*(){var t;return void 0!==o[e]&&(t=n?yield n.call(null,o[e]):o[e],r?r.call(null,t):"function"==typeof i[e]?i[e](t):i[e]=t),this})}}.set("fontSize",t=>{var e=p.map(t=>t.value),n=t,t=[Cg(e),Pg(e)];if("function"==typeof n)return n;if(Array.isArray(n)){const[r,i]=n;if(!t)return()=>(i+r)/2;const[o,a]=t;return a===o?()=>(i+r)/2:({value:t})=>(i-r)/(a-o)*(t-o)+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",FT,e.createMask),e.words([...p]);var n=e.start();const[r,a]=t.size;t=[{x:0,y:0},{x:r,y:a}];const{_bounds:s=t,_tags:l,hasImage:u}=n,c=l.map(t=>{var{x:e,y:n}=t,t=I(t,["x","y"]);return Object.assign(Object.assign({},t),{x:e+r/2,y:n+a/2})});var[{x:n,y:t},{x:h,y:d}]=s,f={text:"",value:0,opacity:0,fontSize:0};return c.push(Object.assign(Object.assign({},f),{x:u?0:n,y:u?0:t}),Object.assign(Object.assign({},f),{x:u?r:h,y:u?a:d})),{data:c}}));zT.props={category:"preprocessor"};const VT=t=>{const{fields:o,as:n=[]}=t;return gM(({data:t})=>{if(!o||(e=o,0===Object.keys(e).length))return{data:t};var e;const[r="key",i="value"]=n;return{data:t.reduce((e,n)=>{for(let t=0;t<o.length;t++)e.push(Object.assign(Object.assign({},n),{[r]:o[t],[i]:n[o[t]]}));return e},[])}})};VT.props={category:"preprocessor"};const GT=t=>{const{fields:n=[],callback:r=function(t){return null!=t&&!Number.isNaN(t)}}=t;return gM(({data:t})=>({data:t.filter(e=>n.every(t=>r(e[t])))}))};function HT(t,e,n){return Math.min(n,Math.max(e,t))}GT.props={category:"preprocessor"};const WT=i=>gM(({data:t})=>{const{fields:e=[]}=i;let{start:n=0,end:r=t.length}=i;n=HT(n,0,t.length-1),r=HT(r,1,t.length),n>r&&([n,r]=[r,n]);return{data:t.filter((t,e)=>e>=n&&e<r).map(n=>e.reduce((t,e)=>(e in n&&(t[e]=n[e]),t),{}))}}),UT=(WT.props={category:"preprocessor"},t=>{t=t.fields;return WT({fields:t})});UT.props={category:"preprocessor"};const YT=t=>{const r=t["map"];return gM(({data:t})=>{if(!r||(e=r,0===Object.keys(e).length))return t;var e;return{data:t.map(t=>Object.entries(t).reduce((t,[e,n])=>(t[r[e]||e]=n,t),{}))}})},qT=(YT.props={category:"preprocessor"},t=>{const{fields:i=[],order:r="ASC"}=t;return gM(({data:t})=>{const n=(n,r)=>i.reduce((t,e)=>0!==t?t:n[e]<r[e]?-1:+(n[e]!==r[e]),0);var e="ASC"===r?n:(t,e)=>n(e,t);return{data:[...t].sort(e)}})});function XT(t){return function(){return t}}function ZT(t){return t[0]}function KT(t){return t[1]}function $T(){this._=null}function JT(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function QT(t,e){var n=e,e=e.R,r=n.U;r?r.L===n?r.L=e:r.R=e:t._=e,e.U=r,n.U=e,n.R=e.L,n.R&&(n.R.U=n),e.L=n}function tO(t,e){var n=e,e=e.L,r=n.U;r?r.L===n?r.L=e:r.R=e:t._=e,e.U=r,n.U=e,n.L=e.R,n.L&&(n.L.U=n),e.R=n}function eO(t){for(;t.L;)t=t.L;return t}function nO(t,e,n,r){var i=[null,null],o=kO.push(i)-1;return i.left=t,i.right=e,n&&iO(i,t,e,n),r&&iO(i,e,t,r),xO[t.index].halfedges.push(o),xO[e.index].halfedges.push(o),i}function rO(t,e,n){e=[e,n];return e.left=t,e}function iO(t,e,n,r){t[0]||t[1]?t.left===n?t[1]=r:t[0]=r:(t[0]=r,t.left=e,t.right=n)}function oO(t,e,n,r){for(var i,o=kO.length;o--;)(function(t,e,n,r,i){var o=t[1];if(!o){var a,s=t[0],l=t.left,u=t.right,c=l[0],l=l[1],h=u[0],u=u[1],d=(c+h)/2;if(u===l){if(d<e||r<=d)return;if(h<c){if(s){if(s[1]>=i)return}else s=[d,n];o=[d,i]}else{if(s){if(s[1]<n)return}else s=[d,i];o=[d,n]}}else if(d=(l+u)/2-(a=(c-h)/(u-l))*d,a<-1||1<a)if(h<c){if(s){if(s[1]>=i)return}else s=[(n-d)/a,n];o=[(i-d)/a,i]}else{if(s){if(s[1]<n)return}else s=[(i-d)/a,i];o=[(n-d)/a,n]}else if(l<u){if(s){if(s[0]>=r)return}else s=[e,a*e+d];o=[r,a*r+d]}else{if(s){if(s[0]<e)return}else s=[r,a*r+d];o=[e,a*e+d]}t[0]=s,t[1]=o}return 1})(i=kO[o],t,e,n,r)&&function(t,e,n,r,i){var o=t[0],a=t[1],s=o[0],o=o[1],l=0,u=1,c=a[0]-s,a=a[1]-o,e=e-s;if(c||!(0<e)){if(e/=c,c<0){if(e<l)return;e<u&&(u=e)}else if(0<c){if(u<e)return;l<e&&(l=e)}if(e=r-s,c||!(e<0)){if(e/=c,c<0){if(u<e)return;l<e&&(l=e)}else if(0<c){if(e<l)return;e<u&&(u=e)}if(e=n-o,a||!(0<e)){if(e/=a,a<0){if(e<l)return;e<u&&(u=e)}else if(0<a){if(u<e)return;l<e&&(l=e)}if(e=i-o,a||!(e<0)){if(e/=a,a<0){if(u<e)return;l<e&&(l=e)}else if(0<a){if(e<l)return;e<u&&(u=e)}return(0<l||u<1)&&(0<l&&(t[0]=[s+l*c,o+l*a]),u<1&&(t[1]=[s+u*c,o+u*a])),1}}}}}(i,t,e,n,r)&&(Math.abs(i[0][0]-i[1][0])>EO||Math.abs(i[0][1]-i[1][1])>EO)||delete kO[o]}function aO(t,e){return e[+(e.left!==t.site)]}function sO(){for(var t,e,n,r,i,o,a,s=0,l=xO.length;s<l;++s)if((t=xO[s])&&(n=(e=t.halfedges).length)){for(var u=new Array(n),c=new Array(n),h=0;h<n;++h)u[h]=h,c[h]=(r=t,i=kO[e[h]],a=o=void 0,r=r.site,o=i.left,a=i.right,r===a&&(a=o,o=r),a?Math.atan2(a[1]-o[1],a[0]-o[0]):(a=r===o?(o=i[1],i[0]):(o=i[0],i[1]),Math.atan2(o[0]-a[0],a[1]-o[1])));for(u.sort(function(t,e){return c[e]-c[t]}),h=0;h<n;++h)c[h]=e[u[h]];for(h=0;h<n;++h)e[h]=c[h]}}qT.props={category:"preprocessor"},$T.prototype={constructor:$T,insert:function(t,e){var n,r,i;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;n=t}else n=this._?(t=eO(this._),e.P=null,(e.N=t).P=t.L=e,t):(e.P=e.N=null,this._=e,null);for(e.L=e.R=null,e.U=n,e.C=!0,t=e;n&&n.C;)n===(r=n.U).L?(i=r.R)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.R&&(QT(this,n),n=(t=n).U),n.C=!1,r.C=!0,tO(this,r)):(i=r.L)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.L&&(tO(this,n),n=(t=n).U),n.C=!1,r.C=!0,QT(this,r)),n=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,n,r=t.U,i=t.L,o=t.R,a=i?o?eO(o):i:o;if(r?r.L===t?r.L=a:r.R=a:this._=a,i&&o?(n=a.C,a.C=t.C,((a.L=i).U=a)!==o?(r=a.U,a.U=t.U,t=a.R,r.L=t,(a.R=o).U=a):(a.U=r,t=(r=a).R)):(n=t.C,t=a),t&&(t.U=r),!n)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===r.L){if((e=r.R).C&&(e.C=!1,r.C=!0,QT(this,r),e=r.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,tO(this,e),e=r.R),e.C=r.C,r.C=e.R.C=!1,QT(this,r),t=this._;break}}else if((e=r.L).C&&(e.C=!1,r.C=!0,tO(this,r),e=r.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,QT(this,e),e=r.L),e.C=r.C,r.C=e.L.C=!1,tO(this,r),t=this._;break}}while(e.C=!0,r=(t=r).U,!t.C);t&&(t.C=!1)}}};var lO,uO=[];function cO(){JT(this),this.x=this.y=this.arc=this.site=this.cy=null}function hO(t){var e=t.P,n=t.N;if(e&&n){var e=e.site,r=t.site,n=n.site;if(e!==n){var i=r[0],o=r[1],a=e[0]-i,e=e[1]-o,s=n[0]-i,n=n[1]-o,l=2*(a*n-e*s);if(!(-_O<=l)){for(var u=a*a+e*e,c=s*s+n*n,n=(n*u-e*c)/l,e=(a*c-s*u)/l,h=uO.pop()||new cO,d=(h.arc=t,h.site=r,h.x=n+i,h.y=(h.cy=e+o)+Math.sqrt(n*n+e*e),t.circle=h,null),f=wO._;f;)if(h.y<f.y||h.y===f.y&&h.x<=f.x){if(!f.L){d=f.P;break}f=f.L}else{if(!f.R){d=f;break}f=f.R}wO.insert(d,h),d||(lO=h)}}}}function dO(t){var e=t.circle;e&&(e.P||(lO=e.N),wO.remove(e),uO.push(e),JT(e),t.circle=null)}var fO=[];function pO(){JT(this),this.edge=this.site=this.circle=null}function yO(t){var e=fO.pop()||new pO;return e.site=t,e}function gO(t){dO(t),bO.remove(t),fO.push(t),JT(t)}function vO(t){for(var e,n,r,i,o=t[0],a=t[1],s=bO._;s;)if(r=mO(s,a)-o,EO<r)s=s.L;else{if(i=o-function(t,e){var n=t.N;if(n)return mO(n,e);n=t.site;return n[1]===e?n[0]:1/0}(s,a),!(EO<i)){-EO<r?(e=s.P,n=s):-EO<i?n=(e=s).N:e=n=s;break}if(!s.R){e=s;break}s=s.R}xO[t.index]={site:t,halfedges:[]};var l,u,c,h,d,f,p,y,g,v,m=yO(t);bO.insert(e,m),(e||n)&&(e===n?(dO(e),n=yO(e.site),bO.insert(m,n),m.edge=n.edge=nO(e.site,m.site),hO(e),hO(n)):n?(dO(e),dO(n),u=(l=e.site)[0],c=l[1],h=t[0]-u,v=t[1]-c,f=(d=n.site)[0]-u,p=d[1]-c,iO(n.edge,l,d,v=[(p*(y=h*h+v*v)-v*(g=f*f+p*p))/(p=2*(h*p-v*f))+u,(h*g-f*y)/p+c]),m.edge=nO(l,t,null,v),n.edge=nO(t,d,null,v),hO(e),hO(n)):m.edge=nO(e.site,m.site))}function mO(t,e){var n=t.site,r=n[0],i=n[1],o=i-e;if(!o)return r;t=t.P;if(!t)return-1/0;t=(n=t.site)[0],n=n[1],e=n-e;if(!e)return t;var a=t-r,s=1/o-1/e,l=a/e;return s?(-l+Math.sqrt(l*l-2*s*(a*a/(-2*e)-n+e/2+i-o/2)))/s+r:(r+t)/2}var bO,xO,wO,kO,EO=1e-6,_O=1e-12;function SO(t,e){return e[1]-t[1]||e[0]-t[0]}function MO(t,e){var D,j,n,r=t.sort(SO).pop();for(kO=[],xO=new Array(t.length),bO=new $T,wO=new $T;;)if(n=lO,r&&(!n||r[1]<n.y||r[1]===n.y&&r[0]<n.x))r[0]===D&&r[1]===j||(vO(r),D=r[0],j=r[1]),r=t.pop();else{if(!n)break;y=p=f=d=h=c=u=l=s=a=o=i=void 0;for(var i=n.arc,o=i.circle,a=o.x,s=o.cy,l=[a,s],u=i.P,c=i.N,h=[i],d=(gO(i),u);d.circle&&Math.abs(a-d.circle.x)<EO&&Math.abs(s-d.circle.cy)<EO;)u=d.P,h.unshift(d),gO(d),d=u;h.unshift(d),dO(d);for(var f=c;f.circle&&Math.abs(a-f.circle.x)<EO&&Math.abs(s-f.circle.cy)<EO;)c=f.N,h.push(f),gO(f),f=c;h.push(f),dO(f);for(var p=h.length,y=1;y<p;++y)f=h[y],d=h[y-1],iO(f.edge,d.site,f.site,l);d=h[0],(f=h[p-1]).edge=nO(d.site,f.site,null,l),hO(d),hO(f)}if(sO(),e){var g,v,m,b,x,w,k,E,_,S,M=+e[0][0],T=+e[0][1],O=+e[1][0],e=+e[1][1],P=(oO(M,T,O,e),M),A=T,C=O,N=e,B=xO.length,L=!0;for(R=0;R<B;++R)if(g=xO[R]){for(v=g.site,m=(b=g.halfedges).length;m--;)kO[b[m]]||b.splice(m,1);for(m=0,x=b.length;m<x;)_=g,_=(S=(S=kO[b[m]])[+(S.left===_.site)])[0],E=S[1],w=(k=aO(g,kO[b[++m%x]]))[0],k=k[1],(Math.abs(_-w)>EO||Math.abs(E-k)>EO)&&(b.splice(m,0,kO.push(rO(v,S,Math.abs(_-P)<EO&&EO<N-E?[P,Math.abs(w-P)<EO?k:N]:Math.abs(E-N)<EO&&EO<C-_?[Math.abs(k-N)<EO?w:C,N]:Math.abs(_-C)<EO&&EO<E-A?[C,Math.abs(w-C)<EO?k:A]:Math.abs(E-A)<EO&&EO<_-P?[Math.abs(k-A)<EO?w:P,A]:null))-1),++x);x&&(L=!1)}if(L){for(var I,F=1/0,R=0,L=null;R<B;++R)(g=xO[R])&&(I=(I=(v=g.site)[0]-P)*I+(I=v[1]-A)*I)<F&&(F=I,L=g);L&&(M=[C,N],T=[C,A],L.halfedges.push(kO.push(rO(v=L.site,O=[P,A],e=[P,N]))-1,kO.push(rO(v,e,M))-1,kO.push(rO(v,M,T))-1,kO.push(rO(v,T,O))-1))}for(R=0;R<B;++R)!(g=xO[R])||g.halfedges.length||delete xO[R]}this.edges=kO,this.cells=xO,bO=wO=kO=xO=null}MO.prototype={constructor:MO,polygons:function(){var n=this.edges;return this.cells.map(function(e){var t=e.halfedges.map(function(t){return aO(e,n[t])});return t.data=e.site.data,t})},triangles:function(){var c=[],h=this.edges;return this.cells.forEach(function(t,e){if(r=(n=t.halfedges).length)for(var n,r,i,o,a=t.site,s=-1,l=h[n[r-1]],u=l.left===a?l.right:l.left;++s<r;)i=u,u=(l=h[n[s]]).left===a?l.right:l.left,i&&u&&e<i.index&&e<u.index&&(o=u,(a[0]-o[0])*(i[1]-a[1])-(a[0]-i[0])*(o[1]-a[1])<0)&&c.push([a.data,i.data,u.data])}),c},links:function(){return this.edges.filter(function(t){return t.right}).map(function(t){return{source:t.left.data,target:t.right.data}})},find:function(n,r,t){for(var e,i,o=this,a=o._found||0,s=o.cells.length;!(i=o.cells[a]);)if(++a>=s)return null;for(var l=n-i.site[0],u=r-i.site[1],c=l*l+u*u;i=o.cells[e=a],a=null,i.halfedges.forEach(function(t){var t=o.edges[t],e=t.left;!(e!==i.site&&e||(e=t.right))||(t=(t=n-e[0])*t+(t=r-e[1])*t)<c&&(c=t,a=e.index)}),null!==a;);return o._found=e,null==t||c<=t*t?i.site:null}};const TO=t=>{const{fields:e,as:n,extend:r}=t,[a,s]=e,[l,u]=n;return gM(({data:t})=>{var i,o,e;function n(r){return new MO(r.map(function(t,e){var n=[Math.round(i(t,e,r)/EO)*EO,Math.round(o(t,e,r)/EO)*EO];return n.index=e,n.data=t,n}),e)}return i=ZT,o=KT,e=null,n.polygons=function(t){return n(t).polygons()},n.links=function(t){return n(t).links()},n.triangles=function(t){return n(t).triangles()},n.x=function(t){return arguments.length?(i="function"==typeof t?t:XT(+t),n):i},n.y=function(t){return arguments.length?(o="function"==typeof t?t:XT(+t),n):o},n.extent=function(t){return arguments.length?(e=null==t?null:[[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]],n):e&&[[e[0][0],e[0][1]],[e[1][0],e[1][1]]]},n.size=function(t){return arguments.length?(e=null==t?null:[[0,0],[+t[0],+t[1]]],n):e&&[e[1][0]-e[0][0],e[1][1]-e[0][1]]},{data:n.x(t=>t[a]).y(t=>t[s]).extent(r).polygons(t).map(t=>Object.assign(Object.assign({},t.data),{[l]:t.map(t=>t[0]),[u]:t.map(t=>t[1])}))}})};function OO(t){return t.target.depth}function PO(t,e){return t.sourceLinks.length?t.depth:e-1}function AO(t){return function(){return t}}function CO(t,e){return LO(t.source,e.source)||t.index-e.index}function NO(t,e){return LO(t.target,e.target)||t.index-e.index}function LO(t,e){return t.y0-e.y0}function IO(t){return t.value}function RO(t){return t.index}function DO(t){return t.nodes}function jO(t){return t.links}function BO(t,e){t=t.get(e);if(t)return t;throw new Error("missing: "+e)}function FO({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 zO(){let b=0,x=0,w=1,k=1,E=24,_=8,S,M=RO,T=PO,O,P,A,C=DO,N=jO,L=6;function e(e){e={nodes:C(e),links:N(e)};{var{nodes:i,links:t}=e;i.forEach((t,e)=>{t.index=e,t.sourceLinks=[],t.targetLinks=[]});const f=new Map(i.map(t=>[M(t),t]));if(t.forEach((t,e)=>{t.index=e;let{source:n,target:r}=t;"object"!=typeof n&&(n=t.source=BO(f,n)),"object"!=typeof r&&(r=t.target=BO(f,r)),n.sourceLinks.push(t),r.targetLinks.push(t)}),null!=A)for(var{sourceLinks:n,targetLinks:r}of i)n.sort(A),r.sort(A)}t=e.nodes;for(const p of t)p.value=void 0===p.fixedValue?Math.max(Bg(p.sourceLinks,IO),Bg(p.targetLinks,IO)):p.fixedValue;{var o=e.nodes,a=o.length;let t=new Set(o),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>a)throw new Error("circular link");t=n,n=new Set}if(O){var s=Math.max(Pg(o,t=>t.depth)+1,0);let e;for(let t=0;t<o.length;t++)(e=o[t]).depth=O.call(null,e,s)}}{var l=(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>l)throw new Error("circular link");t=n,n=new Set}}var u=function({nodes:t}){const e=Math.max(Pg(t,t=>t.depth)+1,0),n=(w-b-E)/(e-1),r=new Array(e).fill(0).map(()=>[]);for(const o of t){var i=Math.max(0,Math.min(e-1,Math.floor(T.call(null,o,e))));o.layer=i,o.x0=b+i*n,o.x1=o.x0+E,r[i]?r[i].push(o):r[i]=[o]}if(P)for(const a of r)a.sort(P);return r}(e),t=(S=Math.min(_,(k-x)/(Pg(u,t=>t.length)-1)),u),c=Cg(t,t=>(k-x-(t.length-1)*S)/Bg(t,IO));for(const y of t){let e=x;for(const g of y){g.y0=e,g.y1=e+g.value*c,e=g.y1+S;for(const v of g.sourceLinks)v.width=v.value*c}e=(k-e+S)/(y.length+1);for(let t=0;t<y.length;++t){const m=y[t];m.y0+=e*(t+1),m.y1+=e*(t+1)}!function(t){if(void 0===A)for(var{sourceLinks:e,targetLinks:n}of t)e.sort(NO),n.sort(CO)}(y)}for(let t=0;t<L;++t){var h=Math.pow(.99,t),d=Math.max(1-h,(t+1)/L);!function(n,r,i){for(let t=n.length,e=t-2;0<=e;--e){const l=n[e];for(const u of l){let t=0,e=0;for(var{target:o,value:a}of u.sourceLinks){a=a*(o.layer-u.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:o,width:a}of t.sourceLinks){if(o===e)break;n-=a}return n}(u,o)*a,e+=a}var s;0<e&&(s=(t/e-u.y0)*r,u.y0+=s,u.y1+=s,R(u))}void 0===P&&l.sort(LO),l.length&&I(l,i)}}(u,h,d),!function(n,r,i){for(let t=1,e=n.length;t<e;++t){const l=n[t];for(const u of l){let t=0,e=0;for(var{source:o,value:a}of u.targetLinks){a=a*(u.layer-o.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:o,width:a}of e.targetLinks){if(o===t)break;n-=a}return n}(o,u)*a,e+=a}var s;0<e&&(s=(t/e-u.y0)*r,u.y0+=s,u.y1+=s,R(u))}void 0===P&&l.sort(LO),l.length&&I(l,i)}}(u,h,d)}return FO(e),e}function I(t,e){var n=t.length>>1,r=t[n];o(t,r.y0-S,n-1,e),i(t,r.y1+S,1+n,e),o(t,k,t.length-1,e),i(t,x,0,e)}function i(t,e,n,r){for(;n<t.length;++n){const o=t[n];var i=(e-o.y0)*r;1e-6<i&&(o.y0+=i,o.y1+=i),e=o.y1+S}}function o(t,e,n,r){for(;0<=n;--n){const o=t[n];var i=(o.y1-e)*r;1e-6<i&&(o.y0-=i,o.y1-=i),e=o.y0-S}}function R({sourceLinks:t,targetLinks:e}){if(void 0===A){for(const{source:{sourceLinks:t}}of e)t.sort(NO);for(const{target:{targetLinks:e}}of t)e.sort(CO)}}return e.update=function(t){return FO(t),t},e.nodeId=function(t){return arguments.length?(M="function"==typeof t?t:AO(t),e):M},e.nodeAlign=function(t){return arguments.length?(T="function"==typeof t?t:AO(t),e):T},e.nodeDepth=function(t){return arguments.length?(O=t,e):O},e.nodeSort=function(t){return arguments.length?(P=t,e):P},e.nodeWidth=function(t){return arguments.length?(E=+t,e):E},e.nodePadding=function(t){return arguments.length?(_=S=+t,e):_},e.nodes=function(t){return arguments.length?(C="function"==typeof t?t:AO(t),e):C},e.links=function(t){return arguments.length?(N="function"==typeof t?t:AO(t),e):N},e.linkSort=function(t){return arguments.length?(A=t,e):A},e.size=function(t){return arguments.length?(b=x=0,w=+t[0],k=+t[1],e):[w-b,k-x]},e.extent=function(t){return arguments.length?(b=+t[0][0],w=+t[1][0],x=+t[0][1],k=+t[1][1],e):[[b,x],[w,k]]},e.iterations=function(t){return arguments.length?(L=+t,e):L},e}TO.props={category:"preprocessor"};const VO={nodeAlign:"justify",nodeWidth:.008,nodePadding:.03,nodes:t=>t.nodes,links:t=>t.links,nodeSort:void 0,linkSort:void 0,iterations:6},GO={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?Cg(t.sourceLinks,OO)-1:0},justify:PO};const HO=p=>gM(({data:t})=>{var{nodeId:e,nodeSort:n,nodeAlign:r,nodeWidth:i,nodePadding:o,nodeDepth:a,nodes:s,links:l,linkSort:u,iterations:c}=Object.assign({},VO,p);const h=zO().nodeSort(n).linkSort(u).links(l).nodes(s).nodeWidth(i).nodePadding(o).nodeDepth(a).nodeAlign("string"==(u=typeof(n=r))?GO[n]||PO:"function"==u?n:PO).iterations(c).extent([[0,0],[1,1]]),{nodes:d,links:f}=("function"==typeof e&&h.nodeId(e),h(t));return{data:{nodes:d.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:f.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]})})}}});HO.props={category:"preprocessor"};var WO=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 UO={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 YO(t){const{y:u,thickness:c,weight:h,marginRatio:d,id:f,source:p,target:y,sourceWeight:g,targetWeight:v,sortBy:m}=Object.assign(Object.assign({},UO),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=Tg(r,t=>t.source),o=Tg(r,t=>t.target);n.forEach(t=>{t.id=f(t);var e=i.has(t.id)?i.get(t.id):[],n=o.has(t.id)?o.get(t.id):[];t.frequency=e.length+n.length,t.value=Bg(e,t=>t.sourceWeight)+Bg(n,t=>t.targetWeight)})}if(r=e,(n="function"==typeof m?m:WO[m])&&r.sort(n),!(n=(r=e).length))throw tb("Invalid nodes: it's empty!");if(h){const a=d/(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-d),e.height=c;var n=a+t,r=n+e.width,i=u-c/2,o=i+c;return e.x=[n,r,r,n],e.y=[i,i,o,o],t+e.width+2*a},0)}else{const l=1/n;r.forEach((t,e)=>{t.x=(e+.5)*l,t.y=u})}return function(t,e){const r=new Map(t.map(t=>[t.id,t]));if(!h)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=[u,u,u,u]});const s=Tg(e,t=>t.source),l=Tg(e,t=>t.target);t.forEach(n=>{const{width:r,value:i,id:t}=n,e=s.get(t)||[],o=l.get(t)||[];let a=0;e.map(t=>{var e=t.sourceWeight/i*r;t.x[0]=n.x[0]+a,t.x[1]=n.x[0]+a+e,a+=e}),o.forEach(t=>{var e=t.targetWeight/i*r;t.x[3]=n.x[0]+a,t.x[2]=n.x[0]+a+e,a+=e})})}(e,t),{nodes:e,edges:t}}}const qO=e=>gM(({data:t})=>({data:YO(e)(t)}));function XO(t,e){return t.parent===e.parent?1:2}function ZO(t,e){return t+e.x}function KO(t,e){return Math.max(t,e.y)}function $O(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 JO(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=tP)):void 0===e&&(e=QO);for(var n,r,i,o,a,t=new rP(t),s=[t];n=s.pop();)if((i=e(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;0<=o;--o)s.push(r=i[o]=new rP(i[o])),r.parent=n,r.depth=n.depth+1;return t.eachBefore(nP)}function QO(t){return t.children}function tP(t){return Array.isArray(t)?t[1]:null}function eP(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function nP(t){for(var e=0;t.height=e,(t=t.parent)&&t.height<++e;);}function rP(t){this.data=t,this.depth=this.height=0,this.parent=null}function iP(t,e){return t.parent===e.parent?1:2}function oP(t){var e=t.children;return e?e[0]:t.t}function aP(t){var e=t.children;return e?e[e.length-1]:t.t}function sP(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}qO.props={category:"preprocessor"},rP.prototype=JO.prototype={constructor:rP,count:function(){return this.eachAfter($O)},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,o=this,a=[o],s=[],l=-1;o=a.pop();)if(s.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=s.pop();)t.call(e,o,++l,this);return this},eachBefore:function(t,e){for(var n,r,i,o=[this],a=-1;n=o.pop();)if(t.call(e,n,++a,this),r=n.children)for(i=r.length-1;0<=i;--i)o.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 JO(this).eachBefore(eP)},[Symbol.iterator]:function*(){var t,e,n,r,i,o=[this];do{for(e=o.reverse(),o=[];t=e.pop();)if(yield t,n=t.children)for(r=0,i=n.length;r<i;++r)o.push(n[r])}while(o.length)}},sP.prototype=Object.create(rP.prototype);a=f=>d=>gM(({data:t})=>{const{field:e="value",nodeSize:n,separation:r,sortBy:i,as:o=["x","y"]}=d,[a,s]=o,l=JO(t,t=>t.children).sum(t=>t[e]).sort(i),u=f(),c=(u.size([1,1]),n&&u.nodeSize(n),r&&u.separation(r),u(l),[]),h=(l.each(t=>{t[a]=t.x,t[s]=t.y,t.name=t.data.name,c.push(t)}),l.links());return h.forEach(t=>{t[a]=[t.source[a],t.target[a]],t[s]=[t.source[s],t.target[s]]}),{data:{nodes:c,edges:h}}});const lP=a(function(){var s=XO,l=1,u=1,c=!1;function e(e){var r,i=0,t=(e.eachAfter(function(t){var e,n=t.children;n?(t.x=(e=n).reduce(ZO,0)/e.length,t.y=1+n.reduce(KO,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),o=t.x-s(t,n)/2,a=n.x+s(n,t)/2;return e.eachAfter(c?function(t){t.x=(t.x-e.x)*l,t.y=(e.y-t.y)*u}:function(t){t.x=(t.x-o)/(a-o)*l,t.y=(1-(e.y?t.y/e.y:1))*u})}return e.separation=function(t){return arguments.length?(s=t,e):s},e.size=function(t){return arguments.length?(c=!1,l=+t[0],u=+t[1],e):c?null:[l,u]},e.nodeSize=function(t){return arguments.length?(c=!0,l=+t[0],u=+t[1],e):c?[l,u]:null},e}),uP=(lP.props={category:"preprocessor"},a(function(){var d=iP,l=1,u=1,c=null;function e(t){var e,n,r,i,o,a,s=function(t){for(var e,n,r,i,o,a=[t=new sP(t,0)];e=a.pop();)if(r=e._.children)for(e.children=new Array(o=r.length),i=o-1;0<=i;--i)a.push(n=e.children[i]=new sP(r[i],i)),n.parent=e;return(t.parent=new sP(null,0)).children=[t],t}(t);return s.eachAfter(h),s.parent.m=-s.z,s.eachBefore(f),c?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:d(e,n)/2,i=s-e.x,o=l/(n.x+s+i),a=u/(r.depth||1),t.eachBefore(function(t){t.x=(t.x+i)*o,t.y=t.depth*a})),t}function h(t){var e=t.children,n=t.parent.children,r=t.i?n[t.i-1]:null;if(e){for(var i,o=0,a=0,s=t.children,l=s.length;0<=--l;)(i=s[l]).z+=o,i.m+=o,o+=i.s+(a+=i.c);e=(e[0].z+e[e.length-1].z)/2;r?(t.z=r.z+d(t._,r._),t.m=t.z-e):t.z=e}else r&&(t.z=r.z+d(t._,r._));t.parent.A=function(t,e,n){if(e){for(var r,i=t,o=t,a=e,s=i.parent.children[0],l=i.m,u=o.m,c=a.m,h=s.m;a=aP(a),i=oP(i),a&&i;)s=oP(s),(o=aP(o)).a=t,0<(r=a.z+c-i.z-l+d(a._,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}(a,t,n),t,r),l+=r,u+=r),c+=a.m,l+=i.m,h+=s.m,u+=o.m;a&&!aP(o)&&(o.t=a,o.m+=c-u),i&&!oP(s)&&(s.t=i,s.m+=l-h,n=t)}return n}(t,r,t.parent.A||n[0])}function f(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function p(t){t.x*=l,t.y=t.depth*u}return e.separation=function(t){return arguments.length?(d=t,e):d},e.size=function(t){return arguments.length?(c=!1,l=+t[0],u=+t[1],e):c?null:[l,u]},e.nodeSize=function(t){return arguments.length?(c=!0,l=+t[0],u=+t[1],e):c?[l,u]:null},e})),cP=(uP.props={category:"preprocessor"},n=>gM(({data:t})=>{const e=n["callback"];return{data:e?e(t):t}}));function hP(){return{"transform.fetch":xT,"transform.sortBy":qT,"transform.filterBy":GT,"transform.pick":UT,"transform.rename":YT,"transform.subset":WT,"transform.fold":VT,"transform.wordCloud":zT,"transform.voronoi":TO,"transform.sankey":HO,"transform.arc":qO,"transform.cluster":lP,"transform.tree":uP,"transform.connector":cP,"transform.maybeZeroY1":xM,"transform.maybeZeroX":jM,"transform.maybeStackY":NM,"transform.maybeTitleX":LM,"transform.maybeTooltipY":DM,"transform.maybeTooltipPosition":RM,"transform.maybeArrayField":zM,"transform.maybeSeries":GM,"transform.stackY":AM,"transform.dodgeX":HM,"transform.jitter":qM,"transform.jitterY":XM,"transform.symmetryY":ZM,"transform.stackEnter":WM,"transform.normalizeY":UM,"transform.select":tT,"transform.selectX":eT,"transform.selectY":nT,"transform.groupX":uT,"transform.maybeSize":FM,"transform.maybeZeroY":BM,"transform.maybeKey":VM,"renderer.canvas":ag,"coordinate.cartesian":sg,"coordinate.polar":lg,"coordinate.transpose":ug,"coordinate.parallel":cg,"coordinate.fisheye":hg,"encode.constant":dg,"encode.field":pg,"encode.transform":fg,"encode.column":yg,"mark.interval":xg,"mark.line":Wg,"mark.point":Ug,"mark.text":Yg,"mark.grid":qg,"mark.area":Xg,"mark.link":Jg,"mark.node":$g,"mark.edge":Kg,"mark.image":Qg,"mark.polygon":Zg,"mark.schema":tv,"mark.vector":ev,"mark.annotation.text":nv,"mark.annotation.lineX":iv,"mark.annotation.lineY":rv,"mark.annotation.connector":ov,"mark.annotation.range":lv,"mark.annotation.rangeX":uv,"mark.annotation.rangeY":cv,"palette.category10":hv,"palette.category20":dv,"scale.linear":zm,"scale.ordinal":Vm,"scale.band":Fm,"scale.identity":Gm,"scale.point":Hm,"scale.time":Wm,"scale.log":Um,"scale.pow":Ym,"scale.threshold":qm,"scale.quantile":Xm,"scale.quantize":Zm,"shape.rect":db,"shape.hollowRect":fb,"shape.funnel":pb,"shape.pyramid":gb,"shape.line":mb,"shape.hv":xb,"shape.vh":wb,"shape.hvh":kb,"shape.smooth":bb,"shape.bowtie":Mb,"shape.cross":Tb,"shape.diamond":Ob,"shape.hexagon":Pb,"shape.hollowBowtie":Ab,"shape.hollowDiamond":Cb,"shape.hollowHexagon":Nb,"shape.hollowPoint":Lb,"shape.hollowSquare":Ib,"shape.hollowTriangle":Rb,"shape.hollowTriangleDown":Db,"shape.hyphen":jb,"shape.linePoint":Bb,"shape.plus":Fb,"shape.point":zb,"shape.square":Vb,"shape.tick":Gb,"shape.triangle":Hb,"shape.triangleDown":Wb,"shape.text":Yb,"shape.area":BE,"shape.smoothArea":FE,"shape.edge":YE,"shape.smoothEdge":qE,"shape.vhvEdge":XE,"shape.arc":ZE,"shape.link":zE,"shape.pointNode":WE,"shape.polygonNode":UE,"shape.image":VE,"shape.polygon":GE,"shape.ribbon":KE,"shape.box":HE,"shape.vector":Ub,"shape.label":r_,"shape.annotation.text":LE,"shape.annotation.badge":RE,"shape.annotation.line":$E,"shape.annotation.connector":n_,"shape.annotation.range":db,"theme.light":i_,"component.axisX":c_,"component.axisY":h_,"component.legendCategory":d_,"component.legendContinuous":f_,"component.title":v_,"animation.scaleInX":w_,"animation.scaleOutX":k_,"animation.scaleInY":E_,"animation.scaleOutY":__,"animation.fadeIn":S_,"animation.fadeOut":M_,"animation.morphing":A_,"interaction.elementActive":xS,"interaction.elementSelected":wS,"interaction.elementHighlight":_S,"interaction.elementHighlightByX":MS,"interaction.elementHighlightByColor":TS,"interaction.elementListHighlight":SS,"interaction.legendActive":OS,"interaction.legendHighlight":PS,"interaction.tooltip":kS,"interaction.fisheye":ES,"interaction.brush":CS,"interaction.brushHighlight":DS,"interaction.brushVisible":jS,"interaction.activeRegion":BS,"interaction.ellipsisText":FS,"composition.layer":zS,"composition.flex":VS,"composition.mark":HS,"composition.view":GS,"composition.rect":nM,"composition.matrix":aM,"composition.circle":dM,"composition.keyframe":fM,"adjust.pack":pM}}function dP(e,n){const r=t=>{if("string"!=typeof t)return t;t=e+"."+t;return n[t]||tb("Unknown Component: "+t)};return[t=>{var e=t["type"],t=I(t,["type"]);return r(e)(Object.assign({},t))},r]}function fP(t,e,n){for(;t<e;)t+=2*Math.PI;for(;n<t;)t-=2*Math.PI;return t}cP.props={category:"preprocessor"};function pP(t,e,n,r,i){var o=t[0],t=t[1],a=fi();return o=[o,t],(t=a)[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=o[0],t[7]=o[1],t[8]=1,t}function yP(t,e,n,r,i){var o=new mm({range:[e,e+r]}),a=new mm({range:[n,n+i]});return{transform:function(t){var e=t[0],t=t[1];return[o.map(e),a.map(t)]},untransform:function(t){var e=t[0],t=t[1];return[o.invert(e),a.invert(t)]}}}function gP(t,e,n,r,i){return(0,t[0])(e,n,r,i)}function vP(t,e,n,r,i){return t[0]}function mP(t,e,n,r,i){var o=t[0],a=t[1],s=t[2],t=t[3],l=new mm({range:[s,t]}),u=new mm({range:[o,a]}),c=1<(s=i/r)?1:s,h=1<s?1/s:1;return{transform:function(t){var e=t[0],t=t[1],e=u.map(e),t=l.map(t);return[.5*(t*Math.cos(e)*c)+.5,.5*(t*Math.sin(e)*h)+.5]},untransform:function(t){var e=t[0],t=t[1],e=2*(e-.5)/c,t=2*(t-.5)/h,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=fP(Math.atan2(t,e),o,a);return[u.invert(t),l.invert(n)]}}}function bP(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 xP(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return MP.apply(void 0,TP([[-1,-1]],e,!1))}function wP(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return MP.apply(void 0,TP([[-1,1]],e,!1))}function kP(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return MP.apply(void 0,TP([[1,-1]],e,!1))}function EP(t,e,n,r,i){var o,t=t[0],a=fi();return a=a,t=t,o=Math.sin(t),t=Math.cos(t),a[0]=t,a[1]=o,a[2]=0,a[3]=-o,a[4]=t,a[5]=0,a[6]=0,a[7]=0,a[8]=1,a}function _P(t,e,n,r,i){var o=t[0],a=t[1],s=t[2],l=(t[3]-s)/(+a/(2*Math.PI)+1),u=l/(2*Math.PI),c=new mm({range:[s,s+.99*l]}),h=new mm({range:[o,a]}),d=1<(t=i/r)?1:t,f=1<t?1/t:1;return{transform:function(t){var e=t[0],t=t[1],e=h.map(e),t=c.map(t);return[.5*(Math.cos(e)*(u*e+t)*d)+.5,.5*(Math.sin(e)*(u*e+t)*f)+.5]},untransform:function(t){var e=t[0],t=t[1],e=2*(e-.5)/d,t=2*(t-.5)/f,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=fP(Math.atan2(t,e)+Math.floor(n/l)*Math.PI*2,o,a),e=n-u*t;return[h.invert(t),c.invert(e)]}}}function SP(t,e,n,r,i){var s=t[0],l=t[1],o=t[2],t=t[3],u=new mm({range:[o,t]});return{transform:function(t){for(var e=[],n=t.length,r=new bm({domain:new Array(n).fill(0).map(function(t,e){return e}),range:[s,l]}),i=0;i<n;i++){var o=t[i],a=r.map(i),o=u.map(o);e.push(a,o)}return e},untransform:function(t){for(var e=[],n=0;n<t.length;n+=2){var r=t[n+1];e.push(u.invert(r))}return e}}}var MP=function(t,e,n,r,i){var o=t[0],t=t[1],a=fi();return o=[o,t],(t=a)[0]=o[0],t[1]=0,t[2]=0,t[3]=0,t[4]=o[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},TP=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;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 OP(t){return 1/Math.tan(t)}function PP(t,e,n,r,i){var o=OP(t[0]);return{transform:function(t){var e=t[0],t=t[1];return[e+t*o,t]},untransform:function(t){var e=t[0],t=t[1];return[e-t*o,t]}}}function AP(t,e,n,r,i){var o=OP(t[0]);return{transform:function(t){var e=t[0];return[e,t[1]+e*o]},untransform:function(t){var e=t[0];return[e,t[1]-e*o]}}}function CP(t,e,n,r,i){var o=t<e,i=(o?e-r:i-e)||i-r,r=o?-1:1;return r*i*(n+1)/(n+i/((t-e)*r))+e}function NP(t,e,n,r,i){var o=t<e,i=(o?e-r:i-e)||i-r;return i/(i*(n+1)/(t-e)-n*(o?-1:1))+e}function LP(t,n,e,r,i){var o=t[0],a=t[1];return{transform:function(t){var e=t[0],t=t[1];return[CP(e,o,a,n,n+r),t]},untransform:function(t){var e=t[0],t=t[1];return[NP(e,o,a,n,n+r),t]}}}function IP(t,e,n,r,i){var o=t[0],a=t[1];return{transform:function(t){return[t[0],CP(t[1],o,a,n,n+i)]},untransform:function(t){return[t[0],NP(t[1],o,a,n,n+i)]}}}function RP(t,n,r,i,o){var a=t[0],s=t[1],l=t[2],u=t[3];return{transform:function(t){var e=t[0],t=t[1];return[CP(e,a,l,n,n+i),CP(t,s,u,r,r+o)]},untransform:function(t){var e=t[0],t=t[1];return[NP(e,a,l,n,n+i),NP(t,s,u,r,r+o)]}}}function DP(t,e,n,r,i){var o=t[0],a=t[1],s=t[2],l=t[3];return{transform:function(t){var e=t[0],t=t[1],n=e-o,r=t-a,i=Math.sqrt(n*n+r*r);if(s<i)return[e,t];e=CP(i,0,l,0,s),t=Math.atan2(r,n);return[o+e*Math.cos(t),a+e*Math.sin(t)]},untransform:function(t){var e=t[0],t=t[1],n=e-o,r=t-a,i=Math.sqrt(n*n+r*r);if(s<i)return[e,t];e=NP(i,0,l,0,s),t=Math.atan2(r,n);return[o+e*Math.cos(t),a+e*Math.sin(t)]}}}var jP=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;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))},BP=(FP.prototype.update=function(t){this.options=C({},this.options,t),this.recoordinate()},FP.prototype.clone=function(){return new FP(this.options)},FP.prototype.getOptions=function(){return this.options},FP.prototype.clear=function(){this.update({transformations:[]})},FP.prototype.getSize=function(){var t=this.options;return[t.width,t.height]},FP.prototype.getCenter=function(){var t=this.options,e=t.x,n=t.y;return[(2*e+t.width)/2,(2*n+t.height)/2]},FP.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:jP(jP([],n,!0),[jP([],t,!0)],!1)}),this},FP.prototype.map=function(t){return this.output(t)},FP.prototype.invert=function(t){return this.input(t)},FP.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},FP.prototype.compose=function(t){for(var e=(t=void 0===t?!1:t)?jP([],this.options.transformations,!0).reverse():this.options.transformations,n=t?function(t){return t.untransform}:function(t){return t.transform},r=[],o=[],i=function(t,e){return o.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},a=0,s=e;a<s.length;a++){var l,u,c,h,d=s[a],f=d[0],d=d.slice(1),p=this.transformers[f];p&&(l=(h=this.options).x,u=h.y,c=h.width,h=h.height,p=p(jP([],d,!0),l,u,c,h),(d=p)instanceof Float32Array||d instanceof Array?r.push(p):(r.length&&(i(this.createMatrixTransform(r,t)),r.splice(0,r.length)),i(n(p)||Tp,"parallel"!==f)))}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):Tp}.apply(void 0,o)},FP.prototype.createMatrixTransform=function(t,e){var n,r,i,o,a,s,l,u,c,h,d,f,p=fi();return e&&t.reverse(),t.forEach(function(t){return pi(p,p,t)}),e&&(e=t=p,(f=new di(9))[0]=e[0],f[1]=e[1],f[2]=e[2],f[3]=e[3],f[4]=e[4],f[5]=e[5],f[6]=e[6],f[7]=e[7],f[8]=e[8],f=(e=f)[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],l=e[7],u=(e=e[8])*o-a*l,(d=f*u+n*(c=-e*i+a*s)+r*(h=l*i-o*s))&&(t[0]=u*(d=1/d),t[1]=(-e*n+r*l)*d,t[2]=(a*n-r*o)*d,t[3]=c*d,t[4]=(e*f-r*s)*d,t[5]=(-a*f+r*i)*d,t[6]=h*d,t[7]=(-l*f+n*s)*d,t[8]=(o*f-n*i)*d)),function(t){t=[t[0],t[1],1];return Ki(t,t,p),[t[0],t[1]]}},FP);function FP(t){this.options={x:0,y:0,width:300,height:150,transformations:[]},this.transformers={cartesian:yP,translate:pP,custom:gP,matrix:vP,polar:mP,transpose:bP,scale:MP,"shear.x":PP,"shear.y":AP,reflect:xP,"reflect.x":wP,"reflect.y":kP,rotate:EP,helix:_P,parallel:SP,fisheye:RP,"fisheye.x":LP,"fisheye.y":IP,"fisheye.circular":DP},this.update(t)}function zP(t){return void 0!==t.find(t=>"polar"===t.type)}function VP(t){return t.filter(({type:t})=>"transpose"===t).length%2==1}function GP(t,e,n,r,i,o,a){var s=t["scaleName"],t=function(t,e,n,r,i,o){var{name:a,field:s}=t,{field:s=s,guide:l={}}=e,u=function(t,e){var{scale:t,name:n,value:r,type:i}=t,{type:e,domain:o,range:a}=e;return void 0!==t?t:void 0!==e?e:"constant"===i&&!KP(n)||function(t){return t.some(t=>"object"==typeof t&&!(t instanceof Date)&&null!==t)}(r)?"identity":2<(o||a||[]).length?YP(n):void 0===o?XP(r)?YP(n):ZP(r)?"time":"linear":XP(o)?YP(n):ZP(r)?"time":"linear"}(t,e);return"string"!=typeof u?e:Object.assign(Object.assign(Object.assign({},e),function(t,e,n,r){var i=e["name"];switch(t){case"linear":case"time":case"log":case"pow":return function(t){var{interpolate:e=am,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)return r;var t=function(t,e,n){return"enterDelay"===e||"enterDuration"===e?0:"band"===t?zP(n)?0:.1:"point"===t&&zP(n)?.5:0}(t,e,n),{paddingInner:e=t,paddingOuter:n=t}=r;return Object.assign(Object.assign({},r),{paddingInner:e,paddingOuter:n})}(t,i,r,n);default:return n}}(u,t,e,n)),{domain:function(t,e,n){var r=e["value"],e=n["domain"];if(void 0!==e)return e;switch(t){case"linear":case"time":case"log":case"pow":case"threshold":return function(t,e){var{zero:e=!1}=e;if(0===t.length)return[];let n=1/0,r=-1/0;for(const i of t)nb(i)&&(n=Math.min(n,+i),r=Math.max(r,+i));return e?[Math.min(0,n),r]:[n,r]}(r,n);case"band":case"ordinal":case"point":return qP(r);case"quantile":return function(t){return qP(t).sort()}(r);default:return[]}}(u,t,e),range:function(t,e,n,r,i,o){var a=n["range"];if(void 0!==a)return a;const[s]=dP("palette",o),{name:l,value:u}=e,{defaultCategory10:c,defaultCategory20:h}=i,d={type:function(t){return Array.from(new Set(t))}(u).length<=10?c:h},{palette:f=d}=n,p=s(f);switch(t){case"linear":case"band":case"point":case"time":case"log":return 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)]:"size"===t?[1,10]:[0,1]}(l,p);case"ordinal":return"color"===l?p:r;default:return[]}}(u,t,e,r,i,o),guide:l,name:a,field:s,type:u})}(t,e,n,r,i,a),e=t["independent"];if(e)return t;if(!o.has(s))return o.set(s,t),t;var n=o.get(s),r=s,i=n,a=t,{type:e,domain:o,range:s}=i,{type:a,domain:t,range:l}=a;return"string"==typeof e&&"string"==typeof a&&(i.type=function(t,e,n){{if($P(t,e,"linear","identity"))return"identity";if($P(t,e,"band","point"))return"band";if(t!==e)throw new Error(`Incompatible scale type: ${t} !== ${e} for channel: `+n);return t}}(e,a,r),i.domain=function(t,e,n){switch(t){case"linear":case"pow":case"log":return JP(e,n);case"band":case"ordinal":return QP(e,n);default:return e}}(e,o,t),i.range=function(t,e,n){switch(t){case"linear":case"band":case"pow":case"log":return JP(e,n);case"ordinal":return QP(e,n);default:return e}}(e,s,l)),n}function HP(t,e){const n=t.map(t=>t[e]).filter(({facet:t=!0})=>t);var t=n.flatMap(t=>t.domain),r=n.every(WP)?Eg(t):n.every(UP)?Array.from(new Set(t)):null;if(null!==r)for(const i of n)i.domain=r}function WP(t){t=t.type;if("string"!=typeof t)return!1;return["linear","log","pow","time"].includes(t)}function UP(t){t=t.type;if("string"!=typeof t)return!1;return["band","point","ordinal"].includes(t)}function YP(t){return(t=t).startsWith("x")||t.startsWith("y")||t.startsWith("position")||t.startsWith("size")?"point":"ordinal"}function qP(t){return Array.from(new Set(t))}function XP(t){return t.some(t=>{t=typeof t;return"string"==t||"boolean"==t})}function ZP(t){return t.some(t=>t instanceof Date)}function KP(t){return t.startsWith("x")||t.startsWith("y")||t.startsWith("position")}function $P(t,e,n,r){return t===n&&e===r||t===r&&e===n}function JP(t,e){var[t,n]=t,[e,r]=e;return[Math.min(+t,+e),Math.max(+n,+r)]}function QP(t,e){return Array.from(new Set([...t,...e]))}function tA(y,g,v,m,b,x){return F(this,void 0,void 0,function*(){const{data:c,encode:t,I:e,columnOf:h,scale:n={}}=yield function(d,f,p){return F(this,void 0,void 0,function*(){const[t,e]=dP("transform",p);d.encode=function(t){const e={};for(var[n,r]of Object.entries(t))if(Array.isArray(r))for(let t=0;t<r.length;t++){var i=""+n+(0===t?"":t);e[i]=r[t]}else e[n]=r;return e}(d.encode);var n=eA(d,p),{transform:r=[]}=d,{preInference:i=[],postInference:o=[]}=f;const a=[],s=[];for(const h of r){var l=h["type"],{category:l="preprocessor"}=e(l).props||{};("preprocessor"===l?a:s).push(h)}var r=yield Q1(a.map(t))(n),u=r["data"],u=u?WS(u):[];const c=[...i,...s,...o];return Q1(c.map(t))(Object.assign(Object.assign(Object.assign({},n),r),{I:u}))})}(y,g,x);if(!1===Array.isArray(c))return null;const r=g["channels"],i=Tg(Object.entries(t).filter(([,t])=>nb(t)),([t])=>{return/([^\d]+)\d*$/.exec(t)[1]}),o=r.filter(t=>{var{name:t,required:e}=t;if(i.has(t))return!0;if(e)throw new Error(`Missing encoding for channel: ${t}.`);return!1}).flatMap(u=>{var t=u["name"];const e=i.get(t);return e.map(t=>{var e=u,n=c,r=h,{independent:i=!1,name:o,scaleName:a}=e,e=I(e,["independent","name","scaleName"]),[t,s]=t,l=(s=nA(n,s)).type;return Object.assign(Object.assign({},e),{type:l,name:t,scaleName:null!=a?a:i?t:o,value:r(n,s),field:rA(s)})})}),a={};var{coordinate:s=[]}=b;const l=Tg(o,t=>t.scaleName);for(const[p,o]of l.entries()){var u=g["shapes"],d=function(t){const e={};for(const a of t){var{value:n=[],field:r}=e,{value:i=[],field:o}=a;Object.assign(e,a),e.value=[...n,...i],e.field=null==o?r:o}return e}(o),{[p]:f={}}=n;a[p]=GP(d,f,s,u,m,v,x)}return[Object.assign(Object.assign({},y),{encode:t,scale:a,data:c}),Object.assign(Object.assign({},g),{channels:o,index:e})]})}function eA(t,e){var{data:t,encode:n={},transform:r=[],scale:i={}}=t;return{data:t,encode:n,columnOf:function(t){const[r]=dP("encode",t);return(t,e)=>{if(void 0===e)return null;if(void 0===t)return null;e=nA(t,e);const n=r(e)(t);t=rA(e);return n.field=t,n}}(e),transform:r,I:Array.isArray(t)?WS(t):[],scale:i}}function nA(t,e){return"object"!=typeof e||e instanceof Date?(t=t,{type:"function"==typeof(n=e)?"transform":"string"==typeof n&&void 0!==(null==(t=null==t?void 0:t[0])?void 0:t[n])?"field":"constant",value:e}):e;var n}function rA(t){var{type:t,value:e}=t;return"field"===t&&"string"==typeof e?e:e&&e.field?e.field:null}function iA(t,n,e){var{component:r=[],coordinate:i=[],title:o,theme:a}=n;const[,s]=dP("component",e);var l,e=t.filter(({guide:t,name:e})=>null!==t&&(!function(t){const{marks:e=[]}=t;return e.some(t=>"object"==typeof t.adjust)}(n)||!KP(e)));const u=[...r];o&&(t=s("title")["props"],{defaultPosition:r,defaultOrder:t,defaultSize:l}=t,a=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)}(C({size:l},a,l="string"==typeof o?{text:o}:o)),u.push(Object.assign({type:"title",position:r,order:t,size:a},l)));for(const g of e){var c,h,d,f,p,y=function(t,e){const{name:n,guide:r,type:i}=t,o=r["type"];if(void 0!==o)return o;if("color"===n)switch(i){case"ordinal":return"legendCategory";case"linear":return"legendContinuous";default:return null}return VP(e)&&zP(e)?null:n.startsWith("x")?VP(e)?"axisY":"axisX":n.startsWith("y")?VP(e)?"axisX":"axisY":n.startsWith("position")&&!zP(e)?"axisY":null}(g,i);null!==y&&(f=s(y)["props"],{defaultPosition:f,defaultSize:p,defaultOrder:c}=f,{guide:h,name:d}=g,{position:d=function(t,e,n,r,i){r=["left","right","top","bottom","centerHorizontal"].includes(r.position)?r.position:n;{if("axisY"===e&&function(t){return void 0!==t.find(t=>"parallel"===t.type)}(i))return null===(n=/position(\d*)/g.exec(t))||0==+n[1]?r:"centerHorizontal";if("axisX"===e&&zP(i)&&!VP(i)||"axisY"===e&&zP(i)&&VP(i))return"arc";if(zP(i)&&("axisX"===e||"axisY"===e))return"arcY"}return r}(d,y,f,h,i),size:f=p,order:p=c}=h,u.push(Object.assign(Object.assign({},h),{position:d,order:p,size:f,type:y,scale:g})))}return u}function oA(t,e,n,r){const[i]=dP("scale",r),[o]=dP("component",r);var{scale:r,bbox:a}=t,t=I(t,["scale","bbox"]),s=r?i(r):null,{field:r,domain:l}=r||{},r={field:r,domain:l,bbox:a};const u=o(t);return u(s,r,e,n)}function aA(t,e){var t=function(t,e){const n=Tg(t,t=>t.position),{paddingLeft:r,paddingRight:i,paddingBottom:o,paddingTop:a}=e,s={paddingBottom:o,paddingLeft:r,paddingTop:a,paddingRight:i};for(const c of["left","right","top","bottom"]){var l="padding"+function(t){return t.replace(/( |^)[a-z]/g,t=>t.toUpperCase())}(c);if(void 0===s[l])if(n.has(c)){const t=n.get(c);var u=t.reduce((t,{size:e})=>t+e,0);s[l]=u}else s[l]=30}return s}(t,e),{paddingLeft:n,paddingRight:r,paddingTop:i,paddingBottom:o}=t,{width:e,height:a,x:s=0,y:l=0}=e;return Object.assign(Object.assign({},t),{width:e,height:a,innerWidth:e-n-r,innerHeight:a-i-o,x:s,y:l})}function sA(t,e,n){const r=Tg(t,t=>t.position);var{paddingLeft:t,paddingRight:i,paddingTop:o,paddingBottom:a,innerHeight:s,innerWidth:l,height:u,width:c}=n,h={top:[t,0,l,o,0,!0,wg],right:[c-i,o,i,s,1,!1,wg],bottom:[t,u-a,l,a,0,!1,wg],left:[0,o,t,s,1,!0,wg],centerHorizontal:[t,o,l,s,-1,null,null],arc:[t,o,c-t-i,u-o-a,-1,null,null],arcY:[t,o,c-t-i,u-o-a,-1,null,null]};for(const[b,t]of r.entries()){var d=h[b];if("centerHorizontal"===b)!function(e,t,n,r){const[,i,,o]=r,a=t["paddingLeft"],s=new Array(e.length+1).fill(0),l=n.map(s),u=l.filter((t,e)=>e%2==0).map(t=>t+a);for(let t=0;t<e.length;t++){const d=e[t];var c=u[t],h=u[t+1]-c;d.bbox={x:c,y:i,width:h,height:o}}}(t,n,e,d);else if("arc"===b||"arcY"===b){m=v=g=y=p=f=void 0;var f=t,p=d,[y,g,v,m]=p;for(let t=0;t<f.length;t++){const x=f[t];x.bbox={x:y,y:g,width:v,height:m}}}else!function(n,t){const[e,r,i,o,a,s,l]=t,[u,c,h,d,f,p,y,g]=0===a?["y",r,"x",e,"height",o,"width",i]:["x",e,"y",r,"width",i,"height",o],v=(n.sort((t,e)=>l(t.order,e.order)),s?c+p:c);for(let t=0,e=v;t<n.length;t++){const b=n[t];var m=b["size"];b.bbox={[u]:s?e-m:e,[h]:d,[f]:m,[y]:g},e+=m*(s?-1:1)}}(t,d)}}function lA(C,N,L){return F(this,void 0,void 0,function*(){const[r]=dP("composition",L),[t]=dP("interaction",L),e=new Set(Object.keys(L).filter(t=>t.startsWith("mark")).map(t=>t.split(".").pop())),i=t=>{t=t.type;return"string"==typeof t&&e.has(t)?"mark":t};const o=t=>"standardView"===i(t);var n=t=>{if(o(t))return[t];var e=i(t);const n=r({type:e});return n(t)};const a=[],s=new Map,l=new Map,u=[C],c=[];for(;u.length;){var h=u.shift();if(o(h)){var d=l.get(h);const[E,_]=d?dA(d,h,L):yield cA(h,L),S=(s.set(E,h),a.push(E),_.flatMap(n));if(u.push(...S),S.every(o)){var f=yield Promise.all(S.map(t=>hA(t,L)));HP(d=(d=f).flatMap(t=>Array.from(t.keys())).map(t=>t.scale),"x"),HP(d,"y");for(let t=0;t<S.length;t++){var p=S[t],y=f[t];l.set(p,y)}}}else{d="mark"===i(h)?h:yield function(o,a){return F(this,void 0,void 0,function*(){var[t]=dP("transform",a);const{transform:e=[]}=o,n=I(o,["transform","data"]);var r=eA(o,a),{data:t,encode:r,scale:i}=yield Q1(e.map(t))(r);return Object.assign(Object.assign({},n),{data:t,encode:r,scale:i})})}(h,L);const M=n(d);Array.isArray(M)?u.push(...M):"function"==typeof M&&c.push(M())}}const g=new Map,v=[];N.selectAll(".view").data(a,t=>t.key).join(t=>t.append("g").attr("className","view").attr("id",t=>t.key).call(uA).each(function(t){fA(t,ib(this),v,L),g.set(t,this)}),t=>t.call(uA).each(function(t){fA(t,ib(this),v,L)}),t=>t.remove()),N.selectAll(".view").each(function(t){{var e=t,n=ib(this),r=(v,L),i,o;const s=e["markState"];for([i,o]of s.entries()){var a=i["key"];const l=n.select("#"+a),u=function(t,e,n,r){return pA("labelShape",t,e,n,r)}(i,o,e,r);l.selectAll(".element").each(function(t,e){if(void 0!==(null==t?void 0:t.label)){const n=u(t,e,this);t=this.getElementById(".label");t?eb(t,n):(n.id="label",this.appendChild(n))}})}}});var m=Array.from(g.entries()).map(([t,e])=>({view:t,container:e,options:s.get(t),update:function(i,o){return r=>F(this,void 0,void 0,function*(){var[t,e]=yield cA(r,o);fA(t,i,[],o);for(const n of e)lA(n,i,o)})}(ib(e),L)}));for(const T of m){const C=T["options"];var b=C["interaction"];for(const O of function(t=[]){const n=[...t];return["tooltip","ellipsisText"].forEach(e=>{t.find(t=>t.type===e)||n.push({type:e})}),n}(b)){const P=t(O);P(T,m)}}const{width:x,height:w}=C;for(const A of c){var k=new Promise(e=>F(this,void 0,void 0,function*(){for(const t of A)yield lA(Object.assign({width:x,height:w},t),N,L);e()}));v.push(k)}return Promise.all(v)})}function uA(t){t.style("transform",t=>`translate(${t.layout.x}, ${t.layout.y})`)}function cA(t,e){return F(this,void 0,void 0,function*(){return dA(yield hA(t,e),t,e)})}function hA(c,h){return F(this,void 0,void 0,function*(){const[t]=dP("theme",h),[,e]=dP("mark",h);var{theme:n,marks:r}=c,i=t(vA(n));const o=new Map;var a=new Map;for(const u of r){var s,{type:l=tb("G2Mark type is required.")}=u,l=e(l)["props"],l=yield tA(u,l,a,i,c,h);l&&([l,s]=l,o.set(l,s))}return o})}function dA(t,e,n){const[r]=dP("mark",n);var[i]=dP("scale",n);const[o]=dP("adjust",n),[a]=dP("theme",n);var{key:s,frame:l,theme:u}=e,u=a(vA(u));const c=Array.from(t.keys());var h,d,f=new Set(c.flatMap(t=>Object.values(t.scale))),f=iA(Array.from(f),e,n),p=aA(f,e),y=function(t,e,n){var[n]=dP("coordinate",n),{innerHeight:t,innerWidth:r}=t,{coordinate:e=[]}=e;const i=(e=e).find(t=>"cartesian"===t.type)?e:[...e,{type:"cartesian"}];return new BP({x:0,y:0,width:r,height:t,transformations:i.map(n).flat()})}(p,e,n),g=(sA(f,y,p),{});const v=[];for([h,d]of t.entries()){const{scale:k,children:E,dataDomain:_,adjust:S}=h;var{index:m,channels:b}=d,x=function(r,i){return Object.entries(r).reduce((t,[e,n])=>(t[e]=i(n,e,r),t),{})}(k,i);Object.assign(g,x);const M=function(t,e){const n={};for(var{scaleName:r,value:i,name:o}of t){const a=e[r];n[o]=i.map(t=>a.map(t))}return n}(b,x),T=r(h),[O,P,A]=T(m,x,M,y),C=[],N=[];for(let t=0;t<O.length;t++){var w=O[t];const I=P[t];I.every(([t,e])=>nb(t)&&nb(e))&&(C.push(w),N.push(I))}b=_||C.length;const L=S?o(S)(P,b,p):[];m=C.map((t,e)=>{const n={points:N[e],transform:L[e]};for(const[r,i]of Object.entries(M))n[r]=i[t],A&&(n["series"+gp(r)]=A[e].map(t=>i[t]));return n}),b=(d.data=m,d.index=C,null===E||void 0===E?void 0:E(m,x,p));v.push(...b||[])}return[{layout:p,theme:u,coordinate:y,components:f,markState:t,key:s,frame:l,scale:g},v]}function fA(v,m,b,x){F(this,void 0,void 0,function*(){const{components:t,theme:n,layout:e,markState:r,coordinate:i,key:o,frame:a=!1}=v;m.selectAll(".component").data(t,(t,e)=>t.type+"-"+e).join(t=>t.append("g").style("zIndex",({zIndex:t})=>t||-1).attr("className","component").append(t=>oA(t,i,n,x)),t=>t.each(function(t){t=oA(t,i,n,x).attributes;const[e]=this.childNodes;e.update(Object.assign({},t))})),m.selectAll(".plot").data([e],()=>o).join(t=>t.append("rect").attr("className","plot").style("fill","transparent").call(bA,a).call(mA).call(xA,Array.from(r.keys())),t=>t.call(mA).call(xA,Array.from(r.keys())));for(var[s,l]of r.entries()){var u=l["data"];const{key:o,class:d}=s,f=(c=s,h=l,pA("shape",c,h,v,x)),p=(c=s,h=l,yA("enter",c,h,v,x)),y=(c=s,h=l,yA("update",c,h,v,x)),g=(c=s,h=l,yA("exit",c,h,v,x));s=function(t,e,n){const r=t.node().parentElement;return r.findAll(t=>t.style.facet===e).flatMap(t=>t.getElementsByClassName(n))}(m,d,"element"),l=m.select("#"+o).selectAll(".element").selectFacetAll(s).data(u,t=>t.key,t=>t.groupKey).join(t=>t.append(f).attr("className","element").transition(function(t){return p(t,[this])}),e=>e.call(t=>{const l=t.parent(),u=function(n){const r=new Map;return t=>{if(r.has(t))return r.get(t);var e=n(t);return 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=u,n.__facet__&&(o=n.parentNode.parentNode,s=r.parentNode,[o,a]=i(o),[i,s]=i(s),o=`translate(${o-i}, ${a-s})`,i=n.style.transform,n.style.transform=(("none"===i?"":i)+" "+o).trimStart(),r.append(n));var n,r,i,o,a=f(t,e),s=y(t,[this],[a]);return null===s&&eb(this,a),s})}),t=>t.transition(function(t){return g(t,[this])}).remove(),t=>t.append(f).attr("className","element").transition(function(t){var e=this["__fromElements__"],t=y(t,e,[this]);const n=new ob(e,null,this.parentNode);return n.transition(t).remove(),t}),t=>t.transition(function(t){const e=new ob([],this.__toData__,this.parentNode);var n=e.append(f).attr("className","element").nodes();return y(t,[this],n)}).remove()).transitions();b.push(...l)}var c,h})}function pA(a,t,e,n,r){const[s]=dP("shape",r);r="default"+gp(a);const{[r]:l,data:i}=e,u=i.map(t=>t.points),{theme:c,coordinate:h}=n,d=t["style"];return(t,e,n)=>{var r=t[a],i=t["points"],t=I(t,["symbol"==typeof a?a:a+"","points"]),t=Object.assign(Object.assign({},t),{index:e,element:n}),n="object"==typeof(e=r||l)?e:{type:e};const o=s(Object.assign(Object.assign({},n),d));return o(i,t,h,c,u)}}function yA(l,t,e,n,r){const[,i]=dP("shape",r),[u]=dP("animation",r);r=e.defaultShape;const{theme:o,coordinate:c}=n;e=`default${gp(l)}Animation`;const{[e]:h}=i(r).props,{[l]:d={}}=t.animate||{},{[l]:f={}}=o;return(t,e,n)=>{var{[l+"Type"]:t,[l+"Delay"]:r,[l+"Duration"]:i,[l+"Easing"]:o}=t,t=Object.assign({type:t||h},d);if(!t.type)return null;const a=u(t),s=a(e,n,{delay:r,duration:i,easing:o},c,f);return Array.isArray(s)?Promise.all(s.map(gA)):gA(s)}}function gA(t){return t.finished.then(()=>{t.cancel()})}function vA(t={type:"light"}){var{type:e="light"}=t;return Object.assign(Object.assign({},t),{type:e})}function mA(t){t.style("x",t=>t.paddingLeft).style("y",t=>t.paddingTop).style("width",t=>t.innerWidth).style("height",t=>t.innerHeight)}function bA(t,e){e&&t.style("lineWidth",1).style("stroke","black")}function xA(t,e){const n=t=>void 0!==t.class?""+t.class:"";t.each(function(){ib(this).selectAll(".main").data(e,t=>t.key).join(t=>t.append("g").attr("className","main").attr("id",t=>t.key).style("facet",n).style("fill","transparent"),t=>t.style("facet",n),t=>t.remove())})}function wA(t,e={},n){const{width:r=640,height:i=480}=t,o=function(t){t=C({},t);const e=new Map([[t,null]]),n=new Map([[null,-1]]),r=[t];for(;r.length;){const l=r.shift();void 0===l.key&&(o=e.get(l),i=n.get(l),o=null===o?"0":o.key+"-"+i,l.key=o);var i,o,{children:a=[]}=l;if(Array.isArray(a))for(let t=0;t<a.length;t++){var s=a[t];e.set(s,l),n.set(s,t),r.push(s)}}return t}(t),{canvas:a=ag({width:r,height:i,container:document.createElement("div")}),library:s=hP()}=e,l=(e.canvas=a,e.library=s,ib(a.document.documentElement));return a.addEventListener(pf.READY,()=>F(this,void 0,void 0,function*(){yield lA(Object.assign(Object.assign({},o),{width:r,height:i}),l,s),null!=n&&n()})),"string"==typeof(t=a.getConfig().container)?document.getElementById(t):t}class kA{constructor(t={},e){this.parentNode=null,this.children=[],this.index=0,this.type=e,this.value=t}map(t=t=>t){t=t(xp(this.value));return this.value=t,this}attr(e,n){return void 0===n?this.value[e]:this.map(t=>(t[e]=n,t))}append(t){const e=new t({});return e.children=[],e.parentNode=this,e.index=this.children.length,this.children.push(e),e}call(t,...e){return t(this.map(),...e),this}}function EA(r){return t=>{for(const n of r){var e=n["type"];"value"===e?function(t,{name:e}){t.prototype[e]=function(t){return this.attr(e,t)}}(t,n):"array"===e?function(t,{name:r}){t.prototype[r]=function(t){if(Array.isArray(t)||void 0===t)return this.attr(r,t);var e=this.attr(r);const n=[...Array.isArray(e)?e:[]];return n.push(t),this.attr(r,n)}}(t,n):"object"===e?function(t,{name:r}){t.prototype[r]=function(t,e){if(Kf(t)||void 0===t)return this.attr(r,t);const n=xp(this.attr(r)||{});return n[t]=e,this.attr(r,n)}}(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)}return t}}function _A(t){return Object.entries(t).map(([t,e])=>({type:"node",name:t,ctor:e}))}l=[{name:"encode",type:"object"},{name:"scale",type:"object"},{name:"data",type:"value"},{name:"key",type:"value"},{name:"class",type:"value"},{name:"transform",type:"array"},{name:"style",type:"object"},{name:"animate",type:"object"},{name:"frame",type:"value"},{name:"facet",type:"value"},{name:"adjust",type:"value"},{name:"coordinate",type:"array"},{name:"interaction",type:"array"},{name:"paddingLeft",type:"value"},{name:"paddingRight",type:"value"},{name:"paddingBottom",type:"value"},{name:"paddingTop",type:"value"}];let SA=class extends kA{constructor(){super({},"interval")}},MA=(SA=t([EA(l)],SA),class extends kA{constructor(){super({},"point")}}),TA=(MA=t([EA(l)],MA),class extends kA{constructor(){super({},"area")}}),OA=(TA=t([EA(l)],TA),class extends kA{constructor(){super({},"line")}}),PA=(OA=t([EA(l)],OA),class extends kA{constructor(){super({},"grid")}}),AA=(PA=t([EA(l)],PA),class extends kA{constructor(){super({},"vector")}}),CA=(AA=t([EA(l)],AA),class extends kA{constructor(){super({},"link")}}),NA=(CA=t([EA(l)],CA),class extends kA{constructor(){super({},"polygon")}});NA=t([EA(l)],NA);r=t([EA(l)],class extends kA{constructor(){super({},"image")}});let LA=class extends kA{constructor(){super({},"text")}},IA=(LA=t([EA(l)],LA),class extends kA{constructor(){super({},"schema")}}),RA=(IA=t([EA(l)],IA),class extends kA{constructor(){super({},"annotation.text")}}),DA=(RA=t([EA(l)],RA),class extends kA{constructor(){super({},"annotation.lineX")}}),jA=(DA=t([EA(l)],DA),class extends kA{constructor(){super({},"annotation.lineY")}}),BA=(jA=t([EA(l)],jA),class extends kA{constructor(){super({},"annotation.range")}}),FA=(BA=t([EA(l)],BA),class extends kA{constructor(){super({},"annotation.rangeX")}}),zA=(FA=t([EA(l)],FA),class extends kA{constructor(){super({},"annotation.rangeY")}}),VA=(zA=t([EA(l)],zA),class extends kA{constructor(){super({},"annotation.connector")}});VA=t([EA(l)],VA);J={interval:SA,point:MA,area:TA,line:OA,grid:PA,vector:AA,link:CA,polygon:NA,image:r,text:LA,schema:IA,annotationText:RA,annotationLineX:DA,annotationLineY:jA,annotationRange:BA,annotationRangeX:FA,annotationRangeY:zA,annotationConnector:VA};let GA=class extends kA{constructor(){super({},"view")}},HA=(GA=t([EA([{type:"value",name:"paddingLeft"},{type:"value",name:"paddingRight"},{type:"value",name:"paddingBottom"},{type:"value",name:"paddingTop"},{type:"value",name:"data"},{type:"value",name:"key"},{type:"array",name:"coordinate"},{type:"array",name:"interaction"},{type:"object",name:"theme"},..._A(J)])],GA),class extends kA{constructor(){super({},"layer")}}),WA=(HA=t([EA([{type:"value",name:"data"},{type:"value",name:"key"},..._A(J)])],HA),class extends kA{constructor(){super({},"flex")}}),UA=(WA=t([EA([{type:"value",name:"data"},{type:"value",name:"key"},{type:"value",name:"padding"},{type:"value",name:"ratio"},{type:"value",name:"direction"},..._A(J)])],WA),class extends kA{constructor(){super({},"rect")}}),YA=(UA=t([EA([{type:"value",name:"data"},{type:"value",name:"key"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"value",name:"paddingLeft"},{type:"value",name:"paddingRight"},{type:"value",name:"paddingBottom"},{type:"value",name:"paddingTop"},{type:"value",name:"shareData"},{type:"value",name:"shareSize"},..._A(J)])],UA),class extends kA{constructor(){super({},"circle")}}),qA=(YA=t([EA([{type:"value",name:"data"},{type:"value",name:"key"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"value",name:"paddingLeft"},{type:"value",name:"paddingRight"},{type:"value",name:"paddingBottom"},{type:"value",name:"paddingTop"},..._A(J)])],YA),class extends kA{constructor(){super({},"matrix")}}),XA=(qA=t([EA([{type:"value",name:"data"},{type:"value",name:"key"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"value",name:"paddingLeft"},{type:"value",name:"paddingRight"},{type:"value",name:"paddingBottom"},{type:"value",name:"paddingTop"},..._A(J)])],qA),class extends kA{constructor(){super({},"keyframe")}});XA=t([EA([{type:"value",name:"key"},{type:"value",name:"direction"},{type:"value",name:"easing"},{type:"value",name:"iterationCount"},{type:"value",name:"duration"},..._A(J)])],XA);var ZA={view:GA,layer:HA,flex:WA,rect:UA,circle:YA,matrix:qA,keyframe:XA};for(const JA of Object.values(ZA))EA(_A(ZA))(JA);function KA(t){var e=xp(t.value);return Object.assign(Object.assign({},e),{type:t.type})}function $A(t){t=function(t){if(null!==t.type)return t;const e=t.children[t.children.length-1];return e.attr("width",t.attr("width")),e.attr("height",t.attr("height")),e.attr("paddingLeft",t.attr("paddingLeft")),e.attr("paddingTop",t.attr("paddingTop")),e.attr("paddingBottom",t.attr("paddingBottom")),e.attr("paddingRight",t.attr("paddingRight")),e}(t);const e=[t],n=new Map;for(n.set(t,KA(t));e.length;){const t=e.pop(),i=n.get(t);for(const o of t.children){var r=KA(o);const{children:a=[]}=i;a.push(r),e.push(o),n.set(o,r),i.children=a}}return n.get(t)}ge=[{name:"data",type:"value"},{name:"coordinate",type:"array"},{name:"interaction",type:"array"},{name:"theme",type:"object"},{name:"title",type:"object"},{name:"key",type:"value"},{name:"transform",type:"array"},{name:"theme",type:"object"},..._A(J),...Object.entries(ZA).map(([t,e])=>({type:"container",name:t,ctor:e}))];w.Chart=class extends kA{constructor(t={}){var e=t["container"];super(I(t,["container"]),"view"),this.container=void 0===(t=e)?document.createElement("div"):"string"==typeof t?document.getElementById(t):t}render(){var t=wA($A(this));return this.container.append(t),this}options(){return $A(this)}node(){return this.container}},w.Chart=t([EA(ge)],w.Chart),w.createLibrary=hP,w.render=wA,Object.defineProperty(w,"__esModule",{value:!0})});
|
|
10
|
+
">${t||""}</div>`),BM=(y={})=>{const g=y["htmlStyle"];return t=>{const{transientLayer:e,selection:n,shared:r}=t;var{mouseX:i,mouseY:o,tip:a}=r;const s=n.select(".plot").node();var[l,u]=s.getBounds().min,[c,h]=[8,8];let d=i-l+c,p=o-u+h;void 0!==y.x&&(d=y.x-l),void 0!==y.y&&(p=y.y-u);const f=e.node();return a?zk(f,".tip-popover",()=>new gp({className:"tip-popover",style:{innerHTML:DM("",g)}})).style("x",d).style("y",p).style("innerHTML",DM(a,g)):null!=(i=f.querySelector(".tip-popover"))&&i.remove(),t}},FM=(BM.props={},()=>({actions:[{action:"enter",events:["plot:mouseenter"]},{action:"hover",events:["plot:mousemove"]},{action:"leave",events:["plot:mouseleave"]}]})),zM=()=>({actions:[{action:"enter",events:["plot:touchstart"]},{action:"hover",events:["plot:touchmove"]},{action:"leave",events:["plot:touchend"]}]});function VM(o,t={"action.surfacePointSelection":nT,"action.elementSelection":iM,"action.recordState":aM,"action.recordPoint":sM,"action.recordCurrentPoint":lM,"action.recordRegion":uM,"action.activeElement":cM,"action.highlightElement":dM,"action.filterElement":kM,"action.legendItemSelection":oM,"action.triggerInfoSelection":rT,"action.setItemState":TM,"action.tooltip":xM,"action.fisheyeFocus":MM,"action.plot":wM,"action.filter":EM,"action.cursor":SM,"action.mask":PM,"action.button":NM,"action.move":IM,"action.activeRegion":jM,"action.recordTip":RM,"action.poptip":BM,"interactor.mousePosition":FM,"interactor.touchPosition":zM}){const[a]=GM("interactor",t),[g]=GM("action",t);return t=>{const{start:e=[],end:n=[],interactors:r=[]}=o(t),f=[...e,...n],i=r.map(a),y=tm(i.flatMap(({actions:t})=>t.flatMap(({action:e,events:t})=>t.map(t=>[t,e]))),t=>t[1]);return(t,e)=>{const n=function(t,e){const{view:n,update:r,container:i,options:o}=t,a=Ob(i),s=a.select(".plot").append("g").attr("className","selection").style("fill","transparent"),l=a.select(".plot").append("g").attr("className","transient").style("fill","transparent");return Object.assign(Object.assign({},n),{update:r,options:o,selection:a,selectionLayer:s,transientLayer:l,viewInstances:e,shared:{}})}(t,e),r=n["selection"];for(const{trigger:l,isEnable:u=()=>!0,action:c,throttle:h}of f){var i,o=[c].flat(1).map(t=>"object"==typeof t?t:{type:t}).map(g);const d=h?t=>vt(t,h.wait,h):t=>t,p=d(_b(o));for([i]of y.get(l)||[[l]]){var[a,s]=i.includes(":")?i.split(":"):[null,i];(a?r.selectAll("."+a):r).on(s,t=>{t=Object.assign({event:t},n);u(t)&&p(t)})}}}}}function GM(e,n){const r=t=>{return"string"!=typeof t?t:n[t=e+"."+t]||kb("Unknown Component: "+t)};return[t=>{var e=t["type"],t=I(t,["type"]);return r(e)(Object.assign({},t))},r]}const HM=VM(t=>({interactors:[{type:"mousePosition"},{type:"touchPosition"}],start:[{trigger:"hover",action:[{type:"elementSelection"},Object.assign({type:"activeElement"},t)]}],end:[{trigger:"leave",action:[{type:"elementSelection"},Object.assign({type:"activeElement"},t)]}]}));HM.props={};const WM=VM((t={})=>{var{singleMode:e=!1}=t;return{start:[{trigger:"plot:pointerdown",action:[{type:"elementSelection",multiple:!e,toggle:!0},Object.assign({type:"activeElement",border:2},t)]}]}});WM.props={};const YM=VM(t=>({interactors:[{type:"mousePosition"},{type:"touchPosition"}],start:[{trigger:"hover",action:[{type:"surfacePointSelection"},{type:"elementSelection",trigger:null!=t&&t.shared?"axis":"item"},Object.assign({type:"tooltip"},t)],throttle:{wait:50,leading:!0,trailing:!1}},{trigger:"leave",action:[{type:"elementSelection",clear:!0},Object.assign({type:"tooltip",hide:!0},t)]}]}));YM.props={};const UM=VM(t=>({interactors:[{type:"mousePosition"},{type:"touchPosition"}],start:[{trigger:"hover",throttle:{wait:50,leading:!0,trailing:!1},action:[Object.assign({type:"fisheyeFocus"},t),{type:"plot"}]}],end:[{trigger:"leave",action:[Object.assign({type:"fisheyeFocus"},t),{type:"plot"}]}]}));UM.props={};const qM=VM(t=>({start:[{trigger:"plot:pointermove",action:[{type:"elementSelection"},Object.assign({type:"highlightElement"},t)]}],end:[{trigger:"plot:pointerleave",action:[{type:"elementSelection"},Object.assign({type:"highlightElement"},t)]}]}));qM.props={};const XM=VM(t=>({start:[{trigger:"plot:pointermove",action:[{type:"elementSelection"},Object.assign({type:"highlightElement"},t),{type:"legendItemSelection",from:"selectedElements"},{type:"setItemState",items:["legendItem"],state:"highlight"}]}],end:[{trigger:"plot:pointerleave",action:[{type:"elementSelection"},Object.assign({type:"highlightElement"},t),{type:"legendItemSelection",from:"selectedElements"},{type:"setItemState",items:["legendItem"],state:"highlight"}]}]}));XM.props={};const ZM=VM(t=>({start:[{trigger:"plot:pointermove",action:[{type:"elementSelection",filterBy:"x"},Object.assign({type:"highlightElement"},t)]}],end:[{trigger:"plot:pointerleave",action:[{type:"elementSelection"},Object.assign({type:"highlightElement"},t)]}]}));ZM.props={};const KM=VM(t=>({start:[{trigger:"plot:pointermove",action:[{type:"elementSelection",filterBy:"color"},Object.assign({type:"highlightElement"},t)]}],end:[{trigger:"plot:pointerleave",action:[{type:"elementSelection"},Object.assign({type:"highlightElement"},t)]}]}));KM.props={};const $M=VM(t=>({start:[{trigger:"legend-item:pointermove",action:[{type:"triggerInfoSelection"},{type:"legendItemSelection",trigger:"triggerInfo"},{type:"setItemState",items:"legendItem",state:"active"},{type:"elementSelection",trigger:"triggerInfo"},{type:"activeElement"}]}],end:[{trigger:"legend-item:pointerleave",action:[{type:"triggerInfoSelection"},{type:"legendItemSelection",trigger:"triggerInfo"},{type:"setItemState",items:"legendItem",state:"active"},{type:"elementSelection",trigger:"triggerInfo"},{type:"activeElement"}]}]}));$M.props={};const JM=VM(t=>({start:[{trigger:"legend-item:pointermove",action:[{type:"triggerInfoSelection"},{type:"legendItemSelection",trigger:"triggerInfo"},{type:"setItemState",items:"legendItem",state:"highlight"},{type:"elementSelection",trigger:"triggerInfo"},{type:"highlightElement"}]}],end:[{trigger:"legend-item:pointerleave",action:[{type:"triggerInfoSelection"},{type:"legendItemSelection",trigger:"triggerInfo"},{type:"setItemState",items:"legendItem",state:"highlight"},{type:"elementSelection",trigger:"triggerInfo"},{type:"highlightElement"}]}]}));function QM(t){var t=t["event"],t=t["target"];return t&&(null==(t=t.className)?void 0:t.includes("button"))}JM.props={};const tS=VM(t=>{var t=t["brushType"],e="polygon"===t?"polygon":"rect",n="rectX"===t?"x":"rectY"===t?"y":"";return{start:[{trigger:"plot:pointermove",isEnable:t=>!QM(t),action:[{type:"cursor",cursor:"crosshair"}]},{trigger:"plot:pointermove",isEnable:t=>QM(t),action:[{type:"cursor",cursor:"pointer"},{type:"button"}]},{trigger:"plot:pointermove",isEnable:t=>"filtered"===t.shared.currentState&&!QM(t),action:[{type:"button",fill:"#f7f7f7"}]},{trigger:"plot:pointerdown",isEnable:t=>!QM(t),action:[{type:"recordPoint",clear:!0},{type:"recordPoint",start:!0},{type:"recordRegion",dim:n},{type:"recordState",state:"brushing"}]},{trigger:"plot:pointermove",isEnable:t=>"brushing"===t.shared.currentState,action:[{type:"recordPoint"},{type:"recordRegion",dim:n},{type:"mask",maskType:t}]},{trigger:"plot:maskChange",action:[{type:"elementSelection",trigger:e+"-mask"},{type:"highlightElement"}]},{trigger:"plot:pointerup",isEnable:t=>!QM(t),action:[{type:"recordState",state:null},{type:"elementSelection",trigger:e+"-mask"},{type:"filter"},{type:"plot"},{type:"recordState",state:"filtered"},{type:"recordPoint",clear:!0},{type:"recordRegion"},{type:"mask"},{type:"elementSelection",trigger:e+"-mask"},{type:"highlightElement"},{type:"button"}]},{trigger:"plot:click",isEnable:t=>QM(t),action:[{type:"button",hide:!0},{type:"filter",reset:!0},{type:"plot"},{type:"recordState",state:null}]}],end:[{trigger:"plot:pointerleave",action:[{type:"cursor",cursor:"default"}]}]}});function eS(t){var t=t["event"],t=t["target"];return t&&(null==(t=t.className)?void 0:t.includes("mask"))}function nS(t){var t=t["event"],t=t["target"];return t&&(null==(t=t.className)?void 0:t.includes("handle"))}function rS(t){return!eS(t)&&!nS(t)}function iS(t){return eS(t)||nS(t)}tS.props={};const oS=VM(t=>{var{brushType:t,multiple:e}=t,n="polygon"===t?"polygon":"rect";const r="rectX"===t?"x":"rectY"===t?"y":"";return{start:[{trigger:"plot:pointermove",isEnable:t=>rS(t),action:[{type:"cursor",cursor:"crosshair"}]},{trigger:"plot:pointermove",isEnable:t=>!rS(t),action:[{type:"cursor"}]},{trigger:"plot:pointerdown",isEnable:t=>rS(t),action:[e?null:{type:"recordPoint",clear:!0},{type:"recordPoint",start:!0},{type:"recordRegion",dim:r},{type:"recordState",state:"brushing"}].filter(t=>!!t)},{trigger:"plot:pointermove",isEnable:t=>"brushing"===t.shared.currentState&&!eS(t),action:[{type:"recordPoint"},{type:"recordRegion",dim:r},{type:"mask",maskType:t}]},{trigger:"plot:maskChange",action:[{type:"elementSelection",trigger:n+"-mask"},{type:"highlightElement"}]},{trigger:"plot:pointerup",isEnable:t=>"brushing"===t.shared.currentState,action:[{type:"recordState",state:null}]},{trigger:"plot:dragstart",isEnable:t=>iS(t),action:[{type:"recordCurrentPoint"}]},{trigger:"plot:drag",isEnable:t=>iS(t)&&t.shared.currentPoint,action:[{type:"move"},{type:"recordRegion",dim:r},{type:"mask",maskType:t},{type:"recordCurrentPoint"}]},{trigger:"plot:dragend",isEnable:t=>iS(t),action:[{type:"recordCurrentPoint",clear:!0}]}],end:[{trigger:"plot:pointerleave",action:[{type:"cursor",cursor:"default"}]},{trigger:"plot:click",isEnable:t=>2===t.event.detail&&!eS(t),action:[{type:"recordPoint",clear:!0},{type:"recordRegion"},{type:"mask"},{type:"elementSelection",trigger:n+"-mask"},{type:"highlightElement"}]}]}});oS.props={};const aS=VM(t=>{var t=t["brushType"],e="polygon"===t?"polygon":"rect",n="rectX"===t?"x":"rectY"===t?"y":"";return{start:[{trigger:"plot:pointerenter",action:[{type:"cursor",cursor:"crosshair"}]},{trigger:"plot:pointerdown",action:[{type:"recordPoint",clear:!0},{type:"recordPoint",start:!0},{type:"recordRegion",dim:n},{type:"recordState",state:"brushing"}]},{trigger:"plot:pointermove",isEnable:t=>"brushing"===t.shared.currentState,action:[{type:"recordPoint"},{type:"recordRegion",dim:n},{type:"mask",maskType:t}]},{trigger:"plot:maskChange",action:[{type:"elementSelection",trigger:e+"-mask"},{type:"highlightElement"}]},{trigger:"plot:pointerup",action:[{type:"recordState",state:null},{type:"elementSelection",trigger:e+"-mask"},{type:"filterElement"},{type:"highlightElement",clear:!0},{type:"recordPoint",clear:!0},{type:"recordRegion"},{type:"mask"}]}],end:[{trigger:"plot:pointerleave",action:[{type:"cursor",cursor:"default"}]}]}});aS.props={};const sS=VM((t={})=>({start:[{trigger:"plot:mousemove",action:[Object.assign({type:"activeRegion"},t)]},{trigger:"plot:mouseleave",action:[{type:"activeRegion",clear:!0}]}]}));sS.props={};const lS=VM(t=>({start:[{trigger:"mousemove",throttle:{wait:50,leading:!0,trailing:!1},action:[{type:"surfacePointSelection"},{type:"recordTip"},Object.assign({type:"poptip"},t)]}]}));function uS(n){return(t,...e)=>N({},n(t,...e),t)}function cS(n){return(t,...e)=>N({},t,n(t,...e))}function hS(t,e){var n;return t?Array.isArray(t)?t:({value:n=e}=t,t=I(t,["value"]),Object.assign(Object.assign({},t),{value:n})):e}lS.props={};const dS=()=>t=>{const e=t["children"];if(!Array.isArray(e))return[];const{x:n=0,y:r=0,width:i,height:o,data:a}=t;return e.map(t=>{var e=t["data"],t=I(t,["data"]);return Object.assign(Object.assign({},t),{data:hS(e,a),x:n,y:r,width:i,height:o})})},pS=(dS.props={},()=>e=>{const n=e["children"];if(!Array.isArray(n))return[];const{direction:t="row",ratio:r=n.map(()=>1),padding:i=0,data:o}=e;var[a,s,l,u]="col"===t?["y","height","width","x"]:["x","width","height","y"];const c=r.reduce((t,e)=>t+e),h=e[s]-i*(n.length-1);var d=r.map(t=>h*(t/c));const p=[];let f=e[a]||0;for(let t=0;t<d.length;t+=1){var y=n[t],g=y["data"],y=I(y,["data"]),g=hS(g,o);p.push(Object.assign({[a]:f,[s]:d[t],[u]:e[u]||0,[l]:e[l],data:g},y)),f+=d[t]+i}return p}),fS=(pS.props={},()=>t=>{const e=t["children"],n=I(t,["children"]);if(!Array.isArray(e))return[];const{data:r,scale:i={}}=n,o=I(n,["data","scale"]);t=e.map(t=>{var{data:e,scale:n}=t,t=I(t,["data","scale"]);return Object.assign({data:hS(e,r),scale:N({},i,n)},t)});return[Object.assign(Object.assign({},o),{marks:t,type:"standardView"})]}),yS=(fS.props={},()=>t=>{var{width:e,height:n,paddingLeft:r,paddingRight:i,paddingTop:o,paddingBottom:a,data:s,coordinate:l,theme:u,component:c,interaction:h,x:d,y:p,key:f,frame:y,title:g,labelLayout:m}=t,t=I(t,["width","height","paddingLeft","paddingRight","paddingTop","paddingBottom","data","coordinate","theme","component","interaction","x","y","key","frame","title","labelLayout"]);return[{type:"standardView",x:d,y:p,key:f,width:e,height:n,paddingLeft:r,paddingRight:i,paddingTop:o,paddingBottom:a,theme:u,coordinate:l,component:c,interaction:h,frame:y,title:g,labelLayout:m,marks:[Object.assign(Object.assign({},t),{key:f+"-0",data:s})]}]});function gS(r,i){return Object.entries(r).reduce((t,[e,n])=>(t[e]=i(n,e,r),t),{})}function mS(t){return t.map((t,e)=>e)}yS.props={};const vS=uS(t=>{const{encode:e,data:i,scale:o,shareSize:a=!1}=t;var{x:t,y:n}=e,r=(e,t)=>{if(void 0===e||!a)return{};const n=tm(i,t=>t[e]),r=(null==(t=null===o||void 0===o?void 0:o[t])?void 0:t.domain)||Array.from(n.keys());t=r.map(t=>n.has(t)?n.get(t).length:1);return{domain:r,flex:t}};return{scale:{x:Object.assign(Object.assign({paddingOuter:0,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,guide:void 0===n?null:{position:"right"}},void 0===n&&{paddingInner:0}),r(n,"y"))}}}),bS=uS(t=>{const{data:e,scale:n}=t,r=[t];let i,o;for(;r.length;){const{children:l,encode:u={},scale:n={}}=r.shift();var a=u["color"],s=n["color"];void 0!==a&&(i=a),void 0!==s&&(o=s),Array.isArray(l)&&r.push(...l)}var t=Object.assign({},o);o&&(o.guide=null);return{encode:{color:i},scale:{color:N({},t,{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,field:i,type:"ordinal"})}}}),xS=uS(()=>({animate:{enter:{type:"fadeIn"}}})),wS=cS(()=>({frame:!1,encode:{shape:"hollowRect"},style:{lineWidth:0}})),ES=cS(()=>({type:"grid"})),_S=cS(u=>{var t=u["data"];return{data:{type:"inline",value:t,transform:[{type:"connector",callback:()=>{const{data:t,encode:e}=u,{x:n,y:r}=e,i=n?Array.from(new Set(t.map(t=>t[n]))):[],o=r?Array.from(new Set(t.map(t=>t[r]))):[];if(i.length&&o.length){const a=[];for(const s of i)for(const l of o)a.push({[n]:s,[r]:l});return a}return i.length?i.map(t=>({[n]:t})):o.length?o.map(t=>({[r]:t})):void 0}}]}}}),kS=cS((t,d=function(t){t=t.points;return Lb(t)},w=function(o){return(t,e)=>{var{rowIndex:t,rowValuesLength:n,columnIndex:r,columnValuesLength:i}=t;return t!==n-1?TS(o,e):(t=e.length?void 0:null,N({title:r===i-1&&void 0,grid:t},o))}},E=function(r){return(t,e)=>{var{rowIndex:t,columnIndex:n}=t;return 0!==n?TS(r,e):(n=e.length?void 0:null,N({title:0===t&&void 0,grid:n},r))}},_={})=>{const{data:e,encode:n,children:p,scale:r,x:k=0,y:T=0,shareData:M=!1}=t,S=e["value"],{x:O,y:P}=n;t=r.color;const A=t["domain"];return{children:(t,e,n)=>{const{x:r,y:i}=e,{paddingLeft:f,paddingTop:y}=n,{domain:o,field:a}=r.getOptions(),{domain:s,field:l}=i.getOptions(),u=mS(t),g=t.map(d),c=t.map(({x:t,y:e})=>[r.invert(t),i.invert(e)]),h=c.map(([n,r])=>t=>{var{[a]:t,[l]:e}=t,t=void 0===O||t===n,e=void 0===P||e===r;return t&&e}),m=h.map(t=>S.filter(t)),v=M?nm(m,t=>t.length):void 0,b=c.map(([t,e])=>({columnField:a,columnIndex:o.indexOf(t),columnValue:t,columnValuesLength:o.length,rowField:l,rowIndex:s.indexOf(e),rowValue:e,rowValuesLength:s.length})),x=b.map(t=>Array.isArray(p)?p:[p(t)].flat(1));return u.flatMap(s=>{const[l,u,c,h]=g[s],d=b[s],p=m[s],t=x[s];return t.map(t=>{var{scale:e,key:n,facet:r=!0}=t,t=I(t,["scale","key","facet"]),i=null==(i=null==e?void 0:e.y)?void 0:i.guide,o=null==(o=null==e?void 0:e.x)?void 0:o.guide,a={x:{tickCount:O?5:void 0},y:{tickCount:P?5:void 0}},r=r?p:S,o={x:{guide:MS(o,w)(d,r)},y:{guide:MS(i,E)(d,r)},color:{guide:null,domain:A}};return Object.assign(Object.assign({key:n+"-"+s,data:r,x:l+f+k,y:u+y+T,width:c,height:h,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!!r.length,dataDomain:v,scale:N(a,e,o)},t),_)})})}}});function TS(t,e){return e.length?N({title:!1,tickLine:null,label:null,subTickLine:null},t):null}function MS(t,e){return"function"==typeof t?t:null===t?()=>null:e(t)}const SS=()=>t=>{return[Hk.of(t).call(ES).call(bS).call(xS).call(vS).call(wS).call(_S).call(kS).value()]},OS=(SS.props={},uS(t=>({scale:{x:{guide:null,paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}}))),PS=cS(t=>{const{data:E,children:c,x:_=0,y:k=0}=t;return{children:(t,e,n)=>{const{x:r,y:i}=e,{paddingLeft:g,paddingTop:m}=n,{domain:o,field:a}=r.getOptions(),{domain:s,field:l}=i.getOptions(),u=mS(t),v=t.map(({points:t})=>Lb(t)),b=t.map(({x:t,y:e})=>[r.invert(t),i.invert(e)]),x=b.map(([t,e])=>({columnField:a,columnIndex:o.indexOf(t),columnValue:t,columnValuesLength:o.length,rowField:l,rowIndex:s.indexOf(e),rowValue:e,rowValuesLength:s.length})),w=x.map(t=>Array.isArray(c)?c:[c(t)].flat(1));return u.flatMap(l=>{const[u,c,h,d]=v[l],[p,f]=b[l],y=x[l],t=w[l];return t.map(t=>{var n,r,{scale:e,key:i,encode:o}=t,t=I(t,["scale","key","encode"]),a=null==(a=null==e?void 0:e.y)?void 0:a.guide,s=null==(s=null==e?void 0:e.x)?void 0:s.guide,s={x:{guide:("function"==typeof(r=s)?r:null===r?()=>null:(t,e)=>{var{rowIndex:t,rowValuesLength:n}=t;if(t!==n-1)return TS(r,e)})(y,E)},y:{guide:("function"==typeof(n=a)?n:null===n?()=>null:(t,e)=>{t=t.columnIndex;if(0!==t)return TS(n,e)})(y,E)}};return Object.assign({data:E,key:i+"-"+l,x:u+g+_,y:c+m+k,width:h,height:d,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!0,scale:N({color:{guide:null},x:{guide:{title:{titleAnchor:"center"}},tickCount:5,facet:!1},y:{guide:{title:{titleAnchor:"center"}},tickCount:5,facet:!1}},e,s),encode:N({},o,{x:p,y:f})},t)})})}}}),AS=t=>{var e=t["encode"],t=I(t,["encode"]);const{position:n=[],x:r=n,y:i=[...n].reverse()}=e,o=I(e,["position","x","y"]),a=[];for(const s of[r].flat(1))for(const l of[i].flat(1))a.push({$x:s,$y:l});return Object.assign(Object.assign({},t),{data:a,encode:Object.assign(Object.assign({},o),{x:"$x",y:"$y"})})};const NS=()=>t=>{return[Hk.of(t).call(ES).call(bS).call(PS).call(AS).call(xS).call(wS).call(OS).value()]},CS=uS(t=>({scale:{x:{guide:{type:"axisX"},paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),LS=uS(t=>({coordinate:[{type:"polar"}]})),IS=t=>{var e=t["encode"],t=I(t,["encode"]),e=e["position"];return Object.assign(Object.assign({},t),{encode:{x:e}})};function jS(t){return t=>null}function RS(t){var t=t["points"],[t,e,n,r]=t,i=Nb(t,r),t=Ab(t,r),r=Ab(e,n),r=(e=r,r=Cb(r=t),e=Cb(e),r<e?e-r:2*Math.PI-(r-e)),e=1/Math.sin(r/2),i=i/(1+e),o=i*Math.sqrt(2),[n,a]=n,t=Cb(t)+r/2,r=i*e;return[n+r*Math.sin(t)-o/2,a+r*Math.cos(t)-o/2,o,o]}const DS=()=>t=>{return[Hk.of(t).call(ES).call(IS).call(bS).call(LS).call(_S).call(kS,RS,jS,jS,{frame:!1}).call(xS).call(wS).call(CS).value()]};const BS=()=>t=>{const{children:e=[],duration:a=1e3,iterationCount:l=1,direction:u="normal",easing:s="ease-in-out-sine"}=t,c=e.length;if(!Array.isArray(e)||0===c)return[];const n=e[0]["key"],h=e.map(t=>Object.assign(Object.assign({},t),{key:n})).map(t=>{{var e=a,n=s;const i=[t];for(;i.length;){const o=i.pop();o.animate=N({enter:{duration:e},update:{duration:e,type:"morphing",easing:n,fill:"both"},exit:{duration:e}},o.animate||{});var r=o["children"];Array.isArray(r)&&i.push(...r)}return t}});return function*(){let t=0,e;for(;"infinite"===l||t<l;){n=u,o=t,a=c,s=void 0,s=[0,a],a=[1-a,1];var[n,r]="normal"===n?s:"reverse"===n?a:"alternate"===n?o%2==0?s:a:"reverse-alternate"===n?o%2==0?a:s:void 0;for(let t=n;t<r;t+=1){var i=Math.abs(t);e!==i&&(yield h[i]),e=i}t++}var o,a,s}},FS=(BS.props={},()=>(t,e,n)=>{var r=t.length;if(0===r)return[];var{innerWidth:i,innerHeight:o}=n;let l=Math.ceil(Math.sqrt(e/(o/i))),u=i/l,c=Math.ceil(e/l),a=c*u;for(;a>o;)l+=1,u=i/l,c=Math.ceil(e/l),a=c*u;const h=o-c*u,d=c<=1?0:h/(c-1),[p,f]=c<=1?[(i-r*u)/(r-1),(o-u)/2]:[0,0];return t.map((t,e)=>{var[t,n,r,i]=Lb(t),o=e%l,e=Math.floor(e/l),a=o*u,s=(c-e-1)*u+h,r=u/r,i=u/i;return`translate(${a-t+p*o}, ${s-n-d*e-f}) scale(${r}, ${i})`})});function zS(t,e){if(null!==t)return{type:"column",value:t,field:e}}function VS(t,e){if(null!==t)return{type:"column",value:t,field:e,visual:!0}}function GS(t,e){return new Array(t.length).fill(e)}function HS(t,e){var t=t[e];return t?({value:e,field:t=null}=t,[e,t]):[null,null]}function WS(t,...e){for(const i of e){if("string"!=typeof i)return[i,null];var[n,r]=HS(t,i);if(null!==n)return[n,r]}return[null,null]}FS.props={};const YS=()=>(t,e)=>{var n=e["encode"],n=n["y1"];return void 0!==n?[t,e]:[t,N({},e,{encode:{y1:zS(GS(t,0))}})]};function US(t,e,n){const r=n["encode"],i=(n=t,(Array.isArray(n)?n:[n]).map(t=>{return[t,null==(t=HS(r,t))?void 0:t[0]]}).filter(([,t])=>Mb(t)));return Array.from(tm(e,e=>i.map(([,t])=>t[e]).join("-")).values())}function qS(t){var o,r;return Array.isArray(t)?(o=t,(i,t,e)=>(n,r)=>o.reduce((t,e)=>0!==t?t:Xg(i[n][e],i[r][e]),0)):"function"==typeof t?(r=t,(e,t,n)=>tO(t=>r(e[t]))):"series"===t?KS:"value"===t?$S:"sum"===t?JS:"maxIndex"===t?QS:()=>null}function XS(t,e){for(const n of t)n.sort(e)}function ZS(t,e){return(null==e?void 0:e.domain)||Array.from(new Set(t))}function KS(t,e,n){return tO(t=>n[t])}function $S(t,e,n){return tO(t=>e[t])}function JS(t,n,e){t=mS(t);const r=Array.from(tm(t,t=>e[+t]).entries()),i=new Map(r.map(([t,e])=>[t,e.reduce((t,e)=>t+ +n[e])]));return tO(t=>i.get(e[t]))}function QS(t,n,e){t=mS(t);const r=Array.from(tm(t,t=>e[+t]).entries()),i=new Map(r.map(([t,e])=>[t,rm(e,t=>n[t])]));return tO(t=>i.get(e[t]))}function tO(n){return(t,e)=>Xg(n(t),n(e))}YS.props={};const eO=(t={})=>{const{groupBy:m="x",orderBy:v,reverse:b=!1,y:x="y"}=t;return(t,e,n)=>{var{data:r,encode:i}=e,[o,a]=HS(i,"y"),[s,l]=HS(i,"y1"),[i]=WS(i,"series","color"),u=US(m,t,e);const c=qS(v);r=c(r,o,i);r&&XS(u,r);const h=new Array(t.length),d=new Array(t.length);for(const y of u){b&&y.reverse();var p=s?+s[y[0]]:0;let t=p,e=p;for(const g of y){var f=+o[g]-p;f<0?e=h[g]=(d[g]=e)+f:0<f?t=h[g]=(d[g]=t)+f:h[g]=d[g]=t}}i="y"===x?h:d;return[t,N({},e,{encode:{y:zS(i,a),y1:zS(d,l)}})]}};function nO(t){t=t.type;return"string"==typeof t&&["stackY","dodgeX","groupX"].includes(t)}eO.props={};const rO=s=>(t,e,n)=>{const{encode:r,transform:i=[]}=e;var o,a;return i.some(nO)||({x:o,y:a}=r,void 0===o||void 0===a)?[t,e]:(o=s["series"],a=o?["x","series"]:"x",eO({groupBy:a})(t,e,n))},iO=(rO.props={},()=>(t,e)=>{var n=e["encode"],r=n["title"];return void 0!==r?[t,e]:([r,n]=HS(n,"x"),[t,N({},e,{encode:{title:zS(r,n)}})])}),oO=(iO.props={},t=>{const a=t["channel"];return(t,e)=>{const o=e["encode"];var n=o["tooltip"];return void 0!==n?[t,e]:(n=Object.entries(o).filter(([t])=>t.startsWith(a)).flatMap(([t])=>{var e=new RegExp(a+"(\\d*)").exec(t)[1],[n,r]=HS(o,t);const i=[[t,zS(n)]];return n&&null!==r&&i.push(["tooltip"+e,zS(n,r)]),i}),[t,N({},e,{encode:Object.fromEntries(n)})])}}),aO=(oO.props={},()=>oO({channel:"position"})),sO=(aO.props={},()=>oO({channel:"y"})),lO=(sO.props={},()=>(t,e)=>{var n=e["encode"],n=n["x"];return void 0!==n?[t,e]:[t,N({},e,{encode:{x:zS(GS(t,0))}})]}),uO=(lO.props={},()=>(t,e)=>{var n=e["encode"],n=n["y"];return void 0!==n?[t,e]:[t,N({},e,{encode:{y:zS(GS(t,0))}})]}),cO=(uO.props={},()=>(t,e)=>{var n=e["encode"],n=n["size"];return void 0!==n?[t,e]:[t,N({},e,{encode:{size:VS(GS(t,3))}})]}),hO=(cO.props={},()=>(t,e)=>{var n=e["encode"],r=n["key"],n=I(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,N({},e,{encode:{key:zS(r)}})]}),dO=(hO.props={},()=>(t,e)=>{var n=e["encode"],{series:r,color:i}=n;return void 0!==r||void 0===i?[t,e]:([r,i]=HS(n,"color"),[t,N({},e,{encode:{series:zS(r,i)}})])}),pO=(dO.props={},(t={})=>{const{groupBy:c="x",reverse:h=!1,orderBy:d}=t,p=I(t,["groupBy","reverse","orderBy"]);return(t,e)=>{var{data:n,encode:r,scale:i}=e,i=i["series"],[o]=HS(r,"y"),[r]=WS(r,"series","color"),a=ZS(r,i),i=US(c,t,e);const s=qS(d);n=s(n,o,r);n&&XS(i,n);const l=new Array(t.length);for(const u of i){h&&u.reverse();for(let t=0;t<u.length;t++)l[u[t]]=a[t]}return[t,N({},e,{scale:Object.assign({domain:a},p),encode:{series:zS(l)}})]}}),fO=(pO.props={},t=>{const{by:p=["x"]}=t;return(n,t)=>{const e=t["encode"];var r=e["enterDuration"];if(void 0===r)return[n,t];r=p.map(t=>[t,HS(e,t)[0]]);if(0===r.length)return[n,t];let i=[n];for(const[,c]of r){const h=[];for(const n of i){var o=Array.from(tm(n,t=>c[t]).values());h.push(...o)}i=h}const[a]=HS(e,"enterDuration");var[s]=WS(e,"enterDelay",GS(n,0));const l=new Array(n.length);for(let t=0,e=0;t<i.length;t++){const n=i[t];var u=nm(n,t=>+a[t]);for(const d of n)l[d]=+s[d]+e;e+=u}return[n,N({},t,{encode:{enterDuration:VS(a),enterDelay:VS(l)}})]}});fO.props={};const yO=(t={})=>{const{groupBy:d="x",basis:p="max"}=t;return(e,t)=>{const n=t["encode"];var r=I(n,["x"]);const i=Object.entries(r).filter(([t])=>t.startsWith("y")).map(([t])=>[t,HS(n,t)[0]]),o=i.map(([t])=>[t,new Array(e.length)]);r=US(d,e,t);const a={min:im,max:nm,first:t=>t[0],last:t=>t[t.length-1],mean:lm,extent:Kg,median:um,sum:hm,deviation:Zg}[p]||nm;for(const e of r){var s=e.flatMap(e=>i.map(([,t])=>+t[e])),l=a(s);for(const c of e)for(let t=0;t<i.length;t++){var[,u]=i[t];const[,h]=o[t];h[c]=+u[c]/l}}return[e,N({},t,{encode:Object.fromEntries(o.map(([t,e])=>[t,zS(e,HS(n,t)[1])]))})]}};function gO(t,e,n){if(null===t)return[-.5,.5];t=ZS(t,e);const r=new qm({domain:t,range:[0,1],padding:n});e=r.getBandWidth();return[-e/2,e/2]}yO.props={};const mO=(t={})=>{const{paddingX:l=0,paddingY:u=0}=t;return(t,e)=>{var{encode:n,scale:r}=e,{x:r,y:i}=r,[o]=HS(n,"x"),[n]=HS(n,"y");const a=gO(o,r,l),s=gO(n,i,u);o=t.map(()=>Sb(...s)),r=t.map(()=>Sb(...a));return[t,N({},e,{encode:{dy:zS(o),dx:zS(r)}})]}},vO=(mO.props={},(t={})=>{const{padding:o=0}=t;return(t,e)=>{var{encode:n,scale:r}=e,r=r["y"],[n]=HS(n,"y");const i=gO(n,r,o);n=t.map(()=>Sb(...i));return[t,N({},e,{encode:{dy:zS(n)}})]}}),bO=(vO.props={},(t={})=>{const{groupBy:y="x"}=t;return(e,t)=>{const n=t["encode"];var r=I(n,["x"]);const i=Object.entries(r).filter(([t])=>t.startsWith("y")).map(([t])=>[t,HS(n,t)[0]]),o=i.map(([t])=>[t,new Array(e.length)]);var a=US(y,e,t);const s=new Array(a.length);for(let t=0;t<a.length;t++){const e=a[t];var[l,u]=Kg(e.flatMap(e=>i.map(([,t])=>+t[e])));s[t]=(l+u)/2}var c=Math.max(...s);for(let t=0;t<a.length;t++){var h=c-s[t];const e=a[t];for(const p of e)for(let t=0;t<i.length;t++){var[,d]=i[t];const[,f]=o[t];f[p]=+d[p]+h}}return[e,N({},t,{encode:Object.fromEntries(o.map(([t,e])=>[t,zS(e,HS(n,t)[1])]))})]}});function xO(t,e){return[t[0]]}function wO(t,e){return[t[t.length-1]]}function EO(t,e){return[t[rm(t,t=>e[t])]]}function _O(t,e){return[t[function(t,e){let n,r=-1,i=-1;if(void 0===e)for(const a of t)++i,null!=a&&(n>a||void 0===n&&a>=a)&&(n=a,r=i);else for(var o of t)null!=(o=e(o,++i,t))&&(n>o||void 0===n&&o>=o)&&(n=o,r=i);return r}(t,t=>e[t])]]}bO.props={};const kO=(t={})=>{const{groupBy:s="series"}=t,l=I(t,["groupBy"]);return(t,e)=>{var n=e["encode"];const r=US(s,t,e);var[t,i]=Object.entries(l)[0];const[o]=HS(n,t),a="function"==typeof(n=i)?n:{first:xO,last:wO,max:EO,min:_O}[n]||xO;return[r.flatMap(t=>a(t,o)),e]}},TO=(kO.props={},(t={})=>{var e=t["selector"],t=I(t,["selector"]);return kO(Object.assign({x:e},t))}),MO=(TO.props={},(t={})=>{var e=t["selector"],t=I(t,["selector"]);return kO(Object.assign({y:e},t))});function SO(){return[(t,e)=>lm(t,t=>+e[t]),t=>"mean of "+t]}function OO(){return[(t,e)=>nm(t,t=>+e[t]),t=>"max of "+t]}function PO(){return[(t,e)=>t.length,t=>"count of "+t]}function AO(){return[(t,e)=>hm(t,t=>+e[t]),t=>"sum of "+t]}function NO(){return[(t,e)=>e[0],t=>"first of "+t]}function CO(){return[(t,e)=>e[t[t.length-1]],t=>"last of "+t]}MO.props={};const LO=(t={})=>{const o=I(t,["orderBy","reverse"]);return(t,e)=>{const{data:a,encode:s}=e,[n]=HS(s,"x"),l=n?Array.from(tm(t,t=>n[t]).values()):[t];var t=Object.entries(o).map(([t,e])=>{const[n,r]=function(t){if("function"==typeof t)return[t,null];const e={mean:SO,max:OO,count:PO,first:NO,last:CO,sum:AO}[t];if(e)return e();throw new Error(`Unknown reducer: ${t}.`)}(e),[i,o]=HS(s,t);return[t,zS(l.map(t=>n(t,null!==i&&void 0!==i?i:a)),(null===r||void 0===r?void 0:r(o))||o)]}),r=Object.keys(s).map(t=>{const[e,n]=HS(s,t);return[t,zS(l.map(t=>e[t[0]]),n)]}),i=l.map(t=>a[t[0]]);return[mS(l),N({},e,{data:i,encode:Object.fromEntries([...r,...t])})]}};LO.props={};var IO={},jO={},RO=34,DO=10,BO=13;function FO(t){return new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'}).join(",")+"}")}function zO(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 VO(t,e){var t=t+"",n=t.length;return n<e?new Array(e-n+1).join(0)+t:t}function GO(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),o=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+VO(-e,6):9999<e?"+"+VO(e,6):VO(e,4))+"-"+VO(t.getUTCMonth()+1,2)+"-"+VO(t.getUTCDate(),2)+(o?"T"+VO(n,2)+":"+VO(r,2)+":"+VO(i,2)+"."+VO(o,3)+"Z":i?"T"+VO(n,2)+":"+VO(r,2)+":"+VO(i,2)+"Z":r||n?"T"+VO(n,2)+":"+VO(r,2)+"Z":"")}function HO(r){var e=new RegExp('["'+r+"\n\r]"),h=r.charCodeAt(0);function n(r,t){var e,n=[],i=r.length,o=0,a=0,s=i<=0,l=!1;function u(){if(s)return jO;if(l)return l=!1,IO;var t,e,n=o;if(r.charCodeAt(n)===RO){for(;o++<i&&r.charCodeAt(o)!==RO||r.charCodeAt(++o)===RO;);return(t=o)>=i?s=!0:(e=r.charCodeAt(o++))===DO?l=!0:e===BO&&(l=!0,r.charCodeAt(o)===DO&&++o),r.slice(n+1,t-1).replace(/""/g,'"')}for(;o<i;){if((e=r.charCodeAt(t=o++))===DO)l=!0;else if(e===BO)l=!0,r.charCodeAt(o)===DO&&++o;else if(e!==h)continue;return r.slice(n,t)}return s=!0,r.slice(n,i)}for(r.charCodeAt(i-1)===DO&&--i,r.charCodeAt(i-1)===BO&&--i;(e=u())!==jO;){for(var c=[];e!==IO&&e!==jO;)c.push(e),e=u();t&&null==(c=t(c,a++))||n.push(c)}return n}function i(t,n){return t.map(function(e){return n.map(function(t){return a(e[t])}).join(r)})}function o(t){return t.map(a).join(r)}function a(t){return null==t?"":t instanceof Date?GO(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,o){var a,s;return(t=n(t,function(t,e){if(a)return a(t,e-1);var n,r,i;s=t,a=o?(r=o,i=FO(n=t),function(t,e){return r(i(t),e,n)}):FO(t)})).columns=s||[],t},parseRows:n,format:function(t,e){return[(e=null==e?zO(t):e).map(a).join(r)].concat(i(t,e)).join("\n")},formatBody:function(t,e){return i(t,e=null==e?zO(t):e).join("\n")},formatRows:function(t){return t.map(o).join("\n")},formatRow:o,formatValue:a}}const WO=t=>{const{value:r,callback:i=Eb,format:o,delimiter:a=","}=t;return()=>Ot(void 0,void 0,void 0,function*(){const t=yield fetch(r);var e;if("csv"===o)return e=yield t.text(),HO(a).parse(e,i);const n=yield t.json();return Array.isArray(n)?n.map(i):n})};WO.props={};const YO=t=>{const{fields:o,as:n=[]}=t;return t=>{if(!o||(e=o,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<o.length;t++)e.push(Object.assign(Object.assign({},n),{[r]:o[t],[i]:n[o[t]]}));return e},[])}};YO.props={};const UO=t=>{const{fields:n=[],callback:r=function(t){return null!=t&&!Number.isNaN(t)}}=t;return t=>t.filter(e=>n.every(t=>r(e[t])))};function qO(t,e,n){return Math.min(n,Math.max(e,t))}UO.props={};const XO=i=>t=>{const{fields:e=[]}=i;let{start:n=0,end:r=t.length}=i;n=qO(n,0,t.length-1),r=qO(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),{}))},ZO=(XO.props={},t=>{t=t.fields;return XO({fields:t})});ZO.props={};const KO=t=>{const r=t["map"];return t=>{var e;return r&&(e=r,0!==Object.keys(e).length)?t.map(t=>Object.entries(t).reduce((t,[e,n])=>(t[r[e]||e]=n,t),{})):t}},$O=(KO.props={},t=>{const{fields:i=[],order:r="ASC"}=t;return t=>{const n=(n,r)=>i.reduce((t,e)=>0!==t?t:n[e]<r[e]?-1:+(n[e]!==r[e]),0);var e="ASC"===r?n:(t,e)=>n(e,t);return[...t].sort(e)}}),JO=($O.props={},t=>{const e=t["value"];return()=>e}),QO=(JO.props={},t=>{const e=t["callback"];return t=>e?e(t):t});function tP(t){var{min:t,max:e}=t.getRenderBounds(),[t,n]=t,[e,r]=e;return[[t,n],[t,r],[e,r],[e,n]]}QO.props={};const eP=()=>n=>{const r=[];n.sort((t,e)=>t.style.priority-e.style.priority);for(let t=0;t<n.length;t++){const o=n[t];let e=!(o.style.visibility="visible");for(let t=0;t<r.length;t++){var i=r[t];if(eM(tP(o),tP(i))){o.style.visibility="hidden",e=!0;break}}e||r.push(o)}return n};function nP(){return{"data.fetch":WO,"data.inline":JO,"data.sortBy":$O,"data.filterBy":UO,"data.pick":ZO,"data.rename":KO,"data.subset":XO,"data.fold":YO,"data.connector":QO,"transform.maybeZeroY1":YS,"transform.maybeZeroX":lO,"transform.maybeStackY":rO,"transform.maybeTitleX":iO,"transform.maybeTooltipY":sO,"transform.maybeTooltipPosition":aO,"transform.maybeSeries":dO,"transform.stackY":eO,"transform.dodgeX":pO,"transform.jitter":mO,"transform.jitterY":vO,"transform.symmetryY":bO,"transform.stackEnter":fO,"transform.normalizeY":yO,"transform.select":kO,"transform.selectX":TO,"transform.selectY":MO,"transform.groupX":LO,"transform.maybeSize":cO,"transform.maybeZeroY":uO,"transform.maybeKey":hO,"renderer.canvas":Sg,"coordinate.cartesian":Og,"coordinate.polar":Pg,"coordinate.helix":Ag,"coordinate.transpose":Ng,"coordinate.theta":jg,"coordinate.reflect":Cg,"coordinate.reflectX":Lg,"coordinate.reflectY":Ig,"coordinate.parallel":Rg,"coordinate.fisheye":Dg,"coordinate.fisheyeX":Bg,"coordinate.fisheyeY":Fg,"encode.constant":zg,"encode.field":Gg,"encode.transform":Vg,"encode.column":Hg,"mark.interval":qg,"mark.line":vm,"mark.point":bm,"mark.text":xm,"mark.grid":wm,"mark.area":Em,"mark.link":Mm,"mark.node":Tm,"mark.edge":km,"mark.image":Sm,"mark.polygon":_m,"mark.schema":Om,"mark.vector":Pm,"mark.annotation.text":Am,"mark.annotation.lineX":Cm,"mark.annotation.lineY":Nm,"mark.annotation.connector":Lm,"mark.annotation.range":Rm,"mark.annotation.rangeX":Dm,"mark.annotation.rangeY":Bm,"palette.category10":Fm,"palette.category20":zm,"scale.linear":f1,"scale.ordinal":y1,"scale.band":p1,"scale.identity":g1,"scale.point":m1,"scale.time":v1,"scale.log":b1,"scale.pow":x1,"scale.threshold":w1,"scale.quantile":E1,"scale.quantize":_1,"shape.rect":Vb,"shape.hollowRect":Gb,"shape.funnel":Hb,"shape.pyramid":Yb,"shape.line":qb,"shape.hv":Zb,"shape.vh":Kb,"shape.hvh":$b,"shape.smooth":Xb,"shape.bowtie":ex,"shape.cross":nx,"shape.diamond":rx,"shape.hexagon":ix,"shape.hollowBowtie":ox,"shape.hollowDiamond":ax,"shape.hollowHexagon":sx,"shape.hollowPoint":lx,"shape.hollowSquare":ux,"shape.hollowTriangle":cx,"shape.hollowTriangleDown":hx,"shape.hyphen":dx,"shape.linePoint":px,"shape.plus":fx,"shape.point":yx,"shape.square":gx,"shape.tick":mx,"shape.triangle":vx,"shape.triangleDown":bx,"shape.text":wx,"shape.area":lk,"shape.smoothArea":uk,"shape.edge":gk,"shape.smoothEdge":mk,"shape.vhvEdge":vk,"shape.arc":bk,"shape.link":ck,"shape.pointNode":fk,"shape.polygonNode":yk,"shape.image":hk,"shape.polygon":dk,"shape.ribbon":xk,"shape.box":pk,"shape.vector":xx,"shape.label":Ok,"shape.annotation.text":rk,"shape.annotation.badge":ok,"shape.annotation.line":wk,"shape.annotation.connector":Mk,"shape.annotation.range":Vb,"theme.light":Pk,"component.axisX":jk,"component.axisY":Rk,"component.legendCategory":Dk,"component.legendContinuous":Bk,"component.title":Gk,"animation.scaleInX":Uk,"animation.scaleOutX":qk,"animation.scaleInY":Xk,"animation.scaleOutY":Zk,"animation.fadeIn":Kk,"animation.fadeOut":$k,"animation.morphing":eT,"interaction.elementActive":HM,"interaction.elementSelected":WM,"interaction.elementHighlight":qM,"interaction.elementHighlightByX":ZM,"interaction.elementHighlightByColor":KM,"interaction.elementListHighlight":XM,"interaction.legendActive":$M,"interaction.legendHighlight":JM,"interaction.tooltip":YM,"interaction.fisheye":UM,"interaction.brush":tS,"interaction.brushHighlight":oS,"interaction.brushVisible":aS,"interaction.activeRegion":sS,"interaction.ellipsisText":lS,"composition.layer":dS,"composition.flex":pS,"composition.mark":yS,"composition.view":fS,"composition.rect":SS,"composition.matrix":NS,"composition.circle":DS,"composition.keyframe":BS,"adjust.pack":FS,"labelLayout.hideOverlap":eP}}function rP(e,n){const r=t=>{return"string"!=typeof t?t:n[t=e+"."+t]||kb("Unknown Component: "+t)};return[t=>{var e=t["type"],t=I(t,["type"]);return r(e)(Object.assign({},t))},r]}function iP(t,e,n){for(;t<e;)t+=2*Math.PI;for(;n<t;)t-=2*Math.PI;return t}function oP(t,e,n,r,i){var o=t[0],t=t[1],a=no();return o=[o,t],(t=a)[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=o[0],t[7]=o[1],t[8]=1,t}function aP(t,e,n,r,i){var o=new Uv({range:[e,e+r]}),a=new Uv({range:[n,n+i]});return{transform:function(t){var e=t[0],t=t[1];return[o.map(e),a.map(t)]},untransform:function(t){var e=t[0],t=t[1];return[o.invert(e),a.invert(t)]}}}function sP(t,e,n,r,i){return(0,t[0])(e,n,r,i)}function lP(t,e,n,r,i){return t[0]}function uP(t,e,n,r,i){var o=t[0],a=t[1],s=t[2],t=t[3],l=new Uv({range:[s,t]}),u=new Uv({range:[o,a]}),c=1<(s=i/r)?1:s,h=1<s?1/s:1;return{transform:function(t){var e=t[0],t=t[1],e=u.map(e),t=l.map(t);return[.5*(t*Math.cos(e)*c)+.5,.5*(t*Math.sin(e)*h)+.5]},untransform:function(t){var e=t[0],t=t[1],e=2*(e-.5)/c,t=2*(t-.5)/h,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=iP(Math.atan2(t,e),o,a);return[u.invert(t),l.invert(n)]}}}function cP(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 hP(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return mP.apply(void 0,vP([[-1,-1]],e,!1))}function dP(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return mP.apply(void 0,vP([[-1,1]],e,!1))}function pP(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return mP.apply(void 0,vP([[1,-1]],e,!1))}function fP(t,e,n,r,i){var o,t=t[0],a=no();return a=a,t=t,o=Math.sin(t),t=Math.cos(t),a[0]=t,a[1]=o,a[2]=0,a[3]=-o,a[4]=t,a[5]=0,a[6]=0,a[7]=0,a[8]=1,a}function yP(t,e,n,r,i){var o=t[0],a=t[1],s=t[2],l=(t[3]-s)/(+a/(2*Math.PI)+1),u=l/(2*Math.PI),c=new Uv({range:[s,s+.99*l]}),h=new Uv({range:[o,a]}),d=1<(t=i/r)?1:t,p=1<t?1/t:1;return{transform:function(t){var e=t[0],t=t[1],e=h.map(e),t=c.map(t);return[.5*(Math.cos(e)*(u*e+t)*d)+.5,.5*(Math.sin(e)*(u*e+t)*p)+.5]},untransform:function(t){var e=t[0],t=t[1],e=2*(e-.5)/d,t=2*(t-.5)/p,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=iP(Math.atan2(t,e)+Math.floor(n/l)*Math.PI*2,o,a),e=n-u*t;return[h.invert(t),c.invert(e)]}}}function gP(t,e,n,r,i){var s=t[0],l=t[1],o=t[2],t=t[3],u=new Uv({range:[o,t]});return{transform:function(t){for(var e=[],n=t.length,r=new qv({domain:new Array(n).fill(0).map(function(t,e){return e}),range:[s,l]}),i=0;i<n;i++){var o=t[i],a=r.map(i),o=u.map(o);e.push(a,o)}return e},untransform:function(t){for(var e=[],n=0;n<t.length;n+=2){var r=t[n+1];e.push(u.invert(r))}return e}}}var mP=function(t,e,n,r,i){var o=t[0],t=t[1],a=no();return o=[o,t],(t=a)[0]=o[0],t[1]=0,t[2]=0,t[3]=0,t[4]=o[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},vP=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;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 bP(t){return 1/Math.tan(t)}function xP(t,e,n,r,i){var o=bP(t[0]);return{transform:function(t){var e=t[0],t=t[1];return[e+t*o,t]},untransform:function(t){var e=t[0],t=t[1];return[e-t*o,t]}}}function wP(t,e,n,r,i){var o=bP(t[0]);return{transform:function(t){var e=t[0];return[e,t[1]+e*o]},untransform:function(t){var e=t[0];return[e,t[1]-e*o]}}}function EP(t,e,n,r,i){var o=t<e,i=(o?e-r:i-e)||i-r,r=o?-1:1;return r*i*(n+1)/(n+i/((t-e)*r))+e}function _P(t,e,n,r,i){var o=t<e,i=(o?e-r:i-e)||i-r;return i/(i*(n+1)/(t-e)-n*(o?-1:1))+e}function kP(t,e,n){return n?new Uv({range:[0,1],domain:[0,e]}).map(t):t}function TP(t,e,n,r,i){var o=t[0],a=t[1],t=t[2],s=kP(o,r,void 0!==t&&t);return{transform:function(t){var e=t[0],t=t[1];return[EP(e,s,a,0,1),t]},untransform:function(t){var e=t[0],t=t[1];return[_P(e,s,a,0,1),t]}}}function MP(t,e,n,r,i){var o=t[0],a=t[1],t=t[2],s=kP(o,i,void 0!==t&&t);return{transform:function(t){return[t[0],EP(t[1],s,a,0,1)]},untransform:function(t){return[t[0],_P(t[1],s,a,0,1)]}}}function SP(t,e,n,r,i){var o=t[0],a=t[1],s=t[2],l=t[3],t=t[4],u=kP(o,r,t=void 0!==t&&t),c=kP(a,i,t);return{transform:function(t){var e=t[0],t=t[1];return[EP(e,u,s,0,1),EP(t,c,l,0,1)]},untransform:function(t){var e=t[0],t=t[1];return[_P(e,u,s,0,1),_P(t,c,l,0,1)]}}}function OP(t,e,n,r,i){var o=t[0],a=t[1],s=t[2],l=t[3],t=void 0!==(t=t[4])&&t,u=new Uv({range:[0,r]}),c=new Uv({range:[0,i]}),h=t?o:u.map(o),d=t?a:c.map(a);return{transform:function(t){var e=t[0],t=t[1],n=u.map(e)-h,r=c.map(t)-d,i=Math.sqrt(n*n+r*r);return s<i?[e,t]:(e=EP(i,0,l,0,s),t=Math.atan2(r,n),i=h+e*Math.cos(t),r=d+e*Math.sin(t),[u.invert(i),c.invert(r)])},untransform:function(t){var e=t[0],t=t[1],n=u.map(e)-h,r=c.map(t)-d,i=Math.sqrt(n*n+r*r);return s<i?[e,t]:(e=_P(i,0,l,0,s),t=Math.atan2(r,n),i=h+e*Math.cos(t),r=d+e*Math.sin(t),[u.invert(i),c.invert(r)])}}}var PP=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;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))},AP=(NP.prototype.update=function(t){this.options=N({},this.options,t),this.recoordinate()},NP.prototype.clone=function(){return new NP(this.options)},NP.prototype.getOptions=function(){return this.options},NP.prototype.clear=function(){this.update({transformations:[]})},NP.prototype.getSize=function(){var t=this.options;return[t.width,t.height]},NP.prototype.getCenter=function(){var t=this.options,e=t.x,n=t.y;return[(2*e+t.width)/2,(2*n+t.height)/2]},NP.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:PP(PP([],n,!0),[PP([],t,!0)],!1)}),this},NP.prototype.map=function(t){return this.output(t)},NP.prototype.invert=function(t){return this.input(t)},NP.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},NP.prototype.compose=function(t){for(var e=(t=void 0===t?!1:t)?PP([],this.options.transformations,!0).reverse():this.options.transformations,n=t?function(t){return t.untransform}:function(t){return t.transform},r=[],o=[],i=function(t,e){return o.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},a=0,s=e;a<s.length;a++){var l,u,c,h,d=s[a],p=d[0],d=d.slice(1),f=this.transformers[p];f&&(l=(h=this.options).x,u=h.y,c=h.width,h=h.height,f=f(PP([],d,!0),l,u,c,h),(d=f)instanceof Float32Array||d instanceof Array?r.push(f):(r.length&&(i(this.createMatrixTransform(r,t)),r.splice(0,r.length)),i(n(f)||xt,"parallel"!==p)))}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):xt}.apply(void 0,o)},NP.prototype.createMatrixTransform=function(t,e){var n,r,i,o,a,s,l,u,c,h,d,p,f=no();return e&&t.reverse(),t.forEach(function(t){return ro(f,f,t)}),e&&(e=t=f,(p=new eo(9))[0]=e[0],p[1]=e[1],p[2]=e[2],p[3]=e[3],p[4]=e[4],p[5]=e[5],p[6]=e[6],p[7]=e[7],p[8]=e[8],p=(e=p)[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],l=e[7],u=(e=e[8])*o-a*l,(d=p*u+n*(c=-e*i+a*s)+r*(h=l*i-o*s))&&(t[0]=u*(d=1/d),t[1]=(-e*n+r*l)*d,t[2]=(a*n-r*o)*d,t[3]=c*d,t[4]=(e*p-r*s)*d,t[5]=(-a*p+r*i)*d,t[6]=h*d,t[7]=(-l*p+n*s)*d,t[8]=(o*p-n*i)*d)),function(t){t=[t[0],t[1],1];return zo(t,t,f),[t[0],t[1]]}},NP);function NP(t){this.options={x:0,y:0,width:300,height:150,transformations:[]},this.transformers={cartesian:aP,translate:oP,custom:sP,matrix:lP,polar:uP,transpose:cP,scale:mP,"shear.x":xP,"shear.y":wP,reflect:hP,"reflect.x":dP,"reflect.y":pP,rotate:fP,helix:yP,parallel:gP,fisheye:SP,"fisheye.x":TP,"fisheye.y":MP,"fisheye.circular":OP},this.update(t)}function CP(t){return void 0!==t.find(t=>"polar"===t.type)}function LP(t){return void 0!==t.find(t=>"helix"===t.type)}function IP(t){return t.filter(({type:t})=>"transpose"===t).length%2==1}function jP(t){return void 0!==t.find(t=>"theta"===t.type)}function RP(t,e,n,r,i,o,a){var s,l,u,c,h=t["scaleName"],t=function(t,e,n,r,i,o){var{name:a,field:s}=t,{field:s=s,guide:l={}}=e,u=function(t,e){var{scale:t,name:n,value:r,visual:i}=t,{type:e,domain:o,range:a}=e;return void 0!==t?t:void 0!==e?e:i||function(t){return t.some(t=>"object"==typeof t&&!(t instanceof Date)&&null!==t)}(r)?"identity":2<(o||a||[]).length?zP(n):void 0===o?GP(r)?zP(n):HP(r)?"time":"linear":GP(o)?zP(n):HP(r)?"time":"linear"}(t,e);return"string"!=typeof u?e:Object.assign(Object.assign(Object.assign({},e),function(t,e,n,r){var i=e["name"];switch(t){case"linear":case"time":case"log":case"pow":return function(t){var{interpolate:e=Iv,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)return r;var t=function(t,e,n){return"enterDelay"===e||"enterDuration"===e?0:"band"===t?CP(n)||jP(n)?0:.1:"point"===t&&CP(n)?.5:0}(t,e,n),{paddingInner:e=t,paddingOuter:n=t}=r;return Object.assign(Object.assign({},r),{paddingInner:e,paddingOuter:n})}(t,i,r,n);default:return n}}(u,t,e,n)),{domain:function(t,e,n){var r=e["value"],e=n["domain"];if(void 0!==e)return e;switch(t){case"linear":case"time":case"log":case"pow":case"threshold":return function(t,e){var{zero:e=!1}=e;if(0===t.length)return[];let n=1/0,r=-1/0;for(const i of t)Mb(i)&&(n=Math.min(n,+i),r=Math.max(r,+i));return e?[Math.min(0,n),r]:[n,r]}(r,n);case"band":case"ordinal":case"point":return VP(r);case"quantile":return function(t){return VP(t).sort()}(r);default:return[]}}(u,t,e),range:function(t,e,n,r,i,o){var a=n["range"];if(void 0!==a)return a;const[s]=rP("palette",o),{name:l,value:u}=e,{defaultCategory10:c,defaultCategory20:h}=i,d={type:function(t){return Array.from(new Set(t))}(u).length<=10?c:h},{palette:p=d}=n,f=s(p);switch(t){case"linear":case"band":case"point":case"time":case"log":return 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)]:"size"===t?[1,10]:[0,1]}(l,f);case"ordinal":return"color"===l?f:r;default:return[]}}(u,t,e,r,i,o),guide:l,name:a,field:s,type:u})}(t,e,n,r,i,a),e=t["independent"];return e?t:o.has(h)?(n=o.get(h),r=h,i=t,{type:e,domain:s,range:l}=a=n,{type:i,domain:u,range:c}=i,"string"==typeof e&&"string"==typeof i&&(a.type=function(t,e,n){{if(YP(t,e,"linear","identity"))return"identity";if(YP(t,e,"band","point"))return"band";if(t!==e)throw new Error(`Incompatible scale type: ${t} !== ${e} for channel: `+n);return t}}(e,i,r),a.domain=function(t,e,n){switch(t){case"linear":case"pow":case"log":return UP(e,n);case"band":case"ordinal":return qP(e,n);default:return e}}(e,s,u),a.range=function(t,e,n){switch(t){case"linear":case"band":case"pow":case"log":return UP(e,n);case"ordinal":return qP(e,n);default:return e}}(e,l,c)),n):(o.set(h,t),t)}function DP(t,e){const n=t.map(t=>t[e]).filter(({facet:t=!0})=>t);var t=n.flatMap(t=>t.domain),r=n.every(BP)?Kg(t):n.every(FP)?Array.from(new Set(t)):null;if(null!==r)for(const i of n)i.domain=r}function BP(t){t=t.type;return"string"==typeof t&&["linear","log","pow","time"].includes(t)}function FP(t){t=t.type;return"string"==typeof t&&["band","point","ordinal"].includes(t)}function zP(t){return(t=t).startsWith("x")||t.startsWith("y")||t.startsWith("position")||t.startsWith("size")?"point":"ordinal"}function VP(t){return Array.from(new Set(t))}function GP(t){return t.some(t=>{t=typeof t;return"string"==t||"boolean"==t})}function HP(t){return t.some(t=>t instanceof Date)}function WP(t){return t.startsWith("x")||t.startsWith("y")||t.startsWith("position")||"enterDelay"===t||"enterDuration"===t||"updateDelay"===t||"updateDuration"===t||"exitDelay"===t||"exitDuration"===t}function YP(t,e,n,r){return t===n&&e===r||t===r&&e===n}function UP(t,e){var[t,n]=t,[e,r]=e;return[Math.min(+t,+e),Math.max(+n,+r)]}function qP(t,e){return Array.from(new Set([...t,...e]))}function XP(t,e,n){var{scale:r={},transform:i=[]}=e,e=I(e,["scale","transform"]);return[t,Object.assign(Object.assign({},e),{scale:r,transform:i})]}function ZP(t,o,a){return Ot(this,void 0,void 0,function*(){var t=a["library"],e=o["data"],[t]=rP("data",t),n=function(t){if(Array.isArray(t))return{type:"inline",value:t};var{type:e="inline"}=t,t=I(t,["type"]);return Object.assign(Object.assign({},t),{type:e})}(e),{transform:r=[]}=n;const i=[I(n,["transform"]),...r];n=yield _b(i.map(t))(e);return[Array.isArray(n)?mS(n):[],Object.assign(Object.assign({},o),{data:n})]})}function KP(t,e,n){var r,i,o=e["encode"];const a={};for([r,i]of Object.entries(o))if(Array.isArray(i))for(let t=0;t<i.length;t++){var s=""+r+(0===t?"":t);a[s]=i[t]}else a[r]=i;return[t,Object.assign(Object.assign({},e),{encode:a})]}function $P(t,e,n){const{encode:r,data:i}=e;var o=gS(r,t=>{var e,n;return function(t){if("object"!=typeof t||t instanceof Date)return;t=t.type;return Mb(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})});return[t,Object.assign(Object.assign({},e),{encode:o})]}function JP(t,e,n){var r=e["encode"],r=gS(r,(t,e)=>{var n=t["type"];return"constant"!==n||WP(e)?t:Object.assign(Object.assign({},t),{visual:!0})});return[t,Object.assign(Object.assign({},e),{encode:r})]}function QP(t,e,n){const{encode:r,data:i}=e;n=n.library;const o=function(t){const[n]=rP("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=gS(r,t=>o(i,t));return[t,Object.assign(Object.assign({},e),{encode:n})]}function tA(l,t,e){var n=t["encode"],t=I(t,["encode"]);const r=Object.entries(n);n=r.filter(([,t])=>{t=t.value;return Array.isArray(t[0])}).flatMap(([n,t])=>{const r=[[n,new Array(l.length).fill(void 0)]],i=t["value"],o=I(t,["value"]);for(let e=0;e<i.length;e++){var a=i[e];if(Array.isArray(a))for(let t=0;t<a.length;t++){const s=r[t]||[""+n+t,new Array(l).fill(void 0)];s[1][e]=a[t],r[t]=s}}return r.map(([t,e])=>[t,Object.assign({type:"column",value:e},o)])}),n=Object.fromEntries([...r,...n]);return[l,Object.assign(Object.assign({},t),{encode:n})]}function eA(y,g,m,v,b,x){return Ot(this,void 0,void 0,function*(){var[t,e]=yield function(s,l,u){return Ot(this,void 0,void 0,function*(){var t=u["library"],[t]=rP("transform",t);const{preInference:e=[],postInference:n=[]}=l,{transform:r=[]}=s;t=[XP,ZP,KP,$P,JP,QP,tA,...e.map(t),...r.map(t),...n.map(t)];let i=[],o=s;for(const a of t)[i,o]=yield a(i,o,u);return[i,o]})}(y,g,{library:x}),{data:n,encode:r,scale:i={}}=e;if(!1===Array.isArray(n))return null;const o=g["channels"],s=tm(Object.entries(r).filter(([,t])=>Mb(t)),([t])=>{return null==(t=/([^\d]+)\d*$/.exec(t))?void 0:t[1]}),a=o.filter(t=>{var{name:t,required:e}=t;if(s.has(t))return!0;if(e)throw new Error(`Missing encoding for channel: ${t}.`);return!1}).flatMap(a=>{var t=a["name"];const e=s.get(t);return e.map(t=>{var{independent:e=!1,name:n,scaleName:r}=i=a,i=I(i,["independent","name","scaleName"]),[t,o]=t;return Object.assign(Object.assign(Object.assign({},i),o),{name:t,scaleName:null!=r?r:e?t:n})})}),l={};var{coordinate:u=[]}=b;const c=tm(a,t=>t.scaleName);for(const[f,a]of c.entries()){var h=g["shapes"],d=function(t){const e={};for(const a of t){var{value:n=[],field:r}=e,{value:i=[],field:o}=a;Object.assign(e,a),e.value=[...n,...i],e.field=null==o?r:o}return e}(a),{[f]:p={}}=i;l[f]=RP(d,p,u,h,v,m,x)}return[Object.assign(Object.assign({},e),{scale:l}),Object.assign(Object.assign({},g),{channels:a,index:t})]})}function nA(t,n,e){var{component:r=[],coordinate:i=[],title:o,theme:a}=n;const[,s]=rP("component",e);var l,e=t.filter(({guide:t,name:e})=>null!==t&&(!function(t){const{marks:e=[]}=t;return e.some(t=>"object"==typeof t.adjust)}(n)||!WP(e)));const u=[...r];o&&(t=s("title")["props"],{defaultPosition:r,defaultOrder:t,defaultSize:l}=t,a=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)}(N({size:l},a,l="string"==typeof o?{text:o}:o)),u.push(Object.assign({type:"title",position:r,order:t,size:a},l)));for(const g of e){var c,h,d,p,f,y=function(t,e){const{name:n,guide:r,type:i}=t,o=r["type"];if(void 0!==o)return o;if("color"===n)switch(i){case"ordinal":return"legendCategory";case"linear":return"legendContinuous";default:return null}return IP(e)&&CP(e)||LP(e)||jP(e)?null:n.startsWith("x")?IP(e)?"axisY":"axisX":n.startsWith("y")?IP(e)?"axisX":"axisY":n.startsWith("position")&&!CP(e)?"axisY":null}(g,i);null!==y&&(p=s(y)["props"],{defaultPosition:p,defaultSize:f,defaultOrder:c}=p,{guide:h,name:d}=g,{position:d=function(t,e,n,r,i){r=["left","right","top","bottom","centerHorizontal"].includes(r.position)?r.position:n;{if("axisY"===e&&function(t){return void 0!==t.find(t=>"parallel"===t.type)}(i))return null===(n=/position(\d*)/g.exec(t))||0==+n[1]?r:"centerHorizontal";if("axisX"===e&&CP(i)&&!IP(i)||"axisY"===e&&CP(i)&&IP(i)||"axisY"===e&&jP(i)||"axisY"===e&&LP(i))return"arc";if(CP(i)&&("axisX"===e||"axisY"===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"}return r}(d,y,p,h,i),size:p=f,order:f=c}=h,u.push(Object.assign(Object.assign({},h),{position:d,order:f,size:p,type:y,scale:g})))}return u}function rA(t,e,n,r){const[i]=rP("scale",r),[o]=rP("component",r);var{scale:r,bbox:a}=t,t=I(t,["scale","bbox"]),s=r?i(r):null,{field:r,domain:l}=r||{},r={field:r,domain:l,bbox:a};const u=o(t);return u(s,r,e,n)}function iA(t,e){var t=function(t,e){const n=tm(t,t=>t.position),{paddingLeft:r,paddingRight:i,paddingBottom:o,paddingTop:a}=e,s={paddingBottom:o,paddingLeft:r,paddingTop:a,paddingRight:i};for(const c of["left","right","top","bottom"]){var l="padding"+function(t){return t.replace(/( |^)[a-z]/g,t=>t.toUpperCase())}(c);if(void 0===s[l])if(n.has(c)){const t=n.get(c);var u=t.reduce((t,{size:e})=>t+e,0);s[l]=u}else s[l]=30}return s}(t,e),{paddingLeft:n,paddingRight:r,paddingTop:i,paddingBottom:o}=t,{width:e,height:a,x:s=0,y:l=0}=e;return Object.assign(Object.assign({},t),{width:e,height:a,innerWidth:e-n-r,innerHeight:a-i-o,x:s,y:l})}function oA(t,e,n){const r=tm(t,t=>t.position);var{paddingLeft:t,paddingRight:i,paddingTop:o,paddingBottom:a,innerHeight:s,innerWidth:l,height:u,width:c}=n,h={top:[t,0,l,o,0,!0,Xg],right:[c-i,o,i,s,1,!1,Xg],bottom:[t,u-a,l,a,0,!1,Xg],left:[0,o,t,s,1,!0,Xg],centerHorizontal:[t,o,l,s,-1,null,null],arc:[t,o,c-t-i,u-o-a,-1,null,null],arcY:[t,o,c-t-i,u-o-a,-1,null,null]};for(const[b,t]of r.entries()){var d=h[b];if("centerHorizontal"===b)!function(e,t,n,r){const[,i,,o]=r,a=t["paddingLeft"],s=new Array(e.length+1).fill(0),l=n.map(s),u=l.filter((t,e)=>e%2==0).map(t=>t+a);for(let t=0;t<e.length;t++){const d=e[t];var c=u[t],h=u[t+1]-c;d.bbox={x:c,y:i,width:h,height:o}}}(t,n,e,d);else if("arc"===b||"arcY"===b){v=m=g=y=f=p=void 0;var p=t,f=d,[y,g,m,v]=f;for(let t=0;t<p.length;t++){const x=p[t];x.bbox={x:y,y:g,width:m,height:v}}}else!function(n,t){const[e,r,i,o,a,s,l]=t,[u,c,h,d,p,f,y,g]=0===a?["y",r,"x",e,"height",o,"width",i]:["x",e,"y",r,"width",i,"height",o],m=(n.sort((t,e)=>l(t.order,e.order)),s?c+f:c);for(let t=0,e=m;t<n.length;t++){const b=n[t];var v=b["size"];b.bbox={[u]:s?e-v:e,[h]:d,[p]:v,[y]:g},e+=v*(s?-1:1)}}(t,d)}}function aA(N,C,L){return Ot(this,void 0,void 0,function*(){const[r]=rP("composition",L),[t]=rP("interaction",L),e=new Set(Object.keys(L).map(t=>{return null==(t=/mark\.(.*)/.exec(t))?void 0:t[1]}).filter(Mb)),i=t=>{t=t.type;return"string"==typeof t&&e.has(t)?"mark":t};const o=t=>"standardView"===i(t);var n=t=>{if(o(t))return[t];var e=i(t);const n=r({type:e});return n(t)};const a=[],s=new Map,l=new Map,u=[N],c=[];for(;u.length;){var h=u.shift();if(o(h)){var d=l.get(h);const[_,k]=d?cA(d,h,L):yield lA(h,L),T=(s.set(_,h),a.push(_),k.flatMap(n));if(u.push(...T),T.every(o)){var p=yield Promise.all(T.map(t=>uA(t,L)));DP(d=(d=p).flatMap(t=>Array.from(t.keys())).map(t=>t.scale),"x"),DP(d,"y");for(let t=0;t<T.length;t++){var f=T[t],y=p[t];l.set(f,y)}}}else{d="mark"===i(h)?h:yield function(r,i){return Ot(this,void 0,void 0,function*(){var t={library:i},e=r["data"],n=I(r,["data"]);return null==e?r:([,{data:e}]=yield ZP(0,{data:e},t),Object.assign({data:e},n))})}(h,L);const M=n(d);Array.isArray(M)?u.push(...M):"function"==typeof M&&c.push(M())}}const g=new Map,m=[];C.selectAll(".view").data(a,t=>t.key).join(t=>t.append("g").attr("className","view").attr("id",t=>t.key).call(sA).each(function(t){hA(t,Ob(this),m,L),g.set(t,this)}),t=>t.call(sA).each(function(t){hA(t,Ob(this),m,L)}),t=>t.remove()),C.selectAll(".view").each(function(t){{var e=t,n=Ob(this),r=(m,L),i,o;const{markState:s,labelLayout:l}=e,u=[];for([i,o]of s.entries()){var a=i["key"];const c=n.select("#"+a),h=function(t,e,n,r){return dA("labelShape",t,e,n,r)}(i,o,e,r);c.selectAll(".element").each(function(t,e){if(void 0!==(null==t?void 0:t.label)){const n=h(t,e,this);t=this.getElementById(".label");t?(u.push(t),Tb(t,n)):(n.id="label",this.appendChild(n),u.push(n))}})}l&&l(u)}});var v=Array.from(g.entries()).map(([t,e])=>({view:t,container:e,options:s.get(t),update:function(i,o){return r=>Ot(this,void 0,void 0,function*(){var[t,e]=yield lA(r,o);hA(t,i,[],o);for(const n of e)aA(n,i,o)})}(Ob(e),L)}));for(const S of v){const N=S["options"];var b=N["interaction"];for(const O of function(t=[]){const n=[...t];return["tooltip","ellipsisText"].forEach(e=>{t.find(t=>t.type===e)||n.push({type:e})}),n}(b)){const P=t(O);P(S,v)}}const{width:x,height:w}=N;for(const A of c){var E=new Promise(e=>Ot(this,void 0,void 0,function*(){for(const t of A)yield aA(Object.assign({width:x,height:w},t),C,L);e()}));m.push(E)}return Promise.all(m)})}function sA(t){t.style("transform",t=>`translate(${t.layout.x}, ${t.layout.y})`)}function lA(t,e){return Ot(this,void 0,void 0,function*(){return cA(yield uA(t,e),t,e)})}function uA(c,h){return Ot(this,void 0,void 0,function*(){const[t]=rP("theme",h),[,e]=rP("mark",h);var{theme:n,marks:r}=c,i=t(yA(n));const o=new Map;var a=new Map;for(const u of r){var s,{type:l=kb("G2Mark type is required.")}=u,l=e(l)["props"],l=yield eA(u,l,a,i,c,h);l&&([l,s]=l,o.set(l,s))}return o})}function cA(t,e,n){const[r]=rP("mark",n);var[i]=rP("scale",n);const[o]=rP("adjust",n),[a]=rP("theme",n);var[s]=rP("labelLayout",n);const{key:l,frame:u,theme:c,labelLayout:h=[]}=e;var d=a(yA(c)),s=h.map(s).reduce((e,n)=>t=>n(e(t)),Eb);const R=Array.from(t.keys());var p,f,y=new Set(R.flatMap(t=>Object.values(t.scale))),y=nA(Array.from(y),e,n),g=iA(y,e),m=function(t,e,n){var[n]=rP("coordinate",n),{innerHeight:t,innerWidth:r}=t,{coordinate:e=[]}=e;const i=(e=e).find(t=>"cartesian"===t.type)?e:[...e,{type:"cartesian"}];return new AP({x:0,y:0,width:r,height:t,transformations:i.map(n).flat()})}(g,e,n),v=(oA(y,m,g),{});const b=[];for([p,f]of t.entries()){const{scale:_,children:k,dataDomain:T,adjust:M}=p;var{index:x,channels:w}=f,E=gS(_,i);Object.assign(v,E);const S=function(t,e){const n={};for(var{scaleName:r,value:i,name:o}of t){const a=e[r];n[o]=i.map(t=>a.map(t))}return n}(w,E),O=r(p),[P,A,N]=O(x,E,S,m),C=[],L=[];for(let t=0;t<P.length;t++){var D=P[t];const j=A[t];j.every(([t,e])=>Mb(t)&&Mb(e))&&(C.push(D),L.push(j))}w=T||C.length;const I=M?o(M)(A,w,g):[];x=C.map((t,e)=>{const n={points:L[e],transform:I[e]};for(const[r,i]of Object.entries(S))n[r]=i[t],N&&(n["series"+ut(r)]=N[e].map(t=>i[t]));return n}),w=(f.data=x,f.index=C,null===k||void 0===k?void 0:k(x,E,g));b.push(...w||[])}return[{layout:g,theme:d,coordinate:m,components:y,markState:t,key:l,frame:u,labelLayout:s,scale:v},b]}function hA(m,v,b,x){Ot(this,void 0,void 0,function*(){const{components:t,theme:n,layout:e,markState:r,coordinate:i,key:o,frame:a=!1}=m;v.selectAll(".component").data(t,(t,e)=>t.type+"-"+e).join(t=>t.append("g").style("zIndex",({zIndex:t})=>t||-1).attr("className","component").append(t=>rA(t,i,n,x)),t=>t.each(function(t){t=rA(t,i,n,x).attributes;const[e]=this.childNodes;e.update(Object.assign({},t))})),v.selectAll(".plot").data([e],()=>o).join(t=>t.append("rect").attr("className","plot").style("fill","transparent").call(mA,a).call(gA).call(vA,Array.from(r.keys())),t=>t.call(gA).call(vA,Array.from(r.keys())));for(var[s,l]of r.entries()){var u=l["data"];const{key:o,class:d}=s,p=(c=s,h=l,dA("shape",c,h,m,x)),f=(c=s,h=l,pA("enter",c,h,m,x)),y=(c=s,h=l,pA("update",c,h,m,x)),g=(c=s,h=l,pA("exit",c,h,m,x));s=function(t,e,n){const r=t.node().parentElement;return r.findAll(t=>t.style.facet===e).flatMap(t=>t.getElementsByClassName(n))}(v,d,"element"),l=v.select("#"+o).selectAll(".element").selectFacetAll(s).data(u,t=>t.key,t=>t.groupKey).join(t=>t.append(p).attr("className","element").transition(function(t){return f(t,[this])}),e=>e.call(t=>{const l=t.parent(),u=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=u,n.__facet__&&(o=n.parentNode.parentNode,s=r.parentNode,[o,a]=i(o),[i,s]=i(s),o=`translate(${o-i}, ${a-s})`,i=n.style.transform,n.style.transform=(("none"===i?"":i)+" "+o).trimStart(),r.append(n));var n,r,i,o,a=p(t,e),s=y(t,[this],[a]);return null===s&&Tb(this,a),s})}),t=>t.transition(function(t){return g(t,[this])}).remove(),t=>t.append(p).attr("className","element").transition(function(t){var e=this["__fromElements__"],t=y(t,e,[this]);const n=new Pb(e,null,this.parentNode);return n.transition(t).remove(),t}),t=>t.transition(function(t){const e=new Pb([],this.__toData__,this.parentNode);var n=e.append(p).attr("className","element").nodes();return y(t,[this],n)}).remove()).transitions();b.push(...l)}var c,h})}function dA(a,t,e,n,r){const[s]=rP("shape",r);r="default"+ut(a);const{[r]:l,data:i}=e,u=i.map(t=>t.points),{theme:c,coordinate:h}=n,d=t["style"];return(t,e,n)=>{var r=t[a],i=t["points"],t=I(t,["symbol"==typeof a?a:a+"","points"]),t=Object.assign(Object.assign({},t),{index:e,element:n}),n="object"==typeof(e=r||l)?e:{type:e};const o=s(Object.assign(Object.assign({},n),d));return o(i,t,h,c,u)}}function pA(l,t,e,n,r){const[,i]=rP("shape",r),[u]=rP("animation",r);r=e.defaultShape;const{theme:o,coordinate:c}=n;e=`default${ut(l)}Animation`;const{[e]:h}=i(r).props,{[l]:d={}}=t.animate||{},{[l]:p={}}=o;return(t,e,n)=>{var{[l+"Type"]:t,[l+"Delay"]:r,[l+"Duration"]:i,[l+"Easing"]:o}=t,t=Object.assign({type:t||h},d);if(!t.type)return null;const a=u(t),s=a(e,n,{delay:r,duration:i,easing:o},c,p);return Array.isArray(s)?Promise.all(s.map(fA)):fA(s)}}function fA(t){return t.finished.then(()=>{t.cancel()})}function yA(t={type:"light"}){var{type:e="light"}=t;return Object.assign(Object.assign({},t),{type:e})}function gA(t){t.style("x",t=>t.paddingLeft).style("y",t=>t.paddingTop).style("width",t=>t.innerWidth).style("height",t=>t.innerHeight)}function mA(t,e){e&&t.style("lineWidth",1).style("stroke","black")}function vA(t,e){const n=t=>void 0!==t.class?""+t.class:"";t.each(function(){Ob(this).selectAll(".main").data(e,t=>t.key).join(t=>t.append("g").attr("className","main").attr("id",t=>t.key).style("facet",n).style("fill","transparent"),t=>t.style("facet",n),t=>t.remove())})}function bA(t,e={},n){const{width:r=640,height:i=480}=t,o=function(t){t=N({},t);const e=new Map([[t,null]]),n=new Map([[null,-1]]),r=[t];for(;r.length;){const l=r.shift();void 0===l.key&&(o=e.get(l),i=n.get(l),o=null===o?"0":o.key+"-"+i,l.key=o);var i,o,{children:a=[]}=l;if(Array.isArray(a))for(let t=0;t<a.length;t++){var s=a[t];e.set(s,l),n.set(s,t),r.push(s)}}return t}(t),{canvas:a=Sg({width:r,height:i,container:document.createElement("div")}),library:s=nP()}=e,l=(e.canvas=a,e.library=s,Ob(a.document.documentElement));return a.ready.then(()=>aA(Object.assign(Object.assign({},o),{width:r,height:i}),l,s)).then(n),"string"==typeof(t=a.getConfig().container)?document.getElementById(t):t}class xA{constructor(t={},e){this.parentNode=null,this.children=[],this.index=0,this.type=e,this.value=t}map(t=t=>t){t=t(pt(this.value));return this.value=t,this}attr(e,n){return void 0===n?this.value[e]:this.map(t=>(t[e]=n,t))}append(t){const e=new t({});return e.children=[],e.parentNode=this,e.index=this.children.length,this.children.push(e),e}call(t,...e){return t(this.map(),...e),this}}function wA(r){return t=>{for(const n of r){var e=n["type"];"value"===e?function(t,{name:e}){t.prototype[e]=function(t){return this.attr(e,t)}}(t,n):"array"===e?function(t,{name:r}){t.prototype[r]=function(t){if(Array.isArray(t)||void 0===t)return this.attr(r,t);var e=this.attr(r);const n=[...Array.isArray(e)?e:[]];return n.push(t),this.attr(r,n)}}(t,n):"object"===e?function(t,{name:r}){t.prototype[r]=function(t,e){if(H(t)||void 0===t)return this.attr(r,t);const n=pt(this.attr(r)||{});return n[t]=e,this.attr(r,n)}}(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)}return t}}function EA(t){return Object.entries(t).map(([t,e])=>({type:"node",name:t,ctor:e}))}c=[{name:"encode",type:"object"},{name:"scale",type:"object"},{name:"data",type:"value"},{name:"key",type:"value"},{name:"class",type:"value"},{name:"transform",type:"array"},{name:"style",type:"object"},{name:"animate",type:"object"},{name:"frame",type:"value"},{name:"facet",type:"value"},{name:"adjust",type:"value"},{name:"coordinate",type:"array"},{name:"interaction",type:"array"},{name:"paddingLeft",type:"value"},{name:"paddingRight",type:"value"},{name:"paddingBottom",type:"value"},{name:"paddingTop",type:"value"}];let _A=class extends xA{constructor(){super({},"interval")}},kA=(_A=t([wA(c)],_A),class extends xA{constructor(){super({},"point")}}),TA=(kA=t([wA(c)],kA),class extends xA{constructor(){super({},"area")}}),MA=(TA=t([wA(c)],TA),class extends xA{constructor(){super({},"line")}}),SA=(MA=t([wA(c)],MA),class extends xA{constructor(){super({},"grid")}}),OA=(SA=t([wA(c)],SA),class extends xA{constructor(){super({},"vector")}}),PA=(OA=t([wA(c)],OA),class extends xA{constructor(){super({},"link")}}),AA=(PA=t([wA(c)],PA),class extends xA{constructor(){super({},"polygon")}});AA=t([wA(c)],AA);a=t([wA(c)],class extends xA{constructor(){super({},"image")}});let NA=class extends xA{constructor(){super({},"text")}},CA=(NA=t([wA(c)],NA),class extends xA{constructor(){super({},"schema")}}),LA=(CA=t([wA(c)],CA),class extends xA{constructor(){super({},"annotation.text")}}),IA=(LA=t([wA(c)],LA),class extends xA{constructor(){super({},"annotation.lineX")}}),jA=(IA=t([wA(c)],IA),class extends xA{constructor(){super({},"annotation.lineY")}}),RA=(jA=t([wA(c)],jA),class extends xA{constructor(){super({},"annotation.range")}}),DA=(RA=t([wA(c)],RA),class extends xA{constructor(){super({},"annotation.rangeX")}}),BA=(DA=t([wA(c)],DA),class extends xA{constructor(){super({},"annotation.rangeY")}}),FA=(BA=t([wA(c)],BA),class extends xA{constructor(){super({},"annotation.connector")}});FA=t([wA(c)],FA);u={interval:_A,point:kA,area:TA,line:MA,grid:SA,vector:OA,link:PA,polygon:AA,image:a,text:NA,schema:CA,annotationText:LA,annotationLineX:IA,annotationLineY:jA,annotationRange:RA,annotationRangeX:DA,annotationRangeY:BA,annotationConnector:FA};let zA=class extends xA{constructor(){super({},"view")}},VA=(zA=t([wA([{type:"value",name:"paddingLeft"},{type:"value",name:"paddingRight"},{type:"value",name:"paddingBottom"},{type:"value",name:"paddingTop"},{type:"value",name:"data"},{type:"value",name:"key"},{type:"array",name:"coordinate"},{type:"array",name:"interaction"},{type:"object",name:"theme"},...EA(u)])],zA),class extends xA{constructor(){super({},"layer")}}),GA=(VA=t([wA([{type:"value",name:"data"},{type:"value",name:"key"},...EA(u)])],VA),class extends xA{constructor(){super({},"flex")}}),HA=(GA=t([wA([{type:"value",name:"data"},{type:"value",name:"key"},{type:"value",name:"padding"},{type:"value",name:"ratio"},{type:"value",name:"direction"},...EA(u)])],GA),class extends xA{constructor(){super({},"rect")}}),WA=(HA=t([wA([{type:"value",name:"data"},{type:"value",name:"key"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"value",name:"paddingLeft"},{type:"value",name:"paddingRight"},{type:"value",name:"paddingBottom"},{type:"value",name:"paddingTop"},{type:"value",name:"shareData"},{type:"value",name:"shareSize"},...EA(u)])],HA),class extends xA{constructor(){super({},"circle")}}),YA=(WA=t([wA([{type:"value",name:"data"},{type:"value",name:"key"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"value",name:"paddingLeft"},{type:"value",name:"paddingRight"},{type:"value",name:"paddingBottom"},{type:"value",name:"paddingTop"},...EA(u)])],WA),class extends xA{constructor(){super({},"matrix")}}),UA=(YA=t([wA([{type:"value",name:"data"},{type:"value",name:"key"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"value",name:"paddingLeft"},{type:"value",name:"paddingRight"},{type:"value",name:"paddingBottom"},{type:"value",name:"paddingTop"},...EA(u)])],YA),class extends xA{constructor(){super({},"keyframe")}});UA=t([wA([{type:"value",name:"key"},{type:"value",name:"direction"},{type:"value",name:"easing"},{type:"value",name:"iterationCount"},{type:"value",name:"duration"},...EA(u)])],UA);var qA={view:zA,layer:VA,flex:GA,rect:HA,circle:WA,matrix:YA,keyframe:UA};for(const $A of Object.values(qA))wA(EA(qA))($A);const XA=nP();function ZA(t){var e=pt(t.value);return Object.assign(Object.assign({},e),{type:t.type})}function KA(t){t=function(t){if(null!==t.type)return t;const e=t.children[t.children.length-1];return e.attr("width",t.attr("width")),e.attr("height",t.attr("height")),e.attr("paddingLeft",t.attr("paddingLeft")),e.attr("paddingTop",t.attr("paddingTop")),e.attr("paddingBottom",t.attr("paddingBottom")),e.attr("paddingRight",t.attr("paddingRight")),e}(t);const e=[t],n=new Map;for(n.set(t,ZA(t));e.length;){const t=e.pop(),i=n.get(t);for(const o of t.children){var r=ZA(o);const{children:a=[]}=i;a.push(r),e.push(o),n.set(o,r),i.children=a}}return n.get(t)}d=[{name:"data",type:"value"},{name:"coordinate",type:"array"},{name:"interaction",type:"array"},{name:"theme",type:"object"},{name:"title",type:"object"},{name:"key",type:"value"},{name:"transform",type:"array"},{name:"theme",type:"object"},...EA(u),...Object.entries(qA).map(([t,e])=>({type:"container",name:t,ctor:e}))];L.Chart=class extends xA{constructor(t={}){var e=t["container"];super(I(t,["container"]),"view"),this._container=void 0===(t=e)?document.createElement("div"):"string"==typeof t?document.getElementById(t):t,this._context={library:XA}}render(){var t=bA(KA(this),this._context);return t.parentNode!==this._container&&this._container.append(t),this}options(){return KA(this)}node(){return this._container}context(){return this._context}},L.Chart=t([wA(d)],L.Chart),L.createLibrary=nP,L.register=function(t,e){Object.assign(XA,{[t]:e})},L.render=bA,Object.defineProperty(L,"__esModule",{value:!0})});
|