{"version":3,"sources":["node_modules/@sentry/core/build/esm/debug-build.js","node_modules/@sentry/core/build/esm/utils-hoist/worldwide.js","node_modules/@sentry/core/build/esm/utils-hoist/debug-build.js","node_modules/@sentry/core/build/esm/utils-hoist/version.js","node_modules/@sentry/core/build/esm/carrier.js","node_modules/@sentry/core/build/esm/utils-hoist/logger.js","node_modules/@sentry/core/build/esm/utils-hoist/stacktrace.js","node_modules/@sentry/core/build/esm/utils-hoist/instrument/handlers.js","node_modules/@sentry/core/build/esm/utils-hoist/instrument/globalError.js","node_modules/@sentry/core/build/esm/utils-hoist/instrument/globalUnhandledRejection.js","node_modules/@sentry/core/build/esm/utils-hoist/is.js","node_modules/@sentry/core/build/esm/utils-hoist/browser.js","node_modules/@sentry/core/build/esm/utils-hoist/string.js","node_modules/@sentry/core/build/esm/utils-hoist/object.js","node_modules/@sentry/core/build/esm/utils-hoist/time.js","node_modules/@sentry/core/build/esm/utils-hoist/misc.js","node_modules/@sentry/core/build/esm/utils-hoist/syncpromise.js","node_modules/@sentry/core/build/esm/session.js","node_modules/@sentry/core/build/esm/utils-hoist/propagationContext.js","node_modules/@sentry/core/build/esm/utils/merge.js","node_modules/@sentry/core/build/esm/utils/spanOnScope.js","node_modules/@sentry/core/build/esm/scope.js","node_modules/@sentry/core/build/esm/defaultScopes.js","node_modules/@sentry/core/build/esm/asyncContext/stackStrategy.js","node_modules/@sentry/core/build/esm/asyncContext/index.js","node_modules/@sentry/core/build/esm/currentScopes.js","node_modules/@sentry/core/build/esm/semanticAttributes.js","node_modules/@sentry/core/build/esm/tracing/utils.js","node_modules/@sentry/core/build/esm/utils/parseSampleRate.js","node_modules/@sentry/core/build/esm/utils-hoist/baggage.js","node_modules/@sentry/core/build/esm/utils/spanUtils.js","node_modules/@sentry/core/build/esm/utils/hasSpansEnabled.js","node_modules/@sentry/core/build/esm/constants.js","node_modules/@sentry/core/build/esm/tracing/dynamicSamplingContext.js","node_modules/@sentry/core/build/esm/utils-hoist/dsn.js","node_modules/@sentry/core/build/esm/utils-hoist/normalize.js","node_modules/@sentry/core/build/esm/utils-hoist/envelope.js","node_modules/@sentry/core/build/esm/envelope.js","node_modules/@sentry/core/build/esm/eventProcessors.js","node_modules/@sentry/core/build/esm/utils-hoist/debug-ids.js","node_modules/@sentry/core/build/esm/utils/applyScopeDataToEvent.js","node_modules/@sentry/core/build/esm/utils/prepareEvent.js","node_modules/@sentry/core/build/esm/exports.js","node_modules/@sentry/core/build/esm/api.js","node_modules/@sentry/core/build/esm/integration.js","node_modules/@sentry/core/build/esm/utils-hoist/clientreport.js","node_modules/@sentry/core/build/esm/utils-hoist/error.js","node_modules/@sentry/core/build/esm/utils/eventUtils.js","node_modules/@sentry/core/build/esm/utils/transactionEvent.js","node_modules/@sentry/core/build/esm/client.js","node_modules/@sentry/core/build/esm/sdk.js","node_modules/@sentry/core/build/esm/utils-hoist/promisebuffer.js","node_modules/@sentry/core/build/esm/utils-hoist/ratelimit.js","node_modules/@sentry/core/build/esm/transports/base.js","node_modules/@sentry/core/build/esm/utils/ipAddress.js","node_modules/@sentry/core/build/esm/utils/sdkMetadata.js","node_modules/@sentry/core/build/esm/breadcrumbs.js","node_modules/@sentry/core/build/esm/integrations/functiontostring.js","node_modules/@sentry/core/build/esm/integrations/eventFilters.js","node_modules/@sentry/core/build/esm/utils-hoist/aggregate-errors.js","node_modules/@sentry/core/build/esm/utils-hoist/instrument/console.js","node_modules/@sentry/core/build/esm/utils-hoist/severity.js","node_modules/@sentry/core/build/esm/integrations/dedupe.js","node_modules/@sentry/core/build/esm/utils-hoist/url.js","node_modules/@sentry/core/build/esm/utils-hoist/breadcrumb-log-level.js","node_modules/@sentry/core/build/esm/utils-hoist/supports.js","node_modules/@sentry/core/build/esm/utils-hoist/instrument/fetch.js","node_modules/@sentry/core/build/esm/utils-hoist/env.js","node_modules/@sentry/browser/build/npm/esm/helpers.js","node_modules/@sentry/browser/build/npm/esm/eventbuilder.js","node_modules/@sentry/browser/build/npm/esm/client.js","node_modules/@sentry-internal/browser-utils/build/esm/debug-build.js","node_modules/@sentry-internal/browser-utils/build/esm/types.js","node_modules/@sentry-internal/browser-utils/build/esm/instrument/dom.js","node_modules/@sentry-internal/browser-utils/build/esm/instrument/history.js","node_modules/@sentry-internal/browser-utils/build/esm/getNativeImplementation.js","node_modules/@sentry-internal/browser-utils/build/esm/instrument/xhr.js","node_modules/@sentry/browser/build/npm/esm/transports/fetch.js","node_modules/@sentry/browser/build/npm/esm/stack-parsers.js","node_modules/@sentry/browser/build/npm/esm/debug-build.js","node_modules/@sentry/browser/build/npm/esm/integrations/breadcrumbs.js","node_modules/@sentry/browser/build/npm/esm/integrations/browserapierrors.js","node_modules/@sentry/browser/build/npm/esm/integrations/browsersession.js","node_modules/@sentry/browser/build/npm/esm/integrations/globalhandlers.js","node_modules/@sentry/browser/build/npm/esm/integrations/httpcontext.js","node_modules/@sentry/browser/build/npm/esm/integrations/linkederrors.js","node_modules/@sentry/browser/build/npm/esm/sdk.js","node_modules/@sentry/angular/fesm2020/sentry-angular.mjs","node_modules/@angular/common/locales/ca.mjs","node_modules/@angular/common/locales/de.mjs","node_modules/@angular/common/locales/en.mjs","node_modules/@angular/common/locales/es.mjs","node_modules/@angular/common/locales/fr.mjs","node_modules/@angular/common/locales/it.mjs","node_modules/@angular/animations/fesm2022/browser.mjs","node_modules/@angular/platform-browser/fesm2022/animations.mjs","src/assets/i18n/ca.json","src/assets/i18n/de.json","src/assets/i18n/en.json","src/assets/i18n/es.json","src/assets/i18n/fr.json","src/assets/i18n/it.json","src/assets/i18n/oc.json","src/app/app.component.ts","src/app/providers/authentication-service/http-headers.ts","src/app/providers/ws-region-service/ws-region.service.ts","src/app/layouts/full-layout.component.ts","src/app/layouts/full-layout.component.html","src/app/layouts/simple-layout.component.ts","src/app/routes.ts","node_modules/echarts/core.js","node_modules/echarts/node_modules/tslib/tslib.es6.js","node_modules/zrender/lib/zrender.js","node_modules/zrender/lib/core/env.js","node_modules/zrender/lib/core/util.js","node_modules/zrender/lib/core/platform.js","node_modules/zrender/node_modules/tslib/tslib.es6.js","node_modules/zrender/lib/core/vector.js","node_modules/zrender/lib/mixin/Draggable.js","node_modules/zrender/lib/core/Eventful.js","node_modules/zrender/lib/core/fourPointsTransform.js","node_modules/zrender/lib/core/dom.js","node_modules/zrender/lib/core/event.js","node_modules/zrender/lib/core/GestureMgr.js","node_modules/zrender/lib/core/matrix.js","node_modules/zrender/lib/core/Point.js","node_modules/zrender/lib/core/BoundingRect.js","node_modules/zrender/lib/Handler.js","node_modules/zrender/lib/core/timsort.js","node_modules/zrender/lib/graphic/constants.js","node_modules/zrender/lib/Storage.js","node_modules/zrender/lib/animation/requestAnimationFrame.js","node_modules/zrender/lib/animation/easing.js","node_modules/zrender/lib/core/curve.js","node_modules/zrender/lib/animation/cubicEasing.js","node_modules/zrender/lib/animation/Clip.js","node_modules/zrender/lib/tool/color.js","node_modules/zrender/lib/core/LRU.js","node_modules/zrender/lib/svg/helper.js","node_modules/zrender/lib/animation/Animator.js","node_modules/zrender/lib/animation/Animation.js","node_modules/zrender/lib/dom/HandlerProxy.js","node_modules/zrender/lib/config.js","node_modules/zrender/lib/core/Transformable.js","node_modules/zrender/lib/contain/text.js","node_modules/zrender/lib/Element.js","node_modules/zrender/lib/graphic/Group.js","node_modules/echarts/lib/util/number.js","node_modules/echarts/lib/util/log.js","node_modules/echarts/lib/util/model.js","node_modules/echarts/lib/util/clazz.js","node_modules/echarts/lib/model/mixin/makeStyleMapper.js","node_modules/echarts/lib/model/mixin/areaStyle.js","node_modules/zrender/lib/graphic/helper/image.js","node_modules/zrender/lib/graphic/helper/parseText.js","node_modules/zrender/lib/graphic/Displayable.js","node_modules/zrender/lib/core/bbox.js","node_modules/zrender/lib/core/PathProxy.js","node_modules/zrender/lib/contain/line.js","node_modules/zrender/lib/contain/cubic.js","node_modules/zrender/lib/contain/quadratic.js","node_modules/zrender/lib/contain/util.js","node_modules/zrender/lib/contain/arc.js","node_modules/zrender/lib/contain/windingLine.js","node_modules/zrender/lib/contain/path.js","node_modules/zrender/lib/graphic/Path.js","node_modules/zrender/lib/graphic/TSpan.js","node_modules/zrender/lib/graphic/Image.js","node_modules/zrender/lib/graphic/helper/roundRect.js","node_modules/zrender/lib/graphic/helper/subPixelOptimize.js","node_modules/zrender/lib/graphic/shape/Rect.js","node_modules/zrender/lib/graphic/Text.js","node_modules/echarts/lib/util/innerStore.js","node_modules/echarts/lib/util/states.js","node_modules/echarts/lib/util/graphic.js","node_modules/zrender/lib/tool/transformPath.js","node_modules/zrender/lib/tool/path.js","node_modules/zrender/lib/graphic/shape/Circle.js","node_modules/zrender/lib/graphic/shape/Ellipse.js","node_modules/zrender/lib/graphic/helper/roundSector.js","node_modules/zrender/lib/graphic/shape/Sector.js","node_modules/zrender/lib/graphic/shape/Ring.js","node_modules/zrender/lib/graphic/helper/smoothBezier.js","node_modules/zrender/lib/graphic/helper/poly.js","node_modules/zrender/lib/graphic/shape/Polygon.js","node_modules/zrender/lib/graphic/shape/Polyline.js","node_modules/zrender/lib/graphic/shape/Line.js","node_modules/zrender/lib/graphic/shape/BezierCurve.js","node_modules/zrender/lib/graphic/shape/Arc.js","node_modules/zrender/lib/graphic/CompoundPath.js","node_modules/zrender/lib/graphic/Gradient.js","node_modules/zrender/lib/graphic/LinearGradient.js","node_modules/zrender/lib/graphic/RadialGradient.js","node_modules/zrender/lib/core/OrientedBoundingRect.js","node_modules/zrender/lib/graphic/IncrementalDisplayable.js","node_modules/echarts/lib/animation/basicTransition.js","node_modules/echarts/lib/label/labelStyle.js","node_modules/echarts/lib/model/mixin/textStyle.js","node_modules/echarts/lib/model/mixin/lineStyle.js","node_modules/echarts/lib/model/mixin/itemStyle.js","node_modules/echarts/lib/model/Model.js","node_modules/echarts/lib/util/component.js","node_modules/echarts/lib/i18n/langEN.js","node_modules/echarts/lib/i18n/langZH.js","node_modules/echarts/lib/core/locale.js","node_modules/echarts/lib/util/time.js","node_modules/echarts/lib/legacy/getTextRect.js","node_modules/echarts/lib/util/format.js","node_modules/echarts/lib/util/layout.js","node_modules/echarts/lib/model/Component.js","node_modules/echarts/lib/model/globalDefault.js","node_modules/echarts/lib/util/types.js","node_modules/echarts/lib/data/helper/sourceHelper.js","node_modules/echarts/lib/model/internalComponentCreator.js","node_modules/echarts/lib/model/mixin/palette.js","node_modules/echarts/lib/model/Global.js","node_modules/echarts/lib/core/ExtensionAPI.js","node_modules/echarts/lib/core/CoordinateSystem.js","node_modules/echarts/lib/model/OptionManager.js","node_modules/echarts/lib/preprocessor/helper/compatStyle.js","node_modules/echarts/lib/preprocessor/backwardCompat.js","node_modules/echarts/lib/processor/dataStack.js","node_modules/echarts/lib/data/Source.js","node_modules/echarts/lib/data/helper/dataProvider.js","node_modules/echarts/lib/model/mixin/dataFormat.js","node_modules/echarts/lib/core/task.js","node_modules/echarts/lib/data/helper/dataValueHelper.js","node_modules/echarts/lib/data/helper/transform.js","node_modules/echarts/lib/data/DataStore.js","node_modules/echarts/lib/data/helper/sourceManager.js","node_modules/echarts/lib/component/tooltip/tooltipMarkup.js","node_modules/echarts/lib/component/tooltip/seriesFormatTooltip.js","node_modules/echarts/lib/model/Series.js","node_modules/echarts/lib/view/Component.js","node_modules/echarts/lib/chart/helper/createRenderPlanner.js","node_modules/echarts/lib/view/Chart.js","node_modules/echarts/lib/util/throttle.js","node_modules/echarts/lib/visual/style.js","node_modules/echarts/lib/loading/default.js","node_modules/echarts/lib/core/Scheduler.js","node_modules/echarts/lib/theme/light.js","node_modules/echarts/lib/theme/dark.js","node_modules/echarts/lib/util/ECEventProcessor.js","node_modules/echarts/lib/visual/symbol.js","node_modules/echarts/lib/visual/helper.js","node_modules/echarts/lib/legacy/dataSelectAction.js","node_modules/echarts/lib/util/event.js","node_modules/zrender/lib/core/WeakMap.js","node_modules/echarts/lib/util/symbol.js","node_modules/zrender/lib/canvas/helper.js","node_modules/zrender/lib/canvas/dashStyle.js","node_modules/zrender/lib/canvas/graphic.js","node_modules/echarts/lib/util/decal.js","node_modules/echarts/lib/visual/decal.js","node_modules/echarts/lib/core/lifecycle.js","node_modules/echarts/lib/core/impl.js","node_modules/echarts/lib/core/echarts.js","node_modules/echarts/lib/data/DataDiffer.js","node_modules/echarts/lib/data/helper/dimensionHelper.js","node_modules/echarts/lib/data/SeriesDimensionDefine.js","node_modules/echarts/lib/data/helper/SeriesDataSchema.js","node_modules/echarts/lib/data/SeriesData.js","node_modules/echarts/lib/export/api/helper.js","node_modules/echarts/lib/data/helper/createDimensions.js","node_modules/echarts/lib/model/referHelper.js","node_modules/echarts/lib/data/helper/dataStackHelper.js","node_modules/echarts/lib/chart/helper/createSeriesData.js","node_modules/echarts/lib/scale/Scale.js","node_modules/echarts/lib/data/OrdinalMeta.js","node_modules/echarts/lib/scale/helper.js","node_modules/echarts/lib/scale/Ordinal.js","node_modules/echarts/lib/scale/Interval.js","node_modules/echarts/lib/util/vendor.js","node_modules/echarts/lib/layout/barGrid.js","node_modules/echarts/lib/scale/Time.js","node_modules/echarts/lib/scale/Log.js","node_modules/echarts/lib/coord/scaleRawExtentInfo.js","node_modules/echarts/lib/coord/axisHelper.js","node_modules/echarts/lib/coord/axisModelCommonMixin.js","node_modules/echarts/lib/extension.js","node_modules/zrender/lib/contain/polygon.js","node_modules/echarts/lib/coord/geo/Region.js","node_modules/echarts/lib/coord/geo/parseGeoJson.js","node_modules/echarts/lib/export/api/number.js","node_modules/echarts/lib/export/api/time.js","node_modules/echarts/lib/export/api/graphic.js","node_modules/echarts/lib/export/api/format.js","node_modules/echarts/lib/export/api/util.js","node_modules/echarts/lib/coord/axisTickLabelBuilder.js","node_modules/echarts/lib/coord/Axis.js","node_modules/echarts/lib/export/api.js","node_modules/echarts/lib/label/labelLayoutHelper.js","node_modules/zrender/lib/canvas/Layer.js","node_modules/zrender/lib/canvas/Painter.js","node_modules/echarts/lib/renderer/installCanvasRenderer.js","node_modules/echarts/lib/chart/line/LineSeries.js","node_modules/echarts/lib/chart/helper/labelHelper.js","node_modules/echarts/lib/chart/helper/Symbol.js","node_modules/echarts/lib/chart/helper/SymbolDraw.js","node_modules/echarts/lib/chart/line/helper.js","node_modules/echarts/lib/chart/line/lineAnimationDiff.js","node_modules/echarts/lib/chart/line/poly.js","node_modules/echarts/lib/chart/helper/createClipPathFromCoordSys.js","node_modules/echarts/lib/coord/CoordinateSystem.js","node_modules/echarts/lib/chart/line/LineView.js","node_modules/echarts/lib/layout/points.js","node_modules/echarts/lib/processor/dataSample.js","node_modules/echarts/lib/chart/line/install.js","node_modules/echarts/lib/chart/bar/BaseBarSeries.js","node_modules/echarts/lib/chart/bar/BarSeries.js","node_modules/echarts/lib/util/shape/sausage.js","node_modules/echarts/lib/label/sectorLabel.js","node_modules/echarts/lib/chart/helper/sectorHelper.js","node_modules/echarts/lib/chart/bar/BarView.js","node_modules/echarts/lib/chart/bar/install.js","node_modules/echarts/lib/chart/scatter/ScatterSeries.js","node_modules/echarts/lib/chart/helper/LargeSymbolDraw.js","node_modules/echarts/lib/chart/scatter/ScatterView.js","node_modules/echarts/lib/coord/cartesian/GridModel.js","node_modules/echarts/lib/coord/cartesian/AxisModel.js","node_modules/echarts/lib/coord/axisDefault.js","node_modules/echarts/lib/coord/axisCommonTypes.js","node_modules/echarts/lib/coord/axisModelCreator.js","node_modules/echarts/lib/coord/cartesian/Cartesian.js","node_modules/echarts/lib/coord/cartesian/Cartesian2D.js","node_modules/echarts/lib/coord/cartesian/Axis2D.js","node_modules/echarts/lib/coord/cartesian/cartesianAxisHelper.js","node_modules/echarts/lib/coord/axisAlignTicks.js","node_modules/echarts/lib/coord/cartesian/Grid.js","node_modules/echarts/lib/component/axis/AxisBuilder.js","node_modules/echarts/lib/component/axisPointer/modelHelper.js","node_modules/echarts/lib/component/axis/AxisView.js","node_modules/echarts/lib/component/axis/axisSplitHelper.js","node_modules/echarts/lib/component/axis/CartesianAxisView.js","node_modules/echarts/lib/component/grid/installSimple.js","node_modules/echarts/lib/chart/scatter/install.js","node_modules/echarts/lib/component/axisPointer/BaseAxisPointer.js","node_modules/echarts/lib/component/axisPointer/viewHelper.js","node_modules/echarts/lib/component/axisPointer/CartesianAxisPointer.js","node_modules/echarts/lib/component/axisPointer/AxisPointerModel.js","node_modules/echarts/lib/component/axisPointer/globalListener.js","node_modules/echarts/lib/component/axisPointer/AxisPointerView.js","node_modules/echarts/lib/component/axisPointer/findPointFromSeries.js","node_modules/echarts/lib/component/axisPointer/axisTrigger.js","node_modules/echarts/lib/component/axisPointer/install.js","node_modules/echarts/lib/component/grid/install.js","node_modules/echarts/lib/component/axisPointer/PolarAxisPointer.js","node_modules/echarts/lib/coord/polar/PolarModel.js","node_modules/echarts/lib/coord/polar/AxisModel.js","node_modules/echarts/lib/coord/polar/RadiusAxis.js","node_modules/echarts/lib/coord/polar/AngleAxis.js","node_modules/echarts/lib/coord/polar/Polar.js","node_modules/echarts/lib/coord/polar/polarCreator.js","node_modules/echarts/lib/component/axis/AngleAxisView.js","node_modules/echarts/lib/component/axis/RadiusAxisView.js","node_modules/echarts/lib/layout/barPolar.js","node_modules/echarts/lib/component/polar/install.js","node_modules/echarts/lib/coord/single/singleAxisHelper.js","node_modules/echarts/lib/component/axis/SingleAxisView.js","node_modules/echarts/lib/coord/single/AxisModel.js","node_modules/echarts/lib/coord/single/SingleAxis.js","node_modules/echarts/lib/coord/single/Single.js","node_modules/echarts/lib/coord/single/singleCreator.js","node_modules/echarts/lib/component/axisPointer/SingleAxisPointer.js","node_modules/echarts/lib/component/singleAxis/install.js","node_modules/echarts/lib/component/helper/listComponent.js","node_modules/echarts/lib/component/tooltip/TooltipModel.js","node_modules/echarts/lib/component/tooltip/helper.js","node_modules/echarts/lib/component/tooltip/TooltipHTMLContent.js","node_modules/echarts/lib/component/tooltip/TooltipRichContent.js","node_modules/echarts/lib/component/tooltip/TooltipView.js","node_modules/echarts/lib/component/tooltip/install.js","node_modules/echarts/lib/component/title/install.js","node_modules/echarts/lib/component/legend/LegendModel.js","node_modules/echarts/lib/component/legend/LegendView.js","node_modules/echarts/lib/component/legend/legendFilter.js","node_modules/echarts/lib/component/legend/legendAction.js","node_modules/echarts/lib/component/legend/installLegendPlain.js","node_modules/echarts/lib/component/legend/ScrollableLegendModel.js","node_modules/echarts/lib/component/legend/ScrollableLegendView.js","node_modules/echarts/lib/component/legend/scrollableLegendAction.js","node_modules/echarts/lib/component/legend/installLegendScroll.js","node_modules/echarts/lib/component/legend/install.js","node_modules/echarts/lib/util/conditionalExpression.js","node_modules/echarts/lib/component/transform/filterTransform.js","node_modules/echarts/lib/component/transform/sortTransform.js","node_modules/echarts/lib/component/transform/install.js","node_modules/echarts/lib/component/dataset/install.js","src/main.ts"],"sourcesContent":["/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nconst DEBUG_BUILD = typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__;\nexport { DEBUG_BUILD };\n","/** Internal global with common properties and Sentry extensions */\n\n/** Get's the global object for the current JavaScript runtime */\nconst GLOBAL_OBJ = globalThis;\nexport { GLOBAL_OBJ };\n","/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nconst DEBUG_BUILD = typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__;\nexport { DEBUG_BUILD };\n","// This is a magic string replaced by rollup\n\nconst SDK_VERSION = \"9.4.0\";\nexport { SDK_VERSION };\n","import { SDK_VERSION } from './utils-hoist/version.js';\nimport { GLOBAL_OBJ } from './utils-hoist/worldwide.js';\n\n/**\n * An object that contains globally accessible properties and maintains a scope stack.\n * @hidden\n */\n\n/**\n * Returns the global shim registry.\n *\n * FIXME: This function is problematic, because despite always returning a valid Carrier,\n * it has an optional `__SENTRY__` property, which then in turn requires us to always perform an unnecessary check\n * at the call-site. We always access the carrier through this function, so we can guarantee that `__SENTRY__` is there.\n **/\nfunction getMainCarrier() {\n // This ensures a Sentry carrier exists\n getSentryCarrier(GLOBAL_OBJ);\n return GLOBAL_OBJ;\n}\n\n/** Will either get the existing sentry carrier, or create a new one. */\nfunction getSentryCarrier(carrier) {\n const __SENTRY__ = carrier.__SENTRY__ = carrier.__SENTRY__ || {};\n\n // For now: First SDK that sets the .version property wins\n __SENTRY__.version = __SENTRY__.version || SDK_VERSION;\n\n // Intentionally populating and returning the version of \"this\" SDK instance\n // rather than what's set in .version so that \"this\" SDK always gets its carrier\n return __SENTRY__[SDK_VERSION] = __SENTRY__[SDK_VERSION] || {};\n}\n\n/**\n * Returns a global singleton contained in the global `__SENTRY__[]` object.\n *\n * If the singleton doesn't already exist in `__SENTRY__`, it will be created using the given factory\n * function and added to the `__SENTRY__` object.\n *\n * @param name name of the global singleton on __SENTRY__\n * @param creator creator Factory function to create the singleton if it doesn't already exist on `__SENTRY__`\n * @param obj (Optional) The global object on which to look for `__SENTRY__`, if not `GLOBAL_OBJ`'s return value\n * @returns the singleton\n */\nfunction getGlobalSingleton(name, creator, obj = GLOBAL_OBJ) {\n const __SENTRY__ = obj.__SENTRY__ = obj.__SENTRY__ || {};\n const carrier = __SENTRY__[SDK_VERSION] = __SENTRY__[SDK_VERSION] || {};\n // Note: We do not want to set `carrier.version` here, as this may be called before any `init` is called, e.g. for the default scopes\n return carrier[name] || (carrier[name] = creator());\n}\nexport { getGlobalSingleton, getMainCarrier, getSentryCarrier };\n","import { getGlobalSingleton } from '../carrier.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { GLOBAL_OBJ } from './worldwide.js';\n\n/** Prefix for logging strings */\nconst PREFIX = 'Sentry Logger ';\nconst CONSOLE_LEVELS = ['debug', 'info', 'warn', 'error', 'log', 'assert', 'trace'];\n\n/** This may be mutated by the console instrumentation. */\nconst originalConsoleMethods = {};\n\n/** A Sentry Logger instance. */\n\n/**\n * Temporarily disable sentry console instrumentations.\n *\n * @param callback The function to run against the original `console` messages\n * @returns The results of the callback\n */\nfunction consoleSandbox(callback) {\n if (!('console' in GLOBAL_OBJ)) {\n return callback();\n }\n const console = GLOBAL_OBJ.console;\n const wrappedFuncs = {};\n const wrappedLevels = Object.keys(originalConsoleMethods);\n\n // Restore all wrapped console methods\n wrappedLevels.forEach(level => {\n const originalConsoleMethod = originalConsoleMethods[level];\n wrappedFuncs[level] = console[level];\n console[level] = originalConsoleMethod;\n });\n try {\n return callback();\n } finally {\n // Revert restoration to wrapped state\n wrappedLevels.forEach(level => {\n console[level] = wrappedFuncs[level];\n });\n }\n}\nfunction makeLogger() {\n let enabled = false;\n const logger = {\n enable: () => {\n enabled = true;\n },\n disable: () => {\n enabled = false;\n },\n isEnabled: () => enabled\n };\n if (DEBUG_BUILD) {\n CONSOLE_LEVELS.forEach(name => {\n logger[name] = (...args) => {\n if (enabled) {\n consoleSandbox(() => {\n GLOBAL_OBJ.console[name](`${PREFIX}[${name}]:`, ...args);\n });\n }\n };\n });\n } else {\n CONSOLE_LEVELS.forEach(name => {\n logger[name] = () => undefined;\n });\n }\n return logger;\n}\n\n/**\n * This is a logger singleton which either logs things or no-ops if logging is not enabled.\n * The logger is a singleton on the carrier, to ensure that a consistent logger is used throughout the SDK.\n */\nconst logger = getGlobalSingleton('logger', makeLogger);\nexport { CONSOLE_LEVELS, consoleSandbox, logger, originalConsoleMethods };\n","const STACKTRACE_FRAME_LIMIT = 50;\nconst UNKNOWN_FUNCTION = '?';\n// Used to sanitize webpack (error: *) wrapped stack errors\nconst WEBPACK_ERROR_REGEXP = /\\(error: (.*)\\)/;\nconst STRIP_FRAME_REGEXP = /captureMessage|captureException/;\n\n/**\n * Creates a stack parser with the supplied line parsers\n *\n * StackFrames are returned in the correct order for Sentry Exception\n * frames and with Sentry SDK internal frames removed from the top and bottom\n *\n */\nfunction createStackParser(...parsers) {\n const sortedParsers = parsers.sort((a, b) => a[0] - b[0]).map(p => p[1]);\n return (stack, skipFirstLines = 0, framesToPop = 0) => {\n const frames = [];\n const lines = stack.split('\\n');\n for (let i = skipFirstLines; i < lines.length; i++) {\n const line = lines[i];\n // Ignore lines over 1kb as they are unlikely to be stack frames.\n // Many of the regular expressions use backtracking which results in run time that increases exponentially with\n // input size. Huge strings can result in hangs/Denial of Service:\n // https://github.com/getsentry/sentry-javascript/issues/2286\n if (line.length > 1024) {\n continue;\n }\n\n // https://github.com/getsentry/sentry-javascript/issues/5459\n // Remove webpack (error: *) wrappers\n const cleanedLine = WEBPACK_ERROR_REGEXP.test(line) ? line.replace(WEBPACK_ERROR_REGEXP, '$1') : line;\n\n // https://github.com/getsentry/sentry-javascript/issues/7813\n // Skip Error: lines\n if (cleanedLine.match(/\\S*Error: /)) {\n continue;\n }\n for (const parser of sortedParsers) {\n const frame = parser(cleanedLine);\n if (frame) {\n frames.push(frame);\n break;\n }\n }\n if (frames.length >= STACKTRACE_FRAME_LIMIT + framesToPop) {\n break;\n }\n }\n return stripSentryFramesAndReverse(frames.slice(framesToPop));\n };\n}\n\n/**\n * Gets a stack parser implementation from Options.stackParser\n * @see Options\n *\n * If options contains an array of line parsers, it is converted into a parser\n */\nfunction stackParserFromStackParserOptions(stackParser) {\n if (Array.isArray(stackParser)) {\n return createStackParser(...stackParser);\n }\n return stackParser;\n}\n\n/**\n * Removes Sentry frames from the top and bottom of the stack if present and enforces a limit of max number of frames.\n * Assumes stack input is ordered from top to bottom and returns the reverse representation so call site of the\n * function that caused the crash is the last frame in the array.\n * @hidden\n */\nfunction stripSentryFramesAndReverse(stack) {\n if (!stack.length) {\n return [];\n }\n const localStack = Array.from(stack);\n\n // If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call)\n if (/sentryWrapped/.test(getLastStackFrame(localStack).function || '')) {\n localStack.pop();\n }\n\n // Reversing in the middle of the procedure allows us to just pop the values off the stack\n localStack.reverse();\n\n // If stack ends with one of our internal API calls, remove it (ends, meaning it's the bottom of the stack - aka top-most call)\n if (STRIP_FRAME_REGEXP.test(getLastStackFrame(localStack).function || '')) {\n localStack.pop();\n\n // When using synthetic events, we will have a 2 levels deep stack, as `new Error('Sentry syntheticException')`\n // is produced within the scope itself, making it:\n //\n // Sentry.captureException()\n // scope.captureException()\n //\n // instead of just the top `Sentry` call itself.\n // This forces us to possibly strip an additional frame in the exact same was as above.\n if (STRIP_FRAME_REGEXP.test(getLastStackFrame(localStack).function || '')) {\n localStack.pop();\n }\n }\n return localStack.slice(0, STACKTRACE_FRAME_LIMIT).map(frame => ({\n ...frame,\n filename: frame.filename || getLastStackFrame(localStack).filename,\n function: frame.function || UNKNOWN_FUNCTION\n }));\n}\nfunction getLastStackFrame(arr) {\n return arr[arr.length - 1] || {};\n}\nconst defaultFunctionName = '';\n\n/**\n * Safely extract function name from itself\n */\nfunction getFunctionName(fn) {\n try {\n if (!fn || typeof fn !== 'function') {\n return defaultFunctionName;\n }\n return fn.name || defaultFunctionName;\n } catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n return defaultFunctionName;\n }\n}\n\n/**\n * Get's stack frames from an event without needing to check for undefined properties.\n */\nfunction getFramesFromEvent(event) {\n const exception = event.exception;\n if (exception) {\n const frames = [];\n try {\n // @ts-expect-error Object could be undefined\n exception.values.forEach(value => {\n // @ts-expect-error Value could be undefined\n if (value.stacktrace.frames) {\n // @ts-expect-error Value could be undefined\n frames.push(...value.stacktrace.frames);\n }\n });\n return frames;\n } catch (_oO) {\n return undefined;\n }\n }\n return undefined;\n}\nexport { UNKNOWN_FUNCTION, createStackParser, getFramesFromEvent, getFunctionName, stackParserFromStackParserOptions, stripSentryFramesAndReverse };\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { logger } from '../logger.js';\nimport { getFunctionName } from '../stacktrace.js';\n\n// We keep the handlers globally\nconst handlers = {};\nconst instrumented = {};\n\n/** Add a handler function. */\nfunction addHandler(type, handler) {\n handlers[type] = handlers[type] || [];\n handlers[type].push(handler);\n}\n\n/**\n * Reset all instrumentation handlers.\n * This can be used by tests to ensure we have a clean slate of instrumentation handlers.\n */\nfunction resetInstrumentationHandlers() {\n Object.keys(handlers).forEach(key => {\n handlers[key] = undefined;\n });\n}\n\n/** Maybe run an instrumentation function, unless it was already called. */\nfunction maybeInstrument(type, instrumentFn) {\n if (!instrumented[type]) {\n instrumented[type] = true;\n try {\n instrumentFn();\n } catch (e) {\n DEBUG_BUILD && logger.error(`Error while instrumenting ${type}`, e);\n }\n }\n}\n\n/** Trigger handlers for a given instrumentation type. */\nfunction triggerHandlers(type, data) {\n const typeHandlers = type && handlers[type];\n if (!typeHandlers) {\n return;\n }\n for (const handler of typeHandlers) {\n try {\n handler(data);\n } catch (e) {\n DEBUG_BUILD && logger.error(`Error while triggering instrumentation handler.\\nType: ${type}\\nName: ${getFunctionName(handler)}\\nError:`, e);\n }\n }\n}\nexport { addHandler, maybeInstrument, resetInstrumentationHandlers, triggerHandlers };\n","import { GLOBAL_OBJ } from '../worldwide.js';\nimport { addHandler, maybeInstrument, triggerHandlers } from './handlers.js';\nlet _oldOnErrorHandler = null;\n\n/**\n * Add an instrumentation handler for when an error is captured by the global error handler.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addGlobalErrorInstrumentationHandler(handler) {\n const type = 'error';\n addHandler(type, handler);\n maybeInstrument(type, instrumentError);\n}\nfunction instrumentError() {\n _oldOnErrorHandler = GLOBAL_OBJ.onerror;\n\n // Note: The reason we are doing window.onerror instead of window.addEventListener('error')\n // is that we are using this handler in the Loader Script, to handle buffered errors consistently\n GLOBAL_OBJ.onerror = function (msg, url, line, column, error) {\n const handlerData = {\n column,\n error,\n line,\n msg,\n url\n };\n triggerHandlers('error', handlerData);\n if (_oldOnErrorHandler) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnErrorHandler.apply(this, arguments);\n }\n return false;\n };\n GLOBAL_OBJ.onerror.__SENTRY_INSTRUMENTED__ = true;\n}\nexport { addGlobalErrorInstrumentationHandler };\n","import { GLOBAL_OBJ } from '../worldwide.js';\nimport { addHandler, maybeInstrument, triggerHandlers } from './handlers.js';\nlet _oldOnUnhandledRejectionHandler = null;\n\n/**\n * Add an instrumentation handler for when an unhandled promise rejection is captured.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addGlobalUnhandledRejectionInstrumentationHandler(handler) {\n const type = 'unhandledrejection';\n addHandler(type, handler);\n maybeInstrument(type, instrumentUnhandledRejection);\n}\nfunction instrumentUnhandledRejection() {\n _oldOnUnhandledRejectionHandler = GLOBAL_OBJ.onunhandledrejection;\n\n // Note: The reason we are doing window.onunhandledrejection instead of window.addEventListener('unhandledrejection')\n // is that we are using this handler in the Loader Script, to handle buffered rejections consistently\n GLOBAL_OBJ.onunhandledrejection = function (e) {\n const handlerData = e;\n triggerHandlers('unhandledrejection', handlerData);\n if (_oldOnUnhandledRejectionHandler) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnUnhandledRejectionHandler.apply(this, arguments);\n }\n return true;\n };\n GLOBAL_OBJ.onunhandledrejection.__SENTRY_INSTRUMENTED__ = true;\n}\nexport { addGlobalUnhandledRejectionInstrumentationHandler };\n","// eslint-disable-next-line @typescript-eslint/unbound-method\nconst objectToString = Object.prototype.toString;\n\n/**\n * Checks whether given value's type is one of a few Error or Error-like\n * {@link isError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isError(wat) {\n switch (objectToString.call(wat)) {\n case '[object Error]':\n case '[object Exception]':\n case '[object DOMException]':\n case '[object WebAssembly.Exception]':\n return true;\n default:\n return isInstanceOf(wat, Error);\n }\n}\n/**\n * Checks whether given value is an instance of the given built-in class.\n *\n * @param wat The value to be checked\n * @param className\n * @returns A boolean representing the result.\n */\nfunction isBuiltin(wat, className) {\n return objectToString.call(wat) === `[object ${className}]`;\n}\n\n/**\n * Checks whether given value's type is ErrorEvent\n * {@link isErrorEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isErrorEvent(wat) {\n return isBuiltin(wat, 'ErrorEvent');\n}\n\n/**\n * Checks whether given value's type is DOMError\n * {@link isDOMError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isDOMError(wat) {\n return isBuiltin(wat, 'DOMError');\n}\n\n/**\n * Checks whether given value's type is DOMException\n * {@link isDOMException}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isDOMException(wat) {\n return isBuiltin(wat, 'DOMException');\n}\n\n/**\n * Checks whether given value's type is a string\n * {@link isString}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isString(wat) {\n return isBuiltin(wat, 'String');\n}\n\n/**\n * Checks whether given string is parameterized\n * {@link isParameterizedString}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isParameterizedString(wat) {\n return typeof wat === 'object' && wat !== null && '__sentry_template_string__' in wat && '__sentry_template_values__' in wat;\n}\n\n/**\n * Checks whether given value is a primitive (undefined, null, number, boolean, string, bigint, symbol)\n * {@link isPrimitive}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isPrimitive(wat) {\n return wat === null || isParameterizedString(wat) || typeof wat !== 'object' && typeof wat !== 'function';\n}\n\n/**\n * Checks whether given value's type is an object literal, or a class instance.\n * {@link isPlainObject}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isPlainObject(wat) {\n return isBuiltin(wat, 'Object');\n}\n\n/**\n * Checks whether given value's type is an Event instance\n * {@link isEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isEvent(wat) {\n return typeof Event !== 'undefined' && isInstanceOf(wat, Event);\n}\n\n/**\n * Checks whether given value's type is an Element instance\n * {@link isElement}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isElement(wat) {\n return typeof Element !== 'undefined' && isInstanceOf(wat, Element);\n}\n\n/**\n * Checks whether given value's type is an regexp\n * {@link isRegExp}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isRegExp(wat) {\n return isBuiltin(wat, 'RegExp');\n}\n\n/**\n * Checks whether given value has a then function.\n * @param wat A value to be checked.\n */\nfunction isThenable(wat) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return Boolean(wat?.then && typeof wat.then === 'function');\n}\n\n/**\n * Checks whether given value's type is a SyntheticEvent\n * {@link isSyntheticEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isSyntheticEvent(wat) {\n return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat;\n}\n\n/**\n * Checks whether given value's type is an instance of provided constructor.\n * {@link isInstanceOf}.\n *\n * @param wat A value to be checked.\n * @param base A constructor to be used in a check.\n * @returns A boolean representing the result.\n */\nfunction isInstanceOf(wat, base) {\n try {\n return wat instanceof base;\n } catch (_e) {\n return false;\n }\n}\n\n/**\n * Checks whether given value's type is a Vue ViewModel.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isVueViewModel(wat) {\n // Not using Object.prototype.toString because in Vue 3 it would read the instance's Symbol(Symbol.toStringTag) property.\n return !!(typeof wat === 'object' && wat !== null && (wat.__isVue || wat._isVue));\n}\nexport { isDOMError, isDOMException, isElement, isError, isErrorEvent, isEvent, isInstanceOf, isParameterizedString, isPlainObject, isPrimitive, isRegExp, isString, isSyntheticEvent, isThenable, isVueViewModel };\n","import { isString } from './is.js';\nimport { GLOBAL_OBJ } from './worldwide.js';\nconst WINDOW = GLOBAL_OBJ;\nconst DEFAULT_MAX_STRING_LENGTH = 80;\n\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction htmlTreeAsString(elem, options = {}) {\n if (!elem) {\n return '';\n }\n\n // try/catch both:\n // - accessing event.target (see getsentry/raven-js#838, #768)\n // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n // - can throw an exception in some circumstances.\n try {\n let currentElem = elem;\n const MAX_TRAVERSE_HEIGHT = 5;\n const out = [];\n let height = 0;\n let len = 0;\n const separator = ' > ';\n const sepLength = separator.length;\n let nextStr;\n const keyAttrs = Array.isArray(options) ? options : options.keyAttrs;\n const maxStringLength = !Array.isArray(options) && options.maxStringLength || DEFAULT_MAX_STRING_LENGTH;\n while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {\n nextStr = _htmlElementAsString(currentElem, keyAttrs);\n // bail out if\n // - nextStr is the 'html' element\n // - the length of the string that would be created exceeds maxStringLength\n // (ignore this limit if we are on the first iteration)\n if (nextStr === 'html' || height > 1 && len + out.length * sepLength + nextStr.length >= maxStringLength) {\n break;\n }\n out.push(nextStr);\n len += nextStr.length;\n currentElem = currentElem.parentNode;\n }\n return out.reverse().join(separator);\n } catch (_oO) {\n return '';\n }\n}\n\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction _htmlElementAsString(el, keyAttrs) {\n const elem = el;\n const out = [];\n if (!elem?.tagName) {\n return '';\n }\n\n // @ts-expect-error WINDOW has HTMLElement\n if (WINDOW.HTMLElement) {\n // If using the component name annotation plugin, this value may be available on the DOM node\n if (elem instanceof HTMLElement && elem.dataset) {\n if (elem.dataset['sentryComponent']) {\n return elem.dataset['sentryComponent'];\n }\n if (elem.dataset['sentryElement']) {\n return elem.dataset['sentryElement'];\n }\n }\n }\n out.push(elem.tagName.toLowerCase());\n\n // Pairs of attribute keys defined in `serializeAttribute` and their values on element.\n const keyAttrPairs = keyAttrs?.length ? keyAttrs.filter(keyAttr => elem.getAttribute(keyAttr)).map(keyAttr => [keyAttr, elem.getAttribute(keyAttr)]) : null;\n if (keyAttrPairs?.length) {\n keyAttrPairs.forEach(keyAttrPair => {\n out.push(`[${keyAttrPair[0]}=\"${keyAttrPair[1]}\"]`);\n });\n } else {\n if (elem.id) {\n out.push(`#${elem.id}`);\n }\n const className = elem.className;\n if (className && isString(className)) {\n const classes = className.split(/\\s+/);\n for (const c of classes) {\n out.push(`.${c}`);\n }\n }\n }\n const allowedAttrs = ['aria-label', 'type', 'name', 'title', 'alt'];\n for (const k of allowedAttrs) {\n const attr = elem.getAttribute(k);\n if (attr) {\n out.push(`[${k}=\"${attr}\"]`);\n }\n }\n return out.join('');\n}\n\n/**\n * A safe form of location.href\n */\nfunction getLocationHref() {\n try {\n return WINDOW.document.location.href;\n } catch (oO) {\n return '';\n }\n}\n\n/**\n * Given a DOM element, traverses up the tree until it finds the first ancestor node\n * that has the `data-sentry-component` or `data-sentry-element` attribute with `data-sentry-component` taking\n * precedence. This attribute is added at build-time by projects that have the component name annotation plugin installed.\n *\n * @returns a string representation of the component for the provided DOM element, or `null` if not found\n */\nfunction getComponentName(elem) {\n // @ts-expect-error WINDOW has HTMLElement\n if (!WINDOW.HTMLElement) {\n return null;\n }\n let currentElem = elem;\n const MAX_TRAVERSE_HEIGHT = 5;\n for (let i = 0; i < MAX_TRAVERSE_HEIGHT; i++) {\n if (!currentElem) {\n return null;\n }\n if (currentElem instanceof HTMLElement) {\n if (currentElem.dataset['sentryComponent']) {\n return currentElem.dataset['sentryComponent'];\n }\n if (currentElem.dataset['sentryElement']) {\n return currentElem.dataset['sentryElement'];\n }\n }\n currentElem = currentElem.parentNode;\n }\n return null;\n}\nexport { getComponentName, getLocationHref, htmlTreeAsString };\n","import { isVueViewModel, isString, isRegExp } from './is.js';\n\n/**\n * Truncates given string to the maximum characters count\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string (0 = unlimited)\n * @returns string Encoded\n */\nfunction truncate(str, max = 0) {\n if (typeof str !== 'string' || max === 0) {\n return str;\n }\n return str.length <= max ? str : `${str.slice(0, max)}...`;\n}\n\n/**\n * This is basically just `trim_line` from\n * https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string\n * @returns string Encoded\n */\nfunction snipLine(line, colno) {\n let newLine = line;\n const lineLength = newLine.length;\n if (lineLength <= 150) {\n return newLine;\n }\n if (colno > lineLength) {\n // eslint-disable-next-line no-param-reassign\n colno = lineLength;\n }\n let start = Math.max(colno - 60, 0);\n if (start < 5) {\n start = 0;\n }\n let end = Math.min(start + 140, lineLength);\n if (end > lineLength - 5) {\n end = lineLength;\n }\n if (end === lineLength) {\n start = Math.max(end - 140, 0);\n }\n newLine = newLine.slice(start, end);\n if (start > 0) {\n newLine = `'{snip} ${newLine}`;\n }\n if (end < lineLength) {\n newLine += ' {snip}';\n }\n return newLine;\n}\n\n/**\n * Join values in array\n * @param input array of values to be joined together\n * @param delimiter string to be placed in-between values\n * @returns Joined values\n */\nfunction safeJoin(input, delimiter) {\n if (!Array.isArray(input)) {\n return '';\n }\n const output = [];\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < input.length; i++) {\n const value = input[i];\n try {\n // This is a hack to fix a Vue3-specific bug that causes an infinite loop of\n // console warnings. This happens when a Vue template is rendered with\n // an undeclared variable, which we try to stringify, ultimately causing\n // Vue to issue another warning which repeats indefinitely.\n // see: https://github.com/getsentry/sentry-javascript/pull/8981\n if (isVueViewModel(value)) {\n output.push('[VueViewModel]');\n } else {\n output.push(String(value));\n }\n } catch (e) {\n output.push('[value cannot be serialized]');\n }\n }\n return output.join(delimiter);\n}\n\n/**\n * Checks if the given value matches a regex or string\n *\n * @param value The string to test\n * @param pattern Either a regex or a string against which `value` will be matched\n * @param requireExactStringMatch If true, `value` must match `pattern` exactly. If false, `value` will match\n * `pattern` if it contains `pattern`. Only applies to string-type patterns.\n */\nfunction isMatchingPattern(value, pattern, requireExactStringMatch = false) {\n if (!isString(value)) {\n return false;\n }\n if (isRegExp(pattern)) {\n return pattern.test(value);\n }\n if (isString(pattern)) {\n return requireExactStringMatch ? value === pattern : value.includes(pattern);\n }\n return false;\n}\n\n/**\n * Test the given string against an array of strings and regexes. By default, string matching is done on a\n * substring-inclusion basis rather than a strict equality basis\n *\n * @param testString The string to test\n * @param patterns The patterns against which to test the string\n * @param requireExactStringMatch If true, `testString` must match one of the given string patterns exactly in order to\n * count. If false, `testString` will match a string pattern if it contains that pattern.\n * @returns\n */\nfunction stringMatchesSomePattern(testString, patterns = [], requireExactStringMatch = false) {\n return patterns.some(pattern => isMatchingPattern(testString, pattern, requireExactStringMatch));\n}\nexport { isMatchingPattern, safeJoin, snipLine, stringMatchesSomePattern, truncate };\n","import { htmlTreeAsString } from './browser.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { isError, isEvent, isInstanceOf, isElement, isPlainObject, isPrimitive } from './is.js';\nimport { logger } from './logger.js';\nimport { truncate } from './string.js';\n\n/**\n * Replace a method in an object with a wrapped version of itself.\n *\n * @param source An object that contains a method to be wrapped.\n * @param name The name of the method to be wrapped.\n * @param replacementFactory A higher-order function that takes the original version of the given method and returns a\n * wrapped version. Note: The function returned by `replacementFactory` needs to be a non-arrow function, in order to\n * preserve the correct value of `this`, and the original method must be called using `origMethod.call(this, )` or `origMethod.apply(this, [])` (rather than being called directly), again to preserve `this`.\n * @returns void\n */\nfunction fill(source, name, replacementFactory) {\n if (!(name in source)) {\n return;\n }\n const original = source[name];\n const wrapped = replacementFactory(original);\n\n // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work\n // otherwise it'll throw \"TypeError: Object.defineProperties called on non-object\"\n if (typeof wrapped === 'function') {\n markFunctionWrapped(wrapped, original);\n }\n try {\n source[name] = wrapped;\n } catch {\n DEBUG_BUILD && logger.log(`Failed to replace method \"${name}\" in object`, source);\n }\n}\n\n/**\n * Defines a non-enumerable property on the given object.\n *\n * @param obj The object on which to set the property\n * @param name The name of the property to be set\n * @param value The value to which to set the property\n */\nfunction addNonEnumerableProperty(obj, name, value) {\n try {\n Object.defineProperty(obj, name, {\n // enumerable: false, // the default, so we can save on bundle size by not explicitly setting it\n value: value,\n writable: true,\n configurable: true\n });\n } catch (o_O) {\n DEBUG_BUILD && logger.log(`Failed to add non-enumerable property \"${name}\" to object`, obj);\n }\n}\n\n/**\n * Remembers the original function on the wrapped function and\n * patches up the prototype.\n *\n * @param wrapped the wrapper function\n * @param original the original function that gets wrapped\n */\nfunction markFunctionWrapped(wrapped, original) {\n try {\n const proto = original.prototype || {};\n wrapped.prototype = original.prototype = proto;\n addNonEnumerableProperty(wrapped, '__sentry_original__', original);\n } catch (o_O) {} // eslint-disable-line no-empty\n}\n\n/**\n * This extracts the original function if available. See\n * `markFunctionWrapped` for more information.\n *\n * @param func the function to unwrap\n * @returns the unwrapped version of the function if available.\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction getOriginalFunction(func) {\n return func.__sentry_original__;\n}\n\n/**\n * Transforms any `Error` or `Event` into a plain object with all of their enumerable properties, and some of their\n * non-enumerable properties attached.\n *\n * @param value Initial source that we have to transform in order for it to be usable by the serializer\n * @returns An Event or Error turned into an object - or the value argument itself, when value is neither an Event nor\n * an Error.\n */\nfunction convertToPlainObject(value) {\n if (isError(value)) {\n return {\n message: value.message,\n name: value.name,\n stack: value.stack,\n ...getOwnProperties(value)\n };\n } else if (isEvent(value)) {\n const newObj = {\n type: value.type,\n target: serializeEventTarget(value.target),\n currentTarget: serializeEventTarget(value.currentTarget),\n ...getOwnProperties(value)\n };\n if (typeof CustomEvent !== 'undefined' && isInstanceOf(value, CustomEvent)) {\n newObj.detail = value.detail;\n }\n return newObj;\n } else {\n return value;\n }\n}\n\n/** Creates a string representation of the target of an `Event` object */\nfunction serializeEventTarget(target) {\n try {\n return isElement(target) ? htmlTreeAsString(target) : Object.prototype.toString.call(target);\n } catch (_oO) {\n return '';\n }\n}\n\n/** Filters out all but an object's own properties */\nfunction getOwnProperties(obj) {\n if (typeof obj === 'object' && obj !== null) {\n const extractedProps = {};\n for (const property in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, property)) {\n extractedProps[property] = obj[property];\n }\n }\n return extractedProps;\n } else {\n return {};\n }\n}\n\n/**\n * Given any captured exception, extract its keys and create a sorted\n * and truncated list that will be used inside the event message.\n * eg. `Non-error exception captured with keys: foo, bar, baz`\n */\nfunction extractExceptionKeysForMessage(exception, maxLength = 40) {\n const keys = Object.keys(convertToPlainObject(exception));\n keys.sort();\n const firstKey = keys[0];\n if (!firstKey) {\n return '[object has no keys]';\n }\n if (firstKey.length >= maxLength) {\n return truncate(firstKey, maxLength);\n }\n for (let includedKeys = keys.length; includedKeys > 0; includedKeys--) {\n const serialized = keys.slice(0, includedKeys).join(', ');\n if (serialized.length > maxLength) {\n continue;\n }\n if (includedKeys === keys.length) {\n return serialized;\n }\n return truncate(serialized, maxLength);\n }\n return '';\n}\n\n/**\n * Given any object, return a new object having removed all fields whose value was `undefined`.\n * Works recursively on objects and arrays.\n *\n * Attention: This function keeps circular references in the returned object.\n */\nfunction dropUndefinedKeys(inputValue) {\n // This map keeps track of what already visited nodes map to.\n // Our Set - based memoBuilder doesn't work here because we want to the output object to have the same circular\n // references as the input object.\n const memoizationMap = new Map();\n\n // This function just proxies `_dropUndefinedKeys` to keep the `memoBuilder` out of this function's API\n return _dropUndefinedKeys(inputValue, memoizationMap);\n}\nfunction _dropUndefinedKeys(inputValue, memoizationMap) {\n if (isPojo(inputValue)) {\n // If this node has already been visited due to a circular reference, return the object it was mapped to in the new object\n const memoVal = memoizationMap.get(inputValue);\n if (memoVal !== undefined) {\n return memoVal;\n }\n const returnValue = {};\n // Store the mapping of this value in case we visit it again, in case of circular data\n memoizationMap.set(inputValue, returnValue);\n for (const key of Object.getOwnPropertyNames(inputValue)) {\n if (typeof inputValue[key] !== 'undefined') {\n returnValue[key] = _dropUndefinedKeys(inputValue[key], memoizationMap);\n }\n }\n return returnValue;\n }\n if (Array.isArray(inputValue)) {\n // If this node has already been visited due to a circular reference, return the array it was mapped to in the new object\n const memoVal = memoizationMap.get(inputValue);\n if (memoVal !== undefined) {\n return memoVal;\n }\n const returnValue = [];\n // Store the mapping of this value in case we visit it again, in case of circular data\n memoizationMap.set(inputValue, returnValue);\n inputValue.forEach(item => {\n returnValue.push(_dropUndefinedKeys(item, memoizationMap));\n });\n return returnValue;\n }\n return inputValue;\n}\nfunction isPojo(input) {\n if (!isPlainObject(input)) {\n return false;\n }\n try {\n const name = Object.getPrototypeOf(input).constructor.name;\n return !name || name === 'Object';\n } catch {\n return true;\n }\n}\n\n/**\n * Ensure that something is an object.\n *\n * Turns `undefined` and `null` into `String`s and all other primitives into instances of their respective wrapper\n * classes (String, Boolean, Number, etc.). Acts as the identity function on non-primitives.\n *\n * @param wat The subject of the objectification\n * @returns A version of `wat` which can safely be used with `Object` class methods\n */\nfunction objectify(wat) {\n let objectified;\n switch (true) {\n // this will catch both undefined and null\n case wat == undefined:\n objectified = new String(wat);\n break;\n\n // Though symbols and bigints do have wrapper classes (`Symbol` and `BigInt`, respectively), for whatever reason\n // those classes don't have constructors which can be used with the `new` keyword. We therefore need to cast each as\n // an object in order to wrap it.\n case typeof wat === 'symbol' || typeof wat === 'bigint':\n objectified = Object(wat);\n break;\n\n // this will catch the remaining primitives: `String`, `Number`, and `Boolean`\n case isPrimitive(wat):\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n objectified = new wat.constructor(wat);\n break;\n\n // by process of elimination, at this point we know that `wat` must already be an object\n default:\n objectified = wat;\n break;\n }\n return objectified;\n}\nexport { addNonEnumerableProperty, convertToPlainObject, dropUndefinedKeys, extractExceptionKeysForMessage, fill, getOriginalFunction, markFunctionWrapped, objectify };\n","import { GLOBAL_OBJ } from './worldwide.js';\nconst ONE_SECOND_IN_MS = 1000;\n\n/**\n * A partial definition of the [Performance Web API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Performance}\n * for accessing a high-resolution monotonic clock.\n */\n\n/**\n * Returns a timestamp in seconds since the UNIX epoch using the Date API.\n */\nfunction dateTimestampInSeconds() {\n return Date.now() / ONE_SECOND_IN_MS;\n}\n\n/**\n * Returns a wrapper around the native Performance API browser implementation, or undefined for browsers that do not\n * support the API.\n *\n * Wrapping the native API works around differences in behavior from different browsers.\n */\nfunction createUnixTimestampInSecondsFunc() {\n const {\n performance\n } = GLOBAL_OBJ;\n if (!performance?.now) {\n return dateTimestampInSeconds;\n }\n\n // Some browser and environments don't have a timeOrigin, so we fallback to\n // using Date.now() to compute the starting time.\n const approxStartingTimeOrigin = Date.now() - performance.now();\n const timeOrigin = performance.timeOrigin == undefined ? approxStartingTimeOrigin : performance.timeOrigin;\n\n // performance.now() is a monotonic clock, which means it starts at 0 when the process begins. To get the current\n // wall clock time (actual UNIX timestamp), we need to add the starting time origin and the current time elapsed.\n //\n // TODO: This does not account for the case where the monotonic clock that powers performance.now() drifts from the\n // wall clock time, which causes the returned timestamp to be inaccurate. We should investigate how to detect and\n // correct for this.\n // See: https://github.com/getsentry/sentry-javascript/issues/2590\n // See: https://github.com/mdn/content/issues/4713\n // See: https://dev.to/noamr/when-a-millisecond-is-not-a-millisecond-3h6\n return () => {\n return (timeOrigin + performance.now()) / ONE_SECOND_IN_MS;\n };\n}\n\n/**\n * Returns a timestamp in seconds since the UNIX epoch using either the Performance or Date APIs, depending on the\n * availability of the Performance API.\n *\n * BUG: Note that because of how browsers implement the Performance API, the clock might stop when the computer is\n * asleep. This creates a skew between `dateTimestampInSeconds` and `timestampInSeconds`. The\n * skew can grow to arbitrary amounts like days, weeks or months.\n * See https://github.com/getsentry/sentry-javascript/issues/2590.\n */\nconst timestampInSeconds = createUnixTimestampInSecondsFunc();\n\n/**\n * Cached result of getBrowserTimeOrigin.\n */\nlet cachedTimeOrigin;\n\n/**\n * Gets the time origin and the mode used to determine it.\n */\nfunction getBrowserTimeOrigin() {\n // Unfortunately browsers may report an inaccurate time origin data, through either performance.timeOrigin or\n // performance.timing.navigationStart, which results in poor results in performance data. We only treat time origin\n // data as reliable if they are within a reasonable threshold of the current time.\n\n const {\n performance\n } = GLOBAL_OBJ;\n if (!performance?.now) {\n return [undefined, 'none'];\n }\n const threshold = 3600 * 1000;\n const performanceNow = performance.now();\n const dateNow = Date.now();\n\n // if timeOrigin isn't available set delta to threshold so it isn't used\n const timeOriginDelta = performance.timeOrigin ? Math.abs(performance.timeOrigin + performanceNow - dateNow) : threshold;\n const timeOriginIsReliable = timeOriginDelta < threshold;\n\n // While performance.timing.navigationStart is deprecated in favor of performance.timeOrigin, performance.timeOrigin\n // is not as widely supported. Namely, performance.timeOrigin is undefined in Safari as of writing.\n // Also as of writing, performance.timing is not available in Web Workers in mainstream browsers, so it is not always\n // a valid fallback. In the absence of an initial time provided by the browser, fallback to the current time from the\n // Date API.\n // eslint-disable-next-line deprecation/deprecation\n const navigationStart = performance.timing?.navigationStart;\n const hasNavigationStart = typeof navigationStart === 'number';\n // if navigationStart isn't available set delta to threshold so it isn't used\n const navigationStartDelta = hasNavigationStart ? Math.abs(navigationStart + performanceNow - dateNow) : threshold;\n const navigationStartIsReliable = navigationStartDelta < threshold;\n if (timeOriginIsReliable || navigationStartIsReliable) {\n // Use the more reliable time origin\n if (timeOriginDelta <= navigationStartDelta) {\n return [performance.timeOrigin, 'timeOrigin'];\n } else {\n return [navigationStart, 'navigationStart'];\n }\n }\n\n // Either both timeOrigin and navigationStart are skewed or neither is available, fallback to Date.\n return [dateNow, 'dateNow'];\n}\n\n/**\n * The number of milliseconds since the UNIX epoch. This value is only usable in a browser, and only when the\n * performance API is available.\n */\nfunction browserPerformanceTimeOrigin() {\n if (!cachedTimeOrigin) {\n cachedTimeOrigin = getBrowserTimeOrigin();\n }\n return cachedTimeOrigin[0];\n}\nexport { browserPerformanceTimeOrigin, dateTimestampInSeconds, timestampInSeconds };\n","import { addNonEnumerableProperty } from './object.js';\nimport { snipLine } from './string.js';\nimport { GLOBAL_OBJ } from './worldwide.js';\nfunction getCrypto() {\n const gbl = GLOBAL_OBJ;\n return gbl.crypto || gbl.msCrypto;\n}\n\n/**\n * UUID4 generator\n * @param crypto Object that provides the crypto API.\n * @returns string Generated UUID4.\n */\nfunction uuid4(crypto = getCrypto()) {\n let getRandomByte = () => Math.random() * 16;\n try {\n if (crypto?.randomUUID) {\n return crypto.randomUUID().replace(/-/g, '');\n }\n if (crypto?.getRandomValues) {\n getRandomByte = () => {\n // crypto.getRandomValues might return undefined instead of the typed array\n // in old Chromium versions (e.g. 23.0.1235.0 (151422))\n // However, `typedArray` is still filled in-place.\n // @see https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues#typedarray\n const typedArray = new Uint8Array(1);\n crypto.getRandomValues(typedArray);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return typedArray[0];\n };\n }\n } catch (_) {\n // some runtimes can crash invoking crypto\n // https://github.com/getsentry/sentry-javascript/issues/8935\n }\n\n // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523\n // Concatenating the following numbers as strings results in '10000000100040008000100000000000'\n return ([1e7] + 1e3 + 4e3 + 8e3 + 1e11).replace(/[018]/g, c =>\n // eslint-disable-next-line no-bitwise\n (c ^ (getRandomByte() & 15) >> c / 4).toString(16));\n}\nfunction getFirstException(event) {\n return event.exception?.values?.[0];\n}\n\n/**\n * Extracts either message or type+value from an event that can be used for user-facing logs\n * @returns event's description\n */\nfunction getEventDescription(event) {\n const {\n message,\n event_id: eventId\n } = event;\n if (message) {\n return message;\n }\n const firstException = getFirstException(event);\n if (firstException) {\n if (firstException.type && firstException.value) {\n return `${firstException.type}: ${firstException.value}`;\n }\n return firstException.type || firstException.value || eventId || '';\n }\n return eventId || '';\n}\n\n/**\n * Adds exception values, type and value to an synthetic Exception.\n * @param event The event to modify.\n * @param value Value of the exception.\n * @param type Type of the exception.\n * @hidden\n */\nfunction addExceptionTypeValue(event, value, type) {\n const exception = event.exception = event.exception || {};\n const values = exception.values = exception.values || [];\n const firstException = values[0] = values[0] || {};\n if (!firstException.value) {\n firstException.value = value || '';\n }\n if (!firstException.type) {\n firstException.type = type || 'Error';\n }\n}\n\n/**\n * Adds exception mechanism data to a given event. Uses defaults if the second parameter is not passed.\n *\n * @param event The event to modify.\n * @param newMechanism Mechanism data to add to the event.\n * @hidden\n */\nfunction addExceptionMechanism(event, newMechanism) {\n const firstException = getFirstException(event);\n if (!firstException) {\n return;\n }\n const defaultMechanism = {\n type: 'generic',\n handled: true\n };\n const currentMechanism = firstException.mechanism;\n firstException.mechanism = {\n ...defaultMechanism,\n ...currentMechanism,\n ...newMechanism\n };\n if (newMechanism && 'data' in newMechanism) {\n const mergedData = {\n ...currentMechanism?.data,\n ...newMechanism.data\n };\n firstException.mechanism.data = mergedData;\n }\n}\n\n// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\nconst SEMVER_REGEXP = /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/;\n\n/**\n * Represents Semantic Versioning object\n */\n\nfunction _parseInt(input) {\n return parseInt(input || '', 10);\n}\n\n/**\n * Parses input into a SemVer interface\n * @param input string representation of a semver version\n */\nfunction parseSemver(input) {\n const match = input.match(SEMVER_REGEXP) || [];\n const major = _parseInt(match[1]);\n const minor = _parseInt(match[2]);\n const patch = _parseInt(match[3]);\n return {\n buildmetadata: match[5],\n major: isNaN(major) ? undefined : major,\n minor: isNaN(minor) ? undefined : minor,\n patch: isNaN(patch) ? undefined : patch,\n prerelease: match[4]\n };\n}\n\n/**\n * This function adds context (pre/post/line) lines to the provided frame\n *\n * @param lines string[] containing all lines\n * @param frame StackFrame that will be mutated\n * @param linesOfContext number of context lines we want to add pre/post\n */\nfunction addContextToFrame(lines, frame, linesOfContext = 5) {\n // When there is no line number in the frame, attaching context is nonsensical and will even break grouping\n if (frame.lineno === undefined) {\n return;\n }\n const maxLines = lines.length;\n const sourceLine = Math.max(Math.min(maxLines - 1, frame.lineno - 1), 0);\n frame.pre_context = lines.slice(Math.max(0, sourceLine - linesOfContext), sourceLine).map(line => snipLine(line, 0));\n\n // We guard here to ensure this is not larger than the existing number of lines\n const lineIndex = Math.min(maxLines - 1, sourceLine);\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n frame.context_line = snipLine(lines[lineIndex], frame.colno || 0);\n frame.post_context = lines.slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext).map(line => snipLine(line, 0));\n}\n\n/**\n * Checks whether or not we've already captured the given exception (note: not an identical exception - the very object\n * in question), and marks it captured if not.\n *\n * This is useful because it's possible for an error to get captured by more than one mechanism. After we intercept and\n * record an error, we rethrow it (assuming we've intercepted it before it's reached the top-level global handlers), so\n * that we don't interfere with whatever effects the error might have had were the SDK not there. At that point, because\n * the error has been rethrown, it's possible for it to bubble up to some other code we've instrumented. If it's not\n * caught after that, it will bubble all the way up to the global handlers (which of course we also instrument). This\n * function helps us ensure that even if we encounter the same error more than once, we only record it the first time we\n * see it.\n *\n * Note: It will ignore primitives (always return `false` and not mark them as seen), as properties can't be set on\n * them. {@link: Object.objectify} can be used on exceptions to convert any that are primitives into their equivalent\n * object wrapper forms so that this check will always work. However, because we need to flag the exact object which\n * will get rethrown, and because that rethrowing happens outside of the event processing pipeline, the objectification\n * must be done before the exception captured.\n *\n * @param A thrown exception to check or flag as having been seen\n * @returns `true` if the exception has already been captured, `false` if not (with the side effect of marking it seen)\n */\nfunction checkOrSetAlreadyCaught(exception) {\n if (isAlreadyCaptured(exception)) {\n return true;\n }\n try {\n // set it this way rather than by assignment so that it's not ennumerable and therefore isn't recorded by the\n // `ExtraErrorData` integration\n addNonEnumerableProperty(exception, '__sentry_captured__', true);\n } catch (err) {\n // `exception` is a primitive, so we can't mark it seen\n }\n return false;\n}\nfunction isAlreadyCaptured(exception) {\n try {\n return exception.__sentry_captured__;\n } catch {} // eslint-disable-line no-empty\n}\nexport { addContextToFrame, addExceptionMechanism, addExceptionTypeValue, checkOrSetAlreadyCaught, getEventDescription, parseSemver, uuid4 };\n","import { isThenable } from './is.js';\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/** SyncPromise internal states */\nvar States;\n(function (States) {\n /** Pending */\n const PENDING = 0;\n States[States[\"PENDING\"] = PENDING] = \"PENDING\";\n /** Resolved / OK */\n const RESOLVED = 1;\n States[States[\"RESOLVED\"] = RESOLVED] = \"RESOLVED\";\n /** Rejected / Error */\n const REJECTED = 2;\n States[States[\"REJECTED\"] = REJECTED] = \"REJECTED\";\n})(States || (States = {}));\n\n// Overloads so we can call resolvedSyncPromise without arguments and generic argument\n\n/**\n * Creates a resolved sync promise.\n *\n * @param value the value to resolve the promise with\n * @returns the resolved sync promise\n */\nfunction resolvedSyncPromise(value) {\n return new SyncPromise(resolve => {\n resolve(value);\n });\n}\n\n/**\n * Creates a rejected sync promise.\n *\n * @param value the value to reject the promise with\n * @returns the rejected sync promise\n */\nfunction rejectedSyncPromise(reason) {\n return new SyncPromise((_, reject) => {\n reject(reason);\n });\n}\n\n/**\n * Thenable class that behaves like a Promise and follows it's interface\n * but is not async internally\n */\nclass SyncPromise {\n constructor(executor) {\n this._state = States.PENDING;\n this._handlers = [];\n this._runExecutor(executor);\n }\n\n /** @inheritdoc */\n then(onfulfilled, onrejected) {\n return new SyncPromise((resolve, reject) => {\n this._handlers.push([false, result => {\n if (!onfulfilled) {\n // TODO: ¯\\_(ツ)_/¯\n // TODO: FIXME\n resolve(result);\n } else {\n try {\n resolve(onfulfilled(result));\n } catch (e) {\n reject(e);\n }\n }\n }, reason => {\n if (!onrejected) {\n reject(reason);\n } else {\n try {\n resolve(onrejected(reason));\n } catch (e) {\n reject(e);\n }\n }\n }]);\n this._executeHandlers();\n });\n }\n\n /** @inheritdoc */\n catch(onrejected) {\n return this.then(val => val, onrejected);\n }\n\n /** @inheritdoc */\n finally(onfinally) {\n return new SyncPromise((resolve, reject) => {\n let val;\n let isRejected;\n return this.then(value => {\n isRejected = false;\n val = value;\n if (onfinally) {\n onfinally();\n }\n }, reason => {\n isRejected = true;\n val = reason;\n if (onfinally) {\n onfinally();\n }\n }).then(() => {\n if (isRejected) {\n reject(val);\n return;\n }\n resolve(val);\n });\n });\n }\n\n /** Excute the resolve/reject handlers. */\n _executeHandlers() {\n if (this._state === States.PENDING) {\n return;\n }\n const cachedHandlers = this._handlers.slice();\n this._handlers = [];\n cachedHandlers.forEach(handler => {\n if (handler[0]) {\n return;\n }\n if (this._state === States.RESOLVED) {\n handler[1](this._value);\n }\n if (this._state === States.REJECTED) {\n handler[2](this._value);\n }\n handler[0] = true;\n });\n }\n\n /** Run the executor for the SyncPromise. */\n _runExecutor(executor) {\n const setResult = (state, value) => {\n if (this._state !== States.PENDING) {\n return;\n }\n if (isThenable(value)) {\n void value.then(resolve, reject);\n return;\n }\n this._state = state;\n this._value = value;\n this._executeHandlers();\n };\n const resolve = value => {\n setResult(States.RESOLVED, value);\n };\n const reject = reason => {\n setResult(States.REJECTED, reason);\n };\n try {\n executor(resolve, reject);\n } catch (e) {\n reject(e);\n }\n }\n}\nexport { SyncPromise, rejectedSyncPromise, resolvedSyncPromise };\n","import './utils-hoist/debug-build.js';\nimport './utils-hoist/logger.js';\nimport { dropUndefinedKeys } from './utils-hoist/object.js';\nimport { timestampInSeconds } from './utils-hoist/time.js';\nimport { uuid4 } from './utils-hoist/misc.js';\nimport './utils-hoist/syncpromise.js';\n\n/**\n * Creates a new `Session` object by setting certain default parameters. If optional @param context\n * is passed, the passed properties are applied to the session object.\n *\n * @param context (optional) additional properties to be applied to the returned session object\n *\n * @returns a new `Session` object\n */\nfunction makeSession(context) {\n // Both timestamp and started are in seconds since the UNIX epoch.\n const startingTime = timestampInSeconds();\n const session = {\n sid: uuid4(),\n init: true,\n timestamp: startingTime,\n started: startingTime,\n duration: 0,\n status: 'ok',\n errors: 0,\n ignoreDuration: false,\n toJSON: () => sessionToJSON(session)\n };\n if (context) {\n updateSession(session, context);\n }\n return session;\n}\n\n/**\n * Updates a session object with the properties passed in the context.\n *\n * Note that this function mutates the passed object and returns void.\n * (Had to do this instead of returning a new and updated session because closing and sending a session\n * makes an update to the session after it was passed to the sending logic.\n * @see Client.captureSession )\n *\n * @param session the `Session` to update\n * @param context the `SessionContext` holding the properties that should be updated in @param session\n */\n// eslint-disable-next-line complexity\nfunction updateSession(session, context = {}) {\n if (context.user) {\n if (!session.ipAddress && context.user.ip_address) {\n session.ipAddress = context.user.ip_address;\n }\n if (!session.did && !context.did) {\n session.did = context.user.id || context.user.email || context.user.username;\n }\n }\n session.timestamp = context.timestamp || timestampInSeconds();\n if (context.abnormal_mechanism) {\n session.abnormal_mechanism = context.abnormal_mechanism;\n }\n if (context.ignoreDuration) {\n session.ignoreDuration = context.ignoreDuration;\n }\n if (context.sid) {\n // Good enough uuid validation. — Kamil\n session.sid = context.sid.length === 32 ? context.sid : uuid4();\n }\n if (context.init !== undefined) {\n session.init = context.init;\n }\n if (!session.did && context.did) {\n session.did = `${context.did}`;\n }\n if (typeof context.started === 'number') {\n session.started = context.started;\n }\n if (session.ignoreDuration) {\n session.duration = undefined;\n } else if (typeof context.duration === 'number') {\n session.duration = context.duration;\n } else {\n const duration = session.timestamp - session.started;\n session.duration = duration >= 0 ? duration : 0;\n }\n if (context.release) {\n session.release = context.release;\n }\n if (context.environment) {\n session.environment = context.environment;\n }\n if (!session.ipAddress && context.ipAddress) {\n session.ipAddress = context.ipAddress;\n }\n if (!session.userAgent && context.userAgent) {\n session.userAgent = context.userAgent;\n }\n if (typeof context.errors === 'number') {\n session.errors = context.errors;\n }\n if (context.status) {\n session.status = context.status;\n }\n}\n\n/**\n * Closes a session by setting its status and updating the session object with it.\n * Internally calls `updateSession` to update the passed session object.\n *\n * Note that this function mutates the passed session (@see updateSession for explanation).\n *\n * @param session the `Session` object to be closed\n * @param status the `SessionStatus` with which the session was closed. If you don't pass a status,\n * this function will keep the previously set status, unless it was `'ok'` in which case\n * it is changed to `'exited'`.\n */\nfunction closeSession(session, status) {\n let context = {};\n if (status) {\n context = {\n status\n };\n } else if (session.status === 'ok') {\n context = {\n status: 'exited'\n };\n }\n updateSession(session, context);\n}\n\n/**\n * Serializes a passed session object to a JSON object with a slightly different structure.\n * This is necessary because the Sentry backend requires a slightly different schema of a session\n * than the one the JS SDKs use internally.\n *\n * @param session the session to be converted\n *\n * @returns a JSON object of the passed session\n */\nfunction sessionToJSON(session) {\n return dropUndefinedKeys({\n sid: `${session.sid}`,\n init: session.init,\n // Make sure that sec is converted to ms for date constructor\n started: new Date(session.started * 1000).toISOString(),\n timestamp: new Date(session.timestamp * 1000).toISOString(),\n status: session.status,\n errors: session.errors,\n did: typeof session.did === 'number' || typeof session.did === 'string' ? `${session.did}` : undefined,\n duration: session.duration,\n abnormal_mechanism: session.abnormal_mechanism,\n attrs: {\n release: session.release,\n environment: session.environment,\n ip_address: session.ipAddress,\n user_agent: session.userAgent\n }\n });\n}\nexport { closeSession, makeSession, updateSession };\n","import { uuid4 } from './misc.js';\n\n/**\n * Generate a random, valid trace ID.\n */\nfunction generateTraceId() {\n return uuid4();\n}\n\n/**\n * Generate a random, valid span ID.\n */\nfunction generateSpanId() {\n return uuid4().substring(16);\n}\nexport { generateSpanId, generateTraceId };\n","/**\n * Shallow merge two objects.\n * Does not mutate the passed in objects.\n * Undefined/empty values in the merge object will overwrite existing values.\n *\n * By default, this merges 2 levels deep.\n */\nfunction merge(initialObj, mergeObj, levels = 2) {\n // If the merge value is not an object, or we have no merge levels left,\n // we just set the value to the merge value\n if (!mergeObj || typeof mergeObj !== 'object' || levels <= 0) {\n return mergeObj;\n }\n\n // If the merge object is an empty object, and the initial object is not undefined, we return the initial object\n if (initialObj && Object.keys(mergeObj).length === 0) {\n return initialObj;\n }\n\n // Clone object\n const output = {\n ...initialObj\n };\n\n // Merge values into output, resursively\n for (const key in mergeObj) {\n if (Object.prototype.hasOwnProperty.call(mergeObj, key)) {\n output[key] = merge(output[key], mergeObj[key], levels - 1);\n }\n }\n return output;\n}\nexport { merge };\n","import { addNonEnumerableProperty } from '../utils-hoist/object.js';\nconst SCOPE_SPAN_FIELD = '_sentrySpan';\n\n/**\n * Set the active span for a given scope.\n * NOTE: This should NOT be used directly, but is only used internally by the trace methods.\n */\nfunction _setSpanForScope(scope, span) {\n if (span) {\n addNonEnumerableProperty(scope, SCOPE_SPAN_FIELD, span);\n } else {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete scope[SCOPE_SPAN_FIELD];\n }\n}\n\n/**\n * Get the active span for a given scope.\n * NOTE: This should NOT be used directly, but is only used internally by the trace methods.\n */\nfunction _getSpanForScope(scope) {\n return scope[SCOPE_SPAN_FIELD];\n}\nexport { _getSpanForScope, _setSpanForScope };\n","import { updateSession } from './session.js';\nimport { isPlainObject } from './utils-hoist/is.js';\nimport { logger } from './utils-hoist/logger.js';\nimport { uuid4 } from './utils-hoist/misc.js';\nimport { generateTraceId } from './utils-hoist/propagationContext.js';\nimport { dateTimestampInSeconds } from './utils-hoist/time.js';\nimport { merge } from './utils/merge.js';\nimport { _setSpanForScope, _getSpanForScope } from './utils/spanOnScope.js';\n\n/**\n * Default value for maximum number of breadcrumbs added to an event.\n */\nconst DEFAULT_MAX_BREADCRUMBS = 100;\n\n/**\n * A context to be used for capturing an event.\n * This can either be a Scope, or a partial ScopeContext,\n * or a callback that receives the current scope and returns a new scope to use.\n */\n\n/**\n * Holds additional event information.\n */\nclass Scope {\n /** Flag if notifying is happening. */\n\n /** Callback for client to receive scope changes. */\n\n /** Callback list that will be called during event processing. */\n\n /** Array of breadcrumbs. */\n\n /** User */\n\n /** Tags */\n\n /** Extra */\n\n /** Contexts */\n\n /** Attachments */\n\n /** Propagation Context for distributed tracing */\n\n /**\n * A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get\n * sent to Sentry\n */\n\n /** Fingerprint */\n\n /** Severity */\n\n /**\n * Transaction Name\n *\n * IMPORTANT: The transaction name on the scope has nothing to do with root spans/transaction objects.\n * It's purpose is to assign a transaction to the scope that's added to non-transaction events.\n */\n\n /** Session */\n\n /** The client on this scope */\n\n /** Contains the last event id of a captured event. */\n\n // NOTE: Any field which gets added here should get added not only to the constructor but also to the `clone` method.\n\n constructor() {\n this._notifyingListeners = false;\n this._scopeListeners = [];\n this._eventProcessors = [];\n this._breadcrumbs = [];\n this._attachments = [];\n this._user = {};\n this._tags = {};\n this._extra = {};\n this._contexts = {};\n this._sdkProcessingMetadata = {};\n this._propagationContext = {\n traceId: generateTraceId(),\n sampleRand: Math.random()\n };\n }\n\n /**\n * Clone all data from this scope into a new scope.\n */\n clone() {\n const newScope = new Scope();\n newScope._breadcrumbs = [...this._breadcrumbs];\n newScope._tags = {\n ...this._tags\n };\n newScope._extra = {\n ...this._extra\n };\n newScope._contexts = {\n ...this._contexts\n };\n if (this._contexts.flags) {\n // We need to copy the `values` array so insertions on a cloned scope\n // won't affect the original array.\n newScope._contexts.flags = {\n values: [...this._contexts.flags.values]\n };\n }\n newScope._user = this._user;\n newScope._level = this._level;\n newScope._session = this._session;\n newScope._transactionName = this._transactionName;\n newScope._fingerprint = this._fingerprint;\n newScope._eventProcessors = [...this._eventProcessors];\n newScope._attachments = [...this._attachments];\n newScope._sdkProcessingMetadata = {\n ...this._sdkProcessingMetadata\n };\n newScope._propagationContext = {\n ...this._propagationContext\n };\n newScope._client = this._client;\n newScope._lastEventId = this._lastEventId;\n _setSpanForScope(newScope, _getSpanForScope(this));\n return newScope;\n }\n\n /**\n * Update the client assigned to this scope.\n * Note that not every scope will have a client assigned - isolation scopes & the global scope will generally not have a client,\n * as well as manually created scopes.\n */\n setClient(client) {\n this._client = client;\n }\n\n /**\n * Set the ID of the last captured error event.\n * This is generally only captured on the isolation scope.\n */\n setLastEventId(lastEventId) {\n this._lastEventId = lastEventId;\n }\n\n /**\n * Get the client assigned to this scope.\n */\n getClient() {\n return this._client;\n }\n\n /**\n * Get the ID of the last captured error event.\n * This is generally only available on the isolation scope.\n */\n lastEventId() {\n return this._lastEventId;\n }\n\n /**\n * @inheritDoc\n */\n addScopeListener(callback) {\n this._scopeListeners.push(callback);\n }\n\n /**\n * Add an event processor that will be called before an event is sent.\n */\n addEventProcessor(callback) {\n this._eventProcessors.push(callback);\n return this;\n }\n\n /**\n * Set the user for this scope.\n * Set to `null` to unset the user.\n */\n setUser(user) {\n // If null is passed we want to unset everything, but still define keys,\n // so that later down in the pipeline any existing values are cleared.\n this._user = user || {\n email: undefined,\n id: undefined,\n ip_address: undefined,\n username: undefined\n };\n if (this._session) {\n updateSession(this._session, {\n user\n });\n }\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Get the user from this scope.\n */\n getUser() {\n return this._user;\n }\n\n /**\n * Set an object that will be merged into existing tags on the scope,\n * and will be sent as tags data with the event.\n */\n setTags(tags) {\n this._tags = {\n ...this._tags,\n ...tags\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Set a single tag that will be sent as tags data with the event.\n */\n setTag(key, value) {\n this._tags = {\n ...this._tags,\n [key]: value\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Set an object that will be merged into existing extra on the scope,\n * and will be sent as extra data with the event.\n */\n setExtras(extras) {\n this._extra = {\n ...this._extra,\n ...extras\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Set a single key:value extra entry that will be sent as extra data with the event.\n */\n setExtra(key, extra) {\n this._extra = {\n ...this._extra,\n [key]: extra\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Sets the fingerprint on the scope to send with the events.\n * @param {string[]} fingerprint Fingerprint to group events in Sentry.\n */\n setFingerprint(fingerprint) {\n this._fingerprint = fingerprint;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Sets the level on the scope for future events.\n */\n setLevel(level) {\n this._level = level;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Sets the transaction name on the scope so that the name of e.g. taken server route or\n * the page location is attached to future events.\n *\n * IMPORTANT: Calling this function does NOT change the name of the currently active\n * root span. If you want to change the name of the active root span, use\n * `Sentry.updateSpanName(rootSpan, 'new name')` instead.\n *\n * By default, the SDK updates the scope's transaction name automatically on sensible\n * occasions, such as a page navigation or when handling a new request on the server.\n */\n setTransactionName(name) {\n this._transactionName = name;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Sets context data with the given name.\n * Data passed as context will be normalized. You can also pass `null` to unset the context.\n * Note that context data will not be merged - calling `setContext` will overwrite an existing context with the same key.\n */\n setContext(key, context) {\n if (context === null) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._contexts[key];\n } else {\n this._contexts[key] = context;\n }\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Set the session for the scope.\n */\n setSession(session) {\n if (!session) {\n delete this._session;\n } else {\n this._session = session;\n }\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Get the session from the scope.\n */\n getSession() {\n return this._session;\n }\n\n /**\n * Updates the scope with provided data. Can work in three variations:\n * - plain object containing updatable attributes\n * - Scope instance that'll extract the attributes from\n * - callback function that'll receive the current scope as an argument and allow for modifications\n */\n update(captureContext) {\n if (!captureContext) {\n return this;\n }\n const scopeToMerge = typeof captureContext === 'function' ? captureContext(this) : captureContext;\n const scopeInstance = scopeToMerge instanceof Scope ? scopeToMerge.getScopeData() : isPlainObject(scopeToMerge) ? captureContext : undefined;\n const {\n tags,\n extra,\n user,\n contexts,\n level,\n fingerprint = [],\n propagationContext\n } = scopeInstance || {};\n this._tags = {\n ...this._tags,\n ...tags\n };\n this._extra = {\n ...this._extra,\n ...extra\n };\n this._contexts = {\n ...this._contexts,\n ...contexts\n };\n if (user && Object.keys(user).length) {\n this._user = user;\n }\n if (level) {\n this._level = level;\n }\n if (fingerprint.length) {\n this._fingerprint = fingerprint;\n }\n if (propagationContext) {\n this._propagationContext = propagationContext;\n }\n return this;\n }\n\n /**\n * Clears the current scope and resets its properties.\n * Note: The client will not be cleared.\n */\n clear() {\n // client is not cleared here on purpose!\n this._breadcrumbs = [];\n this._tags = {};\n this._extra = {};\n this._user = {};\n this._contexts = {};\n this._level = undefined;\n this._transactionName = undefined;\n this._fingerprint = undefined;\n this._session = undefined;\n _setSpanForScope(this, undefined);\n this._attachments = [];\n this.setPropagationContext({\n traceId: generateTraceId(),\n sampleRand: Math.random()\n });\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Adds a breadcrumb to the scope.\n * By default, the last 100 breadcrumbs are kept.\n */\n addBreadcrumb(breadcrumb, maxBreadcrumbs) {\n const maxCrumbs = typeof maxBreadcrumbs === 'number' ? maxBreadcrumbs : DEFAULT_MAX_BREADCRUMBS;\n\n // No data has been changed, so don't notify scope listeners\n if (maxCrumbs <= 0) {\n return this;\n }\n const mergedBreadcrumb = {\n timestamp: dateTimestampInSeconds(),\n ...breadcrumb\n };\n this._breadcrumbs.push(mergedBreadcrumb);\n if (this._breadcrumbs.length > maxCrumbs) {\n this._breadcrumbs = this._breadcrumbs.slice(-maxCrumbs);\n this._client?.recordDroppedEvent('buffer_overflow', 'log_item');\n }\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Get the last breadcrumb of the scope.\n */\n getLastBreadcrumb() {\n return this._breadcrumbs[this._breadcrumbs.length - 1];\n }\n\n /**\n * Clear all breadcrumbs from the scope.\n */\n clearBreadcrumbs() {\n this._breadcrumbs = [];\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Add an attachment to the scope.\n */\n addAttachment(attachment) {\n this._attachments.push(attachment);\n return this;\n }\n\n /**\n * Clear all attachments from the scope.\n */\n clearAttachments() {\n this._attachments = [];\n return this;\n }\n\n /**\n * Get the data of this scope, which should be applied to an event during processing.\n */\n getScopeData() {\n return {\n breadcrumbs: this._breadcrumbs,\n attachments: this._attachments,\n contexts: this._contexts,\n tags: this._tags,\n extra: this._extra,\n user: this._user,\n level: this._level,\n fingerprint: this._fingerprint || [],\n eventProcessors: this._eventProcessors,\n propagationContext: this._propagationContext,\n sdkProcessingMetadata: this._sdkProcessingMetadata,\n transactionName: this._transactionName,\n span: _getSpanForScope(this)\n };\n }\n\n /**\n * Add data which will be accessible during event processing but won't get sent to Sentry.\n */\n setSDKProcessingMetadata(newData) {\n this._sdkProcessingMetadata = merge(this._sdkProcessingMetadata, newData, 2);\n return this;\n }\n\n /**\n * Add propagation context to the scope, used for distributed tracing\n */\n setPropagationContext(context) {\n this._propagationContext = context;\n return this;\n }\n\n /**\n * Get propagation context from the scope, used for distributed tracing\n */\n getPropagationContext() {\n return this._propagationContext;\n }\n\n /**\n * Capture an exception for this scope.\n *\n * @returns {string} The id of the captured Sentry event.\n */\n captureException(exception, hint) {\n const eventId = hint?.event_id || uuid4();\n if (!this._client) {\n logger.warn('No client configured on scope - will not capture exception!');\n return eventId;\n }\n const syntheticException = new Error('Sentry syntheticException');\n this._client.captureException(exception, {\n originalException: exception,\n syntheticException,\n ...hint,\n event_id: eventId\n }, this);\n return eventId;\n }\n\n /**\n * Capture a message for this scope.\n *\n * @returns {string} The id of the captured message.\n */\n captureMessage(message, level, hint) {\n const eventId = hint?.event_id || uuid4();\n if (!this._client) {\n logger.warn('No client configured on scope - will not capture message!');\n return eventId;\n }\n const syntheticException = new Error(message);\n this._client.captureMessage(message, level, {\n originalException: message,\n syntheticException,\n ...hint,\n event_id: eventId\n }, this);\n return eventId;\n }\n\n /**\n * Capture a Sentry event for this scope.\n *\n * @returns {string} The id of the captured event.\n */\n captureEvent(event, hint) {\n const eventId = hint?.event_id || uuid4();\n if (!this._client) {\n logger.warn('No client configured on scope - will not capture event!');\n return eventId;\n }\n this._client.captureEvent(event, {\n ...hint,\n event_id: eventId\n }, this);\n return eventId;\n }\n\n /**\n * This will be called on every set call.\n */\n _notifyScopeListeners() {\n // We need this check for this._notifyingListeners to be able to work on scope during updates\n // If this check is not here we'll produce endless recursion when something is done with the scope\n // during the callback.\n if (!this._notifyingListeners) {\n this._notifyingListeners = true;\n this._scopeListeners.forEach(callback => {\n callback(this);\n });\n this._notifyingListeners = false;\n }\n }\n}\nexport { Scope };\n","import { getGlobalSingleton } from './carrier.js';\nimport { Scope } from './scope.js';\n\n/** Get the default current scope. */\nfunction getDefaultCurrentScope() {\n return getGlobalSingleton('defaultCurrentScope', () => new Scope());\n}\n\n/** Get the default isolation scope. */\nfunction getDefaultIsolationScope() {\n return getGlobalSingleton('defaultIsolationScope', () => new Scope());\n}\nexport { getDefaultCurrentScope, getDefaultIsolationScope };\n","import { getDefaultCurrentScope, getDefaultIsolationScope } from '../defaultScopes.js';\nimport { Scope } from '../scope.js';\nimport { isThenable } from '../utils-hoist/is.js';\nimport { getMainCarrier, getSentryCarrier } from '../carrier.js';\n\n/**\n * This is an object that holds a stack of scopes.\n */\nclass AsyncContextStack {\n constructor(scope, isolationScope) {\n let assignedScope;\n if (!scope) {\n assignedScope = new Scope();\n } else {\n assignedScope = scope;\n }\n let assignedIsolationScope;\n if (!isolationScope) {\n assignedIsolationScope = new Scope();\n } else {\n assignedIsolationScope = isolationScope;\n }\n\n // scope stack for domains or the process\n this._stack = [{\n scope: assignedScope\n }];\n this._isolationScope = assignedIsolationScope;\n }\n\n /**\n * Fork a scope for the stack.\n */\n withScope(callback) {\n const scope = this._pushScope();\n let maybePromiseResult;\n try {\n maybePromiseResult = callback(scope);\n } catch (e) {\n this._popScope();\n throw e;\n }\n if (isThenable(maybePromiseResult)) {\n // @ts-expect-error - isThenable returns the wrong type\n return maybePromiseResult.then(res => {\n this._popScope();\n return res;\n }, e => {\n this._popScope();\n throw e;\n });\n }\n this._popScope();\n return maybePromiseResult;\n }\n\n /**\n * Get the client of the stack.\n */\n getClient() {\n return this.getStackTop().client;\n }\n\n /**\n * Returns the scope of the top stack.\n */\n getScope() {\n return this.getStackTop().scope;\n }\n\n /**\n * Get the isolation scope for the stack.\n */\n getIsolationScope() {\n return this._isolationScope;\n }\n\n /**\n * Returns the topmost scope layer in the order domain > local > process.\n */\n getStackTop() {\n return this._stack[this._stack.length - 1];\n }\n\n /**\n * Push a scope to the stack.\n */\n _pushScope() {\n // We want to clone the content of prev scope\n const scope = this.getScope().clone();\n this._stack.push({\n client: this.getClient(),\n scope\n });\n return scope;\n }\n\n /**\n * Pop a scope from the stack.\n */\n _popScope() {\n if (this._stack.length <= 1) return false;\n return !!this._stack.pop();\n }\n}\n\n/**\n * Get the global async context stack.\n * This will be removed during the v8 cycle and is only here to make migration easier.\n */\nfunction getAsyncContextStack() {\n const registry = getMainCarrier();\n const sentry = getSentryCarrier(registry);\n return sentry.stack = sentry.stack || new AsyncContextStack(getDefaultCurrentScope(), getDefaultIsolationScope());\n}\nfunction withScope(callback) {\n return getAsyncContextStack().withScope(callback);\n}\nfunction withSetScope(scope, callback) {\n const stack = getAsyncContextStack();\n return stack.withScope(() => {\n stack.getStackTop().scope = scope;\n return callback(scope);\n });\n}\nfunction withIsolationScope(callback) {\n return getAsyncContextStack().withScope(() => {\n return callback(getAsyncContextStack().getIsolationScope());\n });\n}\n\n/**\n * Get the stack-based async context strategy.\n */\nfunction getStackAsyncContextStrategy() {\n return {\n withIsolationScope,\n withScope,\n withSetScope,\n withSetIsolationScope: (_isolationScope, callback) => {\n return withIsolationScope(callback);\n },\n getCurrentScope: () => getAsyncContextStack().getScope(),\n getIsolationScope: () => getAsyncContextStack().getIsolationScope()\n };\n}\nexport { AsyncContextStack, getStackAsyncContextStrategy };\n","import { getMainCarrier, getSentryCarrier } from '../carrier.js';\nimport { getStackAsyncContextStrategy } from './stackStrategy.js';\n\n/**\n * @private Private API with no semver guarantees!\n *\n * Sets the global async context strategy\n */\nfunction setAsyncContextStrategy(strategy) {\n // Get main carrier (global for every environment)\n const registry = getMainCarrier();\n const sentry = getSentryCarrier(registry);\n sentry.acs = strategy;\n}\n\n/**\n * Get the current async context strategy.\n * If none has been setup, the default will be used.\n */\nfunction getAsyncContextStrategy(carrier) {\n const sentry = getSentryCarrier(carrier);\n if (sentry.acs) {\n return sentry.acs;\n }\n\n // Otherwise, use the default one (stack)\n return getStackAsyncContextStrategy();\n}\nexport { getAsyncContextStrategy, setAsyncContextStrategy };\n","import { getAsyncContextStrategy } from './asyncContext/index.js';\nimport { getMainCarrier, getGlobalSingleton } from './carrier.js';\nimport { Scope } from './scope.js';\nimport './utils-hoist/debug-build.js';\nimport './utils-hoist/logger.js';\nimport { dropUndefinedKeys } from './utils-hoist/object.js';\nimport './utils-hoist/time.js';\nimport './utils-hoist/syncpromise.js';\nimport { generateSpanId } from './utils-hoist/propagationContext.js';\n\n/**\n * Get the currently active scope.\n */\nfunction getCurrentScope() {\n const carrier = getMainCarrier();\n const acs = getAsyncContextStrategy(carrier);\n return acs.getCurrentScope();\n}\n\n/**\n * Get the currently active isolation scope.\n * The isolation scope is active for the current execution context.\n */\nfunction getIsolationScope() {\n const carrier = getMainCarrier();\n const acs = getAsyncContextStrategy(carrier);\n return acs.getIsolationScope();\n}\n\n/**\n * Get the global scope.\n * This scope is applied to _all_ events.\n */\nfunction getGlobalScope() {\n return getGlobalSingleton('globalScope', () => new Scope());\n}\n\n/**\n * Creates a new scope with and executes the given operation within.\n * The scope is automatically removed once the operation\n * finishes or throws.\n */\n\n/**\n * Either creates a new active scope, or sets the given scope as active scope in the given callback.\n */\nfunction withScope(...rest) {\n const carrier = getMainCarrier();\n const acs = getAsyncContextStrategy(carrier);\n\n // If a scope is defined, we want to make this the active scope instead of the default one\n if (rest.length === 2) {\n const [scope, callback] = rest;\n if (!scope) {\n return acs.withScope(callback);\n }\n return acs.withSetScope(scope, callback);\n }\n return acs.withScope(rest[0]);\n}\n\n/**\n * Attempts to fork the current isolation scope and the current scope based on the current async context strategy. If no\n * async context strategy is set, the isolation scope and the current scope will not be forked (this is currently the\n * case, for example, in the browser).\n *\n * Usage of this function in environments without async context strategy is discouraged and may lead to unexpected behaviour.\n *\n * This function is intended for Sentry SDK and SDK integration development. It is not recommended to be used in \"normal\"\n * applications directly because it comes with pitfalls. Use at your own risk!\n */\n\n/**\n * Either creates a new active isolation scope, or sets the given isolation scope as active scope in the given callback.\n */\nfunction withIsolationScope(...rest) {\n const carrier = getMainCarrier();\n const acs = getAsyncContextStrategy(carrier);\n\n // If a scope is defined, we want to make this the active scope instead of the default one\n if (rest.length === 2) {\n const [isolationScope, callback] = rest;\n if (!isolationScope) {\n return acs.withIsolationScope(callback);\n }\n return acs.withSetIsolationScope(isolationScope, callback);\n }\n return acs.withIsolationScope(rest[0]);\n}\n\n/**\n * Get the currently active client.\n */\nfunction getClient() {\n return getCurrentScope().getClient();\n}\n\n/**\n * Get a trace context for the given scope.\n */\nfunction getTraceContextFromScope(scope) {\n const propagationContext = scope.getPropagationContext();\n const {\n traceId,\n parentSpanId,\n propagationSpanId\n } = propagationContext;\n const traceContext = dropUndefinedKeys({\n trace_id: traceId,\n span_id: propagationSpanId || generateSpanId(),\n parent_span_id: parentSpanId\n });\n return traceContext;\n}\nexport { getClient, getCurrentScope, getGlobalScope, getIsolationScope, getTraceContextFromScope, withIsolationScope, withScope };\n","/**\n * Use this attribute to represent the source of a span.\n * Should be one of: custom, url, route, view, component, task, unknown\n *\n */\nconst SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = 'sentry.source';\n\n/**\n * Attributes that holds the sample rate that was locally applied to a span.\n * If this attribute is not defined, it means that the span inherited a sampling decision.\n *\n * NOTE: Is only defined on root spans.\n */\nconst SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = 'sentry.sample_rate';\n\n/**\n * Use this attribute to represent the operation of a span.\n */\nconst SEMANTIC_ATTRIBUTE_SENTRY_OP = 'sentry.op';\n\n/**\n * Use this attribute to represent the origin of a span.\n */\nconst SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = 'sentry.origin';\n\n/** The reason why an idle span finished. */\nconst SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON = 'sentry.idle_span_finish_reason';\n\n/** The unit of a measurement, which may be stored as a TimedEvent. */\nconst SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT = 'sentry.measurement_unit';\n\n/** The value of a measurement, which may be stored as a TimedEvent. */\nconst SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE = 'sentry.measurement_value';\n\n/**\n * A custom span name set by users guaranteed to be taken over any automatically\n * inferred name. This attribute is removed before the span is sent.\n *\n * @internal only meant for internal SDK usage\n * @hidden\n */\nconst SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME = 'sentry.custom_span_name';\n\n/**\n * The id of the profile that this span occurred in.\n */\nconst SEMANTIC_ATTRIBUTE_PROFILE_ID = 'sentry.profile_id';\nconst SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME = 'sentry.exclusive_time';\nconst SEMANTIC_ATTRIBUTE_CACHE_HIT = 'cache.hit';\nconst SEMANTIC_ATTRIBUTE_CACHE_KEY = 'cache.key';\nconst SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE = 'cache.item_size';\n\n/** TODO: Remove these once we update to latest semantic conventions */\nconst SEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHOD = 'http.request.method';\nconst SEMANTIC_ATTRIBUTE_URL_FULL = 'url.full';\nexport { SEMANTIC_ATTRIBUTE_CACHE_HIT, SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE, SEMANTIC_ATTRIBUTE_CACHE_KEY, SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME, SEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHOD, SEMANTIC_ATTRIBUTE_PROFILE_ID, SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME, SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON, SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT, SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_URL_FULL };\n","import { addNonEnumerableProperty } from '../utils-hoist/object.js';\nconst SCOPE_ON_START_SPAN_FIELD = '_sentryScope';\nconst ISOLATION_SCOPE_ON_START_SPAN_FIELD = '_sentryIsolationScope';\n\n/** Store the scope & isolation scope for a span, which can the be used when it is finished. */\nfunction setCapturedScopesOnSpan(span, scope, isolationScope) {\n if (span) {\n addNonEnumerableProperty(span, ISOLATION_SCOPE_ON_START_SPAN_FIELD, isolationScope);\n addNonEnumerableProperty(span, SCOPE_ON_START_SPAN_FIELD, scope);\n }\n}\n\n/**\n * Grabs the scope and isolation scope off a span that were active when the span was started.\n */\nfunction getCapturedScopesOnSpan(span) {\n return {\n scope: span[SCOPE_ON_START_SPAN_FIELD],\n isolationScope: span[ISOLATION_SCOPE_ON_START_SPAN_FIELD]\n };\n}\nexport { getCapturedScopesOnSpan, setCapturedScopesOnSpan };\n","/**\n * Parse a sample rate from a given value.\n * This will either return a boolean or number sample rate, if the sample rate is valid (between 0 and 1).\n * If a string is passed, we try to convert it to a number.\n *\n * Any invalid sample rate will return `undefined`.\n */\nfunction parseSampleRate(sampleRate) {\n if (typeof sampleRate === 'boolean') {\n return Number(sampleRate);\n }\n const rate = typeof sampleRate === 'string' ? parseFloat(sampleRate) : sampleRate;\n if (typeof rate !== 'number' || isNaN(rate) || rate < 0 || rate > 1) {\n return undefined;\n }\n return rate;\n}\nexport { parseSampleRate };\n","import { DEBUG_BUILD } from './debug-build.js';\nimport { isString } from './is.js';\nimport { logger } from './logger.js';\nconst SENTRY_BAGGAGE_KEY_PREFIX = 'sentry-';\nconst SENTRY_BAGGAGE_KEY_PREFIX_REGEX = /^sentry-/;\n\n/**\n * Max length of a serialized baggage string\n *\n * https://www.w3.org/TR/baggage/#limits\n */\nconst MAX_BAGGAGE_STRING_LENGTH = 8192;\n\n/**\n * Takes a baggage header and turns it into Dynamic Sampling Context, by extracting all the \"sentry-\" prefixed values\n * from it.\n *\n * @param baggageHeader A very bread definition of a baggage header as it might appear in various frameworks.\n * @returns The Dynamic Sampling Context that was found on `baggageHeader`, if there was any, `undefined` otherwise.\n */\nfunction baggageHeaderToDynamicSamplingContext(\n// Very liberal definition of what any incoming header might look like\nbaggageHeader) {\n const baggageObject = parseBaggageHeader(baggageHeader);\n if (!baggageObject) {\n return undefined;\n }\n\n // Read all \"sentry-\" prefixed values out of the baggage object and put it onto a dynamic sampling context object.\n const dynamicSamplingContext = Object.entries(baggageObject).reduce((acc, [key, value]) => {\n if (key.match(SENTRY_BAGGAGE_KEY_PREFIX_REGEX)) {\n const nonPrefixedKey = key.slice(SENTRY_BAGGAGE_KEY_PREFIX.length);\n acc[nonPrefixedKey] = value;\n }\n return acc;\n }, {});\n\n // Only return a dynamic sampling context object if there are keys in it.\n // A keyless object means there were no sentry values on the header, which means that there is no DSC.\n if (Object.keys(dynamicSamplingContext).length > 0) {\n return dynamicSamplingContext;\n } else {\n return undefined;\n }\n}\n\n/**\n * Turns a Dynamic Sampling Object into a baggage header by prefixing all the keys on the object with \"sentry-\".\n *\n * @param dynamicSamplingContext The Dynamic Sampling Context to turn into a header. For convenience and compatibility\n * with the `getDynamicSamplingContext` method on the Transaction class ,this argument can also be `undefined`. If it is\n * `undefined` the function will return `undefined`.\n * @returns a baggage header, created from `dynamicSamplingContext`, or `undefined` either if `dynamicSamplingContext`\n * was `undefined`, or if `dynamicSamplingContext` didn't contain any values.\n */\nfunction dynamicSamplingContextToSentryBaggageHeader(\n// this also takes undefined for convenience and bundle size in other places\ndynamicSamplingContext) {\n if (!dynamicSamplingContext) {\n return undefined;\n }\n\n // Prefix all DSC keys with \"sentry-\" and put them into a new object\n const sentryPrefixedDSC = Object.entries(dynamicSamplingContext).reduce((acc, [dscKey, dscValue]) => {\n if (dscValue) {\n acc[`${SENTRY_BAGGAGE_KEY_PREFIX}${dscKey}`] = dscValue;\n }\n return acc;\n }, {});\n return objectToBaggageHeader(sentryPrefixedDSC);\n}\n\n/**\n * Take a baggage header and parse it into an object.\n */\nfunction parseBaggageHeader(baggageHeader) {\n if (!baggageHeader || !isString(baggageHeader) && !Array.isArray(baggageHeader)) {\n return undefined;\n }\n if (Array.isArray(baggageHeader)) {\n // Combine all baggage headers into one object containing the baggage values so we can later read the Sentry-DSC-values from it\n return baggageHeader.reduce((acc, curr) => {\n const currBaggageObject = baggageHeaderToObject(curr);\n Object.entries(currBaggageObject).forEach(([key, value]) => {\n acc[key] = value;\n });\n return acc;\n }, {});\n }\n return baggageHeaderToObject(baggageHeader);\n}\n\n/**\n * Will parse a baggage header, which is a simple key-value map, into a flat object.\n *\n * @param baggageHeader The baggage header to parse.\n * @returns a flat object containing all the key-value pairs from `baggageHeader`.\n */\nfunction baggageHeaderToObject(baggageHeader) {\n return baggageHeader.split(',').map(baggageEntry => baggageEntry.split('=').map(keyOrValue => decodeURIComponent(keyOrValue.trim()))).reduce((acc, [key, value]) => {\n if (key && value) {\n acc[key] = value;\n }\n return acc;\n }, {});\n}\n\n/**\n * Turns a flat object (key-value pairs) into a baggage header, which is also just key-value pairs.\n *\n * @param object The object to turn into a baggage header.\n * @returns a baggage header string, or `undefined` if the object didn't have any values, since an empty baggage header\n * is not spec compliant.\n */\nfunction objectToBaggageHeader(object) {\n if (Object.keys(object).length === 0) {\n // An empty baggage header is not spec compliant: We return undefined.\n return undefined;\n }\n return Object.entries(object).reduce((baggageHeader, [objectKey, objectValue], currentIndex) => {\n const baggageEntry = `${encodeURIComponent(objectKey)}=${encodeURIComponent(objectValue)}`;\n const newBaggageHeader = currentIndex === 0 ? baggageEntry : `${baggageHeader},${baggageEntry}`;\n if (newBaggageHeader.length > MAX_BAGGAGE_STRING_LENGTH) {\n DEBUG_BUILD && logger.warn(`Not adding key: ${objectKey} with val: ${objectValue} to baggage header due to exceeding baggage size limits.`);\n return baggageHeader;\n } else {\n return newBaggageHeader;\n }\n }, '');\n}\nexport { MAX_BAGGAGE_STRING_LENGTH, SENTRY_BAGGAGE_KEY_PREFIX, SENTRY_BAGGAGE_KEY_PREFIX_REGEX, baggageHeaderToDynamicSamplingContext, dynamicSamplingContextToSentryBaggageHeader, objectToBaggageHeader, parseBaggageHeader };\n","import { getAsyncContextStrategy } from '../asyncContext/index.js';\nimport { getMainCarrier } from '../carrier.js';\nimport { getCurrentScope } from '../currentScopes.js';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME } from '../semanticAttributes.js';\nimport { SPAN_STATUS_UNSET, SPAN_STATUS_OK } from '../tracing/spanstatus.js';\nimport { getCapturedScopesOnSpan } from '../tracing/utils.js';\nimport { consoleSandbox } from '../utils-hoist/logger.js';\nimport { dropUndefinedKeys, addNonEnumerableProperty } from '../utils-hoist/object.js';\nimport { generateSpanId } from '../utils-hoist/propagationContext.js';\nimport { timestampInSeconds } from '../utils-hoist/time.js';\nimport { generateSentryTraceHeader } from '../utils-hoist/tracing.js';\nimport { _getSpanForScope } from './spanOnScope.js';\n\n// These are aligned with OpenTelemetry trace flags\nconst TRACE_FLAG_NONE = 0x0;\nconst TRACE_FLAG_SAMPLED = 0x1;\nlet hasShownSpanDropWarning = false;\n\n/**\n * Convert a span to a trace context, which can be sent as the `trace` context in an event.\n * By default, this will only include trace_id, span_id & parent_span_id.\n * If `includeAllData` is true, it will also include data, op, status & origin.\n */\nfunction spanToTransactionTraceContext(span) {\n const {\n spanId: span_id,\n traceId: trace_id\n } = span.spanContext();\n const {\n data,\n op,\n parent_span_id,\n status,\n origin,\n links\n } = spanToJSON(span);\n return dropUndefinedKeys({\n parent_span_id,\n span_id,\n trace_id,\n data,\n op,\n status,\n origin,\n links\n });\n}\n\n/**\n * Convert a span to a trace context, which can be sent as the `trace` context in a non-transaction event.\n */\nfunction spanToTraceContext(span) {\n const {\n spanId,\n traceId: trace_id,\n isRemote\n } = span.spanContext();\n\n // If the span is remote, we use a random/virtual span as span_id to the trace context,\n // and the remote span as parent_span_id\n const parent_span_id = isRemote ? spanId : spanToJSON(span).parent_span_id;\n const scope = getCapturedScopesOnSpan(span).scope;\n const span_id = isRemote ? scope?.getPropagationContext().propagationSpanId || generateSpanId() : spanId;\n return dropUndefinedKeys({\n parent_span_id,\n span_id,\n trace_id\n });\n}\n\n/**\n * Convert a Span to a Sentry trace header.\n */\nfunction spanToTraceHeader(span) {\n const {\n traceId,\n spanId\n } = span.spanContext();\n const sampled = spanIsSampled(span);\n return generateSentryTraceHeader(traceId, spanId, sampled);\n}\n\n/**\n * Converts the span links array to a flattened version to be sent within an envelope.\n *\n * If the links array is empty, it returns `undefined` so the empty value can be dropped before it's sent.\n */\nfunction convertSpanLinksForEnvelope(links) {\n if (links && links.length > 0) {\n return links.map(({\n context: {\n spanId,\n traceId,\n traceFlags,\n ...restContext\n },\n attributes\n }) => ({\n span_id: spanId,\n trace_id: traceId,\n sampled: traceFlags === TRACE_FLAG_SAMPLED,\n attributes,\n ...restContext\n }));\n } else {\n return undefined;\n }\n}\n\n/**\n * Convert a span time input into a timestamp in seconds.\n */\nfunction spanTimeInputToSeconds(input) {\n if (typeof input === 'number') {\n return ensureTimestampInSeconds(input);\n }\n if (Array.isArray(input)) {\n // See {@link HrTime} for the array-based time format\n return input[0] + input[1] / 1e9;\n }\n if (input instanceof Date) {\n return ensureTimestampInSeconds(input.getTime());\n }\n return timestampInSeconds();\n}\n\n/**\n * Converts a timestamp to second, if it was in milliseconds, or keeps it as second.\n */\nfunction ensureTimestampInSeconds(timestamp) {\n const isMs = timestamp > 9999999999;\n return isMs ? timestamp / 1000 : timestamp;\n}\n\n/**\n * Convert a span to a JSON representation.\n */\n// Note: Because of this, we currently have a circular type dependency (which we opted out of in package.json).\n// This is not avoidable as we need `spanToJSON` in `spanUtils.ts`, which in turn is needed by `span.ts` for backwards compatibility.\n// And `spanToJSON` needs the Span class from `span.ts` to check here.\nfunction spanToJSON(span) {\n if (spanIsSentrySpan(span)) {\n return span.getSpanJSON();\n }\n const {\n spanId: span_id,\n traceId: trace_id\n } = span.spanContext();\n\n // Handle a span from @opentelemetry/sdk-base-trace's `Span` class\n if (spanIsOpenTelemetrySdkTraceBaseSpan(span)) {\n const {\n attributes,\n startTime,\n name,\n endTime,\n parentSpanId,\n status,\n links\n } = span;\n return dropUndefinedKeys({\n span_id,\n trace_id,\n data: attributes,\n description: name,\n parent_span_id: parentSpanId,\n start_timestamp: spanTimeInputToSeconds(startTime),\n // This is [0,0] by default in OTEL, in which case we want to interpret this as no end time\n timestamp: spanTimeInputToSeconds(endTime) || undefined,\n status: getStatusMessage(status),\n op: attributes[SEMANTIC_ATTRIBUTE_SENTRY_OP],\n origin: attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN],\n links: convertSpanLinksForEnvelope(links)\n });\n }\n\n // Finally, at least we have `spanContext()`....\n // This should not actually happen in reality, but we need to handle it for type safety.\n return {\n span_id,\n trace_id,\n start_timestamp: 0,\n data: {}\n };\n}\nfunction spanIsOpenTelemetrySdkTraceBaseSpan(span) {\n const castSpan = span;\n return !!castSpan.attributes && !!castSpan.startTime && !!castSpan.name && !!castSpan.endTime && !!castSpan.status;\n}\n\n/** Exported only for tests. */\n\n/**\n * Sadly, due to circular dependency checks we cannot actually import the Span class here and check for instanceof.\n * :( So instead we approximate this by checking if it has the `getSpanJSON` method.\n */\nfunction spanIsSentrySpan(span) {\n return typeof span.getSpanJSON === 'function';\n}\n\n/**\n * Returns true if a span is sampled.\n * In most cases, you should just use `span.isRecording()` instead.\n * However, this has a slightly different semantic, as it also returns false if the span is finished.\n * So in the case where this distinction is important, use this method.\n */\nfunction spanIsSampled(span) {\n // We align our trace flags with the ones OpenTelemetry use\n // So we also check for sampled the same way they do.\n const {\n traceFlags\n } = span.spanContext();\n return traceFlags === TRACE_FLAG_SAMPLED;\n}\n\n/** Get the status message to use for a JSON representation of a span. */\nfunction getStatusMessage(status) {\n if (!status || status.code === SPAN_STATUS_UNSET) {\n return undefined;\n }\n if (status.code === SPAN_STATUS_OK) {\n return 'ok';\n }\n return status.message || 'unknown_error';\n}\nconst CHILD_SPANS_FIELD = '_sentryChildSpans';\nconst ROOT_SPAN_FIELD = '_sentryRootSpan';\n\n/**\n * Adds an opaque child span reference to a span.\n */\nfunction addChildSpanToSpan(span, childSpan) {\n // We store the root span reference on the child span\n // We need this for `getRootSpan()` to work\n const rootSpan = span[ROOT_SPAN_FIELD] || span;\n addNonEnumerableProperty(childSpan, ROOT_SPAN_FIELD, rootSpan);\n\n // We store a list of child spans on the parent span\n // We need this for `getSpanDescendants()` to work\n if (span[CHILD_SPANS_FIELD]) {\n span[CHILD_SPANS_FIELD].add(childSpan);\n } else {\n addNonEnumerableProperty(span, CHILD_SPANS_FIELD, new Set([childSpan]));\n }\n}\n\n/** This is only used internally by Idle Spans. */\nfunction removeChildSpanFromSpan(span, childSpan) {\n if (span[CHILD_SPANS_FIELD]) {\n span[CHILD_SPANS_FIELD].delete(childSpan);\n }\n}\n\n/**\n * Returns an array of the given span and all of its descendants.\n */\nfunction getSpanDescendants(span) {\n const resultSet = new Set();\n function addSpanChildren(span) {\n // This exit condition is required to not infinitely loop in case of a circular dependency.\n if (resultSet.has(span)) {\n return;\n // We want to ignore unsampled spans (e.g. non recording spans)\n } else if (spanIsSampled(span)) {\n resultSet.add(span);\n const childSpans = span[CHILD_SPANS_FIELD] ? Array.from(span[CHILD_SPANS_FIELD]) : [];\n for (const childSpan of childSpans) {\n addSpanChildren(childSpan);\n }\n }\n }\n addSpanChildren(span);\n return Array.from(resultSet);\n}\n\n/**\n * Returns the root span of a given span.\n */\nfunction getRootSpan(span) {\n return span[ROOT_SPAN_FIELD] || span;\n}\n\n/**\n * Returns the currently active span.\n */\nfunction getActiveSpan() {\n const carrier = getMainCarrier();\n const acs = getAsyncContextStrategy(carrier);\n if (acs.getActiveSpan) {\n return acs.getActiveSpan();\n }\n return _getSpanForScope(getCurrentScope());\n}\n\n/**\n * Logs a warning once if `beforeSendSpan` is used to drop spans.\n */\nfunction showSpanDropWarning() {\n if (!hasShownSpanDropWarning) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn('[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly.');\n });\n hasShownSpanDropWarning = true;\n }\n}\n\n/**\n * Updates the name of the given span and ensures that the span name is not\n * overwritten by the Sentry SDK.\n *\n * Use this function instead of `span.updateName()` if you want to make sure that\n * your name is kept. For some spans, for example root `http.server` spans the\n * Sentry SDK would otherwise overwrite the span name with a high-quality name\n * it infers when the span ends.\n *\n * Use this function in server code or when your span is started on the server\n * and on the client (browser). If you only update a span name on the client,\n * you can also use `span.updateName()` the SDK does not overwrite the name.\n *\n * @param span - The span to update the name of.\n * @param name - The name to set on the span.\n */\nfunction updateSpanName(span, name) {\n span.updateName(name);\n span.setAttributes({\n [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'custom',\n [SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME]: name\n });\n}\nexport { TRACE_FLAG_NONE, TRACE_FLAG_SAMPLED, addChildSpanToSpan, convertSpanLinksForEnvelope, getActiveSpan, getRootSpan, getSpanDescendants, getStatusMessage, removeChildSpanFromSpan, showSpanDropWarning, spanIsSampled, spanTimeInputToSeconds, spanToJSON, spanToTraceContext, spanToTraceHeader, spanToTransactionTraceContext, updateSpanName };\n","import { getClient } from '../currentScopes.js';\n\n// Treeshakable guard to remove all code related to tracing\n\n/**\n * Determines if span recording is currently enabled.\n *\n * Spans are recorded when at least one of `tracesSampleRate` and `tracesSampler`\n * is defined in the SDK config. This function does not make any assumption about\n * sampling decisions, it only checks if the SDK is configured to record spans.\n *\n * Important: This function only determines if span recording is enabled. Trace\n * continuation and propagation is separately controlled and not covered by this function.\n * If this function returns `false`, traces can still be propagated (which is what\n * we refer to by \"Tracing without Performance\")\n * @see https://develop.sentry.dev/sdk/telemetry/traces/tracing-without-performance/\n *\n * @param maybeOptions An SDK options object to be passed to this function.\n * If this option is not provided, the function will use the current client's options.\n */\nfunction hasSpansEnabled(maybeOptions) {\n if (typeof __SENTRY_TRACING__ === 'boolean' && !__SENTRY_TRACING__) {\n return false;\n }\n const options = maybeOptions || getClient()?.getOptions();\n return !!options && (\n // Note: This check is `!= null`, meaning \"nullish\". `0` is not \"nullish\", `undefined` and `null` are. (This comment was brought to you by 15 minutes of questioning life)\n options.tracesSampleRate != null || !!options.tracesSampler);\n}\n\n/**\n * @see JSDoc of `hasSpansEnabled`\n * @deprecated Use `hasSpansEnabled` instead, which is a more accurately named version of this function.\n * This function will be removed in the next major version of the SDK.\n */\n// TODO(v10): Remove this export\nconst hasTracingEnabled = hasSpansEnabled;\nexport { hasSpansEnabled, hasTracingEnabled };\n","const DEFAULT_ENVIRONMENT = 'production';\nexport { DEFAULT_ENVIRONMENT };\n","import { DEFAULT_ENVIRONMENT } from '../constants.js';\nimport { getClient } from '../currentScopes.js';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE } from '../semanticAttributes.js';\nimport { baggageHeaderToDynamicSamplingContext, dynamicSamplingContextToSentryBaggageHeader } from '../utils-hoist/baggage.js';\nimport { dropUndefinedKeys, addNonEnumerableProperty } from '../utils-hoist/object.js';\nimport { hasSpansEnabled } from '../utils/hasSpansEnabled.js';\nimport { getRootSpan, spanToJSON, spanIsSampled } from '../utils/spanUtils.js';\nimport { getCapturedScopesOnSpan } from './utils.js';\n\n/**\n * If you change this value, also update the terser plugin config to\n * avoid minification of the object property!\n */\nconst FROZEN_DSC_FIELD = '_frozenDsc';\n\n/**\n * Freeze the given DSC on the given span.\n */\nfunction freezeDscOnSpan(span, dsc) {\n const spanWithMaybeDsc = span;\n addNonEnumerableProperty(spanWithMaybeDsc, FROZEN_DSC_FIELD, dsc);\n}\n\n/**\n * Creates a dynamic sampling context from a client.\n *\n * Dispatches the `createDsc` lifecycle hook as a side effect.\n */\nfunction getDynamicSamplingContextFromClient(trace_id, client) {\n const options = client.getOptions();\n const {\n publicKey: public_key\n } = client.getDsn() || {};\n const dsc = dropUndefinedKeys({\n environment: options.environment || DEFAULT_ENVIRONMENT,\n release: options.release,\n public_key,\n trace_id\n });\n client.emit('createDsc', dsc);\n return dsc;\n}\n\n/**\n * Get the dynamic sampling context for the currently active scopes.\n */\nfunction getDynamicSamplingContextFromScope(client, scope) {\n const propagationContext = scope.getPropagationContext();\n return propagationContext.dsc || getDynamicSamplingContextFromClient(propagationContext.traceId, client);\n}\n\n/**\n * Creates a dynamic sampling context from a span (and client and scope)\n *\n * @param span the span from which a few values like the root span name and sample rate are extracted.\n *\n * @returns a dynamic sampling context\n */\nfunction getDynamicSamplingContextFromSpan(span) {\n const client = getClient();\n if (!client) {\n return {};\n }\n const rootSpan = getRootSpan(span);\n const rootSpanJson = spanToJSON(rootSpan);\n const rootSpanAttributes = rootSpanJson.data;\n const traceState = rootSpan.spanContext().traceState;\n\n // The span sample rate that was locally applied to the root span should also always be applied to the DSC, even if the DSC is frozen.\n // This is so that the downstream traces/services can use parentSampleRate in their `tracesSampler` to make consistent sampling decisions across the entire trace.\n const rootSpanSampleRate = traceState?.get('sentry.sample_rate') ?? rootSpanAttributes[SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE];\n function applyLocalSampleRateToDsc(dsc) {\n if (typeof rootSpanSampleRate === 'number' || typeof rootSpanSampleRate === 'string') {\n dsc.sample_rate = `${rootSpanSampleRate}`;\n }\n return dsc;\n }\n\n // For core implementation, we freeze the DSC onto the span as a non-enumerable property\n const frozenDsc = rootSpan[FROZEN_DSC_FIELD];\n if (frozenDsc) {\n return applyLocalSampleRateToDsc(frozenDsc);\n }\n\n // For OpenTelemetry, we freeze the DSC on the trace state\n const traceStateDsc = traceState?.get('sentry.dsc');\n\n // If the span has a DSC, we want it to take precedence\n const dscOnTraceState = traceStateDsc && baggageHeaderToDynamicSamplingContext(traceStateDsc);\n if (dscOnTraceState) {\n return applyLocalSampleRateToDsc(dscOnTraceState);\n }\n\n // Else, we generate it from the span\n const dsc = getDynamicSamplingContextFromClient(span.spanContext().traceId, client);\n\n // We don't want to have a transaction name in the DSC if the source is \"url\" because URLs might contain PII\n const source = rootSpanAttributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];\n\n // after JSON conversion, txn.name becomes jsonSpan.description\n const name = rootSpanJson.description;\n if (source !== 'url' && name) {\n dsc.transaction = name;\n }\n\n // How can we even land here with hasSpansEnabled() returning false?\n // Otel creates a Non-recording span in Tracing Without Performance mode when handling incoming requests\n // So we end up with an active span that is not sampled (neither positively nor negatively)\n if (hasSpansEnabled()) {\n dsc.sampled = String(spanIsSampled(rootSpan));\n dsc.sample_rand =\n // In OTEL we store the sample rand on the trace state because we cannot access scopes for NonRecordingSpans\n // The Sentry OTEL SpanSampler takes care of writing the sample rand on the root span\n traceState?.get('sentry.sample_rand') ??\n // On all other platforms we can actually get the scopes from a root span (we use this as a fallback)\n getCapturedScopesOnSpan(rootSpan).scope?.getPropagationContext().sampleRand.toString();\n }\n applyLocalSampleRateToDsc(dsc);\n client.emit('createDsc', dsc, rootSpan);\n return dsc;\n}\n\n/**\n * Convert a Span to a baggage header.\n */\nfunction spanToBaggageHeader(span) {\n const dsc = getDynamicSamplingContextFromSpan(span);\n return dynamicSamplingContextToSentryBaggageHeader(dsc);\n}\nexport { freezeDscOnSpan, getDynamicSamplingContextFromClient, getDynamicSamplingContextFromScope, getDynamicSamplingContextFromSpan, spanToBaggageHeader };\n","import { DEBUG_BUILD } from './debug-build.js';\nimport { consoleSandbox, logger } from './logger.js';\n\n/** Regular expression used to parse a Dsn. */\nconst DSN_REGEX = /^(?:(\\w+):)\\/\\/(?:(\\w+)(?::(\\w+)?)?@)([\\w.-]+)(?::(\\d+))?\\/(.+)/;\nfunction isValidProtocol(protocol) {\n return protocol === 'http' || protocol === 'https';\n}\n\n/**\n * Renders the string representation of this Dsn.\n *\n * By default, this will render the public representation without the password\n * component. To get the deprecated private representation, set `withPassword`\n * to true.\n *\n * @param withPassword When set to true, the password will be included.\n */\nfunction dsnToString(dsn, withPassword = false) {\n const {\n host,\n path,\n pass,\n port,\n projectId,\n protocol,\n publicKey\n } = dsn;\n return `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ''}` + `@${host}${port ? `:${port}` : ''}/${path ? `${path}/` : path}${projectId}`;\n}\n\n/**\n * Parses a Dsn from a given string.\n *\n * @param str A Dsn as string\n * @returns Dsn as DsnComponents or undefined if @param str is not a valid DSN string\n */\nfunction dsnFromString(str) {\n const match = DSN_REGEX.exec(str);\n if (!match) {\n // This should be logged to the console\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.error(`Invalid Sentry Dsn: ${str}`);\n });\n return undefined;\n }\n const [protocol, publicKey, pass = '', host = '', port = '', lastPath = ''] = match.slice(1);\n let path = '';\n let projectId = lastPath;\n const split = projectId.split('/');\n if (split.length > 1) {\n path = split.slice(0, -1).join('/');\n projectId = split.pop();\n }\n if (projectId) {\n const projectMatch = projectId.match(/^\\d+/);\n if (projectMatch) {\n projectId = projectMatch[0];\n }\n }\n return dsnFromComponents({\n host,\n pass,\n path,\n projectId,\n port,\n protocol: protocol,\n publicKey\n });\n}\nfunction dsnFromComponents(components) {\n return {\n protocol: components.protocol,\n publicKey: components.publicKey || '',\n pass: components.pass || '',\n host: components.host,\n port: components.port || '',\n path: components.path || '',\n projectId: components.projectId\n };\n}\nfunction validateDsn(dsn) {\n if (!DEBUG_BUILD) {\n return true;\n }\n const {\n port,\n projectId,\n protocol\n } = dsn;\n const requiredComponents = ['protocol', 'publicKey', 'host', 'projectId'];\n const hasMissingRequiredComponent = requiredComponents.find(component => {\n if (!dsn[component]) {\n logger.error(`Invalid Sentry Dsn: ${component} missing`);\n return true;\n }\n return false;\n });\n if (hasMissingRequiredComponent) {\n return false;\n }\n if (!projectId.match(/^\\d+$/)) {\n logger.error(`Invalid Sentry Dsn: Invalid projectId ${projectId}`);\n return false;\n }\n if (!isValidProtocol(protocol)) {\n logger.error(`Invalid Sentry Dsn: Invalid protocol ${protocol}`);\n return false;\n }\n if (port && isNaN(parseInt(port, 10))) {\n logger.error(`Invalid Sentry Dsn: Invalid port ${port}`);\n return false;\n }\n return true;\n}\n\n/**\n * Creates a valid Sentry Dsn object, identifying a Sentry instance and project.\n * @returns a valid DsnComponents object or `undefined` if @param from is an invalid DSN source\n */\nfunction makeDsn(from) {\n const components = typeof from === 'string' ? dsnFromString(from) : dsnFromComponents(from);\n if (!components || !validateDsn(components)) {\n return undefined;\n }\n return components;\n}\nexport { dsnFromString, dsnToString, makeDsn };\n","import { isVueViewModel, isSyntheticEvent } from './is.js';\nimport { convertToPlainObject } from './object.js';\nimport { getFunctionName } from './stacktrace.js';\n\n/**\n * Recursively normalizes the given object.\n *\n * - Creates a copy to prevent original input mutation\n * - Skips non-enumerable properties\n * - When stringifying, calls `toJSON` if implemented\n * - Removes circular references\n * - Translates non-serializable values (`undefined`/`NaN`/functions) to serializable format\n * - Translates known global objects/classes to a string representations\n * - Takes care of `Error` object serialization\n * - Optionally limits depth of final output\n * - Optionally limits number of properties/elements included in any single object/array\n *\n * @param input The object to be normalized.\n * @param depth The max depth to which to normalize the object. (Anything deeper stringified whole.)\n * @param maxProperties The max number of elements or properties to be included in any single array or\n * object in the normalized output.\n * @returns A normalized version of the object, or `\"**non-serializable**\"` if any errors are thrown during normalization.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction normalize(input, depth = 100, maxProperties = +Infinity) {\n try {\n // since we're at the outermost level, we don't provide a key\n return visit('', input, depth, maxProperties);\n } catch (err) {\n return {\n ERROR: `**non-serializable** (${err})`\n };\n }\n}\n\n/** JSDoc */\nfunction normalizeToSize(\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nobject,\n// Default Node.js REPL depth\ndepth = 3,\n// 100kB, as 200kB is max payload size, so half sounds reasonable\nmaxSize = 100 * 1024) {\n const normalized = normalize(object, depth);\n if (jsonSize(normalized) > maxSize) {\n return normalizeToSize(object, depth - 1, maxSize);\n }\n return normalized;\n}\n\n/**\n * Visits a node to perform normalization on it\n *\n * @param key The key corresponding to the given node\n * @param value The node to be visited\n * @param depth Optional number indicating the maximum recursion depth\n * @param maxProperties Optional maximum number of properties/elements included in any single object/array\n * @param memo Optional Memo class handling decycling\n */\nfunction visit(key, value, depth = +Infinity, maxProperties = +Infinity, memo = memoBuilder()) {\n const [memoize, unmemoize] = memo;\n\n // Get the simple cases out of the way first\n if (value == null ||\n // this matches null and undefined -> eqeq not eqeqeq\n ['boolean', 'string'].includes(typeof value) || typeof value === 'number' && Number.isFinite(value)) {\n return value;\n }\n const stringified = stringifyValue(key, value);\n\n // Anything we could potentially dig into more (objects or arrays) will have come back as `\"[object XXXX]\"`.\n // Everything else will have already been serialized, so if we don't see that pattern, we're done.\n if (!stringified.startsWith('[object ')) {\n return stringified;\n }\n\n // From here on, we can assert that `value` is either an object or an array.\n\n // Do not normalize objects that we know have already been normalized. As a general rule, the\n // \"__sentry_skip_normalization__\" property should only be used sparingly and only should only be set on objects that\n // have already been normalized.\n if (value['__sentry_skip_normalization__']) {\n return value;\n }\n\n // We can set `__sentry_override_normalization_depth__` on an object to ensure that from there\n // We keep a certain amount of depth.\n // This should be used sparingly, e.g. we use it for the redux integration to ensure we get a certain amount of state.\n const remainingDepth = typeof value['__sentry_override_normalization_depth__'] === 'number' ? value['__sentry_override_normalization_depth__'] : depth;\n\n // We're also done if we've reached the max depth\n if (remainingDepth === 0) {\n // At this point we know `serialized` is a string of the form `\"[object XXXX]\"`. Clean it up so it's just `\"[XXXX]\"`.\n return stringified.replace('object ', '');\n }\n\n // If we've already visited this branch, bail out, as it's circular reference. If not, note that we're seeing it now.\n if (memoize(value)) {\n return '[Circular ~]';\n }\n\n // If the value has a `toJSON` method, we call it to extract more information\n const valueWithToJSON = value;\n if (valueWithToJSON && typeof valueWithToJSON.toJSON === 'function') {\n try {\n const jsonValue = valueWithToJSON.toJSON();\n // We need to normalize the return value of `.toJSON()` in case it has circular references\n return visit('', jsonValue, remainingDepth - 1, maxProperties, memo);\n } catch (err) {\n // pass (The built-in `toJSON` failed, but we can still try to do it ourselves)\n }\n }\n\n // At this point we know we either have an object or an array, we haven't seen it before, and we're going to recurse\n // because we haven't yet reached the max depth. Create an accumulator to hold the results of visiting each\n // property/entry, and keep track of the number of items we add to it.\n const normalized = Array.isArray(value) ? [] : {};\n let numAdded = 0;\n\n // Before we begin, convert`Error` and`Event` instances into plain objects, since some of each of their relevant\n // properties are non-enumerable and otherwise would get missed.\n const visitable = convertToPlainObject(value);\n for (const visitKey in visitable) {\n // Avoid iterating over fields in the prototype if they've somehow been exposed to enumeration.\n if (!Object.prototype.hasOwnProperty.call(visitable, visitKey)) {\n continue;\n }\n if (numAdded >= maxProperties) {\n normalized[visitKey] = '[MaxProperties ~]';\n break;\n }\n\n // Recursively visit all the child nodes\n const visitValue = visitable[visitKey];\n normalized[visitKey] = visit(visitKey, visitValue, remainingDepth - 1, maxProperties, memo);\n numAdded++;\n }\n\n // Once we've visited all the branches, remove the parent from memo storage\n unmemoize(value);\n\n // Return accumulated values\n return normalized;\n}\n\n/* eslint-disable complexity */\n/**\n * Stringify the given value. Handles various known special values and types.\n *\n * Not meant to be used on simple primitives which already have a string representation, as it will, for example, turn\n * the number 1231 into \"[Object Number]\", nor on `null`, as it will throw.\n *\n * @param value The value to stringify\n * @returns A stringified representation of the given value\n */\nfunction stringifyValue(key,\n// this type is a tiny bit of a cheat, since this function does handle NaN (which is technically a number), but for\n// our internal use, it'll do\nvalue) {\n try {\n if (key === 'domain' && value && typeof value === 'object' && value._events) {\n return '[Domain]';\n }\n if (key === 'domainEmitter') {\n return '[DomainEmitter]';\n }\n\n // It's safe to use `global`, `window`, and `document` here in this manner, as we are asserting using `typeof` first\n // which won't throw if they are not present.\n\n if (typeof global !== 'undefined' && value === global) {\n return '[Global]';\n }\n\n // eslint-disable-next-line no-restricted-globals\n if (typeof window !== 'undefined' && value === window) {\n return '[Window]';\n }\n\n // eslint-disable-next-line no-restricted-globals\n if (typeof document !== 'undefined' && value === document) {\n return '[Document]';\n }\n if (isVueViewModel(value)) {\n return '[VueViewModel]';\n }\n\n // React's SyntheticEvent thingy\n if (isSyntheticEvent(value)) {\n return '[SyntheticEvent]';\n }\n if (typeof value === 'number' && !Number.isFinite(value)) {\n return `[${value}]`;\n }\n if (typeof value === 'function') {\n return `[Function: ${getFunctionName(value)}]`;\n }\n if (typeof value === 'symbol') {\n return `[${String(value)}]`;\n }\n\n // stringified BigInts are indistinguishable from regular numbers, so we need to label them to avoid confusion\n if (typeof value === 'bigint') {\n return `[BigInt: ${String(value)}]`;\n }\n\n // Now that we've knocked out all the special cases and the primitives, all we have left are objects. Simply casting\n // them to strings means that instances of classes which haven't defined their `toStringTag` will just come out as\n // `\"[object Object]\"`. If we instead look at the constructor's name (which is the same as the name of the class),\n // we can make sure that only plain objects come out that way.\n const objName = getConstructorName(value);\n\n // Handle HTML Elements\n if (/^HTML(\\w*)Element$/.test(objName)) {\n return `[HTMLElement: ${objName}]`;\n }\n return `[object ${objName}]`;\n } catch (err) {\n return `**non-serializable** (${err})`;\n }\n}\n/* eslint-enable complexity */\n\nfunction getConstructorName(value) {\n const prototype = Object.getPrototypeOf(value);\n return prototype?.constructor ? prototype.constructor.name : 'null prototype';\n}\n\n/** Calculates bytes size of input string */\nfunction utf8Length(value) {\n // eslint-disable-next-line no-bitwise\n return ~-encodeURI(value).split(/%..|./).length;\n}\n\n/** Calculates bytes size of input object */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction jsonSize(value) {\n return utf8Length(JSON.stringify(value));\n}\n\n/**\n * Normalizes URLs in exceptions and stacktraces to a base path so Sentry can fingerprint\n * across platforms and working directory.\n *\n * @param url The URL to be normalized.\n * @param basePath The application base path.\n * @returns The normalized URL.\n */\nfunction normalizeUrlToBase(url, basePath) {\n const escapedBase = basePath\n // Backslash to forward\n .replace(/\\\\/g, '/')\n // Escape RegExp special characters\n .replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&');\n let newUrl = url;\n try {\n newUrl = decodeURI(url);\n } catch (_Oo) {\n // Sometime this breaks\n }\n return newUrl.replace(/\\\\/g, '/').replace(/webpack:\\/?/g, '') // Remove intermediate base path\n // eslint-disable-next-line @sentry-internal/sdk/no-regexp-constructor\n .replace(new RegExp(`(file://)?/*${escapedBase}/*`, 'ig'), 'app:///');\n}\n\n/**\n * Helper to decycle json objects\n */\nfunction memoBuilder() {\n const inner = new WeakSet();\n function memoize(obj) {\n if (inner.has(obj)) {\n return true;\n }\n inner.add(obj);\n return false;\n }\n function unmemoize(obj) {\n inner.delete(obj);\n }\n return [memoize, unmemoize];\n}\nexport { normalize, normalizeToSize, normalizeUrlToBase };\n","import { getSentryCarrier } from '../carrier.js';\nimport { dsnToString } from './dsn.js';\nimport { normalize } from './normalize.js';\nimport { dropUndefinedKeys } from './object.js';\nimport { GLOBAL_OBJ } from './worldwide.js';\n\n/**\n * Creates an envelope.\n * Make sure to always explicitly provide the generic to this function\n * so that the envelope types resolve correctly.\n */\nfunction createEnvelope(headers, items = []) {\n return [headers, items];\n}\n\n/**\n * Add an item to an envelope.\n * Make sure to always explicitly provide the generic to this function\n * so that the envelope types resolve correctly.\n */\nfunction addItemToEnvelope(envelope, newItem) {\n const [headers, items] = envelope;\n return [headers, [...items, newItem]];\n}\n\n/**\n * Convenience function to loop through the items and item types of an envelope.\n * (This function was mostly created because working with envelope types is painful at the moment)\n *\n * If the callback returns true, the rest of the items will be skipped.\n */\nfunction forEachEnvelopeItem(envelope, callback) {\n const envelopeItems = envelope[1];\n for (const envelopeItem of envelopeItems) {\n const envelopeItemType = envelopeItem[0].type;\n const result = callback(envelopeItem, envelopeItemType);\n if (result) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * Returns true if the envelope contains any of the given envelope item types\n */\nfunction envelopeContainsItemType(envelope, types) {\n return forEachEnvelopeItem(envelope, (_, type) => types.includes(type));\n}\n\n/**\n * Encode a string to UTF8 array.\n */\nfunction encodeUTF8(input) {\n const carrier = getSentryCarrier(GLOBAL_OBJ);\n return carrier.encodePolyfill ? carrier.encodePolyfill(input) : new TextEncoder().encode(input);\n}\n\n/**\n * Decode a UTF8 array to string.\n */\nfunction decodeUTF8(input) {\n const carrier = getSentryCarrier(GLOBAL_OBJ);\n return carrier.decodePolyfill ? carrier.decodePolyfill(input) : new TextDecoder().decode(input);\n}\n\n/**\n * Serializes an envelope.\n */\nfunction serializeEnvelope(envelope) {\n const [envHeaders, items] = envelope;\n\n // Initially we construct our envelope as a string and only convert to binary chunks if we encounter binary data\n let parts = JSON.stringify(envHeaders);\n function append(next) {\n if (typeof parts === 'string') {\n parts = typeof next === 'string' ? parts + next : [encodeUTF8(parts), next];\n } else {\n parts.push(typeof next === 'string' ? encodeUTF8(next) : next);\n }\n }\n for (const item of items) {\n const [itemHeaders, payload] = item;\n append(`\\n${JSON.stringify(itemHeaders)}\\n`);\n if (typeof payload === 'string' || payload instanceof Uint8Array) {\n append(payload);\n } else {\n let stringifiedPayload;\n try {\n stringifiedPayload = JSON.stringify(payload);\n } catch (e) {\n // In case, despite all our efforts to keep `payload` circular-dependency-free, `JSON.stringify()` still\n // fails, we try again after normalizing it again with infinite normalization depth. This of course has a\n // performance impact but in this case a performance hit is better than throwing.\n stringifiedPayload = JSON.stringify(normalize(payload));\n }\n append(stringifiedPayload);\n }\n }\n return typeof parts === 'string' ? parts : concatBuffers(parts);\n}\nfunction concatBuffers(buffers) {\n const totalLength = buffers.reduce((acc, buf) => acc + buf.length, 0);\n const merged = new Uint8Array(totalLength);\n let offset = 0;\n for (const buffer of buffers) {\n merged.set(buffer, offset);\n offset += buffer.length;\n }\n return merged;\n}\n\n/**\n * Parses an envelope\n */\nfunction parseEnvelope(env) {\n let buffer = typeof env === 'string' ? encodeUTF8(env) : env;\n function readBinary(length) {\n const bin = buffer.subarray(0, length);\n // Replace the buffer with the remaining data excluding trailing newline\n buffer = buffer.subarray(length + 1);\n return bin;\n }\n function readJson() {\n let i = buffer.indexOf(0xa);\n // If we couldn't find a newline, we must have found the end of the buffer\n if (i < 0) {\n i = buffer.length;\n }\n return JSON.parse(decodeUTF8(readBinary(i)));\n }\n const envelopeHeader = readJson();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const items = [];\n while (buffer.length) {\n const itemHeader = readJson();\n const binaryLength = typeof itemHeader.length === 'number' ? itemHeader.length : undefined;\n items.push([itemHeader, binaryLength ? readBinary(binaryLength) : readJson()]);\n }\n return [envelopeHeader, items];\n}\n\n/**\n * Creates envelope item for a single span\n */\nfunction createSpanEnvelopeItem(spanJson) {\n const spanHeaders = {\n type: 'span'\n };\n return [spanHeaders, spanJson];\n}\n\n/**\n * Creates attachment envelope items\n */\nfunction createAttachmentEnvelopeItem(attachment) {\n const buffer = typeof attachment.data === 'string' ? encodeUTF8(attachment.data) : attachment.data;\n return [dropUndefinedKeys({\n type: 'attachment',\n length: buffer.length,\n filename: attachment.filename,\n content_type: attachment.contentType,\n attachment_type: attachment.attachmentType\n }), buffer];\n}\nconst ITEM_TYPE_TO_DATA_CATEGORY_MAP = {\n session: 'session',\n sessions: 'session',\n attachment: 'attachment',\n transaction: 'transaction',\n event: 'error',\n client_report: 'internal',\n user_report: 'default',\n profile: 'profile',\n profile_chunk: 'profile',\n replay_event: 'replay',\n replay_recording: 'replay',\n check_in: 'monitor',\n feedback: 'feedback',\n span: 'span',\n raw_security: 'security',\n otel_log: 'log_item'\n};\n\n/**\n * Maps the type of an envelope item to a data category.\n */\nfunction envelopeItemTypeToDataCategory(type) {\n return ITEM_TYPE_TO_DATA_CATEGORY_MAP[type];\n}\n\n/** Extracts the minimal SDK info from the metadata or an events */\nfunction getSdkMetadataForEnvelopeHeader(metadataOrEvent) {\n if (!metadataOrEvent?.sdk) {\n return;\n }\n const {\n name,\n version\n } = metadataOrEvent.sdk;\n return {\n name,\n version\n };\n}\n\n/**\n * Creates event envelope headers, based on event, sdk info and tunnel\n * Note: This function was extracted from the core package to make it available in Replay\n */\nfunction createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn) {\n const dynamicSamplingContext = event.sdkProcessingMetadata?.dynamicSamplingContext;\n return {\n event_id: event.event_id,\n sent_at: new Date().toISOString(),\n ...(sdkInfo && {\n sdk: sdkInfo\n }),\n ...(!!tunnel && dsn && {\n dsn: dsnToString(dsn)\n }),\n ...(dynamicSamplingContext && {\n trace: dropUndefinedKeys({\n ...dynamicSamplingContext\n })\n })\n };\n}\nexport { addItemToEnvelope, createAttachmentEnvelopeItem, createEnvelope, createEventEnvelopeHeaders, createSpanEnvelopeItem, envelopeContainsItemType, envelopeItemTypeToDataCategory, forEachEnvelopeItem, getSdkMetadataForEnvelopeHeader, parseEnvelope, serializeEnvelope };\n","import { getDynamicSamplingContextFromSpan } from './tracing/dynamicSamplingContext.js';\nimport { dsnToString } from './utils-hoist/dsn.js';\nimport { getSdkMetadataForEnvelopeHeader, createEnvelope, createEventEnvelopeHeaders, createSpanEnvelopeItem } from './utils-hoist/envelope.js';\nimport './utils-hoist/debug-build.js';\nimport './utils-hoist/logger.js';\nimport { spanToJSON, showSpanDropWarning } from './utils/spanUtils.js';\n\n/**\n * Apply SdkInfo (name, version, packages, integrations) to the corresponding event key.\n * Merge with existing data if any.\n **/\nfunction enhanceEventWithSdkInfo(event, sdkInfo) {\n if (!sdkInfo) {\n return event;\n }\n event.sdk = event.sdk || {};\n event.sdk.name = event.sdk.name || sdkInfo.name;\n event.sdk.version = event.sdk.version || sdkInfo.version;\n event.sdk.integrations = [...(event.sdk.integrations || []), ...(sdkInfo.integrations || [])];\n event.sdk.packages = [...(event.sdk.packages || []), ...(sdkInfo.packages || [])];\n return event;\n}\n\n/** Creates an envelope from a Session */\nfunction createSessionEnvelope(session, dsn, metadata, tunnel) {\n const sdkInfo = getSdkMetadataForEnvelopeHeader(metadata);\n const envelopeHeaders = {\n sent_at: new Date().toISOString(),\n ...(sdkInfo && {\n sdk: sdkInfo\n }),\n ...(!!tunnel && dsn && {\n dsn: dsnToString(dsn)\n })\n };\n const envelopeItem = 'aggregates' in session ? [{\n type: 'sessions'\n }, session] : [{\n type: 'session'\n }, session.toJSON()];\n return createEnvelope(envelopeHeaders, [envelopeItem]);\n}\n\n/**\n * Create an Envelope from an event.\n */\nfunction createEventEnvelope(event, dsn, metadata, tunnel) {\n const sdkInfo = getSdkMetadataForEnvelopeHeader(metadata);\n\n /*\n Note: Due to TS, event.type may be `replay_event`, theoretically.\n In practice, we never call `createEventEnvelope` with `replay_event` type,\n and we'd have to adjust a looot of types to make this work properly.\n We want to avoid casting this around, as that could lead to bugs (e.g. when we add another type)\n So the safe choice is to really guard against the replay_event type here.\n */\n const eventType = event.type && event.type !== 'replay_event' ? event.type : 'event';\n enhanceEventWithSdkInfo(event, metadata?.sdk);\n const envelopeHeaders = createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn);\n\n // Prevent this data (which, if it exists, was used in earlier steps in the processing pipeline) from being sent to\n // sentry. (Note: Our use of this property comes and goes with whatever we might be debugging, whatever hacks we may\n // have temporarily added, etc. Even if we don't happen to be using it at some point in the future, let's not get rid\n // of this `delete`, lest we miss putting it back in the next time the property is in use.)\n delete event.sdkProcessingMetadata;\n const eventItem = [{\n type: eventType\n }, event];\n return createEnvelope(envelopeHeaders, [eventItem]);\n}\n\n/**\n * Create envelope from Span item.\n *\n * Takes an optional client and runs spans through `beforeSendSpan` if available.\n */\nfunction createSpanEnvelope(spans, client) {\n function dscHasRequiredProps(dsc) {\n return !!dsc.trace_id && !!dsc.public_key;\n }\n\n // For the moment we'll obtain the DSC from the first span in the array\n // This might need to be changed if we permit sending multiple spans from\n // different segments in one envelope\n const dsc = getDynamicSamplingContextFromSpan(spans[0]);\n const dsn = client?.getDsn();\n const tunnel = client?.getOptions().tunnel;\n const headers = {\n sent_at: new Date().toISOString(),\n ...(dscHasRequiredProps(dsc) && {\n trace: dsc\n }),\n ...(!!tunnel && dsn && {\n dsn: dsnToString(dsn)\n })\n };\n const beforeSendSpan = client?.getOptions().beforeSendSpan;\n const convertToSpanJSON = beforeSendSpan ? span => {\n const spanJson = spanToJSON(span);\n const processedSpan = beforeSendSpan(spanJson);\n if (!processedSpan) {\n showSpanDropWarning();\n return spanJson;\n }\n return processedSpan;\n } : spanToJSON;\n const items = [];\n for (const span of spans) {\n const spanJson = convertToSpanJSON(span);\n if (spanJson) {\n items.push(createSpanEnvelopeItem(spanJson));\n }\n }\n return createEnvelope(headers, items);\n}\nexport { createEventEnvelope, createSessionEnvelope, createSpanEnvelope };\n","import { DEBUG_BUILD } from './debug-build.js';\nimport { isThenable } from './utils-hoist/is.js';\nimport { logger } from './utils-hoist/logger.js';\nimport { SyncPromise } from './utils-hoist/syncpromise.js';\n\n/**\n * Process an array of event processors, returning the processed event (or `null` if the event was dropped).\n */\nfunction notifyEventProcessors(processors, event, hint, index = 0) {\n return new SyncPromise((resolve, reject) => {\n const processor = processors[index];\n if (event === null || typeof processor !== 'function') {\n resolve(event);\n } else {\n const result = processor({\n ...event\n }, hint);\n DEBUG_BUILD && processor.id && result === null && logger.log(`Event processor \"${processor.id}\" dropped event`);\n if (isThenable(result)) {\n void result.then(final => notifyEventProcessors(processors, final, hint, index + 1).then(resolve)).then(null, reject);\n } else {\n void notifyEventProcessors(processors, result, hint, index + 1).then(resolve).then(null, reject);\n }\n }\n });\n}\nexport { notifyEventProcessors };\n","import { GLOBAL_OBJ } from './worldwide.js';\nlet parsedStackResults;\nlet lastKeysCount;\nlet cachedFilenameDebugIds;\n\n/**\n * Returns a map of filenames to debug identifiers.\n */\nfunction getFilenameToDebugIdMap(stackParser) {\n const debugIdMap = GLOBAL_OBJ._sentryDebugIds;\n if (!debugIdMap) {\n return {};\n }\n const debugIdKeys = Object.keys(debugIdMap);\n\n // If the count of registered globals hasn't changed since the last call, we\n // can just return the cached result.\n if (cachedFilenameDebugIds && debugIdKeys.length === lastKeysCount) {\n return cachedFilenameDebugIds;\n }\n lastKeysCount = debugIdKeys.length;\n\n // Build a map of filename -> debug_id.\n cachedFilenameDebugIds = debugIdKeys.reduce((acc, stackKey) => {\n if (!parsedStackResults) {\n parsedStackResults = {};\n }\n const result = parsedStackResults[stackKey];\n if (result) {\n acc[result[0]] = result[1];\n } else {\n const parsedStack = stackParser(stackKey);\n for (let i = parsedStack.length - 1; i >= 0; i--) {\n const stackFrame = parsedStack[i];\n const filename = stackFrame?.filename;\n const debugId = debugIdMap[stackKey];\n if (filename && debugId) {\n acc[filename] = debugId;\n parsedStackResults[stackKey] = [filename, debugId];\n break;\n }\n }\n }\n return acc;\n }, {});\n return cachedFilenameDebugIds;\n}\n\n/**\n * Returns a list of debug images for the given resources.\n */\nfunction getDebugImagesForResources(stackParser, resource_paths) {\n const filenameDebugIdMap = getFilenameToDebugIdMap(stackParser);\n if (!filenameDebugIdMap) {\n return [];\n }\n const images = [];\n for (const path of resource_paths) {\n if (path && filenameDebugIdMap[path]) {\n images.push({\n type: 'sourcemap',\n code_file: path,\n debug_id: filenameDebugIdMap[path]\n });\n }\n }\n return images;\n}\nexport { getDebugImagesForResources, getFilenameToDebugIdMap };\n","import { getDynamicSamplingContextFromSpan } from '../tracing/dynamicSamplingContext.js';\nimport { dropUndefinedKeys } from '../utils-hoist/object.js';\nimport { merge } from './merge.js';\nimport { spanToTraceContext, getRootSpan, spanToJSON } from './spanUtils.js';\n\n/**\n * Applies data from the scope to the event and runs all event processors on it.\n */\nfunction applyScopeDataToEvent(event, data) {\n const {\n fingerprint,\n span,\n breadcrumbs,\n sdkProcessingMetadata\n } = data;\n\n // Apply general data\n applyDataToEvent(event, data);\n\n // We want to set the trace context for normal events only if there isn't already\n // a trace context on the event. There is a product feature in place where we link\n // errors with transaction and it relies on that.\n if (span) {\n applySpanToEvent(event, span);\n }\n applyFingerprintToEvent(event, fingerprint);\n applyBreadcrumbsToEvent(event, breadcrumbs);\n applySdkMetadataToEvent(event, sdkProcessingMetadata);\n}\n\n/** Merge data of two scopes together. */\nfunction mergeScopeData(data, mergeData) {\n const {\n extra,\n tags,\n user,\n contexts,\n level,\n sdkProcessingMetadata,\n breadcrumbs,\n fingerprint,\n eventProcessors,\n attachments,\n propagationContext,\n transactionName,\n span\n } = mergeData;\n mergeAndOverwriteScopeData(data, 'extra', extra);\n mergeAndOverwriteScopeData(data, 'tags', tags);\n mergeAndOverwriteScopeData(data, 'user', user);\n mergeAndOverwriteScopeData(data, 'contexts', contexts);\n data.sdkProcessingMetadata = merge(data.sdkProcessingMetadata, sdkProcessingMetadata, 2);\n if (level) {\n data.level = level;\n }\n if (transactionName) {\n data.transactionName = transactionName;\n }\n if (span) {\n data.span = span;\n }\n if (breadcrumbs.length) {\n data.breadcrumbs = [...data.breadcrumbs, ...breadcrumbs];\n }\n if (fingerprint.length) {\n data.fingerprint = [...data.fingerprint, ...fingerprint];\n }\n if (eventProcessors.length) {\n data.eventProcessors = [...data.eventProcessors, ...eventProcessors];\n }\n if (attachments.length) {\n data.attachments = [...data.attachments, ...attachments];\n }\n data.propagationContext = {\n ...data.propagationContext,\n ...propagationContext\n };\n}\n\n/**\n * Merges certain scope data. Undefined values will overwrite any existing values.\n * Exported only for tests.\n */\nfunction mergeAndOverwriteScopeData(data, prop, mergeVal) {\n data[prop] = merge(data[prop], mergeVal, 1);\n}\nfunction applyDataToEvent(event, data) {\n const {\n extra,\n tags,\n user,\n contexts,\n level,\n transactionName\n } = data;\n const cleanedExtra = dropUndefinedKeys(extra);\n if (Object.keys(cleanedExtra).length) {\n event.extra = {\n ...cleanedExtra,\n ...event.extra\n };\n }\n const cleanedTags = dropUndefinedKeys(tags);\n if (Object.keys(cleanedTags).length) {\n event.tags = {\n ...cleanedTags,\n ...event.tags\n };\n }\n const cleanedUser = dropUndefinedKeys(user);\n if (Object.keys(cleanedUser).length) {\n event.user = {\n ...cleanedUser,\n ...event.user\n };\n }\n const cleanedContexts = dropUndefinedKeys(contexts);\n if (Object.keys(cleanedContexts).length) {\n event.contexts = {\n ...cleanedContexts,\n ...event.contexts\n };\n }\n if (level) {\n event.level = level;\n }\n\n // transaction events get their `transaction` from the root span name\n if (transactionName && event.type !== 'transaction') {\n event.transaction = transactionName;\n }\n}\nfunction applyBreadcrumbsToEvent(event, breadcrumbs) {\n const mergedBreadcrumbs = [...(event.breadcrumbs || []), ...breadcrumbs];\n event.breadcrumbs = mergedBreadcrumbs.length ? mergedBreadcrumbs : undefined;\n}\nfunction applySdkMetadataToEvent(event, sdkProcessingMetadata) {\n event.sdkProcessingMetadata = {\n ...event.sdkProcessingMetadata,\n ...sdkProcessingMetadata\n };\n}\nfunction applySpanToEvent(event, span) {\n event.contexts = {\n trace: spanToTraceContext(span),\n ...event.contexts\n };\n event.sdkProcessingMetadata = {\n dynamicSamplingContext: getDynamicSamplingContextFromSpan(span),\n ...event.sdkProcessingMetadata\n };\n const rootSpan = getRootSpan(span);\n const transactionName = spanToJSON(rootSpan).description;\n if (transactionName && !event.transaction && event.type === 'transaction') {\n event.transaction = transactionName;\n }\n}\n\n/**\n * Applies fingerprint from the scope to the event if there's one,\n * uses message if there's one instead or get rid of empty fingerprint\n */\nfunction applyFingerprintToEvent(event, fingerprint) {\n // Make sure it's an array first and we actually have something in place\n event.fingerprint = event.fingerprint ? Array.isArray(event.fingerprint) ? event.fingerprint : [event.fingerprint] : [];\n\n // If we have something on the scope, then merge it with event\n if (fingerprint) {\n event.fingerprint = event.fingerprint.concat(fingerprint);\n }\n\n // If we have no data at all, remove empty array default\n if (!event.fingerprint.length) {\n delete event.fingerprint;\n }\n}\nexport { applyScopeDataToEvent, mergeAndOverwriteScopeData, mergeScopeData };\n","import { DEFAULT_ENVIRONMENT } from '../constants.js';\nimport { getGlobalScope } from '../currentScopes.js';\nimport { notifyEventProcessors } from '../eventProcessors.js';\nimport { Scope } from '../scope.js';\nimport { getFilenameToDebugIdMap } from '../utils-hoist/debug-ids.js';\nimport { uuid4, addExceptionMechanism } from '../utils-hoist/misc.js';\nimport { normalize } from '../utils-hoist/normalize.js';\nimport { truncate } from '../utils-hoist/string.js';\nimport { dateTimestampInSeconds } from '../utils-hoist/time.js';\nimport { mergeScopeData, applyScopeDataToEvent } from './applyScopeDataToEvent.js';\n\n/**\n * This type makes sure that we get either a CaptureContext, OR an EventHint.\n * It does not allow mixing them, which could lead to unexpected outcomes, e.g. this is disallowed:\n * { user: { id: '123' }, mechanism: { handled: false } }\n */\n\n/**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * @param event The original event.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A new event with more information.\n * @hidden\n */\nfunction prepareEvent(options, event, hint, scope, client, isolationScope) {\n const {\n normalizeDepth = 3,\n normalizeMaxBreadth = 1000\n } = options;\n const prepared = {\n ...event,\n event_id: event.event_id || hint.event_id || uuid4(),\n timestamp: event.timestamp || dateTimestampInSeconds()\n };\n const integrations = hint.integrations || options.integrations.map(i => i.name);\n applyClientOptions(prepared, options);\n applyIntegrationsMetadata(prepared, integrations);\n if (client) {\n client.emit('applyFrameMetadata', event);\n }\n\n // Only put debug IDs onto frames for error events.\n if (event.type === undefined) {\n applyDebugIds(prepared, options.stackParser);\n }\n\n // If we have scope given to us, use it as the base for further modifications.\n // This allows us to prevent unnecessary copying of data if `captureContext` is not provided.\n const finalScope = getFinalScope(scope, hint.captureContext);\n if (hint.mechanism) {\n addExceptionMechanism(prepared, hint.mechanism);\n }\n const clientEventProcessors = client ? client.getEventProcessors() : [];\n\n // This should be the last thing called, since we want that\n // {@link Scope.addEventProcessor} gets the finished prepared event.\n // Merge scope data together\n const data = getGlobalScope().getScopeData();\n if (isolationScope) {\n const isolationData = isolationScope.getScopeData();\n mergeScopeData(data, isolationData);\n }\n if (finalScope) {\n const finalScopeData = finalScope.getScopeData();\n mergeScopeData(data, finalScopeData);\n }\n const attachments = [...(hint.attachments || []), ...data.attachments];\n if (attachments.length) {\n hint.attachments = attachments;\n }\n applyScopeDataToEvent(prepared, data);\n const eventProcessors = [...clientEventProcessors,\n // Run scope event processors _after_ all other processors\n ...data.eventProcessors];\n const result = notifyEventProcessors(eventProcessors, prepared, hint);\n return result.then(evt => {\n if (evt) {\n // We apply the debug_meta field only after all event processors have ran, so that if any event processors modified\n // file names (e.g.the RewriteFrames integration) the filename -> debug ID relationship isn't destroyed.\n // This should not cause any PII issues, since we're only moving data that is already on the event and not adding\n // any new data\n applyDebugMeta(evt);\n }\n if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {\n return normalizeEvent(evt, normalizeDepth, normalizeMaxBreadth);\n }\n return evt;\n });\n}\n\n/**\n * Enhances event using the client configuration.\n * It takes care of all \"static\" values like environment, release and `dist`,\n * as well as truncating overly long values.\n *\n * Only exported for tests.\n *\n * @param event event instance to be enhanced\n */\nfunction applyClientOptions(event, options) {\n const {\n environment,\n release,\n dist,\n maxValueLength = 250\n } = options;\n\n // empty strings do not make sense for environment, release, and dist\n // so we handle them the same as if they were not provided\n event.environment = event.environment || environment || DEFAULT_ENVIRONMENT;\n if (!event.release && release) {\n event.release = release;\n }\n if (!event.dist && dist) {\n event.dist = dist;\n }\n if (event.message) {\n event.message = truncate(event.message, maxValueLength);\n }\n const exception = event.exception?.values?.[0];\n if (exception?.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n const request = event.request;\n if (request?.url) {\n request.url = truncate(request.url, maxValueLength);\n }\n}\n\n/**\n * Puts debug IDs into the stack frames of an error event.\n */\nfunction applyDebugIds(event, stackParser) {\n // Build a map of filename -> debug_id\n const filenameDebugIdMap = getFilenameToDebugIdMap(stackParser);\n event.exception?.values?.forEach(exception => {\n exception.stacktrace?.frames?.forEach(frame => {\n if (frame.filename) {\n frame.debug_id = filenameDebugIdMap[frame.filename];\n }\n });\n });\n}\n\n/**\n * Moves debug IDs from the stack frames of an error event into the debug_meta field.\n */\nfunction applyDebugMeta(event) {\n // Extract debug IDs and filenames from the stack frames on the event.\n const filenameDebugIdMap = {};\n event.exception?.values?.forEach(exception => {\n exception.stacktrace?.frames?.forEach(frame => {\n if (frame.debug_id) {\n if (frame.abs_path) {\n filenameDebugIdMap[frame.abs_path] = frame.debug_id;\n } else if (frame.filename) {\n filenameDebugIdMap[frame.filename] = frame.debug_id;\n }\n delete frame.debug_id;\n }\n });\n });\n if (Object.keys(filenameDebugIdMap).length === 0) {\n return;\n }\n\n // Fill debug_meta information\n event.debug_meta = event.debug_meta || {};\n event.debug_meta.images = event.debug_meta.images || [];\n const images = event.debug_meta.images;\n Object.entries(filenameDebugIdMap).forEach(([filename, debug_id]) => {\n images.push({\n type: 'sourcemap',\n code_file: filename,\n debug_id\n });\n });\n}\n\n/**\n * This function adds all used integrations to the SDK info in the event.\n * @param event The event that will be filled with all integrations.\n */\nfunction applyIntegrationsMetadata(event, integrationNames) {\n if (integrationNames.length > 0) {\n event.sdk = event.sdk || {};\n event.sdk.integrations = [...(event.sdk.integrations || []), ...integrationNames];\n }\n}\n\n/**\n * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization.\n * Normalized keys:\n * - `breadcrumbs.data`\n * - `user`\n * - `contexts`\n * - `extra`\n * @param event Event\n * @returns Normalized event\n */\nfunction normalizeEvent(event, depth, maxBreadth) {\n if (!event) {\n return null;\n }\n const normalized = {\n ...event,\n ...(event.breadcrumbs && {\n breadcrumbs: event.breadcrumbs.map(b => ({\n ...b,\n ...(b.data && {\n data: normalize(b.data, depth, maxBreadth)\n })\n }))\n }),\n ...(event.user && {\n user: normalize(event.user, depth, maxBreadth)\n }),\n ...(event.contexts && {\n contexts: normalize(event.contexts, depth, maxBreadth)\n }),\n ...(event.extra && {\n extra: normalize(event.extra, depth, maxBreadth)\n })\n };\n\n // event.contexts.trace stores information about a Transaction. Similarly,\n // event.spans[] stores information about child Spans. Given that a\n // Transaction is conceptually a Span, normalization should apply to both\n // Transactions and Spans consistently.\n // For now the decision is to skip normalization of Transactions and Spans,\n // so this block overwrites the normalized event to add back the original\n // Transaction information prior to normalization.\n if (event.contexts?.trace && normalized.contexts) {\n normalized.contexts.trace = event.contexts.trace;\n\n // event.contexts.trace.data may contain circular/dangerous data so we need to normalize it\n if (event.contexts.trace.data) {\n normalized.contexts.trace.data = normalize(event.contexts.trace.data, depth, maxBreadth);\n }\n }\n\n // event.spans[].data may contain circular/dangerous data so we need to normalize it\n if (event.spans) {\n normalized.spans = event.spans.map(span => {\n return {\n ...span,\n ...(span.data && {\n data: normalize(span.data, depth, maxBreadth)\n })\n };\n });\n }\n\n // event.contexts.flags (FeatureFlagContext) stores context for our feature\n // flag integrations. It has a greater nesting depth than our other typed\n // Contexts, so we re-normalize with a fixed depth of 3 here. We do not want\n // to skip this in case of conflicting, user-provided context.\n if (event.contexts?.flags && normalized.contexts) {\n normalized.contexts.flags = normalize(event.contexts.flags, 3, maxBreadth);\n }\n return normalized;\n}\nfunction getFinalScope(scope, captureContext) {\n if (!captureContext) {\n return scope;\n }\n const finalScope = scope ? scope.clone() : new Scope();\n finalScope.update(captureContext);\n return finalScope;\n}\n\n/**\n * Parse either an `EventHint` directly, or convert a `CaptureContext` to an `EventHint`.\n * This is used to allow to update method signatures that used to accept a `CaptureContext` but should now accept an `EventHint`.\n */\nfunction parseEventHintOrCaptureContext(hint) {\n if (!hint) {\n return undefined;\n }\n\n // If you pass a Scope or `() => Scope` as CaptureContext, we just return this as captureContext\n if (hintIsScopeOrFunction(hint)) {\n return {\n captureContext: hint\n };\n }\n if (hintIsScopeContext(hint)) {\n return {\n captureContext: hint\n };\n }\n return hint;\n}\nfunction hintIsScopeOrFunction(hint) {\n return hint instanceof Scope || typeof hint === 'function';\n}\nconst captureContextKeys = ['user', 'level', 'extra', 'contexts', 'tags', 'fingerprint', 'propagationContext'];\nfunction hintIsScopeContext(hint) {\n return Object.keys(hint).some(key => captureContextKeys.includes(key));\n}\nexport { applyClientOptions, applyDebugIds, applyDebugMeta, parseEventHintOrCaptureContext, prepareEvent };\n","import { getCurrentScope, getIsolationScope, getClient, withIsolationScope } from './currentScopes.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { makeSession, updateSession, closeSession } from './session.js';\nimport { isThenable } from './utils-hoist/is.js';\nimport { logger } from './utils-hoist/logger.js';\nimport { uuid4 } from './utils-hoist/misc.js';\nimport { timestampInSeconds } from './utils-hoist/time.js';\nimport { GLOBAL_OBJ } from './utils-hoist/worldwide.js';\nimport { parseEventHintOrCaptureContext } from './utils/prepareEvent.js';\n\n/**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception The exception to capture.\n * @param hint Optional additional data to attach to the Sentry event.\n * @returns the id of the captured Sentry event.\n */\nfunction captureException(exception, hint) {\n return getCurrentScope().captureException(exception, parseEventHintOrCaptureContext(hint));\n}\n\n/**\n * Captures a message event and sends it to Sentry.\n *\n * @param message The message to send to Sentry.\n * @param captureContext Define the level of the message or pass in additional data to attach to the message.\n * @returns the id of the captured message.\n */\nfunction captureMessage(message, captureContext) {\n // This is necessary to provide explicit scopes upgrade, without changing the original\n // arity of the `captureMessage(message, level)` method.\n const level = typeof captureContext === 'string' ? captureContext : undefined;\n const context = typeof captureContext !== 'string' ? {\n captureContext\n } : undefined;\n return getCurrentScope().captureMessage(message, level, context);\n}\n\n/**\n * Captures a manually created event and sends it to Sentry.\n *\n * @param event The event to send to Sentry.\n * @param hint Optional additional data to attach to the Sentry event.\n * @returns the id of the captured event.\n */\nfunction captureEvent(event, hint) {\n return getCurrentScope().captureEvent(event, hint);\n}\n\n/**\n * Sets context data with the given name.\n * @param name of the context\n * @param context Any kind of data. This data will be normalized.\n */\nfunction setContext(name, context) {\n getIsolationScope().setContext(name, context);\n}\n\n/**\n * Set an object that will be merged sent as extra data with the event.\n * @param extras Extras object to merge into current context.\n */\nfunction setExtras(extras) {\n getIsolationScope().setExtras(extras);\n}\n\n/**\n * Set key:value that will be sent as extra data with the event.\n * @param key String of extra\n * @param extra Any kind of data. This data will be normalized.\n */\nfunction setExtra(key, extra) {\n getIsolationScope().setExtra(key, extra);\n}\n\n/**\n * Set an object that will be merged sent as tags data with the event.\n * @param tags Tags context object to merge into current context.\n */\nfunction setTags(tags) {\n getIsolationScope().setTags(tags);\n}\n\n/**\n * Set key:value that will be sent as tags data with the event.\n *\n * Can also be used to unset a tag, by passing `undefined`.\n *\n * @param key String key of tag\n * @param value Value of tag\n */\nfunction setTag(key, value) {\n getIsolationScope().setTag(key, value);\n}\n\n/**\n * Updates user context information for future events.\n *\n * @param user User context object to be set in the current context. Pass `null` to unset the user.\n */\nfunction setUser(user) {\n getIsolationScope().setUser(user);\n}\n\n/**\n * The last error event id of the isolation scope.\n *\n * Warning: This function really returns the last recorded error event id on the current\n * isolation scope. If you call this function after handling a certain error and another error\n * is captured in between, the last one is returned instead of the one you might expect.\n * Also, ids of events that were never sent to Sentry (for example because\n * they were dropped in `beforeSend`) could be returned.\n *\n * @returns The last event id of the isolation scope.\n */\nfunction lastEventId() {\n return getIsolationScope().lastEventId();\n}\n\n/**\n * Create a cron monitor check in and send it to Sentry.\n *\n * @param checkIn An object that describes a check in.\n * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want\n * to create a monitor automatically when sending a check in.\n */\nfunction captureCheckIn(checkIn, upsertMonitorConfig) {\n const scope = getCurrentScope();\n const client = getClient();\n if (!client) {\n DEBUG_BUILD && logger.warn('Cannot capture check-in. No client defined.');\n } else if (!client.captureCheckIn) {\n DEBUG_BUILD && logger.warn('Cannot capture check-in. Client does not support sending check-ins.');\n } else {\n return client.captureCheckIn(checkIn, upsertMonitorConfig, scope);\n }\n return uuid4();\n}\n\n/**\n * Wraps a callback with a cron monitor check in. The check in will be sent to Sentry when the callback finishes.\n *\n * @param monitorSlug The distinct slug of the monitor.\n * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want\n * to create a monitor automatically when sending a check in.\n */\nfunction withMonitor(monitorSlug, callback, upsertMonitorConfig) {\n const checkInId = captureCheckIn({\n monitorSlug,\n status: 'in_progress'\n }, upsertMonitorConfig);\n const now = timestampInSeconds();\n function finishCheckIn(status) {\n captureCheckIn({\n monitorSlug,\n status,\n checkInId,\n duration: timestampInSeconds() - now\n });\n }\n return withIsolationScope(() => {\n let maybePromiseResult;\n try {\n maybePromiseResult = callback();\n } catch (e) {\n finishCheckIn('error');\n throw e;\n }\n if (isThenable(maybePromiseResult)) {\n Promise.resolve(maybePromiseResult).then(() => {\n finishCheckIn('ok');\n }, e => {\n finishCheckIn('error');\n throw e;\n });\n } else {\n finishCheckIn('ok');\n }\n return maybePromiseResult;\n });\n}\n\n/**\n * Call `flush()` on the current client, if there is one. See {@link Client.flush}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue. Omitting this parameter will cause\n * the client to wait until all events are sent before resolving the promise.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nasync function flush(timeout) {\n const client = getClient();\n if (client) {\n return client.flush(timeout);\n }\n DEBUG_BUILD && logger.warn('Cannot flush events. No client defined.');\n return Promise.resolve(false);\n}\n\n/**\n * Call `close()` on the current client, if there is one. See {@link Client.close}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue before shutting down. Omitting this\n * parameter will cause the client to wait until all events are sent before disabling itself.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nasync function close(timeout) {\n const client = getClient();\n if (client) {\n return client.close(timeout);\n }\n DEBUG_BUILD && logger.warn('Cannot flush events and disable SDK. No client defined.');\n return Promise.resolve(false);\n}\n\n/**\n * Returns true if Sentry has been properly initialized.\n */\nfunction isInitialized() {\n return !!getClient();\n}\n\n/** If the SDK is initialized & enabled. */\nfunction isEnabled() {\n const client = getClient();\n return client?.getOptions().enabled !== false && !!client?.getTransport();\n}\n\n/**\n * Add an event processor.\n * This will be added to the current isolation scope, ensuring any event that is processed in the current execution\n * context will have the processor applied.\n */\nfunction addEventProcessor(callback) {\n getIsolationScope().addEventProcessor(callback);\n}\n\n/**\n * Start a session on the current isolation scope.\n *\n * @param context (optional) additional properties to be applied to the returned session object\n *\n * @returns the new active session\n */\nfunction startSession(context) {\n const isolationScope = getIsolationScope();\n const currentScope = getCurrentScope();\n\n // Will fetch userAgent if called from browser sdk\n const {\n userAgent\n } = GLOBAL_OBJ.navigator || {};\n const session = makeSession({\n user: currentScope.getUser() || isolationScope.getUser(),\n ...(userAgent && {\n userAgent\n }),\n ...context\n });\n\n // End existing session if there's one\n const currentSession = isolationScope.getSession();\n if (currentSession?.status === 'ok') {\n updateSession(currentSession, {\n status: 'exited'\n });\n }\n endSession();\n\n // Afterwards we set the new session on the scope\n isolationScope.setSession(session);\n return session;\n}\n\n/**\n * End the session on the current isolation scope.\n */\nfunction endSession() {\n const isolationScope = getIsolationScope();\n const currentScope = getCurrentScope();\n const session = currentScope.getSession() || isolationScope.getSession();\n if (session) {\n closeSession(session);\n }\n _sendSessionUpdate();\n\n // the session is over; take it off of the scope\n isolationScope.setSession();\n}\n\n/**\n * Sends the current Session on the scope\n */\nfunction _sendSessionUpdate() {\n const isolationScope = getIsolationScope();\n const client = getClient();\n const session = isolationScope.getSession();\n if (session && client) {\n client.captureSession(session);\n }\n}\n\n/**\n * Sends the current session on the scope to Sentry\n *\n * @param end If set the session will be marked as exited and removed from the scope.\n * Defaults to `false`.\n */\nfunction captureSession(end = false) {\n // both send the update and pull the session from the scope\n if (end) {\n endSession();\n return;\n }\n\n // only send the update\n _sendSessionUpdate();\n}\nexport { addEventProcessor, captureCheckIn, captureEvent, captureException, captureMessage, captureSession, close, endSession, flush, isEnabled, isInitialized, lastEventId, setContext, setExtra, setExtras, setTag, setTags, setUser, startSession, withMonitor };\n","import { makeDsn, dsnToString } from './utils-hoist/dsn.js';\nconst SENTRY_API_VERSION = '7';\n\n/** Returns the prefix to construct Sentry ingestion API endpoints. */\nfunction getBaseApiEndpoint(dsn) {\n const protocol = dsn.protocol ? `${dsn.protocol}:` : '';\n const port = dsn.port ? `:${dsn.port}` : '';\n return `${protocol}//${dsn.host}${port}${dsn.path ? `/${dsn.path}` : ''}/api/`;\n}\n\n/** Returns the ingest API endpoint for target. */\nfunction _getIngestEndpoint(dsn) {\n return `${getBaseApiEndpoint(dsn)}${dsn.projectId}/envelope/`;\n}\n\n/** Returns a URL-encoded string with auth config suitable for a query string. */\nfunction _encodedAuth(dsn, sdkInfo) {\n const params = {\n sentry_version: SENTRY_API_VERSION\n };\n if (dsn.publicKey) {\n // We send only the minimum set of required information. See\n // https://github.com/getsentry/sentry-javascript/issues/2572.\n params.sentry_key = dsn.publicKey;\n }\n if (sdkInfo) {\n params.sentry_client = `${sdkInfo.name}/${sdkInfo.version}`;\n }\n return new URLSearchParams(params).toString();\n}\n\n/**\n * Returns the envelope endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\nfunction getEnvelopeEndpointWithUrlEncodedAuth(dsn, tunnel, sdkInfo) {\n return tunnel ? tunnel : `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, sdkInfo)}`;\n}\n\n/** Returns the url to the report dialog endpoint. */\nfunction getReportDialogEndpoint(dsnLike, dialogOptions) {\n const dsn = makeDsn(dsnLike);\n if (!dsn) {\n return '';\n }\n const endpoint = `${getBaseApiEndpoint(dsn)}embed/error-page/`;\n let encodedOptions = `dsn=${dsnToString(dsn)}`;\n for (const key in dialogOptions) {\n if (key === 'dsn') {\n continue;\n }\n if (key === 'onClose') {\n continue;\n }\n if (key === 'user') {\n const user = dialogOptions.user;\n if (!user) {\n continue;\n }\n if (user.name) {\n encodedOptions += `&name=${encodeURIComponent(user.name)}`;\n }\n if (user.email) {\n encodedOptions += `&email=${encodeURIComponent(user.email)}`;\n }\n } else {\n encodedOptions += `&${encodeURIComponent(key)}=${encodeURIComponent(dialogOptions[key])}`;\n }\n }\n return `${endpoint}?${encodedOptions}`;\n}\nexport { getEnvelopeEndpointWithUrlEncodedAuth, getReportDialogEndpoint };\n","import { getClient } from './currentScopes.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { logger } from './utils-hoist/logger.js';\nconst installedIntegrations = [];\n\n/** Map of integrations assigned to a client */\n\n/**\n * Remove duplicates from the given array, preferring the last instance of any duplicate. Not guaranteed to\n * preserve the order of integrations in the array.\n *\n * @private\n */\nfunction filterDuplicates(integrations) {\n const integrationsByName = {};\n integrations.forEach(currentInstance => {\n const {\n name\n } = currentInstance;\n const existingInstance = integrationsByName[name];\n\n // We want integrations later in the array to overwrite earlier ones of the same type, except that we never want a\n // default instance to overwrite an existing user instance\n if (existingInstance && !existingInstance.isDefaultInstance && currentInstance.isDefaultInstance) {\n return;\n }\n integrationsByName[name] = currentInstance;\n });\n return Object.values(integrationsByName);\n}\n\n/** Gets integrations to install */\nfunction getIntegrationsToSetup(options) {\n const defaultIntegrations = options.defaultIntegrations || [];\n const userIntegrations = options.integrations;\n\n // We flag default instances, so that later we can tell them apart from any user-created instances of the same class\n defaultIntegrations.forEach(integration => {\n integration.isDefaultInstance = true;\n });\n let integrations;\n if (Array.isArray(userIntegrations)) {\n integrations = [...defaultIntegrations, ...userIntegrations];\n } else if (typeof userIntegrations === 'function') {\n const resolvedUserIntegrations = userIntegrations(defaultIntegrations);\n integrations = Array.isArray(resolvedUserIntegrations) ? resolvedUserIntegrations : [resolvedUserIntegrations];\n } else {\n integrations = defaultIntegrations;\n }\n return filterDuplicates(integrations);\n}\n\n/**\n * Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default\n * integrations are added unless they were already provided before.\n * @param integrations array of integration instances\n * @param withDefault should enable default integrations\n */\nfunction setupIntegrations(client, integrations) {\n const integrationIndex = {};\n integrations.forEach(integration => {\n // guard against empty provided integrations\n if (integration) {\n setupIntegration(client, integration, integrationIndex);\n }\n });\n return integrationIndex;\n}\n\n/**\n * Execute the `afterAllSetup` hooks of the given integrations.\n */\nfunction afterSetupIntegrations(client, integrations) {\n for (const integration of integrations) {\n // guard against empty provided integrations\n if (integration?.afterAllSetup) {\n integration.afterAllSetup(client);\n }\n }\n}\n\n/** Setup a single integration. */\nfunction setupIntegration(client, integration, integrationIndex) {\n if (integrationIndex[integration.name]) {\n DEBUG_BUILD && logger.log(`Integration skipped because it was already installed: ${integration.name}`);\n return;\n }\n integrationIndex[integration.name] = integration;\n\n // `setupOnce` is only called the first time\n if (installedIntegrations.indexOf(integration.name) === -1 && typeof integration.setupOnce === 'function') {\n integration.setupOnce();\n installedIntegrations.push(integration.name);\n }\n\n // `setup` is run for each client\n if (integration.setup && typeof integration.setup === 'function') {\n integration.setup(client);\n }\n if (typeof integration.preprocessEvent === 'function') {\n const callback = integration.preprocessEvent.bind(integration);\n client.on('preprocessEvent', (event, hint) => callback(event, hint, client));\n }\n if (typeof integration.processEvent === 'function') {\n const callback = integration.processEvent.bind(integration);\n const processor = Object.assign((event, hint) => callback(event, hint, client), {\n id: integration.name\n });\n client.addEventProcessor(processor);\n }\n DEBUG_BUILD && logger.log(`Integration installed: ${integration.name}`);\n}\n\n/** Add an integration to the current scope's client. */\nfunction addIntegration(integration) {\n const client = getClient();\n if (!client) {\n DEBUG_BUILD && logger.warn(`Cannot add integration \"${integration.name}\" because no SDK Client is available.`);\n return;\n }\n client.addIntegration(integration);\n}\n\n/**\n * Define an integration function that can be used to create an integration instance.\n * Note that this by design hides the implementation details of the integration, as they are considered internal.\n */\nfunction defineIntegration(fn) {\n return fn;\n}\nexport { addIntegration, afterSetupIntegrations, defineIntegration, getIntegrationsToSetup, installedIntegrations, setupIntegration, setupIntegrations };\n","import { createEnvelope } from './envelope.js';\nimport { dateTimestampInSeconds } from './time.js';\n\n/**\n * Creates client report envelope\n * @param discarded_events An array of discard events\n * @param dsn A DSN that can be set on the header. Optional.\n */\nfunction createClientReportEnvelope(discarded_events, dsn, timestamp) {\n const clientReportItem = [{\n type: 'client_report'\n }, {\n timestamp: timestamp || dateTimestampInSeconds(),\n discarded_events\n }];\n return createEnvelope(dsn ? {\n dsn\n } : {}, [clientReportItem]);\n}\nexport { createClientReportEnvelope };\n","/** An error emitted by Sentry SDKs and related utilities. */\nclass SentryError extends Error {\n constructor(message, logLevel = 'warn') {\n super(message);\n this.message = message;\n this.logLevel = logLevel;\n }\n}\nexport { SentryError };\n","/**\n * Get a list of possible event messages from a Sentry event.\n */\nfunction getPossibleEventMessages(event) {\n const possibleMessages = [];\n if (event.message) {\n possibleMessages.push(event.message);\n }\n try {\n // @ts-expect-error Try catching to save bundle size\n const lastException = event.exception.values[event.exception.values.length - 1];\n if (lastException?.value) {\n possibleMessages.push(lastException.value);\n if (lastException.type) {\n possibleMessages.push(`${lastException.type}: ${lastException.value}`);\n }\n }\n } catch (e) {\n // ignore errors here\n }\n return possibleMessages;\n}\nexport { getPossibleEventMessages };\n","import { SEMANTIC_ATTRIBUTE_PROFILE_ID, SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME } from '../semanticAttributes.js';\nimport '../utils-hoist/debug-build.js';\nimport '../utils-hoist/logger.js';\nimport { dropUndefinedKeys } from '../utils-hoist/object.js';\nimport '../utils-hoist/time.js';\nimport '../utils-hoist/syncpromise.js';\n\n/**\n * Converts a transaction event to a span JSON object.\n */\nfunction convertTransactionEventToSpanJson(event) {\n const {\n trace_id,\n parent_span_id,\n span_id,\n status,\n origin,\n data,\n op\n } = event.contexts?.trace ?? {};\n return dropUndefinedKeys({\n data: data ?? {},\n description: event.transaction,\n op,\n parent_span_id,\n span_id: span_id ?? '',\n start_timestamp: event.start_timestamp ?? 0,\n status,\n timestamp: event.timestamp,\n trace_id: trace_id ?? '',\n origin,\n profile_id: data?.[SEMANTIC_ATTRIBUTE_PROFILE_ID],\n exclusive_time: data?.[SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME],\n measurements: event.measurements,\n is_segment: true\n });\n}\n\n/**\n * Converts a span JSON object to a transaction event.\n */\nfunction convertSpanJsonToTransactionEvent(span) {\n const event = {\n type: 'transaction',\n timestamp: span.timestamp,\n start_timestamp: span.start_timestamp,\n transaction: span.description,\n contexts: {\n trace: {\n trace_id: span.trace_id,\n span_id: span.span_id,\n parent_span_id: span.parent_span_id,\n op: span.op,\n status: span.status,\n origin: span.origin,\n data: {\n ...span.data,\n ...(span.profile_id && {\n [SEMANTIC_ATTRIBUTE_PROFILE_ID]: span.profile_id\n }),\n ...(span.exclusive_time && {\n [SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME]: span.exclusive_time\n })\n }\n }\n },\n measurements: span.measurements\n };\n return dropUndefinedKeys(event);\n}\nexport { convertSpanJsonToTransactionEvent, convertTransactionEventToSpanJson };\n","import { getEnvelopeEndpointWithUrlEncodedAuth } from './api.js';\nimport { DEFAULT_ENVIRONMENT } from './constants.js';\nimport { getTraceContextFromScope, getCurrentScope, getIsolationScope } from './currentScopes.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { createEventEnvelope, createSessionEnvelope } from './envelope.js';\nimport { setupIntegration, afterSetupIntegrations, setupIntegrations } from './integration.js';\nimport { updateSession } from './session.js';\nimport { getDynamicSamplingContextFromScope } from './tracing/dynamicSamplingContext.js';\nimport { createClientReportEnvelope } from './utils-hoist/clientreport.js';\nimport { makeDsn, dsnToString } from './utils-hoist/dsn.js';\nimport { addItemToEnvelope, createAttachmentEnvelopeItem } from './utils-hoist/envelope.js';\nimport { SentryError } from './utils-hoist/error.js';\nimport { isPrimitive, isThenable, isPlainObject, isParameterizedString } from './utils-hoist/is.js';\nimport { logger } from './utils-hoist/logger.js';\nimport { uuid4, checkOrSetAlreadyCaught } from './utils-hoist/misc.js';\nimport { resolvedSyncPromise, SyncPromise, rejectedSyncPromise } from './utils-hoist/syncpromise.js';\nimport { getPossibleEventMessages } from './utils/eventUtils.js';\nimport { merge } from './utils/merge.js';\nimport { parseSampleRate } from './utils/parseSampleRate.js';\nimport { prepareEvent } from './utils/prepareEvent.js';\nimport { showSpanDropWarning } from './utils/spanUtils.js';\nimport { convertTransactionEventToSpanJson, convertSpanJsonToTransactionEvent } from './utils/transactionEvent.js';\nconst ALREADY_SEEN_ERROR = \"Not capturing exception because it's already been captured.\";\nconst MISSING_RELEASE_FOR_SESSION_ERROR = 'Discarded session because of missing or non-string release';\n\n/**\n * Base implementation for all JavaScript SDK clients.\n *\n * Call the constructor with the corresponding options\n * specific to the client subclass. To access these options later, use\n * {@link Client.getOptions}.\n *\n * If a Dsn is specified in the options, it will be parsed and stored. Use\n * {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is\n * invalid, the constructor will throw a {@link SentryException}. Note that\n * without a valid Dsn, the SDK will not send any events to Sentry.\n *\n * Before sending an event, it is passed through\n * {@link Client._prepareEvent} to add SDK information and scope data\n * (breadcrumbs and context). To add more custom information, override this\n * method and extend the resulting prepared event.\n *\n * To issue automatically created events (e.g. via instrumentation), use\n * {@link Client.captureEvent}. It will prepare the event and pass it through\n * the callback lifecycle. To issue auto-breadcrumbs, use\n * {@link Client.addBreadcrumb}.\n *\n * @example\n * class NodeClient extends Client {\n * public constructor(options: NodeOptions) {\n * super(options);\n * }\n *\n * // ...\n * }\n */\nclass Client {\n /** Options passed to the SDK. */\n\n /** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */\n\n /** Array of set up integrations. */\n\n /** Number of calls being processed */\n\n /** Holds flushable */\n\n // eslint-disable-next-line @typescript-eslint/ban-types\n\n /**\n * Initializes this client instance.\n *\n * @param options Options for the client.\n */\n constructor(options) {\n this._options = options;\n this._integrations = {};\n this._numProcessing = 0;\n this._outcomes = {};\n this._hooks = {};\n this._eventProcessors = [];\n if (options.dsn) {\n this._dsn = makeDsn(options.dsn);\n } else {\n DEBUG_BUILD && logger.warn('No DSN provided, client will not send events.');\n }\n if (this._dsn) {\n const url = getEnvelopeEndpointWithUrlEncodedAuth(this._dsn, options.tunnel, options._metadata ? options._metadata.sdk : undefined);\n this._transport = options.transport({\n tunnel: this._options.tunnel,\n recordDroppedEvent: this.recordDroppedEvent.bind(this),\n ...options.transportOptions,\n url\n });\n }\n }\n\n /**\n * Captures an exception event and sends it to Sentry.\n *\n * Unlike `captureException` exported from every SDK, this method requires that you pass it the current scope.\n */\n captureException(exception, hint, scope) {\n const eventId = uuid4();\n\n // ensure we haven't captured this very object before\n if (checkOrSetAlreadyCaught(exception)) {\n DEBUG_BUILD && logger.log(ALREADY_SEEN_ERROR);\n return eventId;\n }\n const hintWithEventId = {\n event_id: eventId,\n ...hint\n };\n this._process(this.eventFromException(exception, hintWithEventId).then(event => this._captureEvent(event, hintWithEventId, scope)));\n return hintWithEventId.event_id;\n }\n\n /**\n * Captures a message event and sends it to Sentry.\n *\n * Unlike `captureMessage` exported from every SDK, this method requires that you pass it the current scope.\n */\n captureMessage(message, level, hint, currentScope) {\n const hintWithEventId = {\n event_id: uuid4(),\n ...hint\n };\n const eventMessage = isParameterizedString(message) ? message : String(message);\n const promisedEvent = isPrimitive(message) ? this.eventFromMessage(eventMessage, level, hintWithEventId) : this.eventFromException(message, hintWithEventId);\n this._process(promisedEvent.then(event => this._captureEvent(event, hintWithEventId, currentScope)));\n return hintWithEventId.event_id;\n }\n\n /**\n * Captures a manually created event and sends it to Sentry.\n *\n * Unlike `captureEvent` exported from every SDK, this method requires that you pass it the current scope.\n */\n captureEvent(event, hint, currentScope) {\n const eventId = uuid4();\n\n // ensure we haven't captured this very object before\n if (hint?.originalException && checkOrSetAlreadyCaught(hint.originalException)) {\n DEBUG_BUILD && logger.log(ALREADY_SEEN_ERROR);\n return eventId;\n }\n const hintWithEventId = {\n event_id: eventId,\n ...hint\n };\n const sdkProcessingMetadata = event.sdkProcessingMetadata || {};\n const capturedSpanScope = sdkProcessingMetadata.capturedSpanScope;\n const capturedSpanIsolationScope = sdkProcessingMetadata.capturedSpanIsolationScope;\n this._process(this._captureEvent(event, hintWithEventId, capturedSpanScope || currentScope, capturedSpanIsolationScope));\n return hintWithEventId.event_id;\n }\n\n /**\n * Captures a session.\n */\n captureSession(session) {\n this.sendSession(session);\n // After sending, we set init false to indicate it's not the first occurrence\n updateSession(session, {\n init: false\n });\n }\n\n /**\n * Create a cron monitor check in and send it to Sentry. This method is not available on all clients.\n *\n * @param checkIn An object that describes a check in.\n * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want\n * to create a monitor automatically when sending a check in.\n * @param scope An optional scope containing event metadata.\n * @returns A string representing the id of the check in.\n */\n\n /**\n * Get the current Dsn.\n */\n getDsn() {\n return this._dsn;\n }\n\n /**\n * Get the current options.\n */\n getOptions() {\n return this._options;\n }\n\n /**\n * Get the SDK metadata.\n * @see SdkMetadata\n */\n getSdkMetadata() {\n return this._options._metadata;\n }\n\n /**\n * Returns the transport that is used by the client.\n * Please note that the transport gets lazy initialized so it will only be there once the first event has been sent.\n */\n getTransport() {\n return this._transport;\n }\n\n /**\n * Wait for all events to be sent or the timeout to expire, whichever comes first.\n *\n * @param timeout Maximum time in ms the client should wait for events to be flushed. Omitting this parameter will\n * cause the client to wait until all events are sent before resolving the promise.\n * @returns A promise that will resolve with `true` if all events are sent before the timeout, or `false` if there are\n * still events in the queue when the timeout is reached.\n */\n flush(timeout) {\n const transport = this._transport;\n if (transport) {\n this.emit('flush');\n return this._isClientDoneProcessing(timeout).then(clientFinished => {\n return transport.flush(timeout).then(transportFlushed => clientFinished && transportFlushed);\n });\n } else {\n return resolvedSyncPromise(true);\n }\n }\n\n /**\n * Flush the event queue and set the client to `enabled = false`. See {@link Client.flush}.\n *\n * @param {number} timeout Maximum time in ms the client should wait before shutting down. Omitting this parameter will cause\n * the client to wait until all events are sent before disabling itself.\n * @returns {Promise} A promise which resolves to `true` if the flush completes successfully before the timeout, or `false` if\n * it doesn't.\n */\n close(timeout) {\n return this.flush(timeout).then(result => {\n this.getOptions().enabled = false;\n this.emit('close');\n return result;\n });\n }\n\n /**\n * Get all installed event processors.\n */\n getEventProcessors() {\n return this._eventProcessors;\n }\n\n /**\n * Adds an event processor that applies to any event processed by this client.\n */\n addEventProcessor(eventProcessor) {\n this._eventProcessors.push(eventProcessor);\n }\n\n /**\n * Initialize this client.\n * Call this after the client was set on a scope.\n */\n init() {\n if (this._isEnabled() ||\n // Force integrations to be setup even if no DSN was set when we have\n // Spotlight enabled. This is particularly important for browser as we\n // don't support the `spotlight` option there and rely on the users\n // adding the `spotlightBrowserIntegration()` to their integrations which\n // wouldn't get initialized with the check below when there's no DSN set.\n this._options.integrations.some(({\n name\n }) => name.startsWith('Spotlight'))) {\n this._setupIntegrations();\n }\n }\n\n /**\n * Gets an installed integration by its name.\n *\n * @returns {Integration|undefined} The installed integration or `undefined` if no integration with that `name` was installed.\n */\n getIntegrationByName(integrationName) {\n return this._integrations[integrationName];\n }\n\n /**\n * Add an integration to the client.\n * This can be used to e.g. lazy load integrations.\n * In most cases, this should not be necessary,\n * and you're better off just passing the integrations via `integrations: []` at initialization time.\n * However, if you find the need to conditionally load & add an integration, you can use `addIntegration` to do so.\n */\n addIntegration(integration) {\n const isAlreadyInstalled = this._integrations[integration.name];\n\n // This hook takes care of only installing if not already installed\n setupIntegration(this, integration, this._integrations);\n // Here we need to check manually to make sure to not run this multiple times\n if (!isAlreadyInstalled) {\n afterSetupIntegrations(this, [integration]);\n }\n }\n\n /**\n * Send a fully prepared event to Sentry.\n */\n sendEvent(event, hint = {}) {\n this.emit('beforeSendEvent', event, hint);\n let env = createEventEnvelope(event, this._dsn, this._options._metadata, this._options.tunnel);\n for (const attachment of hint.attachments || []) {\n env = addItemToEnvelope(env, createAttachmentEnvelopeItem(attachment));\n }\n const promise = this.sendEnvelope(env);\n if (promise) {\n promise.then(sendResponse => this.emit('afterSendEvent', event, sendResponse), null);\n }\n }\n\n /**\n * Send a session or session aggregrates to Sentry.\n */\n sendSession(session) {\n // Backfill release and environment on session\n const {\n release: clientReleaseOption,\n environment: clientEnvironmentOption = DEFAULT_ENVIRONMENT\n } = this._options;\n if ('aggregates' in session) {\n const sessionAttrs = session.attrs || {};\n if (!sessionAttrs.release && !clientReleaseOption) {\n DEBUG_BUILD && logger.warn(MISSING_RELEASE_FOR_SESSION_ERROR);\n return;\n }\n sessionAttrs.release = sessionAttrs.release || clientReleaseOption;\n sessionAttrs.environment = sessionAttrs.environment || clientEnvironmentOption;\n session.attrs = sessionAttrs;\n } else {\n if (!session.release && !clientReleaseOption) {\n DEBUG_BUILD && logger.warn(MISSING_RELEASE_FOR_SESSION_ERROR);\n return;\n }\n session.release = session.release || clientReleaseOption;\n session.environment = session.environment || clientEnvironmentOption;\n }\n this.emit('beforeSendSession', session);\n const env = createSessionEnvelope(session, this._dsn, this._options._metadata, this._options.tunnel);\n\n // sendEnvelope should not throw\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.sendEnvelope(env);\n }\n\n /**\n * Record on the client that an event got dropped (ie, an event that will not be sent to Sentry).\n */\n recordDroppedEvent(reason, category, count = 1) {\n if (this._options.sendClientReports) {\n // We want to track each category (error, transaction, session, replay_event) separately\n // but still keep the distinction between different type of outcomes.\n // We could use nested maps, but it's much easier to read and type this way.\n // A correct type for map-based implementation if we want to go that route\n // would be `Partial>>>`\n // With typescript 4.1 we could even use template literal types\n const key = `${reason}:${category}`;\n DEBUG_BUILD && logger.log(`Recording outcome: \"${key}\"${count > 1 ? ` (${count} times)` : ''}`);\n this._outcomes[key] = (this._outcomes[key] || 0) + count;\n }\n }\n\n /* eslint-disable @typescript-eslint/unified-signatures */\n /**\n * Register a callback for whenever a span is started.\n * Receives the span as argument.\n * @returns {() => void} A function that, when executed, removes the registered callback.\n */\n\n /**\n * Register a hook oin this client.\n */\n on(hook, callback) {\n const hooks = this._hooks[hook] = this._hooks[hook] || [];\n\n // @ts-expect-error We assume the types are correct\n hooks.push(callback);\n\n // This function returns a callback execution handler that, when invoked,\n // deregisters a callback. This is crucial for managing instances where callbacks\n // need to be unregistered to prevent self-referencing in callback closures,\n // ensuring proper garbage collection.\n return () => {\n // @ts-expect-error We assume the types are correct\n const cbIndex = hooks.indexOf(callback);\n if (cbIndex > -1) {\n hooks.splice(cbIndex, 1);\n }\n };\n }\n\n /** Fire a hook whenever a span starts. */\n\n /**\n * Emit a hook that was previously registered via `on()`.\n */\n emit(hook, ...rest) {\n const callbacks = this._hooks[hook];\n if (callbacks) {\n callbacks.forEach(callback => callback(...rest));\n }\n }\n\n /**\n * Send an envelope to Sentry.\n */\n sendEnvelope(envelope) {\n this.emit('beforeEnvelope', envelope);\n if (this._isEnabled() && this._transport) {\n return this._transport.send(envelope).then(null, reason => {\n DEBUG_BUILD && logger.error('Error while sending envelope:', reason);\n return reason;\n });\n }\n DEBUG_BUILD && logger.error('Transport disabled');\n return resolvedSyncPromise({});\n }\n\n /* eslint-enable @typescript-eslint/unified-signatures */\n\n /** Setup integrations for this client. */\n _setupIntegrations() {\n const {\n integrations\n } = this._options;\n this._integrations = setupIntegrations(this, integrations);\n afterSetupIntegrations(this, integrations);\n }\n\n /** Updates existing session based on the provided event */\n _updateSessionFromEvent(session, event) {\n let crashed = event.level === 'fatal';\n let errored = false;\n const exceptions = event.exception?.values;\n if (exceptions) {\n errored = true;\n for (const ex of exceptions) {\n const mechanism = ex.mechanism;\n if (mechanism?.handled === false) {\n crashed = true;\n break;\n }\n }\n }\n\n // A session is updated and that session update is sent in only one of the two following scenarios:\n // 1. Session with non terminal status and 0 errors + an error occurred -> Will set error count to 1 and send update\n // 2. Session with non terminal status and 1 error + a crash occurred -> Will set status crashed and send update\n const sessionNonTerminal = session.status === 'ok';\n const shouldUpdateAndSend = sessionNonTerminal && session.errors === 0 || sessionNonTerminal && crashed;\n if (shouldUpdateAndSend) {\n updateSession(session, {\n ...(crashed && {\n status: 'crashed'\n }),\n errors: session.errors || Number(errored || crashed)\n });\n this.captureSession(session);\n }\n }\n\n /**\n * Determine if the client is finished processing. Returns a promise because it will wait `timeout` ms before saying\n * \"no\" (resolving to `false`) in order to give the client a chance to potentially finish first.\n *\n * @param timeout The time, in ms, after which to resolve to `false` if the client is still busy. Passing `0` (or not\n * passing anything) will make the promise wait as long as it takes for processing to finish before resolving to\n * `true`.\n * @returns A promise which will resolve to `true` if processing is already done or finishes before the timeout, and\n * `false` otherwise\n */\n _isClientDoneProcessing(timeout) {\n return new SyncPromise(resolve => {\n let ticked = 0;\n const tick = 1;\n const interval = setInterval(() => {\n if (this._numProcessing == 0) {\n clearInterval(interval);\n resolve(true);\n } else {\n ticked += tick;\n if (timeout && ticked >= timeout) {\n clearInterval(interval);\n resolve(false);\n }\n }\n }, tick);\n });\n }\n\n /** Determines whether this SDK is enabled and a transport is present. */\n _isEnabled() {\n return this.getOptions().enabled !== false && this._transport !== undefined;\n }\n\n /**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * @param event The original event.\n * @param hint May contain additional information about the original exception.\n * @param currentScope A scope containing event metadata.\n * @returns A new event with more information.\n */\n _prepareEvent(event, hint, currentScope, isolationScope) {\n const options = this.getOptions();\n const integrations = Object.keys(this._integrations);\n if (!hint.integrations && integrations?.length) {\n hint.integrations = integrations;\n }\n this.emit('preprocessEvent', event, hint);\n if (!event.type) {\n isolationScope.setLastEventId(event.event_id || hint.event_id);\n }\n return prepareEvent(options, event, hint, currentScope, this, isolationScope).then(evt => {\n if (evt === null) {\n return evt;\n }\n this.emit('postprocessEvent', evt, hint);\n evt.contexts = {\n trace: getTraceContextFromScope(currentScope),\n ...evt.contexts\n };\n const dynamicSamplingContext = getDynamicSamplingContextFromScope(this, currentScope);\n evt.sdkProcessingMetadata = {\n dynamicSamplingContext,\n ...evt.sdkProcessingMetadata\n };\n return evt;\n });\n }\n\n /**\n * Processes the event and logs an error in case of rejection\n * @param event\n * @param hint\n * @param scope\n */\n _captureEvent(event, hint = {}, currentScope = getCurrentScope(), isolationScope = getIsolationScope()) {\n if (DEBUG_BUILD && isErrorEvent(event)) {\n logger.log(`Captured error event \\`${getPossibleEventMessages(event)[0] || ''}\\``);\n }\n return this._processEvent(event, hint, currentScope, isolationScope).then(finalEvent => {\n return finalEvent.event_id;\n }, reason => {\n if (DEBUG_BUILD) {\n // If something's gone wrong, log the error as a warning. If it's just us having used a `SentryError` for\n // control flow, log just the message (no stack) as a log-level log.\n if (reason instanceof SentryError && reason.logLevel === 'log') {\n logger.log(reason.message);\n } else {\n logger.warn(reason);\n }\n }\n return undefined;\n });\n }\n\n /**\n * Processes an event (either error or message) and sends it to Sentry.\n *\n * This also adds breadcrumbs and context information to the event. However,\n * platform specific meta data (such as the User's IP address) must be added\n * by the SDK implementor.\n *\n *\n * @param event The event to send to Sentry.\n * @param hint May contain additional information about the original exception.\n * @param currentScope A scope containing event metadata.\n * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.\n */\n _processEvent(event, hint, currentScope, isolationScope) {\n const options = this.getOptions();\n const {\n sampleRate\n } = options;\n const isTransaction = isTransactionEvent(event);\n const isError = isErrorEvent(event);\n const eventType = event.type || 'error';\n const beforeSendLabel = `before send for type \\`${eventType}\\``;\n\n // 1.0 === 100% events are sent\n // 0.0 === 0% events are sent\n // Sampling for transaction happens somewhere else\n const parsedSampleRate = typeof sampleRate === 'undefined' ? undefined : parseSampleRate(sampleRate);\n if (isError && typeof parsedSampleRate === 'number' && Math.random() > parsedSampleRate) {\n this.recordDroppedEvent('sample_rate', 'error');\n return rejectedSyncPromise(new SentryError(`Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`, 'log'));\n }\n const dataCategory = eventType === 'replay_event' ? 'replay' : eventType;\n return this._prepareEvent(event, hint, currentScope, isolationScope).then(prepared => {\n if (prepared === null) {\n this.recordDroppedEvent('event_processor', dataCategory);\n throw new SentryError('An event processor returned `null`, will not send event.', 'log');\n }\n const isInternalException = hint.data && hint.data.__sentry__ === true;\n if (isInternalException) {\n return prepared;\n }\n const result = processBeforeSend(this, options, prepared, hint);\n return _validateBeforeSendResult(result, beforeSendLabel);\n }).then(processedEvent => {\n if (processedEvent === null) {\n this.recordDroppedEvent('before_send', dataCategory);\n if (isTransaction) {\n const spans = event.spans || [];\n // the transaction itself counts as one span, plus all the child spans that are added\n const spanCount = 1 + spans.length;\n this.recordDroppedEvent('before_send', 'span', spanCount);\n }\n throw new SentryError(`${beforeSendLabel} returned \\`null\\`, will not send event.`, 'log');\n }\n const session = currentScope.getSession() || isolationScope.getSession();\n if (isError && session) {\n this._updateSessionFromEvent(session, processedEvent);\n }\n if (isTransaction) {\n const spanCountBefore = processedEvent.sdkProcessingMetadata?.spanCountBeforeProcessing || 0;\n const spanCountAfter = processedEvent.spans ? processedEvent.spans.length : 0;\n const droppedSpanCount = spanCountBefore - spanCountAfter;\n if (droppedSpanCount > 0) {\n this.recordDroppedEvent('before_send', 'span', droppedSpanCount);\n }\n }\n\n // None of the Sentry built event processor will update transaction name,\n // so if the transaction name has been changed by an event processor, we know\n // it has to come from custom event processor added by a user\n const transactionInfo = processedEvent.transaction_info;\n if (isTransaction && transactionInfo && processedEvent.transaction !== event.transaction) {\n const source = 'custom';\n processedEvent.transaction_info = {\n ...transactionInfo,\n source\n };\n }\n this.sendEvent(processedEvent, hint);\n return processedEvent;\n }).then(null, reason => {\n if (reason instanceof SentryError) {\n throw reason;\n }\n this.captureException(reason, {\n data: {\n __sentry__: true\n },\n originalException: reason\n });\n throw new SentryError(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\\nReason: ${reason}`);\n });\n }\n\n /**\n * Occupies the client with processing and event\n */\n _process(promise) {\n this._numProcessing++;\n void promise.then(value => {\n this._numProcessing--;\n return value;\n }, reason => {\n this._numProcessing--;\n return reason;\n });\n }\n\n /**\n * Clears outcomes on this client and returns them.\n */\n _clearOutcomes() {\n const outcomes = this._outcomes;\n this._outcomes = {};\n return Object.entries(outcomes).map(([key, quantity]) => {\n const [reason, category] = key.split(':');\n return {\n reason,\n category,\n quantity\n };\n });\n }\n\n /**\n * Sends client reports as an envelope.\n */\n _flushOutcomes() {\n DEBUG_BUILD && logger.log('Flushing outcomes...');\n const outcomes = this._clearOutcomes();\n if (outcomes.length === 0) {\n DEBUG_BUILD && logger.log('No outcomes to send');\n return;\n }\n\n // This is really the only place where we want to check for a DSN and only send outcomes then\n if (!this._dsn) {\n DEBUG_BUILD && logger.log('No dsn provided, will not send outcomes');\n return;\n }\n DEBUG_BUILD && logger.log('Sending outcomes:', outcomes);\n const envelope = createClientReportEnvelope(outcomes, this._options.tunnel && dsnToString(this._dsn));\n\n // sendEnvelope should not throw\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.sendEnvelope(envelope);\n }\n\n /**\n * Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`.\n */\n}\n\n/**\n * @deprecated Use `Client` instead. This alias may be removed in a future major version.\n */\n// TODO(v10): Remove\n\n/**\n * @deprecated Use `Client` instead. This alias may be removed in a future major version.\n */\n// TODO(v10): Remove\nconst BaseClient = Client;\n\n/**\n * Verifies that return value of configured `beforeSend` or `beforeSendTransaction` is of expected type, and returns the value if so.\n */\nfunction _validateBeforeSendResult(beforeSendResult, beforeSendLabel) {\n const invalidValueError = `${beforeSendLabel} must return \\`null\\` or a valid event.`;\n if (isThenable(beforeSendResult)) {\n return beforeSendResult.then(event => {\n if (!isPlainObject(event) && event !== null) {\n throw new SentryError(invalidValueError);\n }\n return event;\n }, e => {\n throw new SentryError(`${beforeSendLabel} rejected with ${e}`);\n });\n } else if (!isPlainObject(beforeSendResult) && beforeSendResult !== null) {\n throw new SentryError(invalidValueError);\n }\n return beforeSendResult;\n}\n\n/**\n * Process the matching `beforeSendXXX` callback.\n */\nfunction processBeforeSend(client, options, event, hint) {\n const {\n beforeSend,\n beforeSendTransaction,\n beforeSendSpan\n } = options;\n let processedEvent = event;\n if (isErrorEvent(processedEvent) && beforeSend) {\n return beforeSend(processedEvent, hint);\n }\n if (isTransactionEvent(processedEvent)) {\n if (beforeSendSpan) {\n // process root span\n const processedRootSpanJson = beforeSendSpan(convertTransactionEventToSpanJson(processedEvent));\n if (!processedRootSpanJson) {\n showSpanDropWarning();\n } else {\n // update event with processed root span values\n processedEvent = merge(event, convertSpanJsonToTransactionEvent(processedRootSpanJson));\n }\n\n // process child spans\n if (processedEvent.spans) {\n const processedSpans = [];\n for (const span of processedEvent.spans) {\n const processedSpan = beforeSendSpan(span);\n if (!processedSpan) {\n showSpanDropWarning();\n processedSpans.push(span);\n } else {\n processedSpans.push(processedSpan);\n }\n }\n processedEvent.spans = processedSpans;\n }\n }\n if (beforeSendTransaction) {\n if (processedEvent.spans) {\n // We store the # of spans before processing in SDK metadata,\n // so we can compare it afterwards to determine how many spans were dropped\n const spanCountBefore = processedEvent.spans.length;\n processedEvent.sdkProcessingMetadata = {\n ...event.sdkProcessingMetadata,\n spanCountBeforeProcessing: spanCountBefore\n };\n }\n return beforeSendTransaction(processedEvent, hint);\n }\n }\n return processedEvent;\n}\nfunction isErrorEvent(event) {\n return event.type === undefined;\n}\nfunction isTransactionEvent(event) {\n return event.type === 'transaction';\n}\nexport { BaseClient, Client };\n","import { getCurrentScope } from './currentScopes.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { logger, consoleSandbox } from './utils-hoist/logger.js';\n\n/** A class object that can instantiate Client objects. */\n\n/**\n * Internal function to create a new SDK client instance. The client is\n * installed and then bound to the current scope.\n *\n * @param clientClass The client class to instantiate.\n * @param options Options to pass to the client.\n */\nfunction initAndBind(clientClass, options) {\n if (options.debug === true) {\n if (DEBUG_BUILD) {\n logger.enable();\n } else {\n // use `console.warn` rather than `logger.warn` since by non-debug bundles have all `logger.x` statements stripped\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn('[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.');\n });\n }\n }\n const scope = getCurrentScope();\n scope.update(options.initialScope);\n const client = new clientClass(options);\n setCurrentClient(client);\n client.init();\n return client;\n}\n\n/**\n * Make the given client the current client.\n */\nfunction setCurrentClient(client) {\n getCurrentScope().setClient(client);\n}\nexport { initAndBind, setCurrentClient };\n","import { SentryError } from './error.js';\nimport { rejectedSyncPromise, SyncPromise, resolvedSyncPromise } from './syncpromise.js';\n\n/**\n * Creates an new PromiseBuffer object with the specified limit\n * @param limit max number of promises that can be stored in the buffer\n */\nfunction makePromiseBuffer(limit) {\n const buffer = [];\n function isReady() {\n return limit === undefined || buffer.length < limit;\n }\n\n /**\n * Remove a promise from the queue.\n *\n * @param task Can be any PromiseLike\n * @returns Removed promise.\n */\n function remove(task) {\n return buffer.splice(buffer.indexOf(task), 1)[0] || Promise.resolve(undefined);\n }\n\n /**\n * Add a promise (representing an in-flight action) to the queue, and set it to remove itself on fulfillment.\n *\n * @param taskProducer A function producing any PromiseLike; In previous versions this used to be `task:\n * PromiseLike`, but under that model, Promises were instantly created on the call-site and their executor\n * functions therefore ran immediately. Thus, even if the buffer was full, the action still happened. By\n * requiring the promise to be wrapped in a function, we can defer promise creation until after the buffer\n * limit check.\n * @returns The original promise.\n */\n function add(taskProducer) {\n if (!isReady()) {\n return rejectedSyncPromise(new SentryError('Not adding Promise because buffer limit was reached.'));\n }\n\n // start the task and add its promise to the queue\n const task = taskProducer();\n if (buffer.indexOf(task) === -1) {\n buffer.push(task);\n }\n void task.then(() => remove(task))\n // Use `then(null, rejectionHandler)` rather than `catch(rejectionHandler)` so that we can use `PromiseLike`\n // rather than `Promise`. `PromiseLike` doesn't have a `.catch` method, making its polyfill smaller. (ES5 didn't\n // have promises, so TS has to polyfill when down-compiling.)\n .then(null, () => remove(task).then(null, () => {\n // We have to add another catch here because `remove()` starts a new promise chain.\n }));\n return task;\n }\n\n /**\n * Wait for all promises in the queue to resolve or for timeout to expire, whichever comes first.\n *\n * @param timeout The time, in ms, after which to resolve to `false` if the queue is still non-empty. Passing `0` (or\n * not passing anything) will make the promise wait as long as it takes for the queue to drain before resolving to\n * `true`.\n * @returns A promise which will resolve to `true` if the queue is already empty or drains before the timeout, and\n * `false` otherwise\n */\n function drain(timeout) {\n return new SyncPromise((resolve, reject) => {\n let counter = buffer.length;\n if (!counter) {\n return resolve(true);\n }\n\n // wait for `timeout` ms and then resolve to `false` (if not cancelled first)\n const capturedSetTimeout = setTimeout(() => {\n if (timeout && timeout > 0) {\n resolve(false);\n }\n }, timeout);\n\n // if all promises resolve in time, cancel the timer and resolve to `true`\n buffer.forEach(item => {\n void resolvedSyncPromise(item).then(() => {\n if (! --counter) {\n clearTimeout(capturedSetTimeout);\n resolve(true);\n }\n }, reject);\n });\n });\n }\n return {\n $: buffer,\n add,\n drain\n };\n}\nexport { makePromiseBuffer };\n","// Intentionally keeping the key broad, as we don't know for sure what rate limit headers get returned from backend\n\nconst DEFAULT_RETRY_AFTER = 60 * 1000; // 60 seconds\n\n/**\n * Extracts Retry-After value from the request header or returns default value\n * @param header string representation of 'Retry-After' header\n * @param now current unix timestamp\n *\n */\nfunction parseRetryAfterHeader(header, now = Date.now()) {\n const headerDelay = parseInt(`${header}`, 10);\n if (!isNaN(headerDelay)) {\n return headerDelay * 1000;\n }\n const headerDate = Date.parse(`${header}`);\n if (!isNaN(headerDate)) {\n return headerDate - now;\n }\n return DEFAULT_RETRY_AFTER;\n}\n\n/**\n * Gets the time that the given category is disabled until for rate limiting.\n * In case no category-specific limit is set but a general rate limit across all categories is active,\n * that time is returned.\n *\n * @return the time in ms that the category is disabled until or 0 if there's no active rate limit.\n */\nfunction disabledUntil(limits, dataCategory) {\n return limits[dataCategory] || limits.all || 0;\n}\n\n/**\n * Checks if a category is rate limited\n */\nfunction isRateLimited(limits, dataCategory, now = Date.now()) {\n return disabledUntil(limits, dataCategory) > now;\n}\n\n/**\n * Update ratelimits from incoming headers.\n *\n * @return the updated RateLimits object.\n */\nfunction updateRateLimits(limits, {\n statusCode,\n headers\n}, now = Date.now()) {\n const updatedRateLimits = {\n ...limits\n };\n\n // \"The name is case-insensitive.\"\n // https://developer.mozilla.org/en-US/docs/Web/API/Headers/get\n const rateLimitHeader = headers?.['x-sentry-rate-limits'];\n const retryAfterHeader = headers?.['retry-after'];\n if (rateLimitHeader) {\n /**\n * rate limit headers are of the form\n *
,
,..\n * where each
is of the form\n * : : : : \n * where\n * is a delay in seconds\n * is the event type(s) (error, transaction, etc) being rate limited and is of the form\n * ;;...\n * is what's being limited (org, project, or key) - ignored by SDK\n * is an arbitrary string like \"org_quota\" - ignored by SDK\n * Semicolon-separated list of metric namespace identifiers. Defines which namespace(s) will be affected.\n * Only present if rate limit applies to the metric_bucket data category.\n */\n for (const limit of rateLimitHeader.trim().split(',')) {\n const [retryAfter, categories,,, namespaces] = limit.split(':', 5);\n const headerDelay = parseInt(retryAfter, 10);\n const delay = (!isNaN(headerDelay) ? headerDelay : 60) * 1000; // 60sec default\n if (!categories) {\n updatedRateLimits.all = now + delay;\n } else {\n for (const category of categories.split(';')) {\n if (category === 'metric_bucket') {\n // namespaces will be present when category === 'metric_bucket'\n if (!namespaces || namespaces.split(';').includes('custom')) {\n updatedRateLimits[category] = now + delay;\n }\n } else {\n updatedRateLimits[category] = now + delay;\n }\n }\n }\n }\n } else if (retryAfterHeader) {\n updatedRateLimits.all = now + parseRetryAfterHeader(retryAfterHeader, now);\n } else if (statusCode === 429) {\n updatedRateLimits.all = now + 60 * 1000;\n }\n return updatedRateLimits;\n}\nexport { DEFAULT_RETRY_AFTER, disabledUntil, isRateLimited, parseRetryAfterHeader, updateRateLimits };\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { forEachEnvelopeItem, envelopeItemTypeToDataCategory, createEnvelope, serializeEnvelope } from '../utils-hoist/envelope.js';\nimport { SentryError } from '../utils-hoist/error.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { makePromiseBuffer } from '../utils-hoist/promisebuffer.js';\nimport { isRateLimited, updateRateLimits } from '../utils-hoist/ratelimit.js';\nimport { resolvedSyncPromise } from '../utils-hoist/syncpromise.js';\nconst DEFAULT_TRANSPORT_BUFFER_SIZE = 64;\n\n/**\n * Creates an instance of a Sentry `Transport`\n *\n * @param options\n * @param makeRequest\n */\nfunction createTransport(options, makeRequest, buffer = makePromiseBuffer(options.bufferSize || DEFAULT_TRANSPORT_BUFFER_SIZE)) {\n let rateLimits = {};\n const flush = timeout => buffer.drain(timeout);\n function send(envelope) {\n const filteredEnvelopeItems = [];\n\n // Drop rate limited items from envelope\n forEachEnvelopeItem(envelope, (item, type) => {\n const dataCategory = envelopeItemTypeToDataCategory(type);\n if (isRateLimited(rateLimits, dataCategory)) {\n options.recordDroppedEvent('ratelimit_backoff', dataCategory);\n } else {\n filteredEnvelopeItems.push(item);\n }\n });\n\n // Skip sending if envelope is empty after filtering out rate limited events\n if (filteredEnvelopeItems.length === 0) {\n return resolvedSyncPromise({});\n }\n const filteredEnvelope = createEnvelope(envelope[0], filteredEnvelopeItems);\n\n // Creates client report for each item in an envelope\n const recordEnvelopeLoss = reason => {\n forEachEnvelopeItem(filteredEnvelope, (item, type) => {\n options.recordDroppedEvent(reason, envelopeItemTypeToDataCategory(type));\n });\n };\n const requestTask = () => makeRequest({\n body: serializeEnvelope(filteredEnvelope)\n }).then(response => {\n // We don't want to throw on NOK responses, but we want to at least log them\n if (response.statusCode !== undefined && (response.statusCode < 200 || response.statusCode >= 300)) {\n DEBUG_BUILD && logger.warn(`Sentry responded with status code ${response.statusCode} to sent event.`);\n }\n rateLimits = updateRateLimits(rateLimits, response);\n return response;\n }, error => {\n recordEnvelopeLoss('network_error');\n throw error;\n });\n return buffer.add(requestTask).then(result => result, error => {\n if (error instanceof SentryError) {\n DEBUG_BUILD && logger.error('Skipped sending event because buffer is full.');\n recordEnvelopeLoss('queue_overflow');\n return resolvedSyncPromise({});\n } else {\n throw error;\n }\n });\n }\n return {\n send,\n flush\n };\n}\nexport { DEFAULT_TRANSPORT_BUFFER_SIZE, createTransport };\n","// By default, we want to infer the IP address, unless this is explicitly set to `null`\n// We do this after all other processing is done\n// If `ip_address` is explicitly set to `null` or a value, we leave it as is\n\n/**\n * @internal\n */\nfunction addAutoIpAddressToUser(objWithMaybeUser) {\n if (objWithMaybeUser.user?.ip_address === undefined) {\n objWithMaybeUser.user = {\n ...objWithMaybeUser.user,\n ip_address: '{{auto}}'\n };\n }\n}\n\n/**\n * @internal\n */\nfunction addAutoIpAddressToSession(session) {\n if ('aggregates' in session) {\n if (session.attrs?.['ip_address'] === undefined) {\n session.attrs = {\n ...session.attrs,\n ip_address: '{{auto}}'\n };\n }\n } else {\n if (session.ipAddress === undefined) {\n session.ipAddress = '{{auto}}';\n }\n }\n}\nexport { addAutoIpAddressToSession, addAutoIpAddressToUser };\n","import { SDK_VERSION } from '../utils-hoist/version.js';\n\n/**\n * A builder for the SDK metadata in the options for the SDK initialization.\n *\n * Note: This function is identical to `buildMetadata` in Remix and NextJS and SvelteKit.\n * We don't extract it for bundle size reasons.\n * @see https://github.com/getsentry/sentry-javascript/pull/7404\n * @see https://github.com/getsentry/sentry-javascript/pull/4196\n *\n * If you make changes to this function consider updating the others as well.\n *\n * @param options SDK options object that gets mutated\n * @param names list of package names\n */\nfunction applySdkMetadata(options, name, names = [name], source = 'npm') {\n const metadata = options._metadata || {};\n if (!metadata.sdk) {\n metadata.sdk = {\n name: `sentry.javascript.${name}`,\n packages: names.map(name => ({\n name: `${source}:@sentry/${name}`,\n version: SDK_VERSION\n })),\n version: SDK_VERSION\n };\n }\n options._metadata = metadata;\n}\nexport { applySdkMetadata };\n","import { getClient, getIsolationScope } from './currentScopes.js';\nimport { consoleSandbox } from './utils-hoist/logger.js';\nimport { dateTimestampInSeconds } from './utils-hoist/time.js';\n\n/**\n * Default maximum number of breadcrumbs added to an event. Can be overwritten\n * with {@link Options.maxBreadcrumbs}.\n */\nconst DEFAULT_BREADCRUMBS = 100;\n\n/**\n * Records a new breadcrumb which will be attached to future events.\n *\n * Breadcrumbs will be added to subsequent events to provide more context on\n * user's actions prior to an error or crash.\n */\nfunction addBreadcrumb(breadcrumb, hint) {\n const client = getClient();\n const isolationScope = getIsolationScope();\n if (!client) return;\n const {\n beforeBreadcrumb = null,\n maxBreadcrumbs = DEFAULT_BREADCRUMBS\n } = client.getOptions();\n if (maxBreadcrumbs <= 0) return;\n const timestamp = dateTimestampInSeconds();\n const mergedBreadcrumb = {\n timestamp,\n ...breadcrumb\n };\n const finalBreadcrumb = beforeBreadcrumb ? consoleSandbox(() => beforeBreadcrumb(mergedBreadcrumb, hint)) : mergedBreadcrumb;\n if (finalBreadcrumb === null) return;\n if (client.emit) {\n client.emit('beforeAddBreadcrumb', finalBreadcrumb, hint);\n }\n isolationScope.addBreadcrumb(finalBreadcrumb, maxBreadcrumbs);\n}\nexport { addBreadcrumb };\n","import { getClient } from '../currentScopes.js';\nimport { defineIntegration } from '../integration.js';\nimport { getOriginalFunction } from '../utils-hoist/object.js';\nlet originalFunctionToString;\nconst INTEGRATION_NAME = 'FunctionToString';\nconst SETUP_CLIENTS = new WeakMap();\nconst _functionToStringIntegration = () => {\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n originalFunctionToString = Function.prototype.toString;\n\n // intrinsics (like Function.prototype) might be immutable in some environments\n // e.g. Node with --frozen-intrinsics, XS (an embedded JavaScript engine) or SES (a JavaScript proposal)\n try {\n Function.prototype.toString = function (...args) {\n const originalFunction = getOriginalFunction(this);\n const context = SETUP_CLIENTS.has(getClient()) && originalFunction !== undefined ? originalFunction : this;\n return originalFunctionToString.apply(context, args);\n };\n } catch {\n // ignore errors here, just don't patch this\n }\n },\n setup(client) {\n SETUP_CLIENTS.set(client, true);\n }\n };\n};\n\n/**\n * Patch toString calls to return proper name for wrapped functions.\n *\n * ```js\n * Sentry.init({\n * integrations: [\n * functionToStringIntegration(),\n * ],\n * });\n * ```\n */\nconst functionToStringIntegration = defineIntegration(_functionToStringIntegration);\nexport { functionToStringIntegration };\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { defineIntegration } from '../integration.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { getEventDescription } from '../utils-hoist/misc.js';\nimport { stringMatchesSomePattern } from '../utils-hoist/string.js';\nimport { getPossibleEventMessages } from '../utils/eventUtils.js';\n\n// \"Script error.\" is hard coded into browsers for errors that it can't read.\n// this is the result of a script being pulled in from an external domain and CORS.\nconst DEFAULT_IGNORE_ERRORS = [/^Script error\\.?$/, /^Javascript error: Script error\\.? on line 0$/, /^ResizeObserver loop completed with undelivered notifications.$/,\n// The browser logs this when a ResizeObserver handler takes a bit longer. Usually this is not an actual issue though. It indicates slowness.\n/^Cannot redefine property: googletag$/,\n// This is thrown when google tag manager is used in combination with an ad blocker\n/^Can't find variable: gmo$/,\n// Error from Google Search App https://issuetracker.google.com/issues/396043331\n/^undefined is not an object \\(evaluating 'a\\.[A-Z]'\\)$/,\n// Random error that happens but not actionable or noticeable to end-users.\n'can\\'t redefine non-configurable property \"solana\"',\n// Probably a browser extension or custom browser (Brave) throwing this error\n\"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)\",\n// Error thrown by GTM, seemingly not affecting end-users\n\"Can't find variable: _AutofillCallbackHandler\",\n// Unactionable error in instagram webview https://developers.facebook.com/community/threads/320013549791141/\n/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\\d+, MethodName:simulateEvent, ParamCount:\\d+$/,\n// unactionable error from CEFSharp, a .NET library that embeds chromium in .NET apps\n/^Java exception was raised during method invocation$/ // error from Facebook Mobile browser (https://github.com/getsentry/sentry-javascript/issues/15065)\n];\n\n/** Options for the EventFilters integration */\n\nconst INTEGRATION_NAME = 'EventFilters';\nconst _eventFiltersIntegration = (options = {}) => {\n return {\n name: INTEGRATION_NAME,\n processEvent(event, _hint, client) {\n const clientOptions = client.getOptions();\n const mergedOptions = _mergeOptions(options, clientOptions);\n return _shouldDropEvent(event, mergedOptions) ? null : event;\n }\n };\n};\n\n/**\n * An integration that filters out events (errors and transactions) based on:\n *\n * - (Errors) A curated list of known low-value or irrelevant errors (see {@link DEFAULT_IGNORE_ERRORS})\n * - (Errors) A list of error messages or urls/filenames passed in via\n * - Top level Sentry.init options (`ignoreErrors`, `denyUrls`, `allowUrls`)\n * - The same options passed to the integration directly via @param options\n * - (Transactions/Spans) A list of root span (transaction) names passed in via\n * - Top level Sentry.init option (`ignoreTransactions`)\n * - The same option passed to the integration directly via @param options\n *\n * Events filtered by this integration will not be sent to Sentry.\n */\nconst eventFiltersIntegration = defineIntegration(_eventFiltersIntegration);\n\n/**\n * An integration that filters out events (errors and transactions) based on:\n *\n * - (Errors) A curated list of known low-value or irrelevant errors (see {@link DEFAULT_IGNORE_ERRORS})\n * - (Errors) A list of error messages or urls/filenames passed in via\n * - Top level Sentry.init options (`ignoreErrors`, `denyUrls`, `allowUrls`)\n * - The same options passed to the integration directly via @param options\n * - (Transactions/Spans) A list of root span (transaction) names passed in via\n * - Top level Sentry.init option (`ignoreTransactions`)\n * - The same option passed to the integration directly via @param options\n *\n * Events filtered by this integration will not be sent to Sentry.\n *\n * @deprecated this integration was renamed and will be removed in a future major version.\n * Use `eventFiltersIntegration` instead.\n */\nconst inboundFiltersIntegration = defineIntegration((options = {}) => {\n return {\n ...eventFiltersIntegration(options),\n name: 'InboundFilters'\n };\n});\nfunction _mergeOptions(internalOptions = {}, clientOptions = {}) {\n return {\n allowUrls: [...(internalOptions.allowUrls || []), ...(clientOptions.allowUrls || [])],\n denyUrls: [...(internalOptions.denyUrls || []), ...(clientOptions.denyUrls || [])],\n ignoreErrors: [...(internalOptions.ignoreErrors || []), ...(clientOptions.ignoreErrors || []), ...(internalOptions.disableErrorDefaults ? [] : DEFAULT_IGNORE_ERRORS)],\n ignoreTransactions: [...(internalOptions.ignoreTransactions || []), ...(clientOptions.ignoreTransactions || [])],\n ignoreInternal: internalOptions.ignoreInternal !== undefined ? internalOptions.ignoreInternal : true\n };\n}\nfunction _shouldDropEvent(event, options) {\n if (options.ignoreInternal && _isSentryError(event)) {\n DEBUG_BUILD && logger.warn(`Event dropped due to being internal Sentry Error.\\nEvent: ${getEventDescription(event)}`);\n return true;\n }\n if (_isIgnoredError(event, options.ignoreErrors)) {\n DEBUG_BUILD && logger.warn(`Event dropped due to being matched by \\`ignoreErrors\\` option.\\nEvent: ${getEventDescription(event)}`);\n return true;\n }\n if (_isUselessError(event)) {\n DEBUG_BUILD && logger.warn(`Event dropped due to not having an error message, error type or stacktrace.\\nEvent: ${getEventDescription(event)}`);\n return true;\n }\n if (_isIgnoredTransaction(event, options.ignoreTransactions)) {\n DEBUG_BUILD && logger.warn(`Event dropped due to being matched by \\`ignoreTransactions\\` option.\\nEvent: ${getEventDescription(event)}`);\n return true;\n }\n if (_isDeniedUrl(event, options.denyUrls)) {\n DEBUG_BUILD && logger.warn(`Event dropped due to being matched by \\`denyUrls\\` option.\\nEvent: ${getEventDescription(event)}.\\nUrl: ${_getEventFilterUrl(event)}`);\n return true;\n }\n if (!_isAllowedUrl(event, options.allowUrls)) {\n DEBUG_BUILD && logger.warn(`Event dropped due to not being matched by \\`allowUrls\\` option.\\nEvent: ${getEventDescription(event)}.\\nUrl: ${_getEventFilterUrl(event)}`);\n return true;\n }\n return false;\n}\nfunction _isIgnoredError(event, ignoreErrors) {\n // If event.type, this is not an error\n if (event.type || !ignoreErrors || !ignoreErrors.length) {\n return false;\n }\n return getPossibleEventMessages(event).some(message => stringMatchesSomePattern(message, ignoreErrors));\n}\nfunction _isIgnoredTransaction(event, ignoreTransactions) {\n if (event.type !== 'transaction' || !ignoreTransactions || !ignoreTransactions.length) {\n return false;\n }\n const name = event.transaction;\n return name ? stringMatchesSomePattern(name, ignoreTransactions) : false;\n}\nfunction _isDeniedUrl(event, denyUrls) {\n if (!denyUrls?.length) {\n return false;\n }\n const url = _getEventFilterUrl(event);\n return !url ? false : stringMatchesSomePattern(url, denyUrls);\n}\nfunction _isAllowedUrl(event, allowUrls) {\n if (!allowUrls?.length) {\n return true;\n }\n const url = _getEventFilterUrl(event);\n return !url ? true : stringMatchesSomePattern(url, allowUrls);\n}\nfunction _isSentryError(event) {\n try {\n // @ts-expect-error can't be a sentry error if undefined\n return event.exception.values[0].type === 'SentryError';\n } catch (e) {\n // ignore\n }\n return false;\n}\nfunction _getLastValidUrl(frames = []) {\n for (let i = frames.length - 1; i >= 0; i--) {\n const frame = frames[i];\n if (frame && frame.filename !== '' && frame.filename !== '[native code]') {\n return frame.filename || null;\n }\n }\n return null;\n}\nfunction _getEventFilterUrl(event) {\n try {\n // If there are linked exceptions or exception aggregates we only want to match against the top frame of the \"root\" (the main exception)\n // The root always comes last in linked exceptions\n const rootException = [...(event.exception?.values ?? [])].reverse().find(value => value.mechanism?.parent_id === undefined && value.stacktrace?.frames?.length);\n const frames = rootException?.stacktrace?.frames;\n return frames ? _getLastValidUrl(frames) : null;\n } catch (oO) {\n DEBUG_BUILD && logger.error(`Cannot extract url for event ${getEventDescription(event)}`);\n return null;\n }\n}\nfunction _isUselessError(event) {\n if (event.type) {\n // event is not an error\n return false;\n }\n\n // We only want to consider events for dropping that actually have recorded exception values.\n if (!event.exception?.values?.length) {\n return false;\n }\n return (\n // No top-level message\n !event.message &&\n // There are no exception values that have a stacktrace, a non-generic-Error type or value\n !event.exception.values.some(value => value.stacktrace || value.type && value.type !== 'Error' || value.value)\n );\n}\nexport { eventFiltersIntegration, inboundFiltersIntegration };\n","import { isInstanceOf } from './is.js';\nimport { truncate } from './string.js';\n\n/**\n * Creates exceptions inside `event.exception.values` for errors that are nested on properties based on the `key` parameter.\n */\nfunction applyAggregateErrorsToEvent(exceptionFromErrorImplementation, parser, maxValueLimit = 250, key, limit, event, hint) {\n if (!event.exception?.values || !hint || !isInstanceOf(hint.originalException, Error)) {\n return;\n }\n\n // Generally speaking the last item in `event.exception.values` is the exception originating from the original Error\n const originalException = event.exception.values.length > 0 ? event.exception.values[event.exception.values.length - 1] : undefined;\n\n // We only create exception grouping if there is an exception in the event.\n if (originalException) {\n event.exception.values = truncateAggregateExceptions(aggregateExceptionsFromError(exceptionFromErrorImplementation, parser, limit, hint.originalException, key, event.exception.values, originalException, 0), maxValueLimit);\n }\n}\nfunction aggregateExceptionsFromError(exceptionFromErrorImplementation, parser, limit, error, key, prevExceptions, exception, exceptionId) {\n if (prevExceptions.length >= limit + 1) {\n return prevExceptions;\n }\n let newExceptions = [...prevExceptions];\n\n // Recursively call this function in order to walk down a chain of errors\n if (isInstanceOf(error[key], Error)) {\n applyExceptionGroupFieldsForParentException(exception, exceptionId);\n const newException = exceptionFromErrorImplementation(parser, error[key]);\n const newExceptionId = newExceptions.length;\n applyExceptionGroupFieldsForChildException(newException, key, newExceptionId, exceptionId);\n newExceptions = aggregateExceptionsFromError(exceptionFromErrorImplementation, parser, limit, error[key], key, [newException, ...newExceptions], newException, newExceptionId);\n }\n\n // This will create exception grouping for AggregateErrors\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AggregateError\n if (Array.isArray(error.errors)) {\n error.errors.forEach((childError, i) => {\n if (isInstanceOf(childError, Error)) {\n applyExceptionGroupFieldsForParentException(exception, exceptionId);\n const newException = exceptionFromErrorImplementation(parser, childError);\n const newExceptionId = newExceptions.length;\n applyExceptionGroupFieldsForChildException(newException, `errors[${i}]`, newExceptionId, exceptionId);\n newExceptions = aggregateExceptionsFromError(exceptionFromErrorImplementation, parser, limit, childError, key, [newException, ...newExceptions], newException, newExceptionId);\n }\n });\n }\n return newExceptions;\n}\nfunction applyExceptionGroupFieldsForParentException(exception, exceptionId) {\n // Don't know if this default makes sense. The protocol requires us to set these values so we pick *some* default.\n exception.mechanism = exception.mechanism || {\n type: 'generic',\n handled: true\n };\n exception.mechanism = {\n ...exception.mechanism,\n ...(exception.type === 'AggregateError' && {\n is_exception_group: true\n }),\n exception_id: exceptionId\n };\n}\nfunction applyExceptionGroupFieldsForChildException(exception, source, exceptionId, parentId) {\n // Don't know if this default makes sense. The protocol requires us to set these values so we pick *some* default.\n exception.mechanism = exception.mechanism || {\n type: 'generic',\n handled: true\n };\n exception.mechanism = {\n ...exception.mechanism,\n type: 'chained',\n source,\n exception_id: exceptionId,\n parent_id: parentId\n };\n}\n\n/**\n * Truncate the message (exception.value) of all exceptions in the event.\n * Because this event processor is ran after `applyClientOptions`,\n * we need to truncate the message of the added exceptions here.\n */\nfunction truncateAggregateExceptions(exceptions, maxValueLength) {\n return exceptions.map(exception => {\n if (exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n return exception;\n });\n}\nexport { applyAggregateErrorsToEvent };\n","import { CONSOLE_LEVELS, originalConsoleMethods } from '../logger.js';\nimport { fill } from '../object.js';\nimport { GLOBAL_OBJ } from '../worldwide.js';\nimport { addHandler, maybeInstrument, triggerHandlers } from './handlers.js';\n\n/**\n * Add an instrumentation handler for when a console.xxx method is called.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addConsoleInstrumentationHandler(handler) {\n const type = 'console';\n addHandler(type, handler);\n maybeInstrument(type, instrumentConsole);\n}\nfunction instrumentConsole() {\n if (!('console' in GLOBAL_OBJ)) {\n return;\n }\n CONSOLE_LEVELS.forEach(function (level) {\n if (!(level in GLOBAL_OBJ.console)) {\n return;\n }\n fill(GLOBAL_OBJ.console, level, function (originalConsoleMethod) {\n originalConsoleMethods[level] = originalConsoleMethod;\n return function (...args) {\n const handlerData = {\n args,\n level\n };\n triggerHandlers('console', handlerData);\n const log = originalConsoleMethods[level];\n log?.apply(GLOBAL_OBJ.console, args);\n };\n });\n });\n}\nexport { addConsoleInstrumentationHandler };\n","/**\n * Converts a string-based level into a `SeverityLevel`, normalizing it along the way.\n *\n * @param level String representation of desired `SeverityLevel`.\n * @returns The `SeverityLevel` corresponding to the given string, or 'log' if the string isn't a valid level.\n */\nfunction severityLevelFromString(level) {\n return level === 'warn' ? 'warning' : ['fatal', 'error', 'warning', 'log', 'info', 'debug'].includes(level) ? level : 'log';\n}\nexport { severityLevelFromString };\n","import { defineIntegration } from '../integration.js';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { getFramesFromEvent } from '../utils-hoist/stacktrace.js';\nconst INTEGRATION_NAME = 'Dedupe';\nconst _dedupeIntegration = () => {\n let previousEvent;\n return {\n name: INTEGRATION_NAME,\n processEvent(currentEvent) {\n // We want to ignore any non-error type events, e.g. transactions or replays\n // These should never be deduped, and also not be compared against as _previousEvent.\n if (currentEvent.type) {\n return currentEvent;\n }\n\n // Juuust in case something goes wrong\n try {\n if (_shouldDropEvent(currentEvent, previousEvent)) {\n DEBUG_BUILD && logger.warn('Event dropped due to being a duplicate of previously captured event.');\n return null;\n }\n } catch (_oO) {} // eslint-disable-line no-empty\n\n return previousEvent = currentEvent;\n }\n };\n};\n\n/**\n * Deduplication filter.\n */\nconst dedupeIntegration = defineIntegration(_dedupeIntegration);\n\n/** only exported for tests. */\nfunction _shouldDropEvent(currentEvent, previousEvent) {\n if (!previousEvent) {\n return false;\n }\n if (_isSameMessageEvent(currentEvent, previousEvent)) {\n return true;\n }\n if (_isSameExceptionEvent(currentEvent, previousEvent)) {\n return true;\n }\n return false;\n}\nfunction _isSameMessageEvent(currentEvent, previousEvent) {\n const currentMessage = currentEvent.message;\n const previousMessage = previousEvent.message;\n\n // If neither event has a message property, they were both exceptions, so bail out\n if (!currentMessage && !previousMessage) {\n return false;\n }\n\n // If only one event has a stacktrace, but not the other one, they are not the same\n if (currentMessage && !previousMessage || !currentMessage && previousMessage) {\n return false;\n }\n if (currentMessage !== previousMessage) {\n return false;\n }\n if (!_isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n if (!_isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n return true;\n}\nfunction _isSameExceptionEvent(currentEvent, previousEvent) {\n const previousException = _getExceptionFromEvent(previousEvent);\n const currentException = _getExceptionFromEvent(currentEvent);\n if (!previousException || !currentException) {\n return false;\n }\n if (previousException.type !== currentException.type || previousException.value !== currentException.value) {\n return false;\n }\n if (!_isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n if (!_isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n return true;\n}\nfunction _isSameStacktrace(currentEvent, previousEvent) {\n let currentFrames = getFramesFromEvent(currentEvent);\n let previousFrames = getFramesFromEvent(previousEvent);\n\n // If neither event has a stacktrace, they are assumed to be the same\n if (!currentFrames && !previousFrames) {\n return true;\n }\n\n // If only one event has a stacktrace, but not the other one, they are not the same\n if (currentFrames && !previousFrames || !currentFrames && previousFrames) {\n return false;\n }\n currentFrames = currentFrames;\n previousFrames = previousFrames;\n\n // If number of frames differ, they are not the same\n if (previousFrames.length !== currentFrames.length) {\n return false;\n }\n\n // Otherwise, compare the two\n for (let i = 0; i < previousFrames.length; i++) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const frameA = previousFrames[i];\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const frameB = currentFrames[i];\n if (frameA.filename !== frameB.filename || frameA.lineno !== frameB.lineno || frameA.colno !== frameB.colno || frameA.function !== frameB.function) {\n return false;\n }\n }\n return true;\n}\nfunction _isSameFingerprint(currentEvent, previousEvent) {\n let currentFingerprint = currentEvent.fingerprint;\n let previousFingerprint = previousEvent.fingerprint;\n\n // If neither event has a fingerprint, they are assumed to be the same\n if (!currentFingerprint && !previousFingerprint) {\n return true;\n }\n\n // If only one event has a fingerprint, but not the other one, they are not the same\n if (currentFingerprint && !previousFingerprint || !currentFingerprint && previousFingerprint) {\n return false;\n }\n currentFingerprint = currentFingerprint;\n previousFingerprint = previousFingerprint;\n\n // Otherwise, compare the two\n try {\n return !!(currentFingerprint.join('') === previousFingerprint.join(''));\n } catch (_oO) {\n return false;\n }\n}\nfunction _getExceptionFromEvent(event) {\n return event.exception?.values && event.exception.values[0];\n}\nexport { _shouldDropEvent, dedupeIntegration };\n","/**\n * Parses string form of URL into an object\n * // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B\n * // intentionally using regex and not href parsing trick because React Native and other\n * // environments where DOM might not be available\n * @returns parsed URL object\n */\nfunction parseUrl(url) {\n if (!url) {\n return {};\n }\n const match = url.match(/^(([^:/?#]+):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\n if (!match) {\n return {};\n }\n\n // coerce to undefined values to empty string so we don't get 'undefined'\n const query = match[6] || '';\n const fragment = match[8] || '';\n return {\n host: match[4],\n path: match[5],\n protocol: match[2],\n search: query,\n hash: fragment,\n relative: match[5] + query + fragment // everything minus origin\n };\n}\n\n/**\n * Strip the query string and fragment off of a given URL or path (if present)\n *\n * @param urlPath Full URL or path, including possible query string and/or fragment\n * @returns URL or path without query string or fragment\n */\nfunction stripUrlQueryAndFragment(urlPath) {\n return urlPath.split(/[?#]/, 1)[0];\n}\n\n/**\n * Takes a URL object and returns a sanitized string which is safe to use as span name\n * see: https://develop.sentry.dev/sdk/data-handling/#structuring-data\n */\nfunction getSanitizedUrlString(url) {\n const {\n protocol,\n host,\n path\n } = url;\n const filteredHost = host\n // Always filter out authority\n ?.replace(/^.*@/, '[filtered]:[filtered]@')\n // Don't show standard :80 (http) and :443 (https) ports to reduce the noise\n // TODO: Use new URL global if it exists\n .replace(/(:80)$/, '').replace(/(:443)$/, '') || '';\n return `${protocol ? `${protocol}://` : ''}${filteredHost}${path}`;\n}\nexport { getSanitizedUrlString, parseUrl, stripUrlQueryAndFragment };\n","/**\n * Determine a breadcrumb's log level (only `warning` or `error`) based on an HTTP status code.\n */\nfunction getBreadcrumbLogLevelFromHttpStatusCode(statusCode) {\n // NOTE: undefined defaults to 'info' in Sentry\n if (statusCode === undefined) {\n return undefined;\n } else if (statusCode >= 400 && statusCode < 500) {\n return 'warning';\n } else if (statusCode >= 500) {\n return 'error';\n } else {\n return undefined;\n }\n}\nexport { getBreadcrumbLogLevelFromHttpStatusCode };\n","import { DEBUG_BUILD } from './debug-build.js';\nimport { logger } from './logger.js';\nimport { GLOBAL_OBJ } from './worldwide.js';\nconst WINDOW = GLOBAL_OBJ;\n\n/**\n * Tells whether current environment supports ErrorEvent objects\n * {@link supportsErrorEvent}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsErrorEvent() {\n try {\n new ErrorEvent('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMError objects\n * {@link supportsDOMError}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsDOMError() {\n try {\n // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError':\n // 1 argument required, but only 0 present.\n // @ts-expect-error It really needs 1 argument, not 0.\n new DOMError('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMException objects\n * {@link supportsDOMException}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsDOMException() {\n try {\n new DOMException('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports History API\n * {@link supportsHistory}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsHistory() {\n return 'history' in WINDOW;\n}\n\n/**\n * Tells whether current environment supports Fetch API\n * {@link supportsFetch}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsFetch() {\n if (!('fetch' in WINDOW)) {\n return false;\n }\n try {\n new Headers();\n new Request('http://www.example.com');\n new Response();\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * isNative checks if the given function is a native implementation\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction isNativeFunction(func) {\n return func && /^function\\s+\\w+\\(\\)\\s+\\{\\s+\\[native code\\]\\s+\\}$/.test(func.toString());\n}\n\n/**\n * Tells whether current environment supports Fetch API natively\n * {@link supportsNativeFetch}.\n *\n * @returns true if `window.fetch` is natively implemented, false otherwise\n */\nfunction supportsNativeFetch() {\n if (typeof EdgeRuntime === 'string') {\n return true;\n }\n if (!supportsFetch()) {\n return false;\n }\n\n // Fast path to avoid DOM I/O\n // eslint-disable-next-line @typescript-eslint/unbound-method\n if (isNativeFunction(WINDOW.fetch)) {\n return true;\n }\n\n // window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension)\n // so create a \"pure\" iframe to see if that has native fetch\n let result = false;\n const doc = WINDOW.document;\n // eslint-disable-next-line deprecation/deprecation\n if (doc && typeof doc.createElement === 'function') {\n try {\n const sandbox = doc.createElement('iframe');\n sandbox.hidden = true;\n doc.head.appendChild(sandbox);\n if (sandbox.contentWindow?.fetch) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n result = isNativeFunction(sandbox.contentWindow.fetch);\n }\n doc.head.removeChild(sandbox);\n } catch (err) {\n DEBUG_BUILD && logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err);\n }\n }\n return result;\n}\n\n/**\n * Tells whether current environment supports ReportingObserver API\n * {@link supportsReportingObserver}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsReportingObserver() {\n return 'ReportingObserver' in WINDOW;\n}\n\n/**\n * Tells whether current environment supports Referrer Policy API\n * {@link supportsReferrerPolicy}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsReferrerPolicy() {\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default'\n // (see https://caniuse.com/#feat=referrer-policy),\n // it doesn't. And it throws an exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n\n if (!supportsFetch()) {\n return false;\n }\n try {\n new Request('_', {\n referrerPolicy: 'origin'\n });\n return true;\n } catch (e) {\n return false;\n }\n}\nexport { isNativeFunction, supportsDOMError, supportsDOMException, supportsErrorEvent, supportsFetch, supportsHistory, supportsNativeFetch, supportsReferrerPolicy, supportsReportingObserver };\n","import { isError } from '../is.js';\nimport { fill, addNonEnumerableProperty } from '../object.js';\nimport { supportsNativeFetch } from '../supports.js';\nimport { timestampInSeconds } from '../time.js';\nimport { GLOBAL_OBJ } from '../worldwide.js';\nimport { addHandler, maybeInstrument, triggerHandlers } from './handlers.js';\n\n/**\n * Add an instrumentation handler for when a fetch request happens.\n * The handler function is called once when the request starts and once when it ends,\n * which can be identified by checking if it has an `endTimestamp`.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addFetchInstrumentationHandler(handler, skipNativeFetchCheck) {\n const type = 'fetch';\n addHandler(type, handler);\n maybeInstrument(type, () => instrumentFetch(undefined, skipNativeFetchCheck));\n}\n\n/**\n * Add an instrumentation handler for long-lived fetch requests, like consuming server-sent events (SSE) via fetch.\n * The handler will resolve the request body and emit the actual `endTimestamp`, so that the\n * span can be updated accordingly.\n *\n * Only used internally\n * @hidden\n */\nfunction addFetchEndInstrumentationHandler(handler) {\n const type = 'fetch-body-resolved';\n addHandler(type, handler);\n maybeInstrument(type, () => instrumentFetch(streamHandler));\n}\nfunction instrumentFetch(onFetchResolved, skipNativeFetchCheck = false) {\n if (skipNativeFetchCheck && !supportsNativeFetch()) {\n return;\n }\n fill(GLOBAL_OBJ, 'fetch', function (originalFetch) {\n return function (...args) {\n // We capture the error right here and not in the Promise error callback because Safari (and probably other\n // browsers too) will wipe the stack trace up to this point, only leaving us with this file which is useless.\n\n // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n // it means the error, that was caused by your fetch call did not\n // have a stack trace, so the SDK backfilled the stack trace so\n // you can see which fetch call failed.\n const virtualError = new Error();\n const {\n method,\n url\n } = parseFetchArgs(args);\n const handlerData = {\n args,\n fetchData: {\n method,\n url\n },\n startTimestamp: timestampInSeconds() * 1000,\n // // Adding the error to be able to fingerprint the failed fetch event in HttpClient instrumentation\n virtualError\n };\n\n // if there is no callback, fetch is instrumented directly\n if (!onFetchResolved) {\n triggerHandlers('fetch', {\n ...handlerData\n });\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return originalFetch.apply(GLOBAL_OBJ, args).then(async response => {\n if (onFetchResolved) {\n onFetchResolved(response);\n } else {\n triggerHandlers('fetch', {\n ...handlerData,\n endTimestamp: timestampInSeconds() * 1000,\n response\n });\n }\n return response;\n }, error => {\n triggerHandlers('fetch', {\n ...handlerData,\n endTimestamp: timestampInSeconds() * 1000,\n error\n });\n if (isError(error) && error.stack === undefined) {\n // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n // it means the error, that was caused by your fetch call did not\n // have a stack trace, so the SDK backfilled the stack trace so\n // you can see which fetch call failed.\n error.stack = virtualError.stack;\n addNonEnumerableProperty(error, 'framesToPop', 1);\n }\n\n // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n // it means the sentry.javascript SDK caught an error invoking your application code.\n // This is expected behavior and NOT indicative of a bug with sentry.javascript.\n throw error;\n });\n };\n });\n}\nasync function resolveResponse(res, onFinishedResolving) {\n if (res?.body) {\n const body = res.body;\n const responseReader = body.getReader();\n\n // Define a maximum duration after which we just cancel\n const maxFetchDurationTimeout = setTimeout(() => {\n body.cancel().then(null, () => {\n // noop\n });\n }, 90 * 1000 // 90s\n );\n let readingActive = true;\n while (readingActive) {\n let chunkTimeout;\n try {\n // abort reading if read op takes more than 5s\n chunkTimeout = setTimeout(() => {\n body.cancel().then(null, () => {\n // noop on error\n });\n }, 5000);\n\n // This .read() call will reject/throw when we abort due to timeouts through `body.cancel()`\n const {\n done\n } = await responseReader.read();\n clearTimeout(chunkTimeout);\n if (done) {\n onFinishedResolving();\n readingActive = false;\n }\n } catch (error) {\n readingActive = false;\n } finally {\n clearTimeout(chunkTimeout);\n }\n }\n clearTimeout(maxFetchDurationTimeout);\n responseReader.releaseLock();\n body.cancel().then(null, () => {\n // noop on error\n });\n }\n}\nfunction streamHandler(response) {\n // clone response for awaiting stream\n let clonedResponseForResolving;\n try {\n clonedResponseForResolving = response.clone();\n } catch {\n return;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n resolveResponse(clonedResponseForResolving, () => {\n triggerHandlers('fetch-body-resolved', {\n endTimestamp: timestampInSeconds() * 1000,\n response\n });\n });\n}\nfunction hasProp(obj, prop) {\n return !!obj && typeof obj === 'object' && !!obj[prop];\n}\nfunction getUrlFromResource(resource) {\n if (typeof resource === 'string') {\n return resource;\n }\n if (!resource) {\n return '';\n }\n if (hasProp(resource, 'url')) {\n return resource.url;\n }\n if (resource.toString) {\n return resource.toString();\n }\n return '';\n}\n\n/**\n * Parses the fetch arguments to find the used Http method and the url of the request.\n * Exported for tests only.\n */\nfunction parseFetchArgs(fetchArgs) {\n if (fetchArgs.length === 0) {\n return {\n method: 'GET',\n url: ''\n };\n }\n if (fetchArgs.length === 2) {\n const [url, options] = fetchArgs;\n return {\n url: getUrlFromResource(url),\n method: hasProp(options, 'method') ? String(options.method).toUpperCase() : 'GET'\n };\n }\n const arg = fetchArgs[0];\n return {\n url: getUrlFromResource(arg),\n method: hasProp(arg, 'method') ? String(arg.method).toUpperCase() : 'GET'\n };\n}\nexport { addFetchEndInstrumentationHandler, addFetchInstrumentationHandler, parseFetchArgs };\n","/*\n * This module exists for optimizations in the build process through rollup and terser. We define some global\n * constants, which can be overridden during build. By guarding certain pieces of code with functions that return these\n * constants, we can control whether or not they appear in the final bundle. (Any code guarded by a false condition will\n * never run, and will hence be dropped during treeshaking.) The two primary uses for this are stripping out calls to\n * `logger` and preventing node-related code from appearing in browser bundles.\n *\n * Attention:\n * This file should not be used to define constants/flags that are intended to be used for tree-shaking conducted by\n * users. These flags should live in their respective packages, as we identified user tooling (specifically webpack)\n * having issues tree-shaking these constants across package boundaries.\n * An example for this is the __SENTRY_DEBUG__ constant. It is declared in each package individually because we want\n * users to be able to shake away expressions that it guards.\n */\n\n/**\n * Figures out if we're building a browser bundle.\n *\n * @returns true if this is a browser bundle build.\n */\nfunction isBrowserBundle() {\n return typeof __SENTRY_BROWSER_BUNDLE__ !== 'undefined' && !!__SENTRY_BROWSER_BUNDLE__;\n}\n\n/**\n * Get source of SDK.\n */\nfunction getSDKSource() {\n // This comment is used to identify this line in the CDN bundle build step and replace this with \"return 'cdn';\"\n /* __SENTRY_SDK_SOURCE__ */\n return 'npm';\n}\nexport { getSDKSource, isBrowserBundle };\n","import { GLOBAL_OBJ, getOriginalFunction, markFunctionWrapped, addNonEnumerableProperty, withScope, addExceptionTypeValue, addExceptionMechanism, captureException } from '@sentry/core';\nconst WINDOW = GLOBAL_OBJ;\nlet ignoreOnError = 0;\n\n/**\n * @hidden\n */\nfunction shouldIgnoreOnError() {\n return ignoreOnError > 0;\n}\n\n/**\n * @hidden\n */\nfunction ignoreNextOnError() {\n // onerror should trigger before setTimeout\n ignoreOnError++;\n setTimeout(() => {\n ignoreOnError--;\n });\n}\n\n// eslint-disable-next-line @typescript-eslint/ban-types\n\n/**\n * Instruments the given function and sends an event to Sentry every time the\n * function throws an exception.\n *\n * @param fn A function to wrap. It is generally safe to pass an unbound function, because the returned wrapper always\n * has a correct `this` context.\n * @returns The wrapped function.\n * @hidden\n */\nfunction wrap(fn, options = {}) {\n // for future readers what this does is wrap a function and then create\n // a bi-directional wrapping between them.\n //\n // example: wrapped = wrap(original);\n // original.__sentry_wrapped__ -> wrapped\n // wrapped.__sentry_original__ -> original\n\n function isFunction(fn) {\n return typeof fn === 'function';\n }\n if (!isFunction(fn)) {\n return fn;\n }\n try {\n // if we're dealing with a function that was previously wrapped, return\n // the original wrapper.\n const wrapper = fn.__sentry_wrapped__;\n if (wrapper) {\n if (typeof wrapper === 'function') {\n return wrapper;\n } else {\n // If we find that the `__sentry_wrapped__` function is not a function at the time of accessing it, it means\n // that something messed with it. In that case we want to return the originally passed function.\n return fn;\n }\n }\n\n // We don't wanna wrap it twice\n if (getOriginalFunction(fn)) {\n return fn;\n }\n } catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n // Bail on wrapping and return the function as-is (defers to window.onerror).\n return fn;\n }\n\n // Wrap the function itself\n // It is important that `sentryWrapped` is not an arrow function to preserve the context of `this`\n const sentryWrapped = function (...args) {\n try {\n // Also wrap arguments that are themselves functions\n const wrappedArguments = args.map(arg => wrap(arg, options));\n\n // Attempt to invoke user-land function\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\n // means the sentry.javascript SDK caught an error invoking your application code. This\n // is expected behavior and NOT indicative of a bug with sentry.javascript.\n return fn.apply(this, wrappedArguments);\n } catch (ex) {\n ignoreNextOnError();\n withScope(scope => {\n scope.addEventProcessor(event => {\n if (options.mechanism) {\n addExceptionTypeValue(event, undefined, undefined);\n addExceptionMechanism(event, options.mechanism);\n }\n event.extra = {\n ...event.extra,\n arguments: args\n };\n return event;\n });\n captureException(ex);\n });\n throw ex;\n }\n };\n\n // Wrap the wrapped function in a proxy, to ensure any other properties of the original function remain available\n try {\n for (const property in fn) {\n if (Object.prototype.hasOwnProperty.call(fn, property)) {\n sentryWrapped[property] = fn[property];\n }\n }\n } catch {\n // Accessing some objects may throw\n // ref: https://github.com/getsentry/sentry-javascript/issues/1168\n }\n\n // Signal that this function has been wrapped/filled already\n // for both debugging and to prevent it to being wrapped/filled twice\n markFunctionWrapped(sentryWrapped, fn);\n addNonEnumerableProperty(fn, '__sentry_wrapped__', sentryWrapped);\n\n // Restore original function name (not all browsers allow that)\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, 'name');\n if (descriptor.configurable) {\n Object.defineProperty(sentryWrapped, 'name', {\n get() {\n return fn.name;\n }\n });\n }\n } catch {\n // This may throw if e.g. the descriptor does not exist, or a browser does not allow redefining `name`.\n // to save some bytes we simply try-catch this\n }\n return sentryWrapped;\n}\nexport { WINDOW, ignoreNextOnError, shouldIgnoreOnError, wrap };\n","import { addExceptionMechanism, resolvedSyncPromise, isErrorEvent, isDOMError, isDOMException, addExceptionTypeValue, isError, isPlainObject, isEvent, isParameterizedString, getClient, normalizeToSize, extractExceptionKeysForMessage } from '@sentry/core';\n\n/**\n * This function creates an exception from a JavaScript Error\n */\nfunction exceptionFromError(stackParser, ex) {\n // Get the frames first since Opera can lose the stack if we touch anything else first\n const frames = parseStackFrames(stackParser, ex);\n const exception = {\n type: extractType(ex),\n value: extractMessage(ex)\n };\n if (frames.length) {\n exception.stacktrace = {\n frames\n };\n }\n if (exception.type === undefined && exception.value === '') {\n exception.value = 'Unrecoverable error caught';\n }\n return exception;\n}\nfunction eventFromPlainObject(stackParser, exception, syntheticException, isUnhandledRejection) {\n const client = getClient();\n const normalizeDepth = client?.getOptions().normalizeDepth;\n\n // If we can, we extract an exception from the object properties\n const errorFromProp = getErrorPropertyFromObject(exception);\n const extra = {\n __serialized__: normalizeToSize(exception, normalizeDepth)\n };\n if (errorFromProp) {\n return {\n exception: {\n values: [exceptionFromError(stackParser, errorFromProp)]\n },\n extra\n };\n }\n const event = {\n exception: {\n values: [{\n type: isEvent(exception) ? exception.constructor.name : isUnhandledRejection ? 'UnhandledRejection' : 'Error',\n value: getNonErrorObjectExceptionValue(exception, {\n isUnhandledRejection\n })\n }]\n },\n extra\n };\n if (syntheticException) {\n const frames = parseStackFrames(stackParser, syntheticException);\n if (frames.length) {\n // event.exception.values[0] has been set above\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception.values[0].stacktrace = {\n frames\n };\n }\n }\n return event;\n}\nfunction eventFromError(stackParser, ex) {\n return {\n exception: {\n values: [exceptionFromError(stackParser, ex)]\n }\n };\n}\n\n/** Parses stack frames from an error */\nfunction parseStackFrames(stackParser, ex) {\n // Access and store the stacktrace property before doing ANYTHING\n // else to it because Opera is not very good at providing it\n // reliably in other circumstances.\n const stacktrace = ex.stacktrace || ex.stack || '';\n const skipLines = getSkipFirstStackStringLines(ex);\n const framesToPop = getPopFirstTopFrames(ex);\n try {\n return stackParser(stacktrace, skipLines, framesToPop);\n } catch (e) {\n // no-empty\n }\n return [];\n}\n\n// Based on our own mapping pattern - https://github.com/getsentry/sentry/blob/9f08305e09866c8bd6d0c24f5b0aabdd7dd6c59c/src/sentry/lang/javascript/errormapping.py#L83-L108\nconst reactMinifiedRegexp = /Minified React error #\\d+;/i;\n\n/**\n * Certain known React errors contain links that would be falsely\n * parsed as frames. This function check for these errors and\n * returns number of the stack string lines to skip.\n */\nfunction getSkipFirstStackStringLines(ex) {\n if (ex && reactMinifiedRegexp.test(ex.message)) {\n return 1;\n }\n return 0;\n}\n\n/**\n * If error has `framesToPop` property, it means that the\n * creator tells us the first x frames will be useless\n * and should be discarded. Typically error from wrapper function\n * which don't point to the actual location in the developer's code.\n *\n * Example: https://github.com/zertosh/invariant/blob/master/invariant.js#L46\n */\nfunction getPopFirstTopFrames(ex) {\n if (typeof ex.framesToPop === 'number') {\n return ex.framesToPop;\n }\n return 0;\n}\n\n// https://developer.mozilla.org/en-US/docs/WebAssembly/JavaScript_interface/Exception\n// @ts-expect-error - WebAssembly.Exception is a valid class\nfunction isWebAssemblyException(exception) {\n // Check for support\n // @ts-expect-error - WebAssembly.Exception is a valid class\n if (typeof WebAssembly !== 'undefined' && typeof WebAssembly.Exception !== 'undefined') {\n // @ts-expect-error - WebAssembly.Exception is a valid class\n return exception instanceof WebAssembly.Exception;\n } else {\n return false;\n }\n}\n\n/**\n * Extracts from errors what we use as the exception `type` in error events.\n *\n * Usually, this is the `name` property on Error objects but WASM errors need to be treated differently.\n */\nfunction extractType(ex) {\n const name = ex?.name;\n\n // The name for WebAssembly.Exception Errors needs to be extracted differently.\n // Context: https://github.com/getsentry/sentry-javascript/issues/13787\n if (!name && isWebAssemblyException(ex)) {\n // Emscripten sets array[type, message] to the \"message\" property on the WebAssembly.Exception object\n const hasTypeInMessage = ex.message && Array.isArray(ex.message) && ex.message.length == 2;\n return hasTypeInMessage ? ex.message[0] : 'WebAssembly.Exception';\n }\n return name;\n}\n\n/**\n * There are cases where stacktrace.message is an Event object\n * https://github.com/getsentry/sentry-javascript/issues/1949\n * In this specific case we try to extract stacktrace.message.error.message\n */\nfunction extractMessage(ex) {\n const message = ex?.message;\n if (isWebAssemblyException(ex)) {\n // For Node 18, Emscripten sets array[type, message] to the \"message\" property on the WebAssembly.Exception object\n if (Array.isArray(ex.message) && ex.message.length == 2) {\n return ex.message[1];\n }\n return 'wasm exception';\n }\n if (!message) {\n return 'No error message';\n }\n if (message.error && typeof message.error.message === 'string') {\n return message.error.message;\n }\n return message;\n}\n\n/**\n * Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`.\n * @hidden\n */\nfunction eventFromException(stackParser, exception, hint, attachStacktrace) {\n const syntheticException = hint?.syntheticException || undefined;\n const event = eventFromUnknownInput(stackParser, exception, syntheticException, attachStacktrace);\n addExceptionMechanism(event); // defaults to { type: 'generic', handled: true }\n event.level = 'error';\n if (hint?.event_id) {\n event.event_id = hint.event_id;\n }\n return resolvedSyncPromise(event);\n}\n\n/**\n * Builds and Event from a Message\n * @hidden\n */\nfunction eventFromMessage(stackParser, message, level = 'info', hint, attachStacktrace) {\n const syntheticException = hint?.syntheticException || undefined;\n const event = eventFromString(stackParser, message, syntheticException, attachStacktrace);\n event.level = level;\n if (hint?.event_id) {\n event.event_id = hint.event_id;\n }\n return resolvedSyncPromise(event);\n}\n\n/**\n * @hidden\n */\nfunction eventFromUnknownInput(stackParser, exception, syntheticException, attachStacktrace, isUnhandledRejection) {\n let event;\n if (isErrorEvent(exception) && exception.error) {\n // If it is an ErrorEvent with `error` property, extract it to get actual Error\n const errorEvent = exception;\n return eventFromError(stackParser, errorEvent.error);\n }\n\n // If it is a `DOMError` (which is a legacy API, but still supported in some browsers) then we just extract the name\n // and message, as it doesn't provide anything else. According to the spec, all `DOMExceptions` should also be\n // `Error`s, but that's not the case in IE11, so in that case we treat it the same as we do a `DOMError`.\n //\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMError\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMException\n // https://webidl.spec.whatwg.org/#es-DOMException-specialness\n if (isDOMError(exception) || isDOMException(exception)) {\n const domException = exception;\n if ('stack' in exception) {\n event = eventFromError(stackParser, exception);\n } else {\n const name = domException.name || (isDOMError(domException) ? 'DOMError' : 'DOMException');\n const message = domException.message ? `${name}: ${domException.message}` : name;\n event = eventFromString(stackParser, message, syntheticException, attachStacktrace);\n addExceptionTypeValue(event, message);\n }\n if ('code' in domException) {\n // eslint-disable-next-line deprecation/deprecation\n event.tags = {\n ...event.tags,\n 'DOMException.code': `${domException.code}`\n };\n }\n return event;\n }\n if (isError(exception)) {\n // we have a real Error object, do nothing\n return eventFromError(stackParser, exception);\n }\n if (isPlainObject(exception) || isEvent(exception)) {\n // If it's a plain object or an instance of `Event` (the built-in JS kind, not this SDK's `Event` type), serialize\n // it manually. This will allow us to group events based on top-level keys which is much better than creating a new\n // group on any key/value change.\n const objectException = exception;\n event = eventFromPlainObject(stackParser, objectException, syntheticException, isUnhandledRejection);\n addExceptionMechanism(event, {\n synthetic: true\n });\n return event;\n }\n\n // If none of previous checks were valid, then it means that it's not:\n // - an instance of DOMError\n // - an instance of DOMException\n // - an instance of Event\n // - an instance of Error\n // - a valid ErrorEvent (one with an error property)\n // - a plain Object\n //\n // So bail out and capture it as a simple message:\n event = eventFromString(stackParser, exception, syntheticException, attachStacktrace);\n addExceptionTypeValue(event, `${exception}`, undefined);\n addExceptionMechanism(event, {\n synthetic: true\n });\n return event;\n}\nfunction eventFromString(stackParser, message, syntheticException, attachStacktrace) {\n const event = {};\n if (attachStacktrace && syntheticException) {\n const frames = parseStackFrames(stackParser, syntheticException);\n if (frames.length) {\n event.exception = {\n values: [{\n value: message,\n stacktrace: {\n frames\n }\n }]\n };\n }\n addExceptionMechanism(event, {\n synthetic: true\n });\n }\n if (isParameterizedString(message)) {\n const {\n __sentry_template_string__,\n __sentry_template_values__\n } = message;\n event.logentry = {\n message: __sentry_template_string__,\n params: __sentry_template_values__\n };\n return event;\n }\n event.message = message;\n return event;\n}\nfunction getNonErrorObjectExceptionValue(exception, {\n isUnhandledRejection\n}) {\n const keys = extractExceptionKeysForMessage(exception);\n const captureType = isUnhandledRejection ? 'promise rejection' : 'exception';\n\n // Some ErrorEvent instances do not have an `error` property, which is why they are not handled before\n // We still want to try to get a decent message for these cases\n if (isErrorEvent(exception)) {\n return `Event \\`ErrorEvent\\` captured as ${captureType} with message \\`${exception.message}\\``;\n }\n if (isEvent(exception)) {\n const className = getObjectClassName(exception);\n return `Event \\`${className}\\` (type=${exception.type}) captured as ${captureType}`;\n }\n return `Object captured as ${captureType} with keys: ${keys}`;\n}\nfunction getObjectClassName(obj) {\n try {\n const prototype = Object.getPrototypeOf(obj);\n return prototype ? prototype.constructor.name : undefined;\n } catch (e) {\n // ignore errors here\n }\n}\n\n/** If a plain object has a property that is an `Error`, return this error. */\nfunction getErrorPropertyFromObject(obj) {\n for (const prop in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, prop)) {\n const value = obj[prop];\n if (value instanceof Error) {\n return value;\n }\n }\n }\n return undefined;\n}\nexport { eventFromException, eventFromMessage, eventFromUnknownInput, exceptionFromError, extractMessage, extractType };\n","import { Client, getSDKSource, applySdkMetadata, addAutoIpAddressToUser, addAutoIpAddressToSession } from '@sentry/core';\nimport { eventFromException, eventFromMessage } from './eventbuilder.js';\nimport { WINDOW } from './helpers.js';\n\n/**\n * Configuration options for the Sentry Browser SDK.\n * @see @sentry/core Options for more information.\n */\n\n/**\n * The Sentry Browser SDK Client.\n *\n * @see BrowserOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\nclass BrowserClient extends Client {\n /**\n * Creates a new Browser SDK instance.\n *\n * @param options Configuration options for this SDK.\n */\n constructor(options) {\n const opts = {\n // We default this to true, as it is the safer scenario\n parentSpanIsAlwaysRootSpan: true,\n ...options\n };\n const sdkSource = WINDOW.SENTRY_SDK_SOURCE || getSDKSource();\n applySdkMetadata(opts, 'browser', ['browser'], sdkSource);\n super(opts);\n if (opts.sendClientReports && WINDOW.document) {\n WINDOW.document.addEventListener('visibilitychange', () => {\n if (WINDOW.document.visibilityState === 'hidden') {\n this._flushOutcomes();\n }\n });\n }\n if (this._options.sendDefaultPii) {\n this.on('postprocessEvent', addAutoIpAddressToUser);\n this.on('beforeSendSession', addAutoIpAddressToSession);\n }\n }\n\n /**\n * @inheritDoc\n */\n eventFromException(exception, hint) {\n return eventFromException(this._options.stackParser, exception, hint, this._options.attachStacktrace);\n }\n\n /**\n * @inheritDoc\n */\n eventFromMessage(message, level = 'info', hint) {\n return eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace);\n }\n\n /**\n * @inheritDoc\n */\n _prepareEvent(event, hint, currentScope, isolationScope) {\n event.platform = event.platform || 'javascript';\n return super._prepareEvent(event, hint, currentScope, isolationScope);\n }\n}\nexport { BrowserClient };\n","/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nconst DEBUG_BUILD = typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__;\nexport { DEBUG_BUILD };\n","import { GLOBAL_OBJ } from '@sentry/core';\nconst WINDOW = GLOBAL_OBJ;\nexport { WINDOW };\n","import { addHandler, maybeInstrument, triggerHandlers, fill, addNonEnumerableProperty, uuid4 } from '@sentry/core';\nimport { WINDOW } from '../types.js';\nconst DEBOUNCE_DURATION = 1000;\nlet debounceTimerID;\nlet lastCapturedEventType;\nlet lastCapturedEventTargetId;\n\n/**\n * Add an instrumentation handler for when a click or a keypress happens.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addClickKeypressInstrumentationHandler(handler) {\n const type = 'dom';\n addHandler(type, handler);\n maybeInstrument(type, instrumentDOM);\n}\n\n/** Exported for tests only. */\nfunction instrumentDOM() {\n if (!WINDOW.document) {\n return;\n }\n\n // Make it so that any click or keypress that is unhandled / bubbled up all the way to the document triggers our dom\n // handlers. (Normally we have only one, which captures a breadcrumb for each click or keypress.) Do this before\n // we instrument `addEventListener` so that we don't end up attaching this handler twice.\n const triggerDOMHandler = triggerHandlers.bind(null, 'dom');\n const globalDOMEventHandler = makeDOMEventHandler(triggerDOMHandler, true);\n WINDOW.document.addEventListener('click', globalDOMEventHandler, false);\n WINDOW.document.addEventListener('keypress', globalDOMEventHandler, false);\n\n // After hooking into click and keypress events bubbled up to `document`, we also hook into user-handled\n // clicks & keypresses, by adding an event listener of our own to any element to which they add a listener. That\n // way, whenever one of their handlers is triggered, ours will be, too. (This is needed because their handler\n // could potentially prevent the event from bubbling up to our global listeners. This way, our handler are still\n // guaranteed to fire at least once.)\n ['EventTarget', 'Node'].forEach(target => {\n const globalObject = WINDOW;\n const proto = globalObject[target]?.prototype;\n\n // eslint-disable-next-line no-prototype-builtins\n if (!proto?.hasOwnProperty?.('addEventListener')) {\n return;\n }\n fill(proto, 'addEventListener', function (originalAddEventListener) {\n return function (type, listener, options) {\n if (type === 'click' || type == 'keypress') {\n try {\n const handlers = this.__sentry_instrumentation_handlers__ = this.__sentry_instrumentation_handlers__ || {};\n const handlerForType = handlers[type] = handlers[type] || {\n refCount: 0\n };\n if (!handlerForType.handler) {\n const handler = makeDOMEventHandler(triggerDOMHandler);\n handlerForType.handler = handler;\n originalAddEventListener.call(this, type, handler, options);\n }\n handlerForType.refCount++;\n } catch (e) {\n // Accessing dom properties is always fragile.\n // Also allows us to skip `addEventListeners` calls with no proper `this` context.\n }\n }\n return originalAddEventListener.call(this, type, listener, options);\n };\n });\n fill(proto, 'removeEventListener', function (originalRemoveEventListener) {\n return function (type, listener, options) {\n if (type === 'click' || type == 'keypress') {\n try {\n const handlers = this.__sentry_instrumentation_handlers__ || {};\n const handlerForType = handlers[type];\n if (handlerForType) {\n handlerForType.refCount--;\n // If there are no longer any custom handlers of the current type on this element, we can remove ours, too.\n if (handlerForType.refCount <= 0) {\n originalRemoveEventListener.call(this, type, handlerForType.handler, options);\n handlerForType.handler = undefined;\n delete handlers[type]; // eslint-disable-line @typescript-eslint/no-dynamic-delete\n }\n\n // If there are no longer any custom handlers of any type on this element, cleanup everything.\n if (Object.keys(handlers).length === 0) {\n delete this.__sentry_instrumentation_handlers__;\n }\n }\n } catch (e) {\n // Accessing dom properties is always fragile.\n // Also allows us to skip `addEventListeners` calls with no proper `this` context.\n }\n }\n return originalRemoveEventListener.call(this, type, listener, options);\n };\n });\n });\n}\n\n/**\n * Check whether the event is similar to the last captured one. For example, two click events on the same button.\n */\nfunction isSimilarToLastCapturedEvent(event) {\n // If both events have different type, then user definitely performed two separate actions. e.g. click + keypress.\n if (event.type !== lastCapturedEventType) {\n return false;\n }\n try {\n // If both events have the same type, it's still possible that actions were performed on different targets.\n // e.g. 2 clicks on different buttons.\n if (!event.target || event.target._sentryId !== lastCapturedEventTargetId) {\n return false;\n }\n } catch (e) {\n // just accessing `target` property can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/sentry-javascript/issues/838\n }\n\n // If both events have the same type _and_ same `target` (an element which triggered an event, _not necessarily_\n // to which an event listener was attached), we treat them as the same action, as we want to capture\n // only one breadcrumb. e.g. multiple clicks on the same button, or typing inside a user input box.\n return true;\n}\n\n/**\n * Decide whether an event should be captured.\n * @param event event to be captured\n */\nfunction shouldSkipDOMEvent(eventType, target) {\n // We are only interested in filtering `keypress` events for now.\n if (eventType !== 'keypress') {\n return false;\n }\n if (!target?.tagName) {\n return true;\n }\n\n // Only consider keypress events on actual input elements. This will disregard keypresses targeting body\n // e.g.tabbing through elements, hotkeys, etc.\n if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable) {\n return false;\n }\n return true;\n}\n\n/**\n * Wraps addEventListener to capture UI breadcrumbs\n */\nfunction makeDOMEventHandler(handler, globalListener = false) {\n return event => {\n // It's possible this handler might trigger multiple times for the same\n // event (e.g. event propagation through node ancestors).\n // Ignore if we've already captured that event.\n if (!event || event['_sentryCaptured']) {\n return;\n }\n const target = getEventTarget(event);\n\n // We always want to skip _some_ events.\n if (shouldSkipDOMEvent(event.type, target)) {\n return;\n }\n\n // Mark event as \"seen\"\n addNonEnumerableProperty(event, '_sentryCaptured', true);\n if (target && !target._sentryId) {\n // Add UUID to event target so we can identify if\n addNonEnumerableProperty(target, '_sentryId', uuid4());\n }\n const name = event.type === 'keypress' ? 'input' : event.type;\n\n // If there is no last captured event, it means that we can safely capture the new event and store it for future comparisons.\n // If there is a last captured event, see if the new event is different enough to treat it as a unique one.\n // If that's the case, emit the previous event and store locally the newly-captured DOM event.\n if (!isSimilarToLastCapturedEvent(event)) {\n const handlerData = {\n event,\n name,\n global: globalListener\n };\n handler(handlerData);\n lastCapturedEventType = event.type;\n lastCapturedEventTargetId = target ? target._sentryId : undefined;\n }\n\n // Start a new debounce timer that will prevent us from capturing multiple events that should be grouped together.\n clearTimeout(debounceTimerID);\n debounceTimerID = WINDOW.setTimeout(() => {\n lastCapturedEventTargetId = undefined;\n lastCapturedEventType = undefined;\n }, DEBOUNCE_DURATION);\n };\n}\nfunction getEventTarget(event) {\n try {\n return event.target;\n } catch (e) {\n // just accessing `target` property can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/sentry-javascript/issues/838\n return null;\n }\n}\nexport { addClickKeypressInstrumentationHandler, instrumentDOM };\n","import { addHandler, maybeInstrument, triggerHandlers, supportsHistory, fill } from '@sentry/core';\nimport { WINDOW } from '../types.js';\nlet lastHref;\n\n/**\n * Add an instrumentation handler for when a fetch request happens.\n * The handler function is called once when the request starts and once when it ends,\n * which can be identified by checking if it has an `endTimestamp`.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addHistoryInstrumentationHandler(handler) {\n const type = 'history';\n addHandler(type, handler);\n maybeInstrument(type, instrumentHistory);\n}\nfunction instrumentHistory() {\n // The `popstate` event may also be triggered on `pushState`, but it may not always reliably be emitted by the browser\n // Which is why we also monkey-patch methods below, in addition to this\n WINDOW.addEventListener('popstate', () => {\n const to = WINDOW.location.href;\n // keep track of the current URL state, as we always receive only the updated state\n const from = lastHref;\n lastHref = to;\n if (from === to) {\n return;\n }\n const handlerData = {\n from,\n to\n };\n triggerHandlers('history', handlerData);\n });\n\n // Just guard against this not being available, in weird environments\n if (!supportsHistory()) {\n return;\n }\n function historyReplacementFunction(originalHistoryFunction) {\n return function (...args) {\n const url = args.length > 2 ? args[2] : undefined;\n if (url) {\n // coerce to string (this is what pushState does)\n const from = lastHref;\n const to = String(url);\n // keep track of the current URL state, as we always receive only the updated state\n lastHref = to;\n if (from === to) {\n return;\n }\n const handlerData = {\n from,\n to\n };\n triggerHandlers('history', handlerData);\n }\n return originalHistoryFunction.apply(this, args);\n };\n }\n fill(WINDOW.history, 'pushState', historyReplacementFunction);\n fill(WINDOW.history, 'replaceState', historyReplacementFunction);\n}\nexport { addHistoryInstrumentationHandler };\n","import { isNativeFunction, logger } from '@sentry/core';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { WINDOW } from './types.js';\n\n/**\n * We generally want to use window.fetch / window.setTimeout.\n * However, in some cases this may be wrapped (e.g. by Zone.js for Angular),\n * so we try to get an unpatched version of this from a sandboxed iframe.\n */\n\nconst cachedImplementations = {};\n\n/**\n * Get the native implementation of a browser function.\n *\n * This can be used to ensure we get an unwrapped version of a function, in cases where a wrapped function can lead to problems.\n *\n * The following methods can be retrieved:\n * - `setTimeout`: This can be wrapped by e.g. Angular, causing change detection to be triggered.\n * - `fetch`: This can be wrapped by e.g. ad-blockers, causing an infinite loop when a request is blocked.\n */\nfunction getNativeImplementation(name) {\n const cached = cachedImplementations[name];\n if (cached) {\n return cached;\n }\n let impl = WINDOW[name];\n\n // Fast path to avoid DOM I/O\n if (isNativeFunction(impl)) {\n return cachedImplementations[name] = impl.bind(WINDOW);\n }\n const document = WINDOW.document;\n // eslint-disable-next-line deprecation/deprecation\n if (document && typeof document.createElement === 'function') {\n try {\n const sandbox = document.createElement('iframe');\n sandbox.hidden = true;\n document.head.appendChild(sandbox);\n const contentWindow = sandbox.contentWindow;\n if (contentWindow?.[name]) {\n impl = contentWindow[name];\n }\n document.head.removeChild(sandbox);\n } catch (e) {\n // Could not create sandbox iframe, just use window.xxx\n DEBUG_BUILD && logger.warn(`Could not create sandbox iframe for ${name} check, bailing to window.${name}: `, e);\n }\n }\n\n // Sanity check: This _should_ not happen, but if it does, we just skip caching...\n // This can happen e.g. in tests where fetch may not be available in the env, or similar.\n if (!impl) {\n return impl;\n }\n return cachedImplementations[name] = impl.bind(WINDOW);\n}\n\n/** Clear a cached implementation. */\nfunction clearCachedImplementation(name) {\n cachedImplementations[name] = undefined;\n}\n\n/**\n * A special usecase for incorrectly wrapped Fetch APIs in conjunction with ad-blockers.\n * Whenever someone wraps the Fetch API and returns the wrong promise chain,\n * this chain becomes orphaned and there is no possible way to capture it's rejections\n * other than allowing it bubble up to this very handler. eg.\n *\n * const f = window.fetch;\n * window.fetch = function () {\n * const p = f.apply(this, arguments);\n *\n * p.then(function() {\n * console.log('hi.');\n * });\n *\n * return p;\n * }\n *\n * `p.then(function () { ... })` is producing a completely separate promise chain,\n * however, what's returned is `p` - the result of original `fetch` call.\n *\n * This mean, that whenever we use the Fetch API to send our own requests, _and_\n * some ad-blocker blocks it, this orphaned chain will _always_ reject,\n * effectively causing another event to be captured.\n * This makes a whole process become an infinite loop, which we need to somehow\n * deal with, and break it in one way or another.\n *\n * To deal with this issue, we are making sure that we _always_ use the real\n * browser Fetch API, instead of relying on what `window.fetch` exposes.\n * The only downside to this would be missing our own requests as breadcrumbs,\n * but because we are already not doing this, it should be just fine.\n *\n * Possible failed fetch error messages per-browser:\n *\n * Chrome: Failed to fetch\n * Edge: Failed to Fetch\n * Firefox: NetworkError when attempting to fetch resource\n * Safari: resource blocked by content blocker\n */\nfunction fetch(...rest) {\n return getNativeImplementation('fetch')(...rest);\n}\n\n/**\n * Get an unwrapped `setTimeout` method.\n * This ensures that even if e.g. Angular wraps `setTimeout`, we get the native implementation,\n * avoiding triggering change detection.\n */\nfunction setTimeout(...rest) {\n return getNativeImplementation('setTimeout')(...rest);\n}\nexport { clearCachedImplementation, fetch, getNativeImplementation, setTimeout };\n","import { addHandler, maybeInstrument, timestampInSeconds, isString, triggerHandlers } from '@sentry/core';\nimport { WINDOW } from '../types.js';\nconst SENTRY_XHR_DATA_KEY = '__sentry_xhr_v3__';\n\n/**\n * Add an instrumentation handler for when an XHR request happens.\n * The handler function is called once when the request starts and once when it ends,\n * which can be identified by checking if it has an `endTimestamp`.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addXhrInstrumentationHandler(handler) {\n const type = 'xhr';\n addHandler(type, handler);\n maybeInstrument(type, instrumentXHR);\n}\n\n/** Exported only for tests. */\nfunction instrumentXHR() {\n if (!WINDOW.XMLHttpRequest) {\n return;\n }\n const xhrproto = XMLHttpRequest.prototype;\n\n // eslint-disable-next-line @typescript-eslint/unbound-method\n xhrproto.open = new Proxy(xhrproto.open, {\n apply(originalOpen, xhrOpenThisArg, xhrOpenArgArray) {\n // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n // it means the error, that was caused by your XHR call did not\n // have a stack trace. If you are using HttpClient integration,\n // this is the expected behavior, as we are using this virtual error to capture\n // the location of your XHR call, and group your HttpClient events accordingly.\n const virtualError = new Error();\n const startTimestamp = timestampInSeconds() * 1000;\n\n // open() should always be called with two or more arguments\n // But to be on the safe side, we actually validate this and bail out if we don't have a method & url\n const method = isString(xhrOpenArgArray[0]) ? xhrOpenArgArray[0].toUpperCase() : undefined;\n const url = parseUrl(xhrOpenArgArray[1]);\n if (!method || !url) {\n return originalOpen.apply(xhrOpenThisArg, xhrOpenArgArray);\n }\n xhrOpenThisArg[SENTRY_XHR_DATA_KEY] = {\n method,\n url,\n request_headers: {}\n };\n\n // if Sentry key appears in URL, don't capture it as a request\n if (method === 'POST' && url.match(/sentry_key/)) {\n xhrOpenThisArg.__sentry_own_request__ = true;\n }\n const onreadystatechangeHandler = () => {\n // For whatever reason, this is not the same instance here as from the outer method\n const xhrInfo = xhrOpenThisArg[SENTRY_XHR_DATA_KEY];\n if (!xhrInfo) {\n return;\n }\n if (xhrOpenThisArg.readyState === 4) {\n try {\n // touching statusCode in some platforms throws\n // an exception\n xhrInfo.status_code = xhrOpenThisArg.status;\n } catch (e) {\n /* do nothing */\n }\n const handlerData = {\n endTimestamp: timestampInSeconds() * 1000,\n startTimestamp,\n xhr: xhrOpenThisArg,\n virtualError\n };\n triggerHandlers('xhr', handlerData);\n }\n };\n if ('onreadystatechange' in xhrOpenThisArg && typeof xhrOpenThisArg.onreadystatechange === 'function') {\n xhrOpenThisArg.onreadystatechange = new Proxy(xhrOpenThisArg.onreadystatechange, {\n apply(originalOnreadystatechange, onreadystatechangeThisArg, onreadystatechangeArgArray) {\n onreadystatechangeHandler();\n return originalOnreadystatechange.apply(onreadystatechangeThisArg, onreadystatechangeArgArray);\n }\n });\n } else {\n xhrOpenThisArg.addEventListener('readystatechange', onreadystatechangeHandler);\n }\n\n // Intercepting `setRequestHeader` to access the request headers of XHR instance.\n // This will only work for user/library defined headers, not for the default/browser-assigned headers.\n // Request cookies are also unavailable for XHR, as `Cookie` header can't be defined by `setRequestHeader`.\n xhrOpenThisArg.setRequestHeader = new Proxy(xhrOpenThisArg.setRequestHeader, {\n apply(originalSetRequestHeader, setRequestHeaderThisArg, setRequestHeaderArgArray) {\n const [header, value] = setRequestHeaderArgArray;\n const xhrInfo = setRequestHeaderThisArg[SENTRY_XHR_DATA_KEY];\n if (xhrInfo && isString(header) && isString(value)) {\n xhrInfo.request_headers[header.toLowerCase()] = value;\n }\n return originalSetRequestHeader.apply(setRequestHeaderThisArg, setRequestHeaderArgArray);\n }\n });\n return originalOpen.apply(xhrOpenThisArg, xhrOpenArgArray);\n }\n });\n\n // eslint-disable-next-line @typescript-eslint/unbound-method\n xhrproto.send = new Proxy(xhrproto.send, {\n apply(originalSend, sendThisArg, sendArgArray) {\n const sentryXhrData = sendThisArg[SENTRY_XHR_DATA_KEY];\n if (!sentryXhrData) {\n return originalSend.apply(sendThisArg, sendArgArray);\n }\n if (sendArgArray[0] !== undefined) {\n sentryXhrData.body = sendArgArray[0];\n }\n const handlerData = {\n startTimestamp: timestampInSeconds() * 1000,\n xhr: sendThisArg\n };\n triggerHandlers('xhr', handlerData);\n return originalSend.apply(sendThisArg, sendArgArray);\n }\n });\n}\nfunction parseUrl(url) {\n if (isString(url)) {\n return url;\n }\n try {\n // url can be a string or URL\n // but since URL is not available in IE11, we do not check for it,\n // but simply assume it is an URL and return `toString()` from it (which returns the full URL)\n // If that fails, we just return undefined\n return url.toString();\n } catch {} // eslint-disable-line no-empty\n\n return undefined;\n}\nexport { SENTRY_XHR_DATA_KEY, addXhrInstrumentationHandler, instrumentXHR };\n","import { getNativeImplementation, clearCachedImplementation } from '@sentry-internal/browser-utils';\nimport { createTransport, rejectedSyncPromise } from '@sentry/core';\n\n/**\n * Creates a Transport that uses the Fetch API to send events to Sentry.\n */\nfunction makeFetchTransport(options, nativeFetch = getNativeImplementation('fetch')) {\n let pendingBodySize = 0;\n let pendingCount = 0;\n function makeRequest(request) {\n const requestSize = request.body.length;\n pendingBodySize += requestSize;\n pendingCount++;\n const requestOptions = {\n body: request.body,\n method: 'POST',\n referrerPolicy: 'strict-origin',\n headers: options.headers,\n // Outgoing requests are usually cancelled when navigating to a different page, causing a \"TypeError: Failed to\n // fetch\" error and sending a \"network_error\" client-outcome - in Chrome, the request status shows \"(cancelled)\".\n // The `keepalive` flag keeps outgoing requests alive, even when switching pages. We want this since we're\n // frequently sending events right before the user is switching pages (eg. when finishing navigation transactions).\n // Gotchas:\n // - `keepalive` isn't supported by Firefox\n // - As per spec (https://fetch.spec.whatwg.org/#http-network-or-cache-fetch):\n // If the sum of contentLength and inflightKeepaliveBytes is greater than 64 kibibytes, then return a network error.\n // We will therefore only activate the flag when we're below that limit.\n // There is also a limit of requests that can be open at the same time, so we also limit this to 15\n // See https://github.com/getsentry/sentry-javascript/pull/7553 for details\n keepalive: pendingBodySize <= 60000 && pendingCount < 15,\n ...options.fetchOptions\n };\n if (!nativeFetch) {\n clearCachedImplementation('fetch');\n return rejectedSyncPromise('No fetch implementation available');\n }\n try {\n // TODO: This may need a `suppressTracing` call in the future when we switch the browser SDK to OTEL\n return nativeFetch(options.url, requestOptions).then(response => {\n pendingBodySize -= requestSize;\n pendingCount--;\n return {\n statusCode: response.status,\n headers: {\n 'x-sentry-rate-limits': response.headers.get('X-Sentry-Rate-Limits'),\n 'retry-after': response.headers.get('Retry-After')\n }\n };\n });\n } catch (e) {\n clearCachedImplementation('fetch');\n pendingBodySize -= requestSize;\n pendingCount--;\n return rejectedSyncPromise(e);\n }\n }\n return createTransport(options, makeRequest);\n}\nexport { makeFetchTransport };\n","import { createStackParser, UNKNOWN_FUNCTION } from '@sentry/core';\n\n// This was originally forked from https://github.com/csnover/TraceKit, and was largely\n// re - written as part of raven - js.\n//\n// This code was later copied to the JavaScript mono - repo and further modified and\n// refactored over the years.\n\nconst OPERA10_PRIORITY = 10;\nconst OPERA11_PRIORITY = 20;\nconst CHROME_PRIORITY = 30;\nconst WINJS_PRIORITY = 40;\nconst GECKO_PRIORITY = 50;\nfunction createFrame(filename, func, lineno, colno) {\n const frame = {\n filename,\n function: func === '' ? UNKNOWN_FUNCTION : func,\n in_app: true // All browser frames are considered in_app\n };\n if (lineno !== undefined) {\n frame.lineno = lineno;\n }\n if (colno !== undefined) {\n frame.colno = colno;\n }\n return frame;\n}\n\n// This regex matches frames that have no function name (ie. are at the top level of a module).\n// For example \"at http://localhost:5000//script.js:1:126\"\n// Frames _with_ function names usually look as follows: \"at commitLayoutEffects (react-dom.development.js:23426:1)\"\nconst chromeRegexNoFnName = /^\\s*at (\\S+?)(?::(\\d+))(?::(\\d+))\\s*$/i;\n\n// This regex matches all the frames that have a function name.\nconst chromeRegex = /^\\s*at (?:(.+?\\)(?: \\[.+\\])?|.*?) ?\\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\\/)?.*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i;\nconst chromeEvalRegex = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/;\n\n// Chromium based browsers: Chrome, Brave, new Opera, new Edge\n// We cannot call this variable `chrome` because it can conflict with global `chrome` variable in certain environments\n// See: https://github.com/getsentry/sentry-javascript/issues/6880\nconst chromeStackParserFn = line => {\n // If the stack line has no function name, we need to parse it differently\n const noFnParts = chromeRegexNoFnName.exec(line);\n if (noFnParts) {\n const [, filename, line, col] = noFnParts;\n return createFrame(filename, UNKNOWN_FUNCTION, +line, +col);\n }\n const parts = chromeRegex.exec(line);\n if (parts) {\n const isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line\n\n if (isEval) {\n const subMatch = chromeEvalRegex.exec(parts[2]);\n if (subMatch) {\n // throw out eval line/column and use top-most line/column number\n parts[2] = subMatch[1]; // url\n parts[3] = subMatch[2]; // line\n parts[4] = subMatch[3]; // column\n }\n }\n\n // Kamil: One more hack won't hurt us right? Understanding and adding more rules on top of these regexps right now\n // would be way too time consuming. (TODO: Rewrite whole RegExp to be more readable)\n const [func, filename] = extractSafariExtensionDetails(parts[1] || UNKNOWN_FUNCTION, parts[2]);\n return createFrame(filename, func, parts[3] ? +parts[3] : undefined, parts[4] ? +parts[4] : undefined);\n }\n return;\n};\nconst chromeStackLineParser = [CHROME_PRIORITY, chromeStackParserFn];\n\n// gecko regex: `(?:bundle|\\d+\\.js)`: `bundle` is for react native, `\\d+\\.js` also but specifically for ram bundles because it\n// generates filenames without a prefix like `file://` the filenames in the stacktrace are just 42.js\n// We need this specific case for now because we want no other regex to match.\nconst geckoREgex = /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)?((?:[-a-z]+)?:\\/.*?|\\[native code\\]|[^@]*(?:bundle|\\d+\\.js)|\\/[\\w\\-. /=]+)(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nconst geckoEvalRegex = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\nconst gecko = line => {\n const parts = geckoREgex.exec(line);\n if (parts) {\n const isEval = parts[3] && parts[3].indexOf(' > eval') > -1;\n if (isEval) {\n const subMatch = geckoEvalRegex.exec(parts[3]);\n if (subMatch) {\n // throw out eval line/column and use top-most line number\n parts[1] = parts[1] || 'eval';\n parts[3] = subMatch[1];\n parts[4] = subMatch[2];\n parts[5] = ''; // no column when eval\n }\n }\n let filename = parts[3];\n let func = parts[1] || UNKNOWN_FUNCTION;\n [func, filename] = extractSafariExtensionDetails(func, filename);\n return createFrame(filename, func, parts[4] ? +parts[4] : undefined, parts[5] ? +parts[5] : undefined);\n }\n return;\n};\nconst geckoStackLineParser = [GECKO_PRIORITY, gecko];\nconst winjsRegex = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:[-a-z]+):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\nconst winjs = line => {\n const parts = winjsRegex.exec(line);\n return parts ? createFrame(parts[2], parts[1] || UNKNOWN_FUNCTION, +parts[3], parts[4] ? +parts[4] : undefined) : undefined;\n};\nconst winjsStackLineParser = [WINJS_PRIORITY, winjs];\nconst opera10Regex = / line (\\d+).*script (?:in )?(\\S+)(?:: in function (\\S+))?$/i;\nconst opera10 = line => {\n const parts = opera10Regex.exec(line);\n return parts ? createFrame(parts[2], parts[3] || UNKNOWN_FUNCTION, +parts[1]) : undefined;\n};\nconst opera10StackLineParser = [OPERA10_PRIORITY, opera10];\nconst opera11Regex = / line (\\d+), column (\\d+)\\s*(?:in (?:]+)>|([^)]+))\\(.*\\))? in (.*):\\s*$/i;\nconst opera11 = line => {\n const parts = opera11Regex.exec(line);\n return parts ? createFrame(parts[5], parts[3] || parts[4] || UNKNOWN_FUNCTION, +parts[1], +parts[2]) : undefined;\n};\nconst opera11StackLineParser = [OPERA11_PRIORITY, opera11];\nconst defaultStackLineParsers = [chromeStackLineParser, geckoStackLineParser];\nconst defaultStackParser = createStackParser(...defaultStackLineParsers);\n\n/**\n * Safari web extensions, starting version unknown, can produce \"frames-only\" stacktraces.\n * What it means, is that instead of format like:\n *\n * Error: wat\n * at function@url:row:col\n * at function@url:row:col\n * at function@url:row:col\n *\n * it produces something like:\n *\n * function@url:row:col\n * function@url:row:col\n * function@url:row:col\n *\n * Because of that, it won't be captured by `chrome` RegExp and will fall into `Gecko` branch.\n * This function is extracted so that we can use it in both places without duplicating the logic.\n * Unfortunately \"just\" changing RegExp is too complicated now and making it pass all tests\n * and fix this case seems like an impossible, or at least way too time-consuming task.\n */\nconst extractSafariExtensionDetails = (func, filename) => {\n const isSafariExtension = func.indexOf('safari-extension') !== -1;\n const isSafariWebExtension = func.indexOf('safari-web-extension') !== -1;\n return isSafariExtension || isSafariWebExtension ? [func.indexOf('@') !== -1 ? func.split('@')[0] : UNKNOWN_FUNCTION, isSafariExtension ? `safari-extension:${filename}` : `safari-web-extension:${filename}`] : [func, filename];\n};\nexport { chromeStackLineParser, defaultStackLineParsers, defaultStackParser, geckoStackLineParser, opera10StackLineParser, opera11StackLineParser, winjsStackLineParser };\n","/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nconst DEBUG_BUILD = typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__;\nexport { DEBUG_BUILD };\n","import { addClickKeypressInstrumentationHandler, addXhrInstrumentationHandler, addHistoryInstrumentationHandler, SENTRY_XHR_DATA_KEY } from '@sentry-internal/browser-utils';\nimport { defineIntegration, addConsoleInstrumentationHandler, addFetchInstrumentationHandler, getClient, addBreadcrumb, getEventDescription, logger, htmlTreeAsString, getComponentName, severityLevelFromString, safeJoin, getBreadcrumbLogLevelFromHttpStatusCode, parseUrl } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { WINDOW } from '../helpers.js';\n\n/* eslint-disable max-lines */\n\n/** maxStringLength gets capped to prevent 100 breadcrumbs exceeding 1MB event payload size */\nconst MAX_ALLOWED_STRING_LENGTH = 1024;\nconst INTEGRATION_NAME = 'Breadcrumbs';\nconst _breadcrumbsIntegration = (options = {}) => {\n const _options = {\n console: true,\n dom: true,\n fetch: true,\n history: true,\n sentry: true,\n xhr: true,\n ...options\n };\n return {\n name: INTEGRATION_NAME,\n setup(client) {\n if (_options.console) {\n addConsoleInstrumentationHandler(_getConsoleBreadcrumbHandler(client));\n }\n if (_options.dom) {\n addClickKeypressInstrumentationHandler(_getDomBreadcrumbHandler(client, _options.dom));\n }\n if (_options.xhr) {\n addXhrInstrumentationHandler(_getXhrBreadcrumbHandler(client));\n }\n if (_options.fetch) {\n addFetchInstrumentationHandler(_getFetchBreadcrumbHandler(client));\n }\n if (_options.history) {\n addHistoryInstrumentationHandler(_getHistoryBreadcrumbHandler(client));\n }\n if (_options.sentry) {\n client.on('beforeSendEvent', _getSentryBreadcrumbHandler(client));\n }\n }\n };\n};\nconst breadcrumbsIntegration = defineIntegration(_breadcrumbsIntegration);\n\n/**\n * Adds a breadcrumb for Sentry events or transactions if this option is enabled.\n */\nfunction _getSentryBreadcrumbHandler(client) {\n return function addSentryBreadcrumb(event) {\n if (getClient() !== client) {\n return;\n }\n addBreadcrumb({\n category: `sentry.${event.type === 'transaction' ? 'transaction' : 'event'}`,\n event_id: event.event_id,\n level: event.level,\n message: getEventDescription(event)\n }, {\n event\n });\n };\n}\n\n/**\n * A HOC that creates a function that creates breadcrumbs from DOM API calls.\n * This is a HOC so that we get access to dom options in the closure.\n */\nfunction _getDomBreadcrumbHandler(client, dom) {\n return function _innerDomBreadcrumb(handlerData) {\n if (getClient() !== client) {\n return;\n }\n let target;\n let componentName;\n let keyAttrs = typeof dom === 'object' ? dom.serializeAttribute : undefined;\n let maxStringLength = typeof dom === 'object' && typeof dom.maxStringLength === 'number' ? dom.maxStringLength : undefined;\n if (maxStringLength && maxStringLength > MAX_ALLOWED_STRING_LENGTH) {\n DEBUG_BUILD && logger.warn(`\\`dom.maxStringLength\\` cannot exceed ${MAX_ALLOWED_STRING_LENGTH}, but a value of ${maxStringLength} was configured. Sentry will use ${MAX_ALLOWED_STRING_LENGTH} instead.`);\n maxStringLength = MAX_ALLOWED_STRING_LENGTH;\n }\n if (typeof keyAttrs === 'string') {\n keyAttrs = [keyAttrs];\n }\n\n // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n try {\n const event = handlerData.event;\n const element = _isEvent(event) ? event.target : event;\n target = htmlTreeAsString(element, {\n keyAttrs,\n maxStringLength\n });\n componentName = getComponentName(element);\n } catch (e) {\n target = '';\n }\n if (target.length === 0) {\n return;\n }\n const breadcrumb = {\n category: `ui.${handlerData.name}`,\n message: target\n };\n if (componentName) {\n breadcrumb.data = {\n 'ui.component_name': componentName\n };\n }\n addBreadcrumb(breadcrumb, {\n event: handlerData.event,\n name: handlerData.name,\n global: handlerData.global\n });\n };\n}\n\n/**\n * Creates breadcrumbs from console API calls\n */\nfunction _getConsoleBreadcrumbHandler(client) {\n return function _consoleBreadcrumb(handlerData) {\n if (getClient() !== client) {\n return;\n }\n const breadcrumb = {\n category: 'console',\n data: {\n arguments: handlerData.args,\n logger: 'console'\n },\n level: severityLevelFromString(handlerData.level),\n message: safeJoin(handlerData.args, ' ')\n };\n if (handlerData.level === 'assert') {\n if (handlerData.args[0] === false) {\n breadcrumb.message = `Assertion failed: ${safeJoin(handlerData.args.slice(1), ' ') || 'console.assert'}`;\n breadcrumb.data.arguments = handlerData.args.slice(1);\n } else {\n // Don't capture a breadcrumb for passed assertions\n return;\n }\n }\n addBreadcrumb(breadcrumb, {\n input: handlerData.args,\n level: handlerData.level\n });\n };\n}\n\n/**\n * Creates breadcrumbs from XHR API calls\n */\nfunction _getXhrBreadcrumbHandler(client) {\n return function _xhrBreadcrumb(handlerData) {\n if (getClient() !== client) {\n return;\n }\n const {\n startTimestamp,\n endTimestamp\n } = handlerData;\n const sentryXhrData = handlerData.xhr[SENTRY_XHR_DATA_KEY];\n\n // We only capture complete, non-sentry requests\n if (!startTimestamp || !endTimestamp || !sentryXhrData) {\n return;\n }\n const {\n method,\n url,\n status_code,\n body\n } = sentryXhrData;\n const data = {\n method,\n url,\n status_code\n };\n const hint = {\n xhr: handlerData.xhr,\n input: body,\n startTimestamp,\n endTimestamp\n };\n const breadcrumb = {\n category: 'xhr',\n data,\n type: 'http',\n level: getBreadcrumbLogLevelFromHttpStatusCode(status_code)\n };\n client.emit('beforeOutgoingRequestBreadcrumb', breadcrumb, hint);\n addBreadcrumb(breadcrumb, hint);\n };\n}\n\n/**\n * Creates breadcrumbs from fetch API calls\n */\nfunction _getFetchBreadcrumbHandler(client) {\n return function _fetchBreadcrumb(handlerData) {\n if (getClient() !== client) {\n return;\n }\n const {\n startTimestamp,\n endTimestamp\n } = handlerData;\n\n // We only capture complete fetch requests\n if (!endTimestamp) {\n return;\n }\n if (handlerData.fetchData.url.match(/sentry_key/) && handlerData.fetchData.method === 'POST') {\n // We will not create breadcrumbs for fetch requests that contain `sentry_key` (internal sentry requests)\n return;\n }\n ({\n method: handlerData.fetchData.method,\n url: handlerData.fetchData.url\n });\n if (handlerData.error) {\n const data = handlerData.fetchData;\n const hint = {\n data: handlerData.error,\n input: handlerData.args,\n startTimestamp,\n endTimestamp\n };\n const breadcrumb = {\n category: 'fetch',\n data,\n level: 'error',\n type: 'http'\n };\n client.emit('beforeOutgoingRequestBreadcrumb', breadcrumb, hint);\n addBreadcrumb(breadcrumb, hint);\n } else {\n const response = handlerData.response;\n const data = {\n ...handlerData.fetchData,\n status_code: response?.status\n };\n handlerData.fetchData.request_body_size;\n handlerData.fetchData.response_body_size;\n response?.status;\n const hint = {\n input: handlerData.args,\n response,\n startTimestamp,\n endTimestamp\n };\n const breadcrumb = {\n category: 'fetch',\n data,\n type: 'http',\n level: getBreadcrumbLogLevelFromHttpStatusCode(data.status_code)\n };\n client.emit('beforeOutgoingRequestBreadcrumb', breadcrumb, hint);\n addBreadcrumb(breadcrumb, hint);\n }\n };\n}\n\n/**\n * Creates breadcrumbs from history API calls\n */\nfunction _getHistoryBreadcrumbHandler(client) {\n return function _historyBreadcrumb(handlerData) {\n if (getClient() !== client) {\n return;\n }\n let from = handlerData.from;\n let to = handlerData.to;\n const parsedLoc = parseUrl(WINDOW.location.href);\n let parsedFrom = from ? parseUrl(from) : undefined;\n const parsedTo = parseUrl(to);\n\n // Initial pushState doesn't provide `from` information\n if (!parsedFrom?.path) {\n parsedFrom = parsedLoc;\n }\n\n // Use only the path component of the URL if the URL matches the current\n // document (almost all the time when using pushState)\n if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) {\n to = parsedTo.relative;\n }\n if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) {\n from = parsedFrom.relative;\n }\n addBreadcrumb({\n category: 'navigation',\n data: {\n from,\n to\n }\n });\n };\n}\nfunction _isEvent(event) {\n return !!event && !!event.target;\n}\nexport { breadcrumbsIntegration };\n","import { defineIntegration, fill, getFunctionName, getOriginalFunction } from '@sentry/core';\nimport { WINDOW, wrap } from '../helpers.js';\nconst DEFAULT_EVENT_TARGET = ['EventTarget', 'Window', 'Node', 'ApplicationCache', 'AudioTrackList', 'BroadcastChannel', 'ChannelMergerNode', 'CryptoOperation', 'EventSource', 'FileReader', 'HTMLUnknownElement', 'IDBDatabase', 'IDBRequest', 'IDBTransaction', 'KeyOperation', 'MediaController', 'MessagePort', 'ModalWindow', 'Notification', 'SVGElementInstance', 'Screen', 'SharedWorker', 'TextTrack', 'TextTrackCue', 'TextTrackList', 'WebSocket', 'WebSocketWorker', 'Worker', 'XMLHttpRequest', 'XMLHttpRequestEventTarget', 'XMLHttpRequestUpload'];\nconst INTEGRATION_NAME = 'BrowserApiErrors';\nconst _browserApiErrorsIntegration = (options = {}) => {\n const _options = {\n XMLHttpRequest: true,\n eventTarget: true,\n requestAnimationFrame: true,\n setInterval: true,\n setTimeout: true,\n ...options\n };\n return {\n name: INTEGRATION_NAME,\n // TODO: This currently only works for the first client this is setup\n // We may want to adjust this to check for client etc.\n setupOnce() {\n if (_options.setTimeout) {\n fill(WINDOW, 'setTimeout', _wrapTimeFunction);\n }\n if (_options.setInterval) {\n fill(WINDOW, 'setInterval', _wrapTimeFunction);\n }\n if (_options.requestAnimationFrame) {\n fill(WINDOW, 'requestAnimationFrame', _wrapRAF);\n }\n if (_options.XMLHttpRequest && 'XMLHttpRequest' in WINDOW) {\n fill(XMLHttpRequest.prototype, 'send', _wrapXHR);\n }\n const eventTargetOption = _options.eventTarget;\n if (eventTargetOption) {\n const eventTarget = Array.isArray(eventTargetOption) ? eventTargetOption : DEFAULT_EVENT_TARGET;\n eventTarget.forEach(_wrapEventTarget);\n }\n }\n };\n};\n\n/**\n * Wrap timer functions and event targets to catch errors and provide better meta data.\n */\nconst browserApiErrorsIntegration = defineIntegration(_browserApiErrorsIntegration);\nfunction _wrapTimeFunction(original) {\n return function (...args) {\n const originalCallback = args[0];\n args[0] = wrap(originalCallback, {\n mechanism: {\n data: {\n function: getFunctionName(original)\n },\n handled: false,\n type: 'instrument'\n }\n });\n return original.apply(this, args);\n };\n}\nfunction _wrapRAF(original) {\n return function (callback) {\n return original.apply(this, [wrap(callback, {\n mechanism: {\n data: {\n function: 'requestAnimationFrame',\n handler: getFunctionName(original)\n },\n handled: false,\n type: 'instrument'\n }\n })]);\n };\n}\nfunction _wrapXHR(originalSend) {\n return function (...args) {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const xhr = this;\n const xmlHttpRequestProps = ['onload', 'onerror', 'onprogress', 'onreadystatechange'];\n xmlHttpRequestProps.forEach(prop => {\n if (prop in xhr && typeof xhr[prop] === 'function') {\n fill(xhr, prop, function (original) {\n const wrapOptions = {\n mechanism: {\n data: {\n function: prop,\n handler: getFunctionName(original)\n },\n handled: false,\n type: 'instrument'\n }\n };\n\n // If Instrument integration has been called before BrowserApiErrors, get the name of original function\n const originalFunction = getOriginalFunction(original);\n if (originalFunction) {\n wrapOptions.mechanism.data.handler = getFunctionName(originalFunction);\n }\n\n // Otherwise wrap directly\n return wrap(original, wrapOptions);\n });\n }\n });\n return originalSend.apply(this, args);\n };\n}\nfunction _wrapEventTarget(target) {\n const globalObject = WINDOW;\n const proto = globalObject[target]?.prototype;\n\n // eslint-disable-next-line no-prototype-builtins\n if (!proto?.hasOwnProperty?.('addEventListener')) {\n return;\n }\n fill(proto, 'addEventListener', function (original) {\n return function (eventName, fn, options) {\n try {\n if (isEventListenerObject(fn)) {\n // ESlint disable explanation:\n // First, it is generally safe to call `wrap` with an unbound function. Furthermore, using `.bind()` would\n // introduce a bug here, because bind returns a new function that doesn't have our\n // flags(like __sentry_original__) attached. `wrap` checks for those flags to avoid unnecessary wrapping.\n // Without those flags, every call to addEventListener wraps the function again, causing a memory leak.\n // eslint-disable-next-line @typescript-eslint/unbound-method\n fn.handleEvent = wrap(fn.handleEvent, {\n mechanism: {\n data: {\n function: 'handleEvent',\n handler: getFunctionName(fn),\n target\n },\n handled: false,\n type: 'instrument'\n }\n });\n }\n } catch {\n // can sometimes get 'Permission denied to access property \"handle Event'\n }\n return original.apply(this, [eventName, wrap(fn, {\n mechanism: {\n data: {\n function: 'addEventListener',\n handler: getFunctionName(fn),\n target\n },\n handled: false,\n type: 'instrument'\n }\n }), options]);\n };\n });\n fill(proto, 'removeEventListener', function (originalRemoveEventListener) {\n return function (eventName, fn, options) {\n /**\n * There are 2 possible scenarios here:\n *\n * 1. Someone passes a callback, which was attached prior to Sentry initialization, or by using unmodified\n * method, eg. `document.addEventListener.call(el, name, handler). In this case, we treat this function\n * as a pass-through, and call original `removeEventListener` with it.\n *\n * 2. Someone passes a callback, which was attached after Sentry was initialized, which means that it was using\n * our wrapped version of `addEventListener`, which internally calls `wrap` helper.\n * This helper \"wraps\" whole callback inside a try/catch statement, and attached appropriate metadata to it,\n * in order for us to make a distinction between wrapped/non-wrapped functions possible.\n * If a function was wrapped, it has additional property of `__sentry_wrapped__`, holding the handler.\n *\n * When someone adds a handler prior to initialization, and then do it again, but after,\n * then we have to detach both of them. Otherwise, if we'd detach only wrapped one, it'd be impossible\n * to get rid of the initial handler and it'd stick there forever.\n */\n try {\n const originalEventHandler = fn.__sentry_wrapped__;\n if (originalEventHandler) {\n originalRemoveEventListener.call(this, eventName, originalEventHandler, options);\n }\n } catch (e) {\n // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments\n }\n return originalRemoveEventListener.call(this, eventName, fn, options);\n };\n });\n}\nfunction isEventListenerObject(obj) {\n return typeof obj.handleEvent === 'function';\n}\nexport { browserApiErrorsIntegration };\n","import { addHistoryInstrumentationHandler } from '@sentry-internal/browser-utils';\nimport { defineIntegration, logger, startSession, captureSession } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { WINDOW } from '../helpers.js';\n\n/**\n * When added, automatically creates sessions which allow you to track adoption and crashes (crash free rate) in your Releases in Sentry.\n * More information: https://docs.sentry.io/product/releases/health/\n *\n * Note: In order for session tracking to work, you need to set up Releases: https://docs.sentry.io/product/releases/\n */\nconst browserSessionIntegration = defineIntegration(() => {\n return {\n name: 'BrowserSession',\n setupOnce() {\n if (typeof WINDOW.document === 'undefined') {\n DEBUG_BUILD && logger.warn('Using the `browserSessionIntegration` in non-browser environments is not supported.');\n return;\n }\n\n // The session duration for browser sessions does not track a meaningful\n // concept that can be used as a metric.\n // Automatically captured sessions are akin to page views, and thus we\n // discard their duration.\n startSession({\n ignoreDuration: true\n });\n captureSession();\n\n // We want to create a session for every navigation as well\n addHistoryInstrumentationHandler(({\n from,\n to\n }) => {\n // Don't create an additional session for the initial route or if the location did not change\n if (from !== undefined && from !== to) {\n startSession({\n ignoreDuration: true\n });\n captureSession();\n }\n });\n }\n };\n});\nexport { browserSessionIntegration };\n","import { defineIntegration, addGlobalErrorInstrumentationHandler, getClient, captureEvent, addGlobalUnhandledRejectionInstrumentationHandler, isPrimitive, isString, getLocationHref, UNKNOWN_FUNCTION, logger } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { eventFromUnknownInput } from '../eventbuilder.js';\nimport { shouldIgnoreOnError } from '../helpers.js';\nconst INTEGRATION_NAME = 'GlobalHandlers';\nconst _globalHandlersIntegration = (options = {}) => {\n const _options = {\n onerror: true,\n onunhandledrejection: true,\n ...options\n };\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n Error.stackTraceLimit = 50;\n },\n setup(client) {\n if (_options.onerror) {\n _installGlobalOnErrorHandler(client);\n globalHandlerLog('onerror');\n }\n if (_options.onunhandledrejection) {\n _installGlobalOnUnhandledRejectionHandler(client);\n globalHandlerLog('onunhandledrejection');\n }\n }\n };\n};\nconst globalHandlersIntegration = defineIntegration(_globalHandlersIntegration);\nfunction _installGlobalOnErrorHandler(client) {\n addGlobalErrorInstrumentationHandler(data => {\n const {\n stackParser,\n attachStacktrace\n } = getOptions();\n if (getClient() !== client || shouldIgnoreOnError()) {\n return;\n }\n const {\n msg,\n url,\n line,\n column,\n error\n } = data;\n const event = _enhanceEventWithInitialFrame(eventFromUnknownInput(stackParser, error || msg, undefined, attachStacktrace, false), url, line, column);\n event.level = 'error';\n captureEvent(event, {\n originalException: error,\n mechanism: {\n handled: false,\n type: 'onerror'\n }\n });\n });\n}\nfunction _installGlobalOnUnhandledRejectionHandler(client) {\n addGlobalUnhandledRejectionInstrumentationHandler(e => {\n const {\n stackParser,\n attachStacktrace\n } = getOptions();\n if (getClient() !== client || shouldIgnoreOnError()) {\n return;\n }\n const error = _getUnhandledRejectionError(e);\n const event = isPrimitive(error) ? _eventFromRejectionWithPrimitive(error) : eventFromUnknownInput(stackParser, error, undefined, attachStacktrace, true);\n event.level = 'error';\n captureEvent(event, {\n originalException: error,\n mechanism: {\n handled: false,\n type: 'onunhandledrejection'\n }\n });\n });\n}\nfunction _getUnhandledRejectionError(error) {\n if (isPrimitive(error)) {\n return error;\n }\n\n // dig the object of the rejection out of known event types\n try {\n // PromiseRejectionEvents store the object of the rejection under 'reason'\n // see https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent\n if ('reason' in error) {\n return error.reason;\n }\n\n // something, somewhere, (likely a browser extension) effectively casts PromiseRejectionEvents\n // to CustomEvents, moving the `promise` and `reason` attributes of the PRE into\n // the CustomEvent's `detail` attribute, since they're not part of CustomEvent's spec\n // see https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent and\n // https://github.com/getsentry/sentry-javascript/issues/2380\n if ('detail' in error && 'reason' in error.detail) {\n return error.detail.reason;\n }\n } catch {} // eslint-disable-line no-empty\n\n return error;\n}\n\n/**\n * Create an event from a promise rejection where the `reason` is a primitive.\n *\n * @param reason: The `reason` property of the promise rejection\n * @returns An Event object with an appropriate `exception` value\n */\nfunction _eventFromRejectionWithPrimitive(reason) {\n return {\n exception: {\n values: [{\n type: 'UnhandledRejection',\n // String() is needed because the Primitive type includes symbols (which can't be automatically stringified)\n value: `Non-Error promise rejection captured with value: ${String(reason)}`\n }]\n }\n };\n}\nfunction _enhanceEventWithInitialFrame(event, url, line, column) {\n // event.exception\n const e = event.exception = event.exception || {};\n // event.exception.values\n const ev = e.values = e.values || [];\n // event.exception.values[0]\n const ev0 = ev[0] = ev[0] || {};\n // event.exception.values[0].stacktrace\n const ev0s = ev0.stacktrace = ev0.stacktrace || {};\n // event.exception.values[0].stacktrace.frames\n const ev0sf = ev0s.frames = ev0s.frames || [];\n const colno = column;\n const lineno = line;\n const filename = isString(url) && url.length > 0 ? url : getLocationHref();\n\n // event.exception.values[0].stacktrace.frames\n if (ev0sf.length === 0) {\n ev0sf.push({\n colno,\n filename,\n function: UNKNOWN_FUNCTION,\n in_app: true,\n lineno\n });\n }\n return event;\n}\nfunction globalHandlerLog(type) {\n DEBUG_BUILD && logger.log(`Global Handler attached: ${type}`);\n}\nfunction getOptions() {\n const client = getClient();\n const options = client?.getOptions() || {\n stackParser: () => [],\n attachStacktrace: false\n };\n return options;\n}\nexport { globalHandlersIntegration };\n","import { defineIntegration, getLocationHref } from '@sentry/core';\nimport { WINDOW } from '../helpers.js';\n\n/**\n * Collects information about HTTP request headers and\n * attaches them to the event.\n */\nconst httpContextIntegration = defineIntegration(() => {\n return {\n name: 'HttpContext',\n preprocessEvent(event) {\n // if none of the information we want exists, don't bother\n if (!WINDOW.navigator && !WINDOW.location && !WINDOW.document) {\n return;\n }\n\n // grab as much info as exists and add it to the event\n const url = event.request?.url || getLocationHref();\n const {\n referrer\n } = WINDOW.document || {};\n const {\n userAgent\n } = WINDOW.navigator || {};\n const headers = {\n ...event.request?.headers,\n ...(referrer && {\n Referer: referrer\n }),\n ...(userAgent && {\n 'User-Agent': userAgent\n })\n };\n const request = {\n ...event.request,\n ...(url && {\n url\n }),\n headers\n };\n event.request = request;\n }\n };\n});\nexport { httpContextIntegration };\n","import { defineIntegration, applyAggregateErrorsToEvent } from '@sentry/core';\nimport { exceptionFromError } from '../eventbuilder.js';\nconst DEFAULT_KEY = 'cause';\nconst DEFAULT_LIMIT = 5;\nconst INTEGRATION_NAME = 'LinkedErrors';\nconst _linkedErrorsIntegration = (options = {}) => {\n const limit = options.limit || DEFAULT_LIMIT;\n const key = options.key || DEFAULT_KEY;\n return {\n name: INTEGRATION_NAME,\n preprocessEvent(event, hint, client) {\n const options = client.getOptions();\n applyAggregateErrorsToEvent(\n // This differs from the LinkedErrors integration in core by using a different exceptionFromError function\n exceptionFromError, options.stackParser, options.maxValueLength, key, limit, event, hint);\n }\n };\n};\n\n/**\n * Aggregrate linked errors in an event.\n */\nconst linkedErrorsIntegration = defineIntegration(_linkedErrorsIntegration);\nexport { linkedErrorsIntegration };\n","import { inboundFiltersIntegration, functionToStringIntegration, dedupeIntegration, consoleSandbox, supportsFetch, logger, stackParserFromStackParserOptions, getIntegrationsToSetup, initAndBind, getCurrentScope, lastEventId, getReportDialogEndpoint, getLocationHref } from '@sentry/core';\nimport { BrowserClient } from './client.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { WINDOW } from './helpers.js';\nimport { breadcrumbsIntegration } from './integrations/breadcrumbs.js';\nimport { browserApiErrorsIntegration } from './integrations/browserapierrors.js';\nimport { browserSessionIntegration } from './integrations/browsersession.js';\nimport { globalHandlersIntegration } from './integrations/globalhandlers.js';\nimport { httpContextIntegration } from './integrations/httpcontext.js';\nimport { linkedErrorsIntegration } from './integrations/linkederrors.js';\nimport { defaultStackParser } from './stack-parsers.js';\nimport { makeFetchTransport } from './transports/fetch.js';\n\n/** Get the default integrations for the browser SDK. */\nfunction getDefaultIntegrations(_options) {\n /**\n * Note: Please make sure this stays in sync with Angular SDK, which re-exports\n * `getDefaultIntegrations` but with an adjusted set of integrations.\n */\n return [\n // TODO(v10): Replace with `eventFiltersIntegration` once we remove the deprecated `inboundFiltersIntegration`\n // eslint-disable-next-line deprecation/deprecation\n inboundFiltersIntegration(), functionToStringIntegration(), browserApiErrorsIntegration(), breadcrumbsIntegration(), globalHandlersIntegration(), linkedErrorsIntegration(), dedupeIntegration(), httpContextIntegration(), browserSessionIntegration()];\n}\n\n/** Exported only for tests. */\nfunction applyDefaultOptions(optionsArg = {}) {\n const defaultOptions = {\n defaultIntegrations: getDefaultIntegrations(),\n release: typeof __SENTRY_RELEASE__ === 'string' // This allows build tooling to find-and-replace __SENTRY_RELEASE__ to inject a release value\n ? __SENTRY_RELEASE__ : WINDOW.SENTRY_RELEASE?.id,\n // This supports the variable that sentry-webpack-plugin injects\n sendClientReports: true\n };\n return {\n ...defaultOptions,\n ...dropTopLevelUndefinedKeys(optionsArg)\n };\n}\n\n/**\n * In contrast to the regular `dropUndefinedKeys` method,\n * this one does not deep-drop keys, but only on the top level.\n */\nfunction dropTopLevelUndefinedKeys(obj) {\n const mutatetedObj = {};\n for (const k of Object.getOwnPropertyNames(obj)) {\n const key = k;\n if (obj[key] !== undefined) {\n mutatetedObj[key] = obj[key];\n }\n }\n return mutatetedObj;\n}\nfunction shouldShowBrowserExtensionError() {\n const windowWithMaybeExtension = typeof WINDOW.window !== 'undefined' && WINDOW;\n if (!windowWithMaybeExtension) {\n // No need to show the error if we're not in a browser window environment (e.g. service workers)\n return false;\n }\n const extensionKey = windowWithMaybeExtension.chrome ? 'chrome' : 'browser';\n const extensionObject = windowWithMaybeExtension[extensionKey];\n const runtimeId = extensionObject?.runtime?.id;\n const href = getLocationHref() || '';\n const extensionProtocols = ['chrome-extension:', 'moz-extension:', 'ms-browser-extension:', 'safari-web-extension:'];\n\n // Running the SDK in a dedicated extension page and calling Sentry.init is fine; no risk of data leakage\n const isDedicatedExtensionPage = !!runtimeId && WINDOW === WINDOW.top && extensionProtocols.some(protocol => href.startsWith(`${protocol}//`));\n\n // Running the SDK in NW.js, which appears like a browser extension but isn't, is also fine\n // see: https://github.com/getsentry/sentry-javascript/issues/12668\n const isNWjs = typeof windowWithMaybeExtension.nw !== 'undefined';\n return !!runtimeId && !isDedicatedExtensionPage && !isNWjs;\n}\n\n/**\n * A magic string that build tooling can leverage in order to inject a release value into the SDK.\n */\n\n/**\n * The Sentry Browser SDK Client.\n *\n * To use this SDK, call the {@link init} function as early as possible when\n * loading the web page. To set context information or send manual events, use\n * the provided methods.\n *\n * @example\n *\n * ```\n *\n * import { init } from '@sentry/browser';\n *\n * init({\n * dsn: '__DSN__',\n * // ...\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { addBreadcrumb } from '@sentry/browser';\n * addBreadcrumb({\n * message: 'My Breadcrumb',\n * // ...\n * });\n * ```\n *\n * @example\n *\n * ```\n *\n * import * as Sentry from '@sentry/browser';\n * Sentry.captureMessage('Hello, world!');\n * Sentry.captureException(new Error('Good bye'));\n * Sentry.captureEvent({\n * message: 'Manual',\n * stacktrace: [\n * // ...\n * ],\n * });\n * ```\n *\n * @see {@link BrowserOptions} for documentation on configuration options.\n */\nfunction init(browserOptions = {}) {\n const options = applyDefaultOptions(browserOptions);\n if (!options.skipBrowserExtensionCheck && shouldShowBrowserExtensionError()) {\n if (DEBUG_BUILD) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.error('[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/');\n });\n }\n return;\n }\n if (DEBUG_BUILD && !supportsFetch()) {\n logger.warn('No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill.');\n }\n const clientOptions = {\n ...options,\n stackParser: stackParserFromStackParserOptions(options.stackParser || defaultStackParser),\n integrations: getIntegrationsToSetup(options),\n transport: options.transport || makeFetchTransport\n };\n return initAndBind(BrowserClient, clientOptions);\n}\n\n/**\n * Present the user with a report dialog.\n *\n * @param options Everything is optional, we try to fetch all info need from the global scope.\n */\nfunction showReportDialog(options = {}) {\n // doesn't work without a document (React Native)\n if (!WINDOW.document) {\n DEBUG_BUILD && logger.error('Global document not defined in showReportDialog call');\n return;\n }\n const scope = getCurrentScope();\n const client = scope.getClient();\n const dsn = client?.getDsn();\n if (!dsn) {\n DEBUG_BUILD && logger.error('DSN not configured for showReportDialog call');\n return;\n }\n if (scope) {\n options.user = {\n ...scope.getUser(),\n ...options.user\n };\n }\n if (!options.eventId) {\n const eventId = lastEventId();\n if (eventId) {\n options.eventId = eventId;\n }\n }\n const script = WINDOW.document.createElement('script');\n script.async = true;\n script.crossOrigin = 'anonymous';\n script.src = getReportDialogEndpoint(dsn, options);\n if (options.onLoad) {\n script.onload = options.onLoad;\n }\n const {\n onClose\n } = options;\n if (onClose) {\n const reportDialogClosedMessageHandler = event => {\n if (event.data === '__sentry_reportdialog_closed__') {\n try {\n onClose();\n } finally {\n WINDOW.removeEventListener('message', reportDialogClosedMessageHandler);\n }\n }\n };\n WINDOW.addEventListener('message', reportDialogClosedMessageHandler);\n }\n const injectionPoint = WINDOW.document.head || WINDOW.document.body;\n if (injectionPoint) {\n injectionPoint.appendChild(script);\n } else {\n DEBUG_BUILD && logger.error('Not injecting report dialog. No injection point found in HTML');\n }\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nfunction forceLoad() {\n // Noop\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nfunction onLoad(callback) {\n callback();\n}\nexport { applyDefaultOptions, forceLoad, getDefaultIntegrations, init, onLoad, showReportDialog };\n","import * as Sentry from '@sentry/browser';\nimport { breadcrumbsIntegration, globalHandlersIntegration, linkedErrorsIntegration, httpContextIntegration, browserSessionIntegration, init as init$1, setContext, browserTracingIntegration as browserTracingIntegration$1, spanToJSON, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, getClient, startBrowserTracingNavigationSpan, startInactiveSpan, getCurrentScope, getActiveSpan, getRootSpan } from '@sentry/browser';\nexport * from '@sentry/browser';\nimport * as i0 from '@angular/core';\nimport { VERSION, Injectable, Inject, Directive, Input, NgModule } from '@angular/core';\nimport { inboundFiltersIntegration, functionToStringIntegration, dedupeIntegration, applySdkMetadata, logger, isString, consoleSandbox, stripUrlQueryAndFragment, timestampInSeconds } from '@sentry/core';\nimport { HttpErrorResponse } from '@angular/common/http';\nimport * as i1 from '@angular/router';\nimport { NavigationStart, ResolveEnd, NavigationEnd, NavigationCancel, NavigationError } from '@angular/router';\nimport { Subscription } from 'rxjs';\nimport { filter, tap } from 'rxjs/operators';\n\n/*\n * This file defines flags and constants that can be modified during compile time in order to facilitate tree shaking\n * for users.\n *\n * We define \"magic strings\" like `__SENTRY_DEBUG__` that may get replaced with actual values during our, or the user's\n * build process. Take care when introducing new flags - they must not throw if they are not replaced. See the Debug\n * Build Flags section in CONTRIBUTING.md.\n */\n/** Flag that is true for debug builds, false otherwise. */\nconst IS_DEBUG_BUILD = typeof __SENTRY_DEBUG__ === 'undefined' ? true : __SENTRY_DEBUG__;\n\n/**\n * Get the default integrations for the Angular SDK.\n */\nfunction getDefaultIntegrations(_options = {}) {\n // Don't include the BrowserApiErrors integration as it interferes with the Angular SDK's `ErrorHandler`:\n // BrowserApiErrors would catch certain errors before they reach the `ErrorHandler` and\n // thus provide a lower fidelity error than what `SentryErrorHandler`\n // (see errorhandler.ts) would provide.\n //\n // see:\n // - https://github.com/getsentry/sentry-javascript/issues/5417#issuecomment-1453407097\n // - https://github.com/getsentry/sentry-javascript/issues/2744\n return [\n // TODO(v10): Replace with `eventFiltersIntegration` once we remove the deprecated `inboundFiltersIntegration`\n // eslint-disable-next-line deprecation/deprecation\n inboundFiltersIntegration(), functionToStringIntegration(), breadcrumbsIntegration(), globalHandlersIntegration(), linkedErrorsIntegration(), dedupeIntegration(), httpContextIntegration(), browserSessionIntegration()];\n}\n/**\n * Inits the Angular SDK\n */\nfunction init(options) {\n const opts = {\n defaultIntegrations: getDefaultIntegrations(),\n ...options\n };\n applySdkMetadata(opts, 'angular');\n checkAndSetAngularVersion();\n return init$1(opts);\n}\nfunction checkAndSetAngularVersion() {\n const ANGULAR_MINIMUM_VERSION = 14;\n const angularVersion = VERSION?.major && parseInt(VERSION.major, 10);\n if (angularVersion) {\n if (angularVersion < ANGULAR_MINIMUM_VERSION) {\n IS_DEBUG_BUILD && logger.warn(`This Sentry SDK does not officially support Angular ${angularVersion}.`, `This SDK only supports Angular ${ANGULAR_MINIMUM_VERSION} and above.`, \"If you're using lower Angular versions, check the Angular Version Compatibility table in our docs: https://docs.sentry.io/platforms/javascript/guides/angular/#angular-version-compatibility.\", 'Otherwise, please consider upgrading your Angular version.');\n }\n setContext('angular', {\n version: angularVersion\n });\n }\n}\n\n// In Angular 17 and future versions, zoneless support is forthcoming.\n// Therefore, it's advisable to safely check whether the `run` function is\n// available in the `` context.\n// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\nconst isNgZoneEnabled = typeof Zone !== 'undefined' && Zone.root?.run;\n/**\n * The function that does the same job as `NgZone.runOutsideAngular`.\n *\n * ⚠️ Note: All of the Sentry functionality called from inside the Angular\n * execution context must be wrapped in this function. Angular's rendering\n * relies on asynchronous tasks being scheduled within its execution context.\n * Since Sentry schedules tasks that do not interact with Angular's rendering,\n * it may prevent Angular from functioning reliably. Consequently, it may disrupt\n * processes such as server-side rendering or client-side hydration.\n */\nfunction runOutsideAngular(callback) {\n // Running the `callback` within the root execution context enables Angular\n // processes (such as SSR and hydration) to continue functioning normally without\n // timeouts and delays that could affect the user experience. This approach is\n // necessary because some of the Sentry functionality continues to run in the background.\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return isNgZoneEnabled ? Zone.root.run(callback) : callback();\n}\n\n// https://github.com/angular/angular/blob/master/packages/core/src/util/errors.ts\nfunction tryToUnwrapZonejsError(error) {\n // TODO: once Angular14 is the minimum requirement ERROR_ORIGINAL_ERROR and\n // getOriginalError from error.ts can be used directly.\n return error && error.ngOriginalError ? error.ngOriginalError : error;\n}\nfunction extractHttpModuleError(error) {\n // The `error` property of http exception can be either an `Error` object, which we can use directly...\n if (isErrorOrErrorLikeObject(error.error)) {\n return error.error;\n }\n // ... or an`ErrorEvent`, which can provide us with the message but no stack...\n // guarding `ErrorEvent` against `undefined` as it's not defined in Node environments\n if (typeof ErrorEvent !== 'undefined' && error.error instanceof ErrorEvent && error.error.message) {\n return error.error.message;\n }\n // ...or the request body itself, which we can use as a message instead.\n if (typeof error.error === 'string') {\n return `Server returned code ${error.status} with body \"${error.error}\"`;\n }\n // If we don't have any detailed information, fallback to the request message itself.\n return error.message;\n}\nfunction isErrorOrErrorLikeObject(value) {\n if (value instanceof Error) {\n return true;\n }\n if (value === null || typeof value !== 'object') {\n return false;\n }\n const candidate = value;\n return isString(candidate.name) && isString(candidate.message) && (undefined === candidate.stack || isString(candidate.stack));\n}\n/**\n * Implementation of Angular's ErrorHandler provider that can be used as a drop-in replacement for the stock one.\n */\nlet SentryErrorHandler = /*#__PURE__*/(() => {\n class SentryErrorHandler {\n constructor(options) {\n this._options = {\n logErrors: true,\n ...options\n };\n }\n /**\n * Method executed when the injector is destroyed.\n */\n ngOnDestroy() {\n if (this._removeAfterSendEventListener) {\n this._removeAfterSendEventListener();\n }\n }\n /**\n * Method called for every value captured through the ErrorHandler\n */\n handleError(error) {\n const extractedError = this._extractError(error) || 'Handled unknown error';\n // Capture handled exception and send it to Sentry.\n const eventId = runOutsideAngular(() => Sentry.captureException(extractedError, {\n mechanism: {\n type: 'angular',\n handled: false\n }\n }));\n // When in development mode, log the error to console for immediate feedback.\n if (this._options.logErrors) {\n // eslint-disable-next-line no-console\n consoleSandbox(() => console.error(extractedError));\n }\n // Optionally show user dialog to provide details on what happened.\n if (this._options.showDialog) {\n const client = Sentry.getClient();\n if (client && !this._removeAfterSendEventListener) {\n this._removeAfterSendEventListener = client.on('afterSendEvent', event => {\n if (!event.type && event.event_id) {\n runOutsideAngular(() => {\n Sentry.showReportDialog({\n ...this._options.dialogOptions,\n eventId: event.event_id\n });\n });\n }\n });\n } else if (!client) {\n runOutsideAngular(() => {\n Sentry.showReportDialog({\n ...this._options.dialogOptions,\n eventId\n });\n });\n }\n }\n }\n /**\n * Used to pull a desired value that will be used to capture an event out of the raw value captured by ErrorHandler.\n */\n _extractError(error) {\n // Allow custom overrides of extracting function\n if (this._options.extractor) {\n const defaultExtractor = this._defaultExtractor.bind(this);\n return this._options.extractor(error, defaultExtractor);\n }\n return this._defaultExtractor(error);\n }\n /**\n * Default implementation of error extraction that handles default error wrapping, HTTP responses, ErrorEvent and few other known cases.\n */\n _defaultExtractor(errorCandidate) {\n const error = tryToUnwrapZonejsError(errorCandidate);\n // If it's http module error, extract as much information from it as we can.\n if (error instanceof HttpErrorResponse) {\n return extractHttpModuleError(error);\n }\n // We can handle messages and Error objects directly.\n if (typeof error === 'string' || isErrorOrErrorLikeObject(error)) {\n return error;\n }\n // Nothing was extracted, fallback to default error message.\n return null;\n }\n }\n SentryErrorHandler.ɵfac = function SentryErrorHandler_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || SentryErrorHandler)(i0.ɵɵinject('errorHandlerOptions'));\n };\n SentryErrorHandler.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: SentryErrorHandler,\n factory: SentryErrorHandler.ɵfac,\n providedIn: 'root'\n });\n return SentryErrorHandler;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * Factory function that creates an instance of a preconfigured ErrorHandler provider.\n */\nfunction createErrorHandler(config) {\n return new SentryErrorHandler(config);\n}\nconst ANGULAR_ROUTING_OP = 'ui.angular.routing';\nconst ANGULAR_INIT_OP = 'ui.angular.init';\nconst ANGULAR_OP = 'ui.angular';\nlet instrumentationInitialized;\n/**\n * A custom browser tracing integration for Angular.\n *\n * Use this integration in combination with `TraceService`\n */\nfunction browserTracingIntegration(options = {}) {\n // If the user opts out to set this up, we just don't initialize this.\n // That way, the TraceService will not actually do anything, functionally disabling this.\n if (options.instrumentNavigation !== false) {\n instrumentationInitialized = true;\n }\n return browserTracingIntegration$1({\n ...options,\n instrumentNavigation: false\n });\n}\n/**\n * This function is extracted to make unit testing easier.\n */\nfunction _updateSpanAttributesForParametrizedUrl(route, span) {\n const attributes = span && spanToJSON(span).data || {};\n if (span && attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] === 'url') {\n span.updateName(route);\n span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, 'route');\n span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, `auto.${spanToJSON(span).op}.angular`);\n }\n}\n/**\n * Angular's Service responsible for hooking into Angular Router and tracking current navigation process.\n * Creates a new transaction for every route change and measures a duration of routing process.\n */\nlet TraceService = /*#__PURE__*/(() => {\n class TraceService {\n constructor(_router) {\n this._router = _router;\n this.navStart$ = this._router.events.pipe(filter(event => event instanceof NavigationStart), tap(navigationEvent => {\n if (!instrumentationInitialized) {\n IS_DEBUG_BUILD && logger.error('Angular integration has tracing enabled, but Tracing integration is not configured');\n return;\n }\n if (this._routingSpan) {\n this._routingSpan.end();\n this._routingSpan = null;\n }\n const client = getClient();\n const strippedUrl = stripUrlQueryAndFragment(navigationEvent.url);\n if (client) {\n // see comment in `_isPageloadOngoing` for rationale\n if (!this._isPageloadOngoing()) {\n runOutsideAngular(() => {\n startBrowserTracingNavigationSpan(client, {\n name: strippedUrl,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.navigation.angular',\n [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url'\n }\n });\n });\n } else {\n // The first time we end up here, we set the pageload flag to false\n // Subsequent navigations are going to get their own navigation root span\n // even if the pageload root span is still ongoing.\n this._pageloadOngoing = false;\n }\n this._routingSpan = runOutsideAngular(() => startInactiveSpan({\n name: `${navigationEvent.url}`,\n op: ANGULAR_ROUTING_OP,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.angular',\n [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url',\n url: strippedUrl,\n ...(navigationEvent.navigationTrigger && {\n navigationTrigger: navigationEvent.navigationTrigger\n })\n }\n })) || null;\n return;\n }\n }));\n // The ResolveEnd event is fired when the Angular router has resolved the URL and\n // the parameter<->value mapping. It holds the new resolved router state with\n // the mapping and the new URL.\n // Only After this event, the route is activated, meaning that the transaction\n // can be updated with the parameterized route name before e.g. the route's root\n // component is initialized. This should be early enough before outgoing requests\n // are made from the new route, with the exceptions of requests being made during\n // a navigation.\n this.resEnd$ = this._router.events.pipe(filter(event => event instanceof ResolveEnd), tap(event => {\n const route = getParameterizedRouteFromSnapshot(event.state.root);\n if (route) {\n getCurrentScope().setTransactionName(route);\n }\n const activeSpan = getActiveSpan();\n const rootSpan = activeSpan && getRootSpan(activeSpan);\n _updateSpanAttributesForParametrizedUrl(route, rootSpan);\n }));\n this.navEnd$ = this._router.events.pipe(filter(event => event instanceof NavigationEnd || event instanceof NavigationCancel || event instanceof NavigationError), tap(() => {\n if (this._routingSpan) {\n runOutsideAngular(() => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n this._routingSpan.end();\n });\n this._routingSpan = null;\n }\n }));\n this._routingSpan = null;\n this._pageloadOngoing = true;\n this._subscription = new Subscription();\n this._subscription.add(this.navStart$.subscribe());\n this._subscription.add(this.resEnd$.subscribe());\n this._subscription.add(this.navEnd$.subscribe());\n }\n /**\n * This is used to prevent memory leaks when the root view is created and destroyed multiple times,\n * since `subscribe` callbacks capture `this` and prevent many resources from being GC'd.\n */\n ngOnDestroy() {\n this._subscription.unsubscribe();\n }\n /**\n * We only _avoid_ creating a navigation root span in one case:\n *\n * There is an ongoing pageload span AND the router didn't yet emit the first navigation start event\n *\n * The first navigation start event will create the child routing span\n * and update the pageload root span name on ResolveEnd.\n *\n * There's an edge case we need to avoid here: If the router fires the first navigation start event\n * _after_ the pageload root span finished. This is why we check for the pageload root span.\n * Possible real-world scenario: Angular application and/or router is bootstrapped after the pageload\n * idle root span finished\n *\n * The overall rationale is:\n * - if we already avoided creating a navigation root span once, we don't avoid it again\n * (i.e. set `_pageloadOngoing` to `false`)\n * - if `_pageloadOngoing` is already `false`, create a navigation root span\n * - if there's no active/pageload root span, create a navigation root span\n * - only if there's an ongoing pageload root span AND `_pageloadOngoing` is still `true,\n * don't create a navigation root span\n */\n _isPageloadOngoing() {\n if (!this._pageloadOngoing) {\n // pageload is already finished, no need to update\n return false;\n }\n const activeSpan = getActiveSpan();\n if (!activeSpan) {\n this._pageloadOngoing = false;\n return false;\n }\n const rootSpan = getRootSpan(activeSpan);\n this._pageloadOngoing = spanToJSON(rootSpan).op === 'pageload';\n return this._pageloadOngoing;\n }\n }\n TraceService.ɵfac = function TraceService_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || TraceService)(i0.ɵɵinject(i1.Router));\n };\n TraceService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: TraceService,\n factory: TraceService.ɵfac,\n providedIn: 'root'\n });\n return TraceService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * Captures the initialization lifecycle of the component this directive is applied to.\n * Specifically, this directive measures the time between `ngOnInit` and `ngAfterViewInit`\n * of the component.\n *\n * Falls back to the component's selector if no name is provided.\n *\n * @example\n * ```html\n * \n * ```\n */\nlet TraceDirective = /*#__PURE__*/(() => {\n class TraceDirective {\n constructor(_host) {\n this._host = _host;\n }\n /**\n * Implementation of OnInit lifecycle method\n * @inheritdoc\n */\n ngOnInit() {\n if (!this.componentName) {\n // Technically, the `trace` binding should always be provided.\n // However, if it is incorrectly declared on the element without a\n // value (e.g., ``), we fall back to using `tagName`\n // (which is e.g. `APP-COMPONENT`).\n this.componentName = this._host.nativeElement.tagName.toLowerCase();\n }\n if (getActiveSpan()) {\n this._tracingSpan = runOutsideAngular(() => startInactiveSpan({\n name: `<${this.componentName}>`,\n op: ANGULAR_INIT_OP,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.angular.trace_directive'\n }\n }));\n }\n }\n /**\n * Implementation of AfterViewInit lifecycle method\n * @inheritdoc\n */\n ngAfterViewInit() {\n const span = this._tracingSpan;\n if (span) {\n runOutsideAngular(() => span.end());\n }\n }\n }\n TraceDirective.ɵfac = function TraceDirective_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || TraceDirective)(i0.ɵɵdirectiveInject(i0.ElementRef));\n };\n TraceDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TraceDirective,\n selectors: [[\"\", \"trace\", \"\"]],\n inputs: {\n componentName: [0, \"trace\", \"componentName\"]\n },\n standalone: false\n });\n return TraceDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * A module serves as a single compilation unit for the `TraceDirective` and can be re-used by any other module.\n */\nlet TraceModule = /*#__PURE__*/(() => {\n class TraceModule {}\n TraceModule.ɵfac = function TraceModule_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || TraceModule)();\n };\n TraceModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TraceModule\n });\n TraceModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n return TraceModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * Decorator function that can be used to capture initialization lifecycle of the whole component.\n */\nfunction TraceClass(options) {\n let tracingSpan;\n /* eslint-disable @typescript-eslint/no-unsafe-member-access */\n return target => {\n const originalOnInit = target.prototype.ngOnInit;\n target.prototype.ngOnInit = function (...args) {\n tracingSpan = runOutsideAngular(() => startInactiveSpan({\n onlyIfParent: true,\n name: `<${options?.name || 'unnamed'}>`,\n op: ANGULAR_INIT_OP,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.angular.trace_class_decorator'\n }\n }));\n if (originalOnInit) {\n return originalOnInit.apply(this, args);\n }\n };\n const originalAfterViewInit = target.prototype.ngAfterViewInit;\n target.prototype.ngAfterViewInit = function (...args) {\n if (tracingSpan) {\n runOutsideAngular(() => tracingSpan.end());\n }\n if (originalAfterViewInit) {\n return originalAfterViewInit.apply(this, args);\n }\n };\n };\n /* eslint-enable @typescript-eslint/no-unsafe-member-access */\n}\n/**\n * Decorator function that can be used to capture a single lifecycle methods of the component.\n */\nfunction TraceMethod(options) {\n return (_target, propertyKey, descriptor) => {\n const originalMethod = descriptor.value;\n descriptor.value = function (...args) {\n const now = timestampInSeconds();\n runOutsideAngular(() => {\n startInactiveSpan({\n onlyIfParent: true,\n name: `<${options?.name ? options.name : 'unnamed'}>`,\n op: `${ANGULAR_OP}.${String(propertyKey)}`,\n startTime: now,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.angular.trace_method_decorator'\n }\n }).end(now);\n });\n if (originalMethod) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return originalMethod.apply(this, args);\n }\n };\n return descriptor;\n };\n}\n/**\n * Takes the parameterized route from a given ActivatedRouteSnapshot and concatenates the snapshot's\n * child route with its parent to produce the complete parameterized URL of the activated route.\n * This happens recursively until the last child (i.e. the end of the URL) is reached.\n *\n * @param route the ActivatedRouteSnapshot of which its path and its child's path is concatenated\n *\n * @returns the concatenated parameterized route string\n */\nfunction getParameterizedRouteFromSnapshot(route) {\n const parts = [];\n let currentRoute = route?.firstChild;\n while (currentRoute) {\n const path = currentRoute?.routeConfig && currentRoute.routeConfig.path;\n if (path === null || path === undefined) {\n break;\n }\n parts.push(path);\n currentRoute = currentRoute.firstChild;\n }\n const fullPath = parts.filter(part => part).join('/');\n return fullPath ? `/${fullPath}/` : '/';\n}\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { SentryErrorHandler, TraceClass, TraceDirective, TraceMethod, TraceModule, TraceService, browserTracingIntegration, createErrorHandler, getDefaultIntegrations, init };\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n// THIS CODE IS GENERATED - DO NOT MODIFY.\nconst u = undefined;\nfunction plural(val) {\n const n = val,\n i = Math.floor(Math.abs(val)),\n v = val.toString().replace(/^[^.]*\\.?/, '').length;\n if (i === 1 && v === 0) return 1;\n return 5;\n}\nexport default [\"ca\", [[\"a. m.\", \"p. m.\"], u, u], u, [[\"dg\", \"dl\", \"dt\", \"dc\", \"dj\", \"dv\", \"ds\"], [\"dg.\", \"dl.\", \"dt.\", \"dc.\", \"dj.\", \"dv.\", \"ds.\"], [\"diumenge\", \"dilluns\", \"dimarts\", \"dimecres\", \"dijous\", \"divendres\", \"dissabte\"], [\"dg.\", \"dl.\", \"dt.\", \"dc.\", \"dj.\", \"dv.\", \"ds.\"]], u, [[\"GN\", \"FB\", \"MÇ\", \"AB\", \"MG\", \"JN\", \"JL\", \"AG\", \"ST\", \"OC\", \"NV\", \"DS\"], [\"de gen.\", \"de febr.\", \"de març\", \"d’abr.\", \"de maig\", \"de juny\", \"de jul.\", \"d’ag.\", \"de set.\", \"d’oct.\", \"de nov.\", \"de des.\"], [\"de gener\", \"de febrer\", \"de març\", \"d’abril\", \"de maig\", \"de juny\", \"de juliol\", \"d’agost\", \"de setembre\", \"d’octubre\", \"de novembre\", \"de desembre\"]], [[\"GN\", \"FB\", \"MÇ\", \"AB\", \"MG\", \"JN\", \"JL\", \"AG\", \"ST\", \"OC\", \"NV\", \"DS\"], [\"gen.\", \"febr.\", \"març\", \"abr.\", \"maig\", \"juny\", \"jul.\", \"ag.\", \"set.\", \"oct.\", \"nov.\", \"des.\"], [\"gener\", \"febrer\", \"març\", \"abril\", \"maig\", \"juny\", \"juliol\", \"agost\", \"setembre\", \"octubre\", \"novembre\", \"desembre\"]], [[\"aC\", \"dC\"], u, [\"abans de Crist\", \"després de Crist\"]], 1, [6, 0], [\"d/M/yy\", \"d MMM y\", \"d MMMM 'de' y\", \"EEEE, d MMMM 'de' y\"], [\"H:mm\", \"H:mm:ss\", \"H:mm:ss z\", \"H:mm:ss (zzzz)\"], [\"{1} {0}\", \"{1}, {0}\", \"{1}, 'a' 'les' {0}\", u], [\",\", \".\", \";\", \"%\", \"+\", \"-\", \"E\", \"×\", \"‰\", \"∞\", \"NaN\", \":\"], [\"#,##0.###\", \"#,##0%\", \"#,##0.00 ¤\", \"#E0\"], \"EUR\", \"€\", \"euro\", {\n \"AUD\": [\"AU$\", \"$\"],\n \"BRL\": [u, \"R$\"],\n \"BYN\": [u, \"р.\"],\n \"CAD\": [u, \"$\"],\n \"CNY\": [u, \"¥\"],\n \"ESP\": [\"₧\"],\n \"MXN\": [u, \"$\"],\n \"PHP\": [u, \"₱\"],\n \"THB\": [\"฿\"],\n \"USD\": [u, \"$\"],\n \"VEF\": [u, \"Bs F\"],\n \"XCD\": [u, \"$\"],\n \"XXX\": []\n}, \"ltr\", plural];\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n// THIS CODE IS GENERATED - DO NOT MODIFY.\nconst u = undefined;\nfunction plural(val) {\n const n = val,\n i = Math.floor(Math.abs(val)),\n v = val.toString().replace(/^[^.]*\\.?/, '').length;\n if (i === 1 && v === 0) return 1;\n return 5;\n}\nexport default [\"de\", [[\"AM\", \"PM\"], u, u], u, [[\"S\", \"M\", \"D\", \"M\", \"D\", \"F\", \"S\"], [\"So.\", \"Mo.\", \"Di.\", \"Mi.\", \"Do.\", \"Fr.\", \"Sa.\"], [\"Sonntag\", \"Montag\", \"Dienstag\", \"Mittwoch\", \"Donnerstag\", \"Freitag\", \"Samstag\"], [\"So.\", \"Mo.\", \"Di.\", \"Mi.\", \"Do.\", \"Fr.\", \"Sa.\"]], [[\"S\", \"M\", \"D\", \"M\", \"D\", \"F\", \"S\"], [\"So\", \"Mo\", \"Di\", \"Mi\", \"Do\", \"Fr\", \"Sa\"], [\"Sonntag\", \"Montag\", \"Dienstag\", \"Mittwoch\", \"Donnerstag\", \"Freitag\", \"Samstag\"], [\"So.\", \"Mo.\", \"Di.\", \"Mi.\", \"Do.\", \"Fr.\", \"Sa.\"]], [[\"J\", \"F\", \"M\", \"A\", \"M\", \"J\", \"J\", \"A\", \"S\", \"O\", \"N\", \"D\"], [\"Jan.\", \"Feb.\", \"März\", \"Apr.\", \"Mai\", \"Juni\", \"Juli\", \"Aug.\", \"Sept.\", \"Okt.\", \"Nov.\", \"Dez.\"], [\"Januar\", \"Februar\", \"März\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Dezember\"]], [[\"J\", \"F\", \"M\", \"A\", \"M\", \"J\", \"J\", \"A\", \"S\", \"O\", \"N\", \"D\"], [\"Jan\", \"Feb\", \"Mär\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dez\"], [\"Januar\", \"Februar\", \"März\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Dezember\"]], [[\"v. Chr.\", \"n. Chr.\"], u, u], 1, [6, 0], [\"dd.MM.yy\", \"dd.MM.y\", \"d. MMMM y\", \"EEEE, d. MMMM y\"], [\"HH:mm\", \"HH:mm:ss\", \"HH:mm:ss z\", \"HH:mm:ss zzzz\"], [\"{1}, {0}\", u, \"{1} 'um' {0}\", u], [\",\", \".\", \";\", \"%\", \"+\", \"-\", \"E\", \"·\", \"‰\", \"∞\", \"NaN\", \":\"], [\"#,##0.###\", \"#,##0 %\", \"#,##0.00 ¤\", \"#E0\"], \"EUR\", \"€\", \"Euro\", {\n \"ATS\": [\"öS\"],\n \"AUD\": [\"AU$\", \"$\"],\n \"BGM\": [\"BGK\"],\n \"BGO\": [\"BGJ\"],\n \"BYN\": [u, \"р.\"],\n \"CUC\": [u, \"Cub$\"],\n \"DEM\": [\"DM\"],\n \"FKP\": [u, \"Fl£\"],\n \"GHS\": [u, \"₵\"],\n \"GNF\": [u, \"F.G.\"],\n \"KMF\": [u, \"FC\"],\n \"PHP\": [u, \"₱\"],\n \"RON\": [u, \"L\"],\n \"RUR\": [u, \"р.\"],\n \"RWF\": [u, \"F.Rw\"],\n \"SYP\": [],\n \"THB\": [\"฿\"],\n \"TWD\": [\"NT$\"],\n \"XXX\": [],\n \"ZMW\": [u, \"K\"]\n}, \"ltr\", plural];\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n// THIS CODE IS GENERATED - DO NOT MODIFY.\nconst u = undefined;\nfunction plural(val) {\n const n = val,\n i = Math.floor(Math.abs(val)),\n v = val.toString().replace(/^[^.]*\\.?/, '').length;\n if (i === 1 && v === 0) return 1;\n return 5;\n}\nexport default [\"en\", [[\"a\", \"p\"], [\"AM\", \"PM\"], u], [[\"AM\", \"PM\"], u, u], [[\"S\", \"M\", \"T\", \"W\", \"T\", \"F\", \"S\"], [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"], [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"], [\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\"]], u, [[\"J\", \"F\", \"M\", \"A\", \"M\", \"J\", \"J\", \"A\", \"S\", \"O\", \"N\", \"D\"], [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"], [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"]], u, [[\"B\", \"A\"], [\"BC\", \"AD\"], [\"Before Christ\", \"Anno Domini\"]], 0, [6, 0], [\"M/d/yy\", \"MMM d, y\", \"MMMM d, y\", \"EEEE, MMMM d, y\"], [\"h:mm a\", \"h:mm:ss a\", \"h:mm:ss a z\", \"h:mm:ss a zzzz\"], [\"{1}, {0}\", u, \"{1} 'at' {0}\", u], [\".\", \",\", \";\", \"%\", \"+\", \"-\", \"E\", \"×\", \"‰\", \"∞\", \"NaN\", \":\"], [\"#,##0.###\", \"#,##0%\", \"¤#,##0.00\", \"#E0\"], \"USD\", \"$\", \"US Dollar\", {}, \"ltr\", plural];\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n// THIS CODE IS GENERATED - DO NOT MODIFY.\nconst u = undefined;\nfunction plural(val) {\n const n = val,\n i = Math.floor(Math.abs(val)),\n v = val.toString().replace(/^[^.]*\\.?/, '').length,\n e = parseInt(val.toString().replace(/^[^e]*(e([-+]?\\d+))?/, '$2')) || 0;\n if (n === 1) return 1;\n if (e === 0 && !(i === 0) && i % 1000000 === 0 && v === 0 || !(e >= 0 && e <= 5)) return 4;\n return 5;\n}\nexport default [\"es\", [[\"a. m.\", \"p. m.\"], u, u], u, [[\"D\", \"L\", \"M\", \"X\", \"J\", \"V\", \"S\"], [\"dom\", \"lun\", \"mar\", \"mié\", \"jue\", \"vie\", \"sáb\"], [\"domingo\", \"lunes\", \"martes\", \"miércoles\", \"jueves\", \"viernes\", \"sábado\"], [\"DO\", \"LU\", \"MA\", \"MI\", \"JU\", \"VI\", \"SA\"]], u, [[\"E\", \"F\", \"M\", \"A\", \"M\", \"J\", \"J\", \"A\", \"S\", \"O\", \"N\", \"D\"], [\"ene\", \"feb\", \"mar\", \"abr\", \"may\", \"jun\", \"jul\", \"ago\", \"sept\", \"oct\", \"nov\", \"dic\"], [\"enero\", \"febrero\", \"marzo\", \"abril\", \"mayo\", \"junio\", \"julio\", \"agosto\", \"septiembre\", \"octubre\", \"noviembre\", \"diciembre\"]], u, [[\"a. C.\", \"d. C.\"], u, [\"antes de Cristo\", \"después de Cristo\"]], 1, [6, 0], [\"d/M/yy\", \"d MMM y\", \"d 'de' MMMM 'de' y\", \"EEEE, d 'de' MMMM 'de' y\"], [\"H:mm\", \"H:mm:ss\", \"H:mm:ss z\", \"H:mm:ss (zzzz)\"], [\"{1}, {0}\", u, u, u], [\",\", \".\", \";\", \"%\", \"+\", \"-\", \"E\", \"×\", \"‰\", \"∞\", \"NaN\", \":\"], [\"#,##0.###\", \"#,##0 %\", \"#,##0.00 ¤\", \"#E0\"], \"EUR\", \"€\", \"euro\", {\n \"AUD\": [u, \"$\"],\n \"BRL\": [u, \"R$\"],\n \"BYN\": [u, \"р.\"],\n \"CAD\": [u, \"$\"],\n \"CNY\": [u, \"¥\"],\n \"EGP\": [],\n \"ESP\": [\"₧\"],\n \"GBP\": [u, \"£\"],\n \"HKD\": [u, \"$\"],\n \"ILS\": [u, \"₪\"],\n \"INR\": [u, \"₹\"],\n \"JPY\": [u, \"¥\"],\n \"KRW\": [u, \"₩\"],\n \"MXN\": [u, \"$\"],\n \"NZD\": [u, \"$\"],\n \"PHP\": [u, \"₱\"],\n \"RON\": [u, \"L\"],\n \"THB\": [\"฿\"],\n \"TWD\": [u, \"NT$\"],\n \"USD\": [\"US$\", \"$\"],\n \"XAF\": [],\n \"XCD\": [u, \"$\"],\n \"XOF\": []\n}, \"ltr\", plural];\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n// THIS CODE IS GENERATED - DO NOT MODIFY.\nconst u = undefined;\nfunction plural(val) {\n const n = val,\n i = Math.floor(Math.abs(val)),\n v = val.toString().replace(/^[^.]*\\.?/, '').length,\n e = parseInt(val.toString().replace(/^[^e]*(e([-+]?\\d+))?/, '$2')) || 0;\n if (i === 0 || i === 1) return 1;\n if (e === 0 && !(i === 0) && i % 1000000 === 0 && v === 0 || !(e >= 0 && e <= 5)) return 4;\n return 5;\n}\nexport default [\"fr\", [[\"AM\", \"PM\"], u, u], u, [[\"D\", \"L\", \"M\", \"M\", \"J\", \"V\", \"S\"], [\"dim.\", \"lun.\", \"mar.\", \"mer.\", \"jeu.\", \"ven.\", \"sam.\"], [\"dimanche\", \"lundi\", \"mardi\", \"mercredi\", \"jeudi\", \"vendredi\", \"samedi\"], [\"di\", \"lu\", \"ma\", \"me\", \"je\", \"ve\", \"sa\"]], u, [[\"J\", \"F\", \"M\", \"A\", \"M\", \"J\", \"J\", \"A\", \"S\", \"O\", \"N\", \"D\"], [\"janv.\", \"févr.\", \"mars\", \"avr.\", \"mai\", \"juin\", \"juil.\", \"août\", \"sept.\", \"oct.\", \"nov.\", \"déc.\"], [\"janvier\", \"février\", \"mars\", \"avril\", \"mai\", \"juin\", \"juillet\", \"août\", \"septembre\", \"octobre\", \"novembre\", \"décembre\"]], u, [[\"av. J.-C.\", \"ap. J.-C.\"], u, [\"avant Jésus-Christ\", \"après Jésus-Christ\"]], 1, [6, 0], [\"dd/MM/y\", \"d MMM y\", \"d MMMM y\", \"EEEE d MMMM y\"], [\"HH:mm\", \"HH:mm:ss\", \"HH:mm:ss z\", \"HH:mm:ss zzzz\"], [\"{1} {0}\", \"{1}, {0}\", \"{1} 'à' {0}\", u], [\",\", \" \", \";\", \"%\", \"+\", \"-\", \"E\", \"×\", \"‰\", \"∞\", \"NaN\", \":\"], [\"#,##0.###\", \"#,##0 %\", \"#,##0.00 ¤\", \"#E0\"], \"EUR\", \"€\", \"euro\", {\n \"ARS\": [\"$AR\", \"$\"],\n \"AUD\": [\"$AU\", \"$\"],\n \"BEF\": [\"FB\"],\n \"BMD\": [\"$BM\", \"$\"],\n \"BND\": [\"$BN\", \"$\"],\n \"BYN\": [u, \"р.\"],\n \"BZD\": [\"$BZ\", \"$\"],\n \"CAD\": [\"$CA\", \"$\"],\n \"CLP\": [\"$CL\", \"$\"],\n \"CNY\": [u, \"¥\"],\n \"COP\": [\"$CO\", \"$\"],\n \"CYP\": [\"£CY\"],\n \"EGP\": [u, \"£E\"],\n \"FJD\": [\"$FJ\", \"$\"],\n \"FKP\": [\"£FK\", \"£\"],\n \"FRF\": [\"F\"],\n \"GBP\": [\"£GB\", \"£\"],\n \"GIP\": [\"£GI\", \"£\"],\n \"HKD\": [u, \"$\"],\n \"IEP\": [\"£IE\"],\n \"ILP\": [\"£IL\"],\n \"ITL\": [\"₤IT\"],\n \"JPY\": [u, \"¥\"],\n \"KMF\": [u, \"FC\"],\n \"LBP\": [\"£LB\", \"£L\"],\n \"MTP\": [\"£MT\"],\n \"MXN\": [\"$MX\", \"$\"],\n \"NAD\": [\"$NA\", \"$\"],\n \"NIO\": [u, \"$C\"],\n \"NZD\": [\"$NZ\", \"$\"],\n \"PHP\": [u, \"₱\"],\n \"RHD\": [\"$RH\"],\n \"RON\": [u, \"L\"],\n \"RWF\": [u, \"FR\"],\n \"SBD\": [\"$SB\", \"$\"],\n \"SGD\": [\"$SG\", \"$\"],\n \"SRD\": [\"$SR\", \"$\"],\n \"TOP\": [u, \"$T\"],\n \"TTD\": [\"$TT\", \"$\"],\n \"TWD\": [u, \"NT$\"],\n \"USD\": [\"$US\", \"$\"],\n \"UYU\": [\"$UY\", \"$\"],\n \"WST\": [\"$WS\"],\n \"XCD\": [u, \"$\"],\n \"XPF\": [\"FCFP\"],\n \"ZMW\": [u, \"Kw\"]\n}, \"ltr\", plural];\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n// THIS CODE IS GENERATED - DO NOT MODIFY.\nconst u = undefined;\nfunction plural(val) {\n const n = val,\n i = Math.floor(Math.abs(val)),\n v = val.toString().replace(/^[^.]*\\.?/, '').length,\n e = parseInt(val.toString().replace(/^[^e]*(e([-+]?\\d+))?/, '$2')) || 0;\n if (i === 1 && v === 0) return 1;\n if (e === 0 && !(i === 0) && i % 1000000 === 0 && v === 0 || !(e >= 0 && e <= 5)) return 4;\n return 5;\n}\nexport default [\"it\", [[\"m.\", \"p.\"], [\"AM\", \"PM\"], u], u, [[\"D\", \"L\", \"M\", \"M\", \"G\", \"V\", \"S\"], [\"dom\", \"lun\", \"mar\", \"mer\", \"gio\", \"ven\", \"sab\"], [\"domenica\", \"lunedì\", \"martedì\", \"mercoledì\", \"giovedì\", \"venerdì\", \"sabato\"], [\"dom\", \"lun\", \"mar\", \"mer\", \"gio\", \"ven\", \"sab\"]], u, [[\"G\", \"F\", \"M\", \"A\", \"M\", \"G\", \"L\", \"A\", \"S\", \"O\", \"N\", \"D\"], [\"gen\", \"feb\", \"mar\", \"apr\", \"mag\", \"giu\", \"lug\", \"ago\", \"set\", \"ott\", \"nov\", \"dic\"], [\"gennaio\", \"febbraio\", \"marzo\", \"aprile\", \"maggio\", \"giugno\", \"luglio\", \"agosto\", \"settembre\", \"ottobre\", \"novembre\", \"dicembre\"]], u, [[\"aC\", \"dC\"], [\"a.C.\", \"d.C.\"], [\"avanti Cristo\", \"dopo Cristo\"]], 1, [6, 0], [\"dd/MM/yy\", \"d MMM y\", \"d MMMM y\", \"EEEE d MMMM y\"], [\"HH:mm\", \"HH:mm:ss\", \"HH:mm:ss z\", \"HH:mm:ss zzzz\"], [\"{1}, {0}\", u, \"{1} {0}\", u], [\",\", \".\", \";\", \"%\", \"+\", \"-\", \"E\", \"×\", \"‰\", \"∞\", \"NaN\", \":\"], [\"#,##0.###\", \"#,##0%\", \"#,##0.00 ¤\", \"#E0\"], \"EUR\", \"€\", \"euro\", {\n \"BRL\": [u, \"R$\"],\n \"BYN\": [u, \"Br\"],\n \"EGP\": [u, \"£E\"],\n \"HKD\": [u, \"$\"],\n \"INR\": [u, \"₹\"],\n \"JPY\": [u, \"¥\"],\n \"KRW\": [u, \"₩\"],\n \"MXN\": [u, \"$\"],\n \"NOK\": [u, \"NKr\"],\n \"THB\": [\"฿\"],\n \"TWD\": [u, \"NT$\"],\n \"USD\": [u, \"$\"],\n \"VND\": [u, \"₫\"]\n}, \"ltr\", plural];\n","/**\n * @license Angular v19.2.1\n * (c) 2010-2025 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport { ɵAnimationGroupPlayer, NoopAnimationPlayer, AUTO_STYLE, ɵPRE_STYLE, sequence, AnimationMetadataType, style } from '@angular/animations';\nimport * as i0 from '@angular/core';\nimport { ɵRuntimeError, Injectable } from '@angular/core';\nconst LINE_START = '\\n - ';\nfunction invalidTimingValue(exp) {\n return new ɵRuntimeError(3000 /* RuntimeErrorCode.INVALID_TIMING_VALUE */, ngDevMode && `The provided timing value \"${exp}\" is invalid.`);\n}\nfunction negativeStepValue() {\n return new ɵRuntimeError(3100 /* RuntimeErrorCode.NEGATIVE_STEP_VALUE */, ngDevMode && 'Duration values below 0 are not allowed for this animation step.');\n}\nfunction negativeDelayValue() {\n return new ɵRuntimeError(3101 /* RuntimeErrorCode.NEGATIVE_DELAY_VALUE */, ngDevMode && 'Delay values below 0 are not allowed for this animation step.');\n}\nfunction invalidStyleParams(varName) {\n return new ɵRuntimeError(3001 /* RuntimeErrorCode.INVALID_STYLE_PARAMS */, ngDevMode && `Unable to resolve the local animation param ${varName} in the given list of values`);\n}\nfunction invalidParamValue(varName) {\n return new ɵRuntimeError(3003 /* RuntimeErrorCode.INVALID_PARAM_VALUE */, ngDevMode && `Please provide a value for the animation param ${varName}`);\n}\nfunction invalidNodeType(nodeType) {\n return new ɵRuntimeError(3004 /* RuntimeErrorCode.INVALID_NODE_TYPE */, ngDevMode && `Unable to resolve animation metadata node #${nodeType}`);\n}\nfunction invalidCssUnitValue(userProvidedProperty, value) {\n return new ɵRuntimeError(3005 /* RuntimeErrorCode.INVALID_CSS_UNIT_VALUE */, ngDevMode && `Please provide a CSS unit value for ${userProvidedProperty}:${value}`);\n}\nfunction invalidTrigger() {\n return new ɵRuntimeError(3006 /* RuntimeErrorCode.INVALID_TRIGGER */, ngDevMode && \"animation triggers cannot be prefixed with an `@` sign (e.g. trigger('@foo', [...]))\");\n}\nfunction invalidDefinition() {\n return new ɵRuntimeError(3007 /* RuntimeErrorCode.INVALID_DEFINITION */, ngDevMode && 'only state() and transition() definitions can sit inside of a trigger()');\n}\nfunction invalidState(metadataName, missingSubs) {\n return new ɵRuntimeError(3008 /* RuntimeErrorCode.INVALID_STATE */, ngDevMode && `state(\"${metadataName}\", ...) must define default values for all the following style substitutions: ${missingSubs.join(', ')}`);\n}\nfunction invalidStyleValue(value) {\n return new ɵRuntimeError(3002 /* RuntimeErrorCode.INVALID_STYLE_VALUE */, ngDevMode && `The provided style string value ${value} is not allowed.`);\n}\nfunction invalidProperty(prop) {\n return new ɵRuntimeError(3009 /* RuntimeErrorCode.INVALID_PROPERTY */, ngDevMode && `The provided animation property \"${prop}\" is not a supported CSS property for animations`);\n}\nfunction invalidParallelAnimation(prop, firstStart, firstEnd, secondStart, secondEnd) {\n return new ɵRuntimeError(3010 /* RuntimeErrorCode.INVALID_PARALLEL_ANIMATION */, ngDevMode && `The CSS property \"${prop}\" that exists between the times of \"${firstStart}ms\" and \"${firstEnd}ms\" is also being animated in a parallel animation between the times of \"${secondStart}ms\" and \"${secondEnd}ms\"`);\n}\nfunction invalidKeyframes() {\n return new ɵRuntimeError(3011 /* RuntimeErrorCode.INVALID_KEYFRAMES */, ngDevMode && `keyframes() must be placed inside of a call to animate()`);\n}\nfunction invalidOffset() {\n return new ɵRuntimeError(3012 /* RuntimeErrorCode.INVALID_OFFSET */, ngDevMode && `Please ensure that all keyframe offsets are between 0 and 1`);\n}\nfunction keyframeOffsetsOutOfOrder() {\n return new ɵRuntimeError(3200 /* RuntimeErrorCode.KEYFRAME_OFFSETS_OUT_OF_ORDER */, ngDevMode && `Please ensure that all keyframe offsets are in order`);\n}\nfunction keyframesMissingOffsets() {\n return new ɵRuntimeError(3202 /* RuntimeErrorCode.KEYFRAMES_MISSING_OFFSETS */, ngDevMode && `Not all style() steps within the declared keyframes() contain offsets`);\n}\nfunction invalidStagger() {\n return new ɵRuntimeError(3013 /* RuntimeErrorCode.INVALID_STAGGER */, ngDevMode && `stagger() can only be used inside of query()`);\n}\nfunction invalidQuery(selector) {\n return new ɵRuntimeError(3014 /* RuntimeErrorCode.INVALID_QUERY */, ngDevMode && `\\`query(\"${selector}\")\\` returned zero elements. (Use \\`query(\"${selector}\", { optional: true })\\` if you wish to allow this.)`);\n}\nfunction invalidExpression(expr) {\n return new ɵRuntimeError(3015 /* RuntimeErrorCode.INVALID_EXPRESSION */, ngDevMode && `The provided transition expression \"${expr}\" is not supported`);\n}\nfunction invalidTransitionAlias(alias) {\n return new ɵRuntimeError(3016 /* RuntimeErrorCode.INVALID_TRANSITION_ALIAS */, ngDevMode && `The transition alias value \"${alias}\" is not supported`);\n}\nfunction validationFailed(errors) {\n return new ɵRuntimeError(3500 /* RuntimeErrorCode.VALIDATION_FAILED */, ngDevMode && `animation validation failed:\\n${errors.map(err => err.message).join('\\n')}`);\n}\nfunction buildingFailed(errors) {\n return new ɵRuntimeError(3501 /* RuntimeErrorCode.BUILDING_FAILED */, ngDevMode && `animation building failed:\\n${errors.map(err => err.message).join('\\n')}`);\n}\nfunction triggerBuildFailed(name, errors) {\n return new ɵRuntimeError(3404 /* RuntimeErrorCode.TRIGGER_BUILD_FAILED */, ngDevMode && `The animation trigger \"${name}\" has failed to build due to the following errors:\\n - ${errors.map(err => err.message).join('\\n - ')}`);\n}\nfunction animationFailed(errors) {\n return new ɵRuntimeError(3502 /* RuntimeErrorCode.ANIMATION_FAILED */, ngDevMode && `Unable to animate due to the following errors:${LINE_START}${errors.map(err => err.message).join(LINE_START)}`);\n}\nfunction registerFailed(errors) {\n return new ɵRuntimeError(3503 /* RuntimeErrorCode.REGISTRATION_FAILED */, ngDevMode && `Unable to build the animation due to the following errors: ${errors.map(err => err.message).join('\\n')}`);\n}\nfunction missingOrDestroyedAnimation() {\n return new ɵRuntimeError(3300 /* RuntimeErrorCode.MISSING_OR_DESTROYED_ANIMATION */, ngDevMode && \"The requested animation doesn't exist or has already been destroyed\");\n}\nfunction createAnimationFailed(errors) {\n return new ɵRuntimeError(3504 /* RuntimeErrorCode.CREATE_ANIMATION_FAILED */, ngDevMode && `Unable to create the animation due to the following errors:${errors.map(err => err.message).join('\\n')}`);\n}\nfunction missingPlayer(id) {\n return new ɵRuntimeError(3301 /* RuntimeErrorCode.MISSING_PLAYER */, ngDevMode && `Unable to find the timeline player referenced by ${id}`);\n}\nfunction missingTrigger(phase, name) {\n return new ɵRuntimeError(3302 /* RuntimeErrorCode.MISSING_TRIGGER */, ngDevMode && `Unable to listen on the animation trigger event \"${phase}\" because the animation trigger \"${name}\" doesn\\'t exist!`);\n}\nfunction missingEvent(name) {\n return new ɵRuntimeError(3303 /* RuntimeErrorCode.MISSING_EVENT */, ngDevMode && `Unable to listen on the animation trigger \"${name}\" because the provided event is undefined!`);\n}\nfunction unsupportedTriggerEvent(phase, name) {\n return new ɵRuntimeError(3400 /* RuntimeErrorCode.UNSUPPORTED_TRIGGER_EVENT */, ngDevMode && `The provided animation trigger event \"${phase}\" for the animation trigger \"${name}\" is not supported!`);\n}\nfunction unregisteredTrigger(name) {\n return new ɵRuntimeError(3401 /* RuntimeErrorCode.UNREGISTERED_TRIGGER */, ngDevMode && `The provided animation trigger \"${name}\" has not been registered!`);\n}\nfunction triggerTransitionsFailed(errors) {\n return new ɵRuntimeError(3402 /* RuntimeErrorCode.TRIGGER_TRANSITIONS_FAILED */, ngDevMode && `Unable to process animations due to the following failed trigger transitions\\n ${errors.map(err => err.message).join('\\n')}`);\n}\nfunction triggerParsingFailed(name, errors) {\n return new ɵRuntimeError(3403 /* RuntimeErrorCode.TRIGGER_PARSING_FAILED */, ngDevMode && `Animation parsing for the ${name} trigger have failed:${LINE_START}${errors.map(err => err.message).join(LINE_START)}`);\n}\nfunction transitionFailed(name, errors) {\n return new ɵRuntimeError(3505 /* RuntimeErrorCode.TRANSITION_FAILED */, ngDevMode && `@${name} has failed due to:\\n ${errors.map(err => err.message).join('\\n- ')}`);\n}\n\n/**\n * Set of all animatable CSS properties\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_animated_properties\n */\nconst ANIMATABLE_PROP_SET = /*#__PURE__*/new Set(['-moz-outline-radius', '-moz-outline-radius-bottomleft', '-moz-outline-radius-bottomright', '-moz-outline-radius-topleft', '-moz-outline-radius-topright', '-ms-grid-columns', '-ms-grid-rows', '-webkit-line-clamp', '-webkit-text-fill-color', '-webkit-text-stroke', '-webkit-text-stroke-color', 'accent-color', 'all', 'backdrop-filter', 'background', 'background-color', 'background-position', 'background-size', 'block-size', 'border', 'border-block-end', 'border-block-end-color', 'border-block-end-width', 'border-block-start', 'border-block-start-color', 'border-block-start-width', 'border-bottom', 'border-bottom-color', 'border-bottom-left-radius', 'border-bottom-right-radius', 'border-bottom-width', 'border-color', 'border-end-end-radius', 'border-end-start-radius', 'border-image-outset', 'border-image-slice', 'border-image-width', 'border-inline-end', 'border-inline-end-color', 'border-inline-end-width', 'border-inline-start', 'border-inline-start-color', 'border-inline-start-width', 'border-left', 'border-left-color', 'border-left-width', 'border-radius', 'border-right', 'border-right-color', 'border-right-width', 'border-start-end-radius', 'border-start-start-radius', 'border-top', 'border-top-color', 'border-top-left-radius', 'border-top-right-radius', 'border-top-width', 'border-width', 'bottom', 'box-shadow', 'caret-color', 'clip', 'clip-path', 'color', 'column-count', 'column-gap', 'column-rule', 'column-rule-color', 'column-rule-width', 'column-width', 'columns', 'filter', 'flex', 'flex-basis', 'flex-grow', 'flex-shrink', 'font', 'font-size', 'font-size-adjust', 'font-stretch', 'font-variation-settings', 'font-weight', 'gap', 'grid-column-gap', 'grid-gap', 'grid-row-gap', 'grid-template-columns', 'grid-template-rows', 'height', 'inline-size', 'input-security', 'inset', 'inset-block', 'inset-block-end', 'inset-block-start', 'inset-inline', 'inset-inline-end', 'inset-inline-start', 'left', 'letter-spacing', 'line-clamp', 'line-height', 'margin', 'margin-block-end', 'margin-block-start', 'margin-bottom', 'margin-inline-end', 'margin-inline-start', 'margin-left', 'margin-right', 'margin-top', 'mask', 'mask-border', 'mask-position', 'mask-size', 'max-block-size', 'max-height', 'max-inline-size', 'max-lines', 'max-width', 'min-block-size', 'min-height', 'min-inline-size', 'min-width', 'object-position', 'offset', 'offset-anchor', 'offset-distance', 'offset-path', 'offset-position', 'offset-rotate', 'opacity', 'order', 'outline', 'outline-color', 'outline-offset', 'outline-width', 'padding', 'padding-block-end', 'padding-block-start', 'padding-bottom', 'padding-inline-end', 'padding-inline-start', 'padding-left', 'padding-right', 'padding-top', 'perspective', 'perspective-origin', 'right', 'rotate', 'row-gap', 'scale', 'scroll-margin', 'scroll-margin-block', 'scroll-margin-block-end', 'scroll-margin-block-start', 'scroll-margin-bottom', 'scroll-margin-inline', 'scroll-margin-inline-end', 'scroll-margin-inline-start', 'scroll-margin-left', 'scroll-margin-right', 'scroll-margin-top', 'scroll-padding', 'scroll-padding-block', 'scroll-padding-block-end', 'scroll-padding-block-start', 'scroll-padding-bottom', 'scroll-padding-inline', 'scroll-padding-inline-end', 'scroll-padding-inline-start', 'scroll-padding-left', 'scroll-padding-right', 'scroll-padding-top', 'scroll-snap-coordinate', 'scroll-snap-destination', 'scrollbar-color', 'shape-image-threshold', 'shape-margin', 'shape-outside', 'tab-size', 'text-decoration', 'text-decoration-color', 'text-decoration-thickness', 'text-emphasis', 'text-emphasis-color', 'text-indent', 'text-shadow', 'text-underline-offset', 'top', 'transform', 'transform-origin', 'translate', 'vertical-align', 'visibility', 'width', 'word-spacing', 'z-index', 'zoom']);\nfunction optimizeGroupPlayer(players) {\n switch (players.length) {\n case 0:\n return new NoopAnimationPlayer();\n case 1:\n return players[0];\n default:\n return new ɵAnimationGroupPlayer(players);\n }\n}\nfunction normalizeKeyframes$1(normalizer, keyframes, preStyles = new Map(), postStyles = new Map()) {\n const errors = [];\n const normalizedKeyframes = [];\n let previousOffset = -1;\n let previousKeyframe = null;\n keyframes.forEach(kf => {\n const offset = kf.get('offset');\n const isSameOffset = offset == previousOffset;\n const normalizedKeyframe = isSameOffset && previousKeyframe || new Map();\n kf.forEach((val, prop) => {\n let normalizedProp = prop;\n let normalizedValue = val;\n if (prop !== 'offset') {\n normalizedProp = normalizer.normalizePropertyName(normalizedProp, errors);\n switch (normalizedValue) {\n case ɵPRE_STYLE:\n normalizedValue = preStyles.get(prop);\n break;\n case AUTO_STYLE:\n normalizedValue = postStyles.get(prop);\n break;\n default:\n normalizedValue = normalizer.normalizeStyleValue(prop, normalizedProp, normalizedValue, errors);\n break;\n }\n }\n normalizedKeyframe.set(normalizedProp, normalizedValue);\n });\n if (!isSameOffset) {\n normalizedKeyframes.push(normalizedKeyframe);\n }\n previousKeyframe = normalizedKeyframe;\n previousOffset = offset;\n });\n if (errors.length) {\n throw animationFailed(errors);\n }\n return normalizedKeyframes;\n}\nfunction listenOnPlayer(player, eventName, event, callback) {\n switch (eventName) {\n case 'start':\n player.onStart(() => callback(event && copyAnimationEvent(event, 'start', player)));\n break;\n case 'done':\n player.onDone(() => callback(event && copyAnimationEvent(event, 'done', player)));\n break;\n case 'destroy':\n player.onDestroy(() => callback(event && copyAnimationEvent(event, 'destroy', player)));\n break;\n }\n}\nfunction copyAnimationEvent(e, phaseName, player) {\n const totalTime = player.totalTime;\n const disabled = player.disabled ? true : false;\n const event = makeAnimationEvent(e.element, e.triggerName, e.fromState, e.toState, phaseName || e.phaseName, totalTime == undefined ? e.totalTime : totalTime, disabled);\n const data = e['_data'];\n if (data != null) {\n event['_data'] = data;\n }\n return event;\n}\nfunction makeAnimationEvent(element, triggerName, fromState, toState, phaseName = '', totalTime = 0, disabled) {\n return {\n element,\n triggerName,\n fromState,\n toState,\n phaseName,\n totalTime,\n disabled: !!disabled\n };\n}\nfunction getOrSetDefaultValue(map, key, defaultValue) {\n let value = map.get(key);\n if (!value) {\n map.set(key, value = defaultValue);\n }\n return value;\n}\nfunction parseTimelineCommand(command) {\n const separatorPos = command.indexOf(':');\n const id = command.substring(1, separatorPos);\n const action = command.slice(separatorPos + 1);\n return [id, action];\n}\nconst documentElement = /* @__PURE__ */(() => typeof document === 'undefined' ? null : document.documentElement)();\nfunction getParentElement(element) {\n const parent = element.parentNode || element.host || null; // consider host to support shadow DOM\n if (parent === documentElement) {\n return null;\n }\n return parent;\n}\nfunction containsVendorPrefix(prop) {\n // Webkit is the only real popular vendor prefix nowadays\n // cc: http://shouldiprefix.com/\n return prop.substring(1, 6) == 'ebkit'; // webkit or Webkit\n}\nlet _CACHED_BODY = null;\nlet _IS_WEBKIT = false;\nfunction validateStyleProperty(prop) {\n if (!_CACHED_BODY) {\n _CACHED_BODY = getBodyNode() || {};\n _IS_WEBKIT = _CACHED_BODY.style ? 'WebkitAppearance' in _CACHED_BODY.style : false;\n }\n let result = true;\n if (_CACHED_BODY.style && !containsVendorPrefix(prop)) {\n result = prop in _CACHED_BODY.style;\n if (!result && _IS_WEBKIT) {\n const camelProp = 'Webkit' + prop.charAt(0).toUpperCase() + prop.slice(1);\n result = camelProp in _CACHED_BODY.style;\n }\n }\n return result;\n}\nfunction validateWebAnimatableStyleProperty(prop) {\n return ANIMATABLE_PROP_SET.has(prop);\n}\nfunction getBodyNode() {\n if (typeof document != 'undefined') {\n return document.body;\n }\n return null;\n}\nfunction containsElement(elm1, elm2) {\n while (elm2) {\n if (elm2 === elm1) {\n return true;\n }\n elm2 = getParentElement(elm2);\n }\n return false;\n}\nfunction invokeQuery(element, selector, multi) {\n if (multi) {\n return Array.from(element.querySelectorAll(selector));\n }\n const elem = element.querySelector(selector);\n return elem ? [elem] : [];\n}\nfunction hypenatePropsKeys(original) {\n const newMap = new Map();\n original.forEach((val, prop) => {\n const newProp = prop.replace(/([a-z])([A-Z])/g, '$1-$2');\n newMap.set(newProp, val);\n });\n return newMap;\n}\n\n/**\n * @publicApi\n *\n * `AnimationDriver` implentation for Noop animations\n */\nlet NoopAnimationDriver = /*#__PURE__*/(() => {\n class NoopAnimationDriver {\n /**\n * @returns Whether `prop` is a valid CSS property\n */\n validateStyleProperty(prop) {\n return validateStyleProperty(prop);\n }\n /**\n *\n * @returns Whether elm1 contains elm2.\n */\n containsElement(elm1, elm2) {\n return containsElement(elm1, elm2);\n }\n /**\n * @returns Rhe parent of the given element or `null` if the element is the `document`\n */\n getParentElement(element) {\n return getParentElement(element);\n }\n /**\n * @returns The result of the query selector on the element. The array will contain up to 1 item\n * if `multi` is `false`.\n */\n query(element, selector, multi) {\n return invokeQuery(element, selector, multi);\n }\n /**\n * @returns The `defaultValue` or empty string\n */\n computeStyle(element, prop, defaultValue) {\n return defaultValue || '';\n }\n /**\n * @returns An `NoopAnimationPlayer`\n */\n animate(element, keyframes, duration, delay, easing, previousPlayers = [], scrubberAccessRequested) {\n return new NoopAnimationPlayer(duration, delay);\n }\n static ɵfac = function NoopAnimationDriver_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || NoopAnimationDriver)();\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: NoopAnimationDriver,\n factory: NoopAnimationDriver.ɵfac\n });\n }\n return NoopAnimationDriver;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * @publicApi\n */\nclass AnimationDriver {\n /**\n * @deprecated Use the NoopAnimationDriver class.\n */\n static NOOP = /*#__PURE__*/new NoopAnimationDriver();\n}\nclass AnimationStyleNormalizer {}\nclass NoopAnimationStyleNormalizer {\n normalizePropertyName(propertyName, errors) {\n return propertyName;\n }\n normalizeStyleValue(userProvidedProperty, normalizedProperty, value, errors) {\n return value;\n }\n}\nconst ONE_SECOND = 1000;\nconst SUBSTITUTION_EXPR_START = '{{';\nconst SUBSTITUTION_EXPR_END = '}}';\nconst ENTER_CLASSNAME = 'ng-enter';\nconst LEAVE_CLASSNAME = 'ng-leave';\nconst NG_TRIGGER_CLASSNAME = 'ng-trigger';\nconst NG_TRIGGER_SELECTOR = '.ng-trigger';\nconst NG_ANIMATING_CLASSNAME = 'ng-animating';\nconst NG_ANIMATING_SELECTOR = '.ng-animating';\nfunction resolveTimingValue(value) {\n if (typeof value == 'number') return value;\n const matches = value.match(/^(-?[\\.\\d]+)(m?s)/);\n if (!matches || matches.length < 2) return 0;\n return _convertTimeValueToMS(parseFloat(matches[1]), matches[2]);\n}\nfunction _convertTimeValueToMS(value, unit) {\n switch (unit) {\n case 's':\n return value * ONE_SECOND;\n default:\n // ms or something else\n return value;\n }\n}\nfunction resolveTiming(timings, errors, allowNegativeValues) {\n return timings.hasOwnProperty('duration') ? timings : parseTimeExpression(timings, errors, allowNegativeValues);\n}\nfunction parseTimeExpression(exp, errors, allowNegativeValues) {\n const regex = /^(-?[\\.\\d]+)(m?s)(?:\\s+(-?[\\.\\d]+)(m?s))?(?:\\s+([-a-z]+(?:\\(.+?\\))?))?$/i;\n let duration;\n let delay = 0;\n let easing = '';\n if (typeof exp === 'string') {\n const matches = exp.match(regex);\n if (matches === null) {\n errors.push(invalidTimingValue(exp));\n return {\n duration: 0,\n delay: 0,\n easing: ''\n };\n }\n duration = _convertTimeValueToMS(parseFloat(matches[1]), matches[2]);\n const delayMatch = matches[3];\n if (delayMatch != null) {\n delay = _convertTimeValueToMS(parseFloat(delayMatch), matches[4]);\n }\n const easingVal = matches[5];\n if (easingVal) {\n easing = easingVal;\n }\n } else {\n duration = exp;\n }\n if (!allowNegativeValues) {\n let containsErrors = false;\n let startIndex = errors.length;\n if (duration < 0) {\n errors.push(negativeStepValue());\n containsErrors = true;\n }\n if (delay < 0) {\n errors.push(negativeDelayValue());\n containsErrors = true;\n }\n if (containsErrors) {\n errors.splice(startIndex, 0, invalidTimingValue(exp));\n }\n }\n return {\n duration,\n delay,\n easing\n };\n}\nfunction normalizeKeyframes(keyframes) {\n if (!keyframes.length) {\n return [];\n }\n if (keyframes[0] instanceof Map) {\n return keyframes;\n }\n return keyframes.map(kf => new Map(Object.entries(kf)));\n}\nfunction normalizeStyles(styles) {\n return Array.isArray(styles) ? new Map(...styles) : new Map(styles);\n}\nfunction setStyles(element, styles, formerStyles) {\n styles.forEach((val, prop) => {\n const camelProp = dashCaseToCamelCase(prop);\n if (formerStyles && !formerStyles.has(prop)) {\n formerStyles.set(prop, element.style[camelProp]);\n }\n element.style[camelProp] = val;\n });\n}\nfunction eraseStyles(element, styles) {\n styles.forEach((_, prop) => {\n const camelProp = dashCaseToCamelCase(prop);\n element.style[camelProp] = '';\n });\n}\nfunction normalizeAnimationEntry(steps) {\n if (Array.isArray(steps)) {\n if (steps.length == 1) return steps[0];\n return sequence(steps);\n }\n return steps;\n}\nfunction validateStyleParams(value, options, errors) {\n const params = options.params || {};\n const matches = extractStyleParams(value);\n if (matches.length) {\n matches.forEach(varName => {\n if (!params.hasOwnProperty(varName)) {\n errors.push(invalidStyleParams(varName));\n }\n });\n }\n}\nconst PARAM_REGEX = /* @__PURE__ */new RegExp(`${SUBSTITUTION_EXPR_START}\\\\s*(.+?)\\\\s*${SUBSTITUTION_EXPR_END}`, 'g');\nfunction extractStyleParams(value) {\n let params = [];\n if (typeof value === 'string') {\n let match;\n while (match = PARAM_REGEX.exec(value)) {\n params.push(match[1]);\n }\n PARAM_REGEX.lastIndex = 0;\n }\n return params;\n}\nfunction interpolateParams(value, params, errors) {\n const original = `${value}`;\n const str = original.replace(PARAM_REGEX, (_, varName) => {\n let localVal = params[varName];\n // this means that the value was never overridden by the data passed in by the user\n if (localVal == null) {\n errors.push(invalidParamValue(varName));\n localVal = '';\n }\n return localVal.toString();\n });\n // we do this to assert that numeric values stay as they are\n return str == original ? value : str;\n}\nconst DASH_CASE_REGEXP = /-+([a-z0-9])/g;\nfunction dashCaseToCamelCase(input) {\n return input.replace(DASH_CASE_REGEXP, (...m) => m[1].toUpperCase());\n}\nfunction camelCaseToDashCase(input) {\n return input.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n}\nfunction allowPreviousPlayerStylesMerge(duration, delay) {\n return duration === 0 || delay === 0;\n}\nfunction balancePreviousStylesIntoKeyframes(element, keyframes, previousStyles) {\n if (previousStyles.size && keyframes.length) {\n let startingKeyframe = keyframes[0];\n let missingStyleProps = [];\n previousStyles.forEach((val, prop) => {\n if (!startingKeyframe.has(prop)) {\n missingStyleProps.push(prop);\n }\n startingKeyframe.set(prop, val);\n });\n if (missingStyleProps.length) {\n for (let i = 1; i < keyframes.length; i++) {\n let kf = keyframes[i];\n missingStyleProps.forEach(prop => kf.set(prop, computeStyle(element, prop)));\n }\n }\n }\n return keyframes;\n}\nfunction visitDslNode(visitor, node, context) {\n switch (node.type) {\n case AnimationMetadataType.Trigger:\n return visitor.visitTrigger(node, context);\n case AnimationMetadataType.State:\n return visitor.visitState(node, context);\n case AnimationMetadataType.Transition:\n return visitor.visitTransition(node, context);\n case AnimationMetadataType.Sequence:\n return visitor.visitSequence(node, context);\n case AnimationMetadataType.Group:\n return visitor.visitGroup(node, context);\n case AnimationMetadataType.Animate:\n return visitor.visitAnimate(node, context);\n case AnimationMetadataType.Keyframes:\n return visitor.visitKeyframes(node, context);\n case AnimationMetadataType.Style:\n return visitor.visitStyle(node, context);\n case AnimationMetadataType.Reference:\n return visitor.visitReference(node, context);\n case AnimationMetadataType.AnimateChild:\n return visitor.visitAnimateChild(node, context);\n case AnimationMetadataType.AnimateRef:\n return visitor.visitAnimateRef(node, context);\n case AnimationMetadataType.Query:\n return visitor.visitQuery(node, context);\n case AnimationMetadataType.Stagger:\n return visitor.visitStagger(node, context);\n default:\n throw invalidNodeType(node.type);\n }\n}\nfunction computeStyle(element, prop) {\n return window.getComputedStyle(element)[prop];\n}\nconst DIMENSIONAL_PROP_SET = /*#__PURE__*/new Set(['width', 'height', 'minWidth', 'minHeight', 'maxWidth', 'maxHeight', 'left', 'top', 'bottom', 'right', 'fontSize', 'outlineWidth', 'outlineOffset', 'paddingTop', 'paddingLeft', 'paddingBottom', 'paddingRight', 'marginTop', 'marginLeft', 'marginBottom', 'marginRight', 'borderRadius', 'borderWidth', 'borderTopWidth', 'borderLeftWidth', 'borderRightWidth', 'borderBottomWidth', 'textIndent', 'perspective']);\nclass WebAnimationsStyleNormalizer extends AnimationStyleNormalizer {\n normalizePropertyName(propertyName, errors) {\n return dashCaseToCamelCase(propertyName);\n }\n normalizeStyleValue(userProvidedProperty, normalizedProperty, value, errors) {\n let unit = '';\n const strVal = value.toString().trim();\n if (DIMENSIONAL_PROP_SET.has(normalizedProperty) && value !== 0 && value !== '0') {\n if (typeof value === 'number') {\n unit = 'px';\n } else {\n const valAndSuffixMatch = value.match(/^[+-]?[\\d\\.]+([a-z]*)$/);\n if (valAndSuffixMatch && valAndSuffixMatch[1].length == 0) {\n errors.push(invalidCssUnitValue(userProvidedProperty, value));\n }\n }\n }\n return strVal + unit;\n }\n}\nfunction createListOfWarnings(warnings) {\n const LINE_START = '\\n - ';\n return `${LINE_START}${warnings.filter(Boolean).map(warning => warning).join(LINE_START)}`;\n}\nfunction warnValidation(warnings) {\n console.warn(`animation validation warnings:${createListOfWarnings(warnings)}`);\n}\nfunction warnTriggerBuild(name, warnings) {\n console.warn(`The animation trigger \"${name}\" has built with the following warnings:${createListOfWarnings(warnings)}`);\n}\nfunction warnRegister(warnings) {\n console.warn(`Animation built with the following warnings:${createListOfWarnings(warnings)}`);\n}\nfunction triggerParsingWarnings(name, warnings) {\n console.warn(`Animation parsing for the ${name} trigger presents the following warnings:${createListOfWarnings(warnings)}`);\n}\nfunction pushUnrecognizedPropertiesWarning(warnings, props) {\n if (props.length) {\n warnings.push(`The following provided properties are not recognized: ${props.join(', ')}`);\n }\n}\nconst ANY_STATE = '*';\nfunction parseTransitionExpr(transitionValue, errors) {\n const expressions = [];\n if (typeof transitionValue == 'string') {\n transitionValue.split(/\\s*,\\s*/).forEach(str => parseInnerTransitionStr(str, expressions, errors));\n } else {\n expressions.push(transitionValue);\n }\n return expressions;\n}\nfunction parseInnerTransitionStr(eventStr, expressions, errors) {\n if (eventStr[0] == ':') {\n const result = parseAnimationAlias(eventStr, errors);\n if (typeof result == 'function') {\n expressions.push(result);\n return;\n }\n eventStr = result;\n }\n const match = eventStr.match(/^(\\*|[-\\w]+)\\s*()\\s*(\\*|[-\\w]+)$/);\n if (match == null || match.length < 4) {\n errors.push(invalidExpression(eventStr));\n return expressions;\n }\n const fromState = match[1];\n const separator = match[2];\n const toState = match[3];\n expressions.push(makeLambdaFromStates(fromState, toState));\n const isFullAnyStateExpr = fromState == ANY_STATE && toState == ANY_STATE;\n if (separator[0] == '<' && !isFullAnyStateExpr) {\n expressions.push(makeLambdaFromStates(toState, fromState));\n }\n return;\n}\nfunction parseAnimationAlias(alias, errors) {\n switch (alias) {\n case ':enter':\n return 'void => *';\n case ':leave':\n return '* => void';\n case ':increment':\n return (fromState, toState) => parseFloat(toState) > parseFloat(fromState);\n case ':decrement':\n return (fromState, toState) => parseFloat(toState) < parseFloat(fromState);\n default:\n errors.push(invalidTransitionAlias(alias));\n return '* => *';\n }\n}\n// DO NOT REFACTOR ... keep the follow set instantiations\n// with the values intact (closure compiler for some reason\n// removes follow-up lines that add the values outside of\n// the constructor...\nconst TRUE_BOOLEAN_VALUES = /*#__PURE__*/new Set(['true', '1']);\nconst FALSE_BOOLEAN_VALUES = /*#__PURE__*/new Set(['false', '0']);\nfunction makeLambdaFromStates(lhs, rhs) {\n const LHS_MATCH_BOOLEAN = TRUE_BOOLEAN_VALUES.has(lhs) || FALSE_BOOLEAN_VALUES.has(lhs);\n const RHS_MATCH_BOOLEAN = TRUE_BOOLEAN_VALUES.has(rhs) || FALSE_BOOLEAN_VALUES.has(rhs);\n return (fromState, toState) => {\n let lhsMatch = lhs == ANY_STATE || lhs == fromState;\n let rhsMatch = rhs == ANY_STATE || rhs == toState;\n if (!lhsMatch && LHS_MATCH_BOOLEAN && typeof fromState === 'boolean') {\n lhsMatch = fromState ? TRUE_BOOLEAN_VALUES.has(lhs) : FALSE_BOOLEAN_VALUES.has(lhs);\n }\n if (!rhsMatch && RHS_MATCH_BOOLEAN && typeof toState === 'boolean') {\n rhsMatch = toState ? TRUE_BOOLEAN_VALUES.has(rhs) : FALSE_BOOLEAN_VALUES.has(rhs);\n }\n return lhsMatch && rhsMatch;\n };\n}\nconst SELF_TOKEN = ':self';\nconst SELF_TOKEN_REGEX = /* @__PURE__ */new RegExp(`s*${SELF_TOKEN}s*,?`, 'g');\n/*\n * [Validation]\n * The visitor code below will traverse the animation AST generated by the animation verb functions\n * (the output is a tree of objects) and attempt to perform a series of validations on the data. The\n * following corner-cases will be validated:\n *\n * 1. Overlap of animations\n * Given that a CSS property cannot be animated in more than one place at the same time, it's\n * important that this behavior is detected and validated. The way in which this occurs is that\n * each time a style property is examined, a string-map containing the property will be updated with\n * the start and end times for when the property is used within an animation step.\n *\n * If there are two or more parallel animations that are currently running (these are invoked by the\n * group()) on the same element then the validator will throw an error. Since the start/end timing\n * values are collected for each property then if the current animation step is animating the same\n * property and its timing values fall anywhere into the window of time that the property is\n * currently being animated within then this is what causes an error.\n *\n * 2. Timing values\n * The validator will validate to see if a timing value of `duration delay easing` or\n * `durationNumber` is valid or not.\n *\n * (note that upon validation the code below will replace the timing data with an object containing\n * {duration,delay,easing}.\n *\n * 3. Offset Validation\n * Each of the style() calls are allowed to have an offset value when placed inside of keyframes().\n * Offsets within keyframes() are considered valid when:\n *\n * - No offsets are used at all\n * - Each style() entry contains an offset value\n * - Each offset is between 0 and 1\n * - Each offset is greater to or equal than the previous one\n *\n * Otherwise an error will be thrown.\n */\nfunction buildAnimationAst(driver, metadata, errors, warnings) {\n return new AnimationAstBuilderVisitor(driver).build(metadata, errors, warnings);\n}\nconst ROOT_SELECTOR = '';\nclass AnimationAstBuilderVisitor {\n _driver;\n constructor(_driver) {\n this._driver = _driver;\n }\n build(metadata, errors, warnings) {\n const context = new AnimationAstBuilderContext(errors);\n this._resetContextStyleTimingState(context);\n const ast = visitDslNode(this, normalizeAnimationEntry(metadata), context);\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (context.unsupportedCSSPropertiesFound.size) {\n pushUnrecognizedPropertiesWarning(warnings, [...context.unsupportedCSSPropertiesFound.keys()]);\n }\n }\n return ast;\n }\n _resetContextStyleTimingState(context) {\n context.currentQuerySelector = ROOT_SELECTOR;\n context.collectedStyles = new Map();\n context.collectedStyles.set(ROOT_SELECTOR, new Map());\n context.currentTime = 0;\n }\n visitTrigger(metadata, context) {\n let queryCount = context.queryCount = 0;\n let depCount = context.depCount = 0;\n const states = [];\n const transitions = [];\n if (metadata.name.charAt(0) == '@') {\n context.errors.push(invalidTrigger());\n }\n metadata.definitions.forEach(def => {\n this._resetContextStyleTimingState(context);\n if (def.type == AnimationMetadataType.State) {\n const stateDef = def;\n const name = stateDef.name;\n name.toString().split(/\\s*,\\s*/).forEach(n => {\n stateDef.name = n;\n states.push(this.visitState(stateDef, context));\n });\n stateDef.name = name;\n } else if (def.type == AnimationMetadataType.Transition) {\n const transition = this.visitTransition(def, context);\n queryCount += transition.queryCount;\n depCount += transition.depCount;\n transitions.push(transition);\n } else {\n context.errors.push(invalidDefinition());\n }\n });\n return {\n type: AnimationMetadataType.Trigger,\n name: metadata.name,\n states,\n transitions,\n queryCount,\n depCount,\n options: null\n };\n }\n visitState(metadata, context) {\n const styleAst = this.visitStyle(metadata.styles, context);\n const astParams = metadata.options && metadata.options.params || null;\n if (styleAst.containsDynamicStyles) {\n const missingSubs = new Set();\n const params = astParams || {};\n styleAst.styles.forEach(style => {\n if (style instanceof Map) {\n style.forEach(value => {\n extractStyleParams(value).forEach(sub => {\n if (!params.hasOwnProperty(sub)) {\n missingSubs.add(sub);\n }\n });\n });\n }\n });\n if (missingSubs.size) {\n context.errors.push(invalidState(metadata.name, [...missingSubs.values()]));\n }\n }\n return {\n type: AnimationMetadataType.State,\n name: metadata.name,\n style: styleAst,\n options: astParams ? {\n params: astParams\n } : null\n };\n }\n visitTransition(metadata, context) {\n context.queryCount = 0;\n context.depCount = 0;\n const animation = visitDslNode(this, normalizeAnimationEntry(metadata.animation), context);\n const matchers = parseTransitionExpr(metadata.expr, context.errors);\n return {\n type: AnimationMetadataType.Transition,\n matchers,\n animation,\n queryCount: context.queryCount,\n depCount: context.depCount,\n options: normalizeAnimationOptions(metadata.options)\n };\n }\n visitSequence(metadata, context) {\n return {\n type: AnimationMetadataType.Sequence,\n steps: metadata.steps.map(s => visitDslNode(this, s, context)),\n options: normalizeAnimationOptions(metadata.options)\n };\n }\n visitGroup(metadata, context) {\n const currentTime = context.currentTime;\n let furthestTime = 0;\n const steps = metadata.steps.map(step => {\n context.currentTime = currentTime;\n const innerAst = visitDslNode(this, step, context);\n furthestTime = Math.max(furthestTime, context.currentTime);\n return innerAst;\n });\n context.currentTime = furthestTime;\n return {\n type: AnimationMetadataType.Group,\n steps,\n options: normalizeAnimationOptions(metadata.options)\n };\n }\n visitAnimate(metadata, context) {\n const timingAst = constructTimingAst(metadata.timings, context.errors);\n context.currentAnimateTimings = timingAst;\n let styleAst;\n let styleMetadata = metadata.styles ? metadata.styles : style({});\n if (styleMetadata.type == AnimationMetadataType.Keyframes) {\n styleAst = this.visitKeyframes(styleMetadata, context);\n } else {\n let styleMetadata = metadata.styles;\n let isEmpty = false;\n if (!styleMetadata) {\n isEmpty = true;\n const newStyleData = {};\n if (timingAst.easing) {\n newStyleData['easing'] = timingAst.easing;\n }\n styleMetadata = style(newStyleData);\n }\n context.currentTime += timingAst.duration + timingAst.delay;\n const _styleAst = this.visitStyle(styleMetadata, context);\n _styleAst.isEmptyStep = isEmpty;\n styleAst = _styleAst;\n }\n context.currentAnimateTimings = null;\n return {\n type: AnimationMetadataType.Animate,\n timings: timingAst,\n style: styleAst,\n options: null\n };\n }\n visitStyle(metadata, context) {\n const ast = this._makeStyleAst(metadata, context);\n this._validateStyleAst(ast, context);\n return ast;\n }\n _makeStyleAst(metadata, context) {\n const styles = [];\n const metadataStyles = Array.isArray(metadata.styles) ? metadata.styles : [metadata.styles];\n for (let styleTuple of metadataStyles) {\n if (typeof styleTuple === 'string') {\n if (styleTuple === AUTO_STYLE) {\n styles.push(styleTuple);\n } else {\n context.errors.push(invalidStyleValue(styleTuple));\n }\n } else {\n styles.push(new Map(Object.entries(styleTuple)));\n }\n }\n let containsDynamicStyles = false;\n let collectedEasing = null;\n styles.forEach(styleData => {\n if (styleData instanceof Map) {\n if (styleData.has('easing')) {\n collectedEasing = styleData.get('easing');\n styleData.delete('easing');\n }\n if (!containsDynamicStyles) {\n for (let value of styleData.values()) {\n if (value.toString().indexOf(SUBSTITUTION_EXPR_START) >= 0) {\n containsDynamicStyles = true;\n break;\n }\n }\n }\n }\n });\n return {\n type: AnimationMetadataType.Style,\n styles,\n easing: collectedEasing,\n offset: metadata.offset,\n containsDynamicStyles,\n options: null\n };\n }\n _validateStyleAst(ast, context) {\n const timings = context.currentAnimateTimings;\n let endTime = context.currentTime;\n let startTime = context.currentTime;\n if (timings && startTime > 0) {\n startTime -= timings.duration + timings.delay;\n }\n ast.styles.forEach(tuple => {\n if (typeof tuple === 'string') return;\n tuple.forEach((value, prop) => {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!this._driver.validateStyleProperty(prop)) {\n tuple.delete(prop);\n context.unsupportedCSSPropertiesFound.add(prop);\n return;\n }\n }\n // This is guaranteed to have a defined Map at this querySelector location making it\n // safe to add the assertion here. It is set as a default empty map in prior methods.\n const collectedStyles = context.collectedStyles.get(context.currentQuerySelector);\n const collectedEntry = collectedStyles.get(prop);\n let updateCollectedStyle = true;\n if (collectedEntry) {\n if (startTime != endTime && startTime >= collectedEntry.startTime && endTime <= collectedEntry.endTime) {\n context.errors.push(invalidParallelAnimation(prop, collectedEntry.startTime, collectedEntry.endTime, startTime, endTime));\n updateCollectedStyle = false;\n }\n // we always choose the smaller start time value since we\n // want to have a record of the entire animation window where\n // the style property is being animated in between\n startTime = collectedEntry.startTime;\n }\n if (updateCollectedStyle) {\n collectedStyles.set(prop, {\n startTime,\n endTime\n });\n }\n if (context.options) {\n validateStyleParams(value, context.options, context.errors);\n }\n });\n });\n }\n visitKeyframes(metadata, context) {\n const ast = {\n type: AnimationMetadataType.Keyframes,\n styles: [],\n options: null\n };\n if (!context.currentAnimateTimings) {\n context.errors.push(invalidKeyframes());\n return ast;\n }\n const MAX_KEYFRAME_OFFSET = 1;\n let totalKeyframesWithOffsets = 0;\n const offsets = [];\n let offsetsOutOfOrder = false;\n let keyframesOutOfRange = false;\n let previousOffset = 0;\n const keyframes = metadata.steps.map(styles => {\n const style = this._makeStyleAst(styles, context);\n let offsetVal = style.offset != null ? style.offset : consumeOffset(style.styles);\n let offset = 0;\n if (offsetVal != null) {\n totalKeyframesWithOffsets++;\n offset = style.offset = offsetVal;\n }\n keyframesOutOfRange = keyframesOutOfRange || offset < 0 || offset > 1;\n offsetsOutOfOrder = offsetsOutOfOrder || offset < previousOffset;\n previousOffset = offset;\n offsets.push(offset);\n return style;\n });\n if (keyframesOutOfRange) {\n context.errors.push(invalidOffset());\n }\n if (offsetsOutOfOrder) {\n context.errors.push(keyframeOffsetsOutOfOrder());\n }\n const length = metadata.steps.length;\n let generatedOffset = 0;\n if (totalKeyframesWithOffsets > 0 && totalKeyframesWithOffsets < length) {\n context.errors.push(keyframesMissingOffsets());\n } else if (totalKeyframesWithOffsets == 0) {\n generatedOffset = MAX_KEYFRAME_OFFSET / (length - 1);\n }\n const limit = length - 1;\n const currentTime = context.currentTime;\n const currentAnimateTimings = context.currentAnimateTimings;\n const animateDuration = currentAnimateTimings.duration;\n keyframes.forEach((kf, i) => {\n const offset = generatedOffset > 0 ? i == limit ? 1 : generatedOffset * i : offsets[i];\n const durationUpToThisFrame = offset * animateDuration;\n context.currentTime = currentTime + currentAnimateTimings.delay + durationUpToThisFrame;\n currentAnimateTimings.duration = durationUpToThisFrame;\n this._validateStyleAst(kf, context);\n kf.offset = offset;\n ast.styles.push(kf);\n });\n return ast;\n }\n visitReference(metadata, context) {\n return {\n type: AnimationMetadataType.Reference,\n animation: visitDslNode(this, normalizeAnimationEntry(metadata.animation), context),\n options: normalizeAnimationOptions(metadata.options)\n };\n }\n visitAnimateChild(metadata, context) {\n context.depCount++;\n return {\n type: AnimationMetadataType.AnimateChild,\n options: normalizeAnimationOptions(metadata.options)\n };\n }\n visitAnimateRef(metadata, context) {\n return {\n type: AnimationMetadataType.AnimateRef,\n animation: this.visitReference(metadata.animation, context),\n options: normalizeAnimationOptions(metadata.options)\n };\n }\n visitQuery(metadata, context) {\n const parentSelector = context.currentQuerySelector;\n const options = metadata.options || {};\n context.queryCount++;\n context.currentQuery = metadata;\n const [selector, includeSelf] = normalizeSelector(metadata.selector);\n context.currentQuerySelector = parentSelector.length ? parentSelector + ' ' + selector : selector;\n getOrSetDefaultValue(context.collectedStyles, context.currentQuerySelector, new Map());\n const animation = visitDslNode(this, normalizeAnimationEntry(metadata.animation), context);\n context.currentQuery = null;\n context.currentQuerySelector = parentSelector;\n return {\n type: AnimationMetadataType.Query,\n selector,\n limit: options.limit || 0,\n optional: !!options.optional,\n includeSelf,\n animation,\n originalSelector: metadata.selector,\n options: normalizeAnimationOptions(metadata.options)\n };\n }\n visitStagger(metadata, context) {\n if (!context.currentQuery) {\n context.errors.push(invalidStagger());\n }\n const timings = metadata.timings === 'full' ? {\n duration: 0,\n delay: 0,\n easing: 'full'\n } : resolveTiming(metadata.timings, context.errors, true);\n return {\n type: AnimationMetadataType.Stagger,\n animation: visitDslNode(this, normalizeAnimationEntry(metadata.animation), context),\n timings,\n options: null\n };\n }\n}\nfunction normalizeSelector(selector) {\n const hasAmpersand = selector.split(/\\s*,\\s*/).find(token => token == SELF_TOKEN) ? true : false;\n if (hasAmpersand) {\n selector = selector.replace(SELF_TOKEN_REGEX, '');\n }\n // Note: the :enter and :leave aren't normalized here since those\n // selectors are filled in at runtime during timeline building\n selector = selector.replace(/@\\*/g, NG_TRIGGER_SELECTOR).replace(/@\\w+/g, match => NG_TRIGGER_SELECTOR + '-' + match.slice(1)).replace(/:animating/g, NG_ANIMATING_SELECTOR);\n return [selector, hasAmpersand];\n}\nfunction normalizeParams(obj) {\n return obj ? {\n ...obj\n } : null;\n}\nclass AnimationAstBuilderContext {\n errors;\n queryCount = 0;\n depCount = 0;\n currentTransition = null;\n currentQuery = null;\n currentQuerySelector = null;\n currentAnimateTimings = null;\n currentTime = 0;\n collectedStyles = /*#__PURE__*/new Map();\n options = null;\n unsupportedCSSPropertiesFound = /*#__PURE__*/new Set();\n constructor(errors) {\n this.errors = errors;\n }\n}\nfunction consumeOffset(styles) {\n if (typeof styles == 'string') return null;\n let offset = null;\n if (Array.isArray(styles)) {\n styles.forEach(styleTuple => {\n if (styleTuple instanceof Map && styleTuple.has('offset')) {\n const obj = styleTuple;\n offset = parseFloat(obj.get('offset'));\n obj.delete('offset');\n }\n });\n } else if (styles instanceof Map && styles.has('offset')) {\n const obj = styles;\n offset = parseFloat(obj.get('offset'));\n obj.delete('offset');\n }\n return offset;\n}\nfunction constructTimingAst(value, errors) {\n if (value.hasOwnProperty('duration')) {\n return value;\n }\n if (typeof value == 'number') {\n const duration = resolveTiming(value, errors).duration;\n return makeTimingAst(duration, 0, '');\n }\n const strValue = value;\n const isDynamic = strValue.split(/\\s+/).some(v => v.charAt(0) == '{' && v.charAt(1) == '{');\n if (isDynamic) {\n const ast = makeTimingAst(0, 0, '');\n ast.dynamic = true;\n ast.strValue = strValue;\n return ast;\n }\n const timings = resolveTiming(strValue, errors);\n return makeTimingAst(timings.duration, timings.delay, timings.easing);\n}\nfunction normalizeAnimationOptions(options) {\n if (options) {\n options = {\n ...options\n };\n if (options['params']) {\n options['params'] = normalizeParams(options['params']);\n }\n } else {\n options = {};\n }\n return options;\n}\nfunction makeTimingAst(duration, delay, easing) {\n return {\n duration,\n delay,\n easing\n };\n}\nfunction createTimelineInstruction(element, keyframes, preStyleProps, postStyleProps, duration, delay, easing = null, subTimeline = false) {\n return {\n type: 1 /* AnimationTransitionInstructionType.TimelineAnimation */,\n element,\n keyframes,\n preStyleProps,\n postStyleProps,\n duration,\n delay,\n totalTime: duration + delay,\n easing,\n subTimeline\n };\n}\nclass ElementInstructionMap {\n _map = /*#__PURE__*/new Map();\n get(element) {\n return this._map.get(element) || [];\n }\n append(element, instructions) {\n let existingInstructions = this._map.get(element);\n if (!existingInstructions) {\n this._map.set(element, existingInstructions = []);\n }\n existingInstructions.push(...instructions);\n }\n has(element) {\n return this._map.has(element);\n }\n clear() {\n this._map.clear();\n }\n}\nconst ONE_FRAME_IN_MILLISECONDS = 1;\nconst ENTER_TOKEN = ':enter';\nconst ENTER_TOKEN_REGEX = /* @__PURE__ */new RegExp(ENTER_TOKEN, 'g');\nconst LEAVE_TOKEN = ':leave';\nconst LEAVE_TOKEN_REGEX = /* @__PURE__ */new RegExp(LEAVE_TOKEN, 'g');\n/*\n * The code within this file aims to generate web-animations-compatible keyframes from Angular's\n * animation DSL code.\n *\n * The code below will be converted from:\n *\n * ```ts\n * sequence([\n * style({ opacity: 0 }),\n * animate(1000, style({ opacity: 0 }))\n * ])\n * ```\n *\n * To:\n * ```ts\n * keyframes = [{ opacity: 0, offset: 0 }, { opacity: 1, offset: 1 }]\n * duration = 1000\n * delay = 0\n * easing = ''\n * ```\n *\n * For this operation to cover the combination of animation verbs (style, animate, group, etc...) a\n * combination of AST traversal and merge-sort-like algorithms are used.\n *\n * [AST Traversal]\n * Each of the animation verbs, when executed, will return an string-map object representing what\n * type of action it is (style, animate, group, etc...) and the data associated with it. This means\n * that when functional composition mix of these functions is evaluated (like in the example above)\n * then it will end up producing a tree of objects representing the animation itself.\n *\n * When this animation object tree is processed by the visitor code below it will visit each of the\n * verb statements within the visitor. And during each visit it will build the context of the\n * animation keyframes by interacting with the `TimelineBuilder`.\n *\n * [TimelineBuilder]\n * This class is responsible for tracking the styles and building a series of keyframe objects for a\n * timeline between a start and end time. The builder starts off with an initial timeline and each\n * time the AST comes across a `group()`, `keyframes()` or a combination of the two within a\n * `sequence()` then it will generate a sub timeline for each step as well as a new one after\n * they are complete.\n *\n * As the AST is traversed, the timing state on each of the timelines will be incremented. If a sub\n * timeline was created (based on one of the cases above) then the parent timeline will attempt to\n * merge the styles used within the sub timelines into itself (only with group() this will happen).\n * This happens with a merge operation (much like how the merge works in mergeSort) and it will only\n * copy the most recently used styles from the sub timelines into the parent timeline. This ensures\n * that if the styles are used later on in another phase of the animation then they will be the most\n * up-to-date values.\n *\n * [How Missing Styles Are Updated]\n * Each timeline has a `backFill` property which is responsible for filling in new styles into\n * already processed keyframes if a new style shows up later within the animation sequence.\n *\n * ```ts\n * sequence([\n * style({ width: 0 }),\n * animate(1000, style({ width: 100 })),\n * animate(1000, style({ width: 200 })),\n * animate(1000, style({ width: 300 }))\n * animate(1000, style({ width: 400, height: 400 })) // notice how `height` doesn't exist anywhere\n * else\n * ])\n * ```\n *\n * What is happening here is that the `height` value is added later in the sequence, but is missing\n * from all previous animation steps. Therefore when a keyframe is created it would also be missing\n * from all previous keyframes up until where it is first used. For the timeline keyframe generation\n * to properly fill in the style it will place the previous value (the value from the parent\n * timeline) or a default value of `*` into the backFill map.\n *\n * When a sub-timeline is created it will have its own backFill property. This is done so that\n * styles present within the sub-timeline do not accidentally seep into the previous/future timeline\n * keyframes\n *\n * [Validation]\n * The code in this file is not responsible for validation. That functionality happens with within\n * the `AnimationValidatorVisitor` code.\n */\nfunction buildAnimationTimelines(driver, rootElement, ast, enterClassName, leaveClassName, startingStyles = new Map(), finalStyles = new Map(), options, subInstructions, errors = []) {\n return new AnimationTimelineBuilderVisitor().buildKeyframes(driver, rootElement, ast, enterClassName, leaveClassName, startingStyles, finalStyles, options, subInstructions, errors);\n}\nclass AnimationTimelineBuilderVisitor {\n buildKeyframes(driver, rootElement, ast, enterClassName, leaveClassName, startingStyles, finalStyles, options, subInstructions, errors = []) {\n subInstructions = subInstructions || new ElementInstructionMap();\n const context = new AnimationTimelineContext(driver, rootElement, subInstructions, enterClassName, leaveClassName, errors, []);\n context.options = options;\n const delay = options.delay ? resolveTimingValue(options.delay) : 0;\n context.currentTimeline.delayNextStep(delay);\n context.currentTimeline.setStyles([startingStyles], null, context.errors, options);\n visitDslNode(this, ast, context);\n // this checks to see if an actual animation happened\n const timelines = context.timelines.filter(timeline => timeline.containsAnimation());\n // note: we just want to apply the final styles for the rootElement, so we do not\n // just apply the styles to the last timeline but the last timeline which\n // element is the root one (basically `*`-styles are replaced with the actual\n // state style values only for the root element)\n if (timelines.length && finalStyles.size) {\n let lastRootTimeline;\n for (let i = timelines.length - 1; i >= 0; i--) {\n const timeline = timelines[i];\n if (timeline.element === rootElement) {\n lastRootTimeline = timeline;\n break;\n }\n }\n if (lastRootTimeline && !lastRootTimeline.allowOnlyTimelineStyles()) {\n lastRootTimeline.setStyles([finalStyles], null, context.errors, options);\n }\n }\n return timelines.length ? timelines.map(timeline => timeline.buildKeyframes()) : [createTimelineInstruction(rootElement, [], [], [], 0, delay, '', false)];\n }\n visitTrigger(ast, context) {\n // these values are not visited in this AST\n }\n visitState(ast, context) {\n // these values are not visited in this AST\n }\n visitTransition(ast, context) {\n // these values are not visited in this AST\n }\n visitAnimateChild(ast, context) {\n const elementInstructions = context.subInstructions.get(context.element);\n if (elementInstructions) {\n const innerContext = context.createSubContext(ast.options);\n const startTime = context.currentTimeline.currentTime;\n const endTime = this._visitSubInstructions(elementInstructions, innerContext, innerContext.options);\n if (startTime != endTime) {\n // we do this on the upper context because we created a sub context for\n // the sub child animations\n context.transformIntoNewTimeline(endTime);\n }\n }\n context.previousNode = ast;\n }\n visitAnimateRef(ast, context) {\n const innerContext = context.createSubContext(ast.options);\n innerContext.transformIntoNewTimeline();\n this._applyAnimationRefDelays([ast.options, ast.animation.options], context, innerContext);\n this.visitReference(ast.animation, innerContext);\n context.transformIntoNewTimeline(innerContext.currentTimeline.currentTime);\n context.previousNode = ast;\n }\n _applyAnimationRefDelays(animationsRefsOptions, context, innerContext) {\n for (const animationRefOptions of animationsRefsOptions) {\n const animationDelay = animationRefOptions?.delay;\n if (animationDelay) {\n const animationDelayValue = typeof animationDelay === 'number' ? animationDelay : resolveTimingValue(interpolateParams(animationDelay, animationRefOptions?.params ?? {}, context.errors));\n innerContext.delayNextStep(animationDelayValue);\n }\n }\n }\n _visitSubInstructions(instructions, context, options) {\n const startTime = context.currentTimeline.currentTime;\n let furthestTime = startTime;\n // this is a special-case for when a user wants to skip a sub\n // animation from being fired entirely.\n const duration = options.duration != null ? resolveTimingValue(options.duration) : null;\n const delay = options.delay != null ? resolveTimingValue(options.delay) : null;\n if (duration !== 0) {\n instructions.forEach(instruction => {\n const instructionTimings = context.appendInstructionToTimeline(instruction, duration, delay);\n furthestTime = Math.max(furthestTime, instructionTimings.duration + instructionTimings.delay);\n });\n }\n return furthestTime;\n }\n visitReference(ast, context) {\n context.updateOptions(ast.options, true);\n visitDslNode(this, ast.animation, context);\n context.previousNode = ast;\n }\n visitSequence(ast, context) {\n const subContextCount = context.subContextCount;\n let ctx = context;\n const options = ast.options;\n if (options && (options.params || options.delay)) {\n ctx = context.createSubContext(options);\n ctx.transformIntoNewTimeline();\n if (options.delay != null) {\n if (ctx.previousNode.type == AnimationMetadataType.Style) {\n ctx.currentTimeline.snapshotCurrentStyles();\n ctx.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;\n }\n const delay = resolveTimingValue(options.delay);\n ctx.delayNextStep(delay);\n }\n }\n if (ast.steps.length) {\n ast.steps.forEach(s => visitDslNode(this, s, ctx));\n // this is here just in case the inner steps only contain or end with a style() call\n ctx.currentTimeline.applyStylesToKeyframe();\n // this means that some animation function within the sequence\n // ended up creating a sub timeline (which means the current\n // timeline cannot overlap with the contents of the sequence)\n if (ctx.subContextCount > subContextCount) {\n ctx.transformIntoNewTimeline();\n }\n }\n context.previousNode = ast;\n }\n visitGroup(ast, context) {\n const innerTimelines = [];\n let furthestTime = context.currentTimeline.currentTime;\n const delay = ast.options && ast.options.delay ? resolveTimingValue(ast.options.delay) : 0;\n ast.steps.forEach(s => {\n const innerContext = context.createSubContext(ast.options);\n if (delay) {\n innerContext.delayNextStep(delay);\n }\n visitDslNode(this, s, innerContext);\n furthestTime = Math.max(furthestTime, innerContext.currentTimeline.currentTime);\n innerTimelines.push(innerContext.currentTimeline);\n });\n // this operation is run after the AST loop because otherwise\n // if the parent timeline's collected styles were updated then\n // it would pass in invalid data into the new-to-be forked items\n innerTimelines.forEach(timeline => context.currentTimeline.mergeTimelineCollectedStyles(timeline));\n context.transformIntoNewTimeline(furthestTime);\n context.previousNode = ast;\n }\n _visitTiming(ast, context) {\n if (ast.dynamic) {\n const strValue = ast.strValue;\n const timingValue = context.params ? interpolateParams(strValue, context.params, context.errors) : strValue;\n return resolveTiming(timingValue, context.errors);\n } else {\n return {\n duration: ast.duration,\n delay: ast.delay,\n easing: ast.easing\n };\n }\n }\n visitAnimate(ast, context) {\n const timings = context.currentAnimateTimings = this._visitTiming(ast.timings, context);\n const timeline = context.currentTimeline;\n if (timings.delay) {\n context.incrementTime(timings.delay);\n timeline.snapshotCurrentStyles();\n }\n const style = ast.style;\n if (style.type == AnimationMetadataType.Keyframes) {\n this.visitKeyframes(style, context);\n } else {\n context.incrementTime(timings.duration);\n this.visitStyle(style, context);\n timeline.applyStylesToKeyframe();\n }\n context.currentAnimateTimings = null;\n context.previousNode = ast;\n }\n visitStyle(ast, context) {\n const timeline = context.currentTimeline;\n const timings = context.currentAnimateTimings;\n // this is a special case for when a style() call\n // directly follows an animate() call (but not inside of an animate() call)\n if (!timings && timeline.hasCurrentStyleProperties()) {\n timeline.forwardFrame();\n }\n const easing = timings && timings.easing || ast.easing;\n if (ast.isEmptyStep) {\n timeline.applyEmptyStep(easing);\n } else {\n timeline.setStyles(ast.styles, easing, context.errors, context.options);\n }\n context.previousNode = ast;\n }\n visitKeyframes(ast, context) {\n const currentAnimateTimings = context.currentAnimateTimings;\n const startTime = context.currentTimeline.duration;\n const duration = currentAnimateTimings.duration;\n const innerContext = context.createSubContext();\n const innerTimeline = innerContext.currentTimeline;\n innerTimeline.easing = currentAnimateTimings.easing;\n ast.styles.forEach(step => {\n const offset = step.offset || 0;\n innerTimeline.forwardTime(offset * duration);\n innerTimeline.setStyles(step.styles, step.easing, context.errors, context.options);\n innerTimeline.applyStylesToKeyframe();\n });\n // this will ensure that the parent timeline gets all the styles from\n // the child even if the new timeline below is not used\n context.currentTimeline.mergeTimelineCollectedStyles(innerTimeline);\n // we do this because the window between this timeline and the sub timeline\n // should ensure that the styles within are exactly the same as they were before\n context.transformIntoNewTimeline(startTime + duration);\n context.previousNode = ast;\n }\n visitQuery(ast, context) {\n // in the event that the first step before this is a style step we need\n // to ensure the styles are applied before the children are animated\n const startTime = context.currentTimeline.currentTime;\n const options = ast.options || {};\n const delay = options.delay ? resolveTimingValue(options.delay) : 0;\n if (delay && (context.previousNode.type === AnimationMetadataType.Style || startTime == 0 && context.currentTimeline.hasCurrentStyleProperties())) {\n context.currentTimeline.snapshotCurrentStyles();\n context.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;\n }\n let furthestTime = startTime;\n const elms = context.invokeQuery(ast.selector, ast.originalSelector, ast.limit, ast.includeSelf, options.optional ? true : false, context.errors);\n context.currentQueryTotal = elms.length;\n let sameElementTimeline = null;\n elms.forEach((element, i) => {\n context.currentQueryIndex = i;\n const innerContext = context.createSubContext(ast.options, element);\n if (delay) {\n innerContext.delayNextStep(delay);\n }\n if (element === context.element) {\n sameElementTimeline = innerContext.currentTimeline;\n }\n visitDslNode(this, ast.animation, innerContext);\n // this is here just incase the inner steps only contain or end\n // with a style() call (which is here to signal that this is a preparatory\n // call to style an element before it is animated again)\n innerContext.currentTimeline.applyStylesToKeyframe();\n const endTime = innerContext.currentTimeline.currentTime;\n furthestTime = Math.max(furthestTime, endTime);\n });\n context.currentQueryIndex = 0;\n context.currentQueryTotal = 0;\n context.transformIntoNewTimeline(furthestTime);\n if (sameElementTimeline) {\n context.currentTimeline.mergeTimelineCollectedStyles(sameElementTimeline);\n context.currentTimeline.snapshotCurrentStyles();\n }\n context.previousNode = ast;\n }\n visitStagger(ast, context) {\n const parentContext = context.parentContext;\n const tl = context.currentTimeline;\n const timings = ast.timings;\n const duration = Math.abs(timings.duration);\n const maxTime = duration * (context.currentQueryTotal - 1);\n let delay = duration * context.currentQueryIndex;\n let staggerTransformer = timings.duration < 0 ? 'reverse' : timings.easing;\n switch (staggerTransformer) {\n case 'reverse':\n delay = maxTime - delay;\n break;\n case 'full':\n delay = parentContext.currentStaggerTime;\n break;\n }\n const timeline = context.currentTimeline;\n if (delay) {\n timeline.delayNextStep(delay);\n }\n const startingTime = timeline.currentTime;\n visitDslNode(this, ast.animation, context);\n context.previousNode = ast;\n // time = duration + delay\n // the reason why this computation is so complex is because\n // the inner timeline may either have a delay value or a stretched\n // keyframe depending on if a subtimeline is not used or is used.\n parentContext.currentStaggerTime = tl.currentTime - startingTime + (tl.startTime - parentContext.currentTimeline.startTime);\n }\n}\nconst DEFAULT_NOOP_PREVIOUS_NODE = {};\nclass AnimationTimelineContext {\n _driver;\n element;\n subInstructions;\n _enterClassName;\n _leaveClassName;\n errors;\n timelines;\n parentContext = null;\n currentTimeline;\n currentAnimateTimings = null;\n previousNode = DEFAULT_NOOP_PREVIOUS_NODE;\n subContextCount = 0;\n options = {};\n currentQueryIndex = 0;\n currentQueryTotal = 0;\n currentStaggerTime = 0;\n constructor(_driver, element, subInstructions, _enterClassName, _leaveClassName, errors, timelines, initialTimeline) {\n this._driver = _driver;\n this.element = element;\n this.subInstructions = subInstructions;\n this._enterClassName = _enterClassName;\n this._leaveClassName = _leaveClassName;\n this.errors = errors;\n this.timelines = timelines;\n this.currentTimeline = initialTimeline || new TimelineBuilder(this._driver, element, 0);\n timelines.push(this.currentTimeline);\n }\n get params() {\n return this.options.params;\n }\n updateOptions(options, skipIfExists) {\n if (!options) return;\n const newOptions = options;\n let optionsToUpdate = this.options;\n // NOTE: this will get patched up when other animation methods support duration overrides\n if (newOptions.duration != null) {\n optionsToUpdate.duration = resolveTimingValue(newOptions.duration);\n }\n if (newOptions.delay != null) {\n optionsToUpdate.delay = resolveTimingValue(newOptions.delay);\n }\n const newParams = newOptions.params;\n if (newParams) {\n let paramsToUpdate = optionsToUpdate.params;\n if (!paramsToUpdate) {\n paramsToUpdate = this.options.params = {};\n }\n Object.keys(newParams).forEach(name => {\n if (!skipIfExists || !paramsToUpdate.hasOwnProperty(name)) {\n paramsToUpdate[name] = interpolateParams(newParams[name], paramsToUpdate, this.errors);\n }\n });\n }\n }\n _copyOptions() {\n const options = {};\n if (this.options) {\n const oldParams = this.options.params;\n if (oldParams) {\n const params = options['params'] = {};\n Object.keys(oldParams).forEach(name => {\n params[name] = oldParams[name];\n });\n }\n }\n return options;\n }\n createSubContext(options = null, element, newTime) {\n const target = element || this.element;\n const context = new AnimationTimelineContext(this._driver, target, this.subInstructions, this._enterClassName, this._leaveClassName, this.errors, this.timelines, this.currentTimeline.fork(target, newTime || 0));\n context.previousNode = this.previousNode;\n context.currentAnimateTimings = this.currentAnimateTimings;\n context.options = this._copyOptions();\n context.updateOptions(options);\n context.currentQueryIndex = this.currentQueryIndex;\n context.currentQueryTotal = this.currentQueryTotal;\n context.parentContext = this;\n this.subContextCount++;\n return context;\n }\n transformIntoNewTimeline(newTime) {\n this.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;\n this.currentTimeline = this.currentTimeline.fork(this.element, newTime);\n this.timelines.push(this.currentTimeline);\n return this.currentTimeline;\n }\n appendInstructionToTimeline(instruction, duration, delay) {\n const updatedTimings = {\n duration: duration != null ? duration : instruction.duration,\n delay: this.currentTimeline.currentTime + (delay != null ? delay : 0) + instruction.delay,\n easing: ''\n };\n const builder = new SubTimelineBuilder(this._driver, instruction.element, instruction.keyframes, instruction.preStyleProps, instruction.postStyleProps, updatedTimings, instruction.stretchStartingKeyframe);\n this.timelines.push(builder);\n return updatedTimings;\n }\n incrementTime(time) {\n this.currentTimeline.forwardTime(this.currentTimeline.duration + time);\n }\n delayNextStep(delay) {\n // negative delays are not yet supported\n if (delay > 0) {\n this.currentTimeline.delayNextStep(delay);\n }\n }\n invokeQuery(selector, originalSelector, limit, includeSelf, optional, errors) {\n let results = [];\n if (includeSelf) {\n results.push(this.element);\n }\n if (selector.length > 0) {\n // only if :self is used then the selector can be empty\n selector = selector.replace(ENTER_TOKEN_REGEX, '.' + this._enterClassName);\n selector = selector.replace(LEAVE_TOKEN_REGEX, '.' + this._leaveClassName);\n const multi = limit != 1;\n let elements = this._driver.query(this.element, selector, multi);\n if (limit !== 0) {\n elements = limit < 0 ? elements.slice(elements.length + limit, elements.length) : elements.slice(0, limit);\n }\n results.push(...elements);\n }\n if (!optional && results.length == 0) {\n errors.push(invalidQuery(originalSelector));\n }\n return results;\n }\n}\nclass TimelineBuilder {\n _driver;\n element;\n startTime;\n _elementTimelineStylesLookup;\n duration = 0;\n easing = null;\n _previousKeyframe = /*#__PURE__*/new Map();\n _currentKeyframe = /*#__PURE__*/new Map();\n _keyframes = /*#__PURE__*/new Map();\n _styleSummary = /*#__PURE__*/new Map();\n _localTimelineStyles = /*#__PURE__*/new Map();\n _globalTimelineStyles;\n _pendingStyles = /*#__PURE__*/new Map();\n _backFill = /*#__PURE__*/new Map();\n _currentEmptyStepKeyframe = null;\n constructor(_driver, element, startTime, _elementTimelineStylesLookup) {\n this._driver = _driver;\n this.element = element;\n this.startTime = startTime;\n this._elementTimelineStylesLookup = _elementTimelineStylesLookup;\n if (!this._elementTimelineStylesLookup) {\n this._elementTimelineStylesLookup = new Map();\n }\n this._globalTimelineStyles = this._elementTimelineStylesLookup.get(element);\n if (!this._globalTimelineStyles) {\n this._globalTimelineStyles = this._localTimelineStyles;\n this._elementTimelineStylesLookup.set(element, this._localTimelineStyles);\n }\n this._loadKeyframe();\n }\n containsAnimation() {\n switch (this._keyframes.size) {\n case 0:\n return false;\n case 1:\n return this.hasCurrentStyleProperties();\n default:\n return true;\n }\n }\n hasCurrentStyleProperties() {\n return this._currentKeyframe.size > 0;\n }\n get currentTime() {\n return this.startTime + this.duration;\n }\n delayNextStep(delay) {\n // in the event that a style() step is placed right before a stagger()\n // and that style() step is the very first style() value in the animation\n // then we need to make a copy of the keyframe [0, copy, 1] so that the delay\n // properly applies the style() values to work with the stagger...\n const hasPreStyleStep = this._keyframes.size === 1 && this._pendingStyles.size;\n if (this.duration || hasPreStyleStep) {\n this.forwardTime(this.currentTime + delay);\n if (hasPreStyleStep) {\n this.snapshotCurrentStyles();\n }\n } else {\n this.startTime += delay;\n }\n }\n fork(element, currentTime) {\n this.applyStylesToKeyframe();\n return new TimelineBuilder(this._driver, element, currentTime || this.currentTime, this._elementTimelineStylesLookup);\n }\n _loadKeyframe() {\n if (this._currentKeyframe) {\n this._previousKeyframe = this._currentKeyframe;\n }\n this._currentKeyframe = this._keyframes.get(this.duration);\n if (!this._currentKeyframe) {\n this._currentKeyframe = new Map();\n this._keyframes.set(this.duration, this._currentKeyframe);\n }\n }\n forwardFrame() {\n this.duration += ONE_FRAME_IN_MILLISECONDS;\n this._loadKeyframe();\n }\n forwardTime(time) {\n this.applyStylesToKeyframe();\n this.duration = time;\n this._loadKeyframe();\n }\n _updateStyle(prop, value) {\n this._localTimelineStyles.set(prop, value);\n this._globalTimelineStyles.set(prop, value);\n this._styleSummary.set(prop, {\n time: this.currentTime,\n value\n });\n }\n allowOnlyTimelineStyles() {\n return this._currentEmptyStepKeyframe !== this._currentKeyframe;\n }\n applyEmptyStep(easing) {\n if (easing) {\n this._previousKeyframe.set('easing', easing);\n }\n // special case for animate(duration):\n // all missing styles are filled with a `*` value then\n // if any destination styles are filled in later on the same\n // keyframe then they will override the overridden styles\n // We use `_globalTimelineStyles` here because there may be\n // styles in previous keyframes that are not present in this timeline\n for (let [prop, value] of this._globalTimelineStyles) {\n this._backFill.set(prop, value || AUTO_STYLE);\n this._currentKeyframe.set(prop, AUTO_STYLE);\n }\n this._currentEmptyStepKeyframe = this._currentKeyframe;\n }\n setStyles(input, easing, errors, options) {\n if (easing) {\n this._previousKeyframe.set('easing', easing);\n }\n const params = options && options.params || {};\n const styles = flattenStyles(input, this._globalTimelineStyles);\n for (let [prop, value] of styles) {\n const val = interpolateParams(value, params, errors);\n this._pendingStyles.set(prop, val);\n if (!this._localTimelineStyles.has(prop)) {\n this._backFill.set(prop, this._globalTimelineStyles.get(prop) ?? AUTO_STYLE);\n }\n this._updateStyle(prop, val);\n }\n }\n applyStylesToKeyframe() {\n if (this._pendingStyles.size == 0) return;\n this._pendingStyles.forEach((val, prop) => {\n this._currentKeyframe.set(prop, val);\n });\n this._pendingStyles.clear();\n this._localTimelineStyles.forEach((val, prop) => {\n if (!this._currentKeyframe.has(prop)) {\n this._currentKeyframe.set(prop, val);\n }\n });\n }\n snapshotCurrentStyles() {\n for (let [prop, val] of this._localTimelineStyles) {\n this._pendingStyles.set(prop, val);\n this._updateStyle(prop, val);\n }\n }\n getFinalKeyframe() {\n return this._keyframes.get(this.duration);\n }\n get properties() {\n const properties = [];\n for (let prop in this._currentKeyframe) {\n properties.push(prop);\n }\n return properties;\n }\n mergeTimelineCollectedStyles(timeline) {\n timeline._styleSummary.forEach((details1, prop) => {\n const details0 = this._styleSummary.get(prop);\n if (!details0 || details1.time > details0.time) {\n this._updateStyle(prop, details1.value);\n }\n });\n }\n buildKeyframes() {\n this.applyStylesToKeyframe();\n const preStyleProps = new Set();\n const postStyleProps = new Set();\n const isEmpty = this._keyframes.size === 1 && this.duration === 0;\n let finalKeyframes = [];\n this._keyframes.forEach((keyframe, time) => {\n const finalKeyframe = new Map([...this._backFill, ...keyframe]);\n finalKeyframe.forEach((value, prop) => {\n if (value === ɵPRE_STYLE) {\n preStyleProps.add(prop);\n } else if (value === AUTO_STYLE) {\n postStyleProps.add(prop);\n }\n });\n if (!isEmpty) {\n finalKeyframe.set('offset', time / this.duration);\n }\n finalKeyframes.push(finalKeyframe);\n });\n const preProps = [...preStyleProps.values()];\n const postProps = [...postStyleProps.values()];\n // special case for a 0-second animation (which is designed just to place styles onscreen)\n if (isEmpty) {\n const kf0 = finalKeyframes[0];\n const kf1 = new Map(kf0);\n kf0.set('offset', 0);\n kf1.set('offset', 1);\n finalKeyframes = [kf0, kf1];\n }\n return createTimelineInstruction(this.element, finalKeyframes, preProps, postProps, this.duration, this.startTime, this.easing, false);\n }\n}\nclass SubTimelineBuilder extends TimelineBuilder {\n keyframes;\n preStyleProps;\n postStyleProps;\n _stretchStartingKeyframe;\n timings;\n constructor(driver, element, keyframes, preStyleProps, postStyleProps, timings, _stretchStartingKeyframe = false) {\n super(driver, element, timings.delay);\n this.keyframes = keyframes;\n this.preStyleProps = preStyleProps;\n this.postStyleProps = postStyleProps;\n this._stretchStartingKeyframe = _stretchStartingKeyframe;\n this.timings = {\n duration: timings.duration,\n delay: timings.delay,\n easing: timings.easing\n };\n }\n containsAnimation() {\n return this.keyframes.length > 1;\n }\n buildKeyframes() {\n let keyframes = this.keyframes;\n let {\n delay,\n duration,\n easing\n } = this.timings;\n if (this._stretchStartingKeyframe && delay) {\n const newKeyframes = [];\n const totalTime = duration + delay;\n const startingGap = delay / totalTime;\n // the original starting keyframe now starts once the delay is done\n const newFirstKeyframe = new Map(keyframes[0]);\n newFirstKeyframe.set('offset', 0);\n newKeyframes.push(newFirstKeyframe);\n const oldFirstKeyframe = new Map(keyframes[0]);\n oldFirstKeyframe.set('offset', roundOffset(startingGap));\n newKeyframes.push(oldFirstKeyframe);\n /*\n When the keyframe is stretched then it means that the delay before the animation\n starts is gone. Instead the first keyframe is placed at the start of the animation\n and it is then copied to where it starts when the original delay is over. This basically\n means nothing animates during that delay, but the styles are still rendered. For this\n to work the original offset values that exist in the original keyframes must be \"warped\"\n so that they can take the new keyframe + delay into account.\n delay=1000, duration=1000, keyframes = 0 .5 1\n turns into\n delay=0, duration=2000, keyframes = 0 .33 .66 1\n */\n // offsets between 1 ... n -1 are all warped by the keyframe stretch\n const limit = keyframes.length - 1;\n for (let i = 1; i <= limit; i++) {\n let kf = new Map(keyframes[i]);\n const oldOffset = kf.get('offset');\n const timeAtKeyframe = delay + oldOffset * duration;\n kf.set('offset', roundOffset(timeAtKeyframe / totalTime));\n newKeyframes.push(kf);\n }\n // the new starting keyframe should be added at the start\n duration = totalTime;\n delay = 0;\n easing = '';\n keyframes = newKeyframes;\n }\n return createTimelineInstruction(this.element, keyframes, this.preStyleProps, this.postStyleProps, duration, delay, easing, true);\n }\n}\nfunction roundOffset(offset, decimalPoints = 3) {\n const mult = Math.pow(10, decimalPoints - 1);\n return Math.round(offset * mult) / mult;\n}\nfunction flattenStyles(input, allStyles) {\n const styles = new Map();\n let allProperties;\n input.forEach(token => {\n if (token === '*') {\n allProperties ??= allStyles.keys();\n for (let prop of allProperties) {\n styles.set(prop, AUTO_STYLE);\n }\n } else {\n for (let [prop, val] of token) {\n styles.set(prop, val);\n }\n }\n });\n return styles;\n}\nfunction createTransitionInstruction(element, triggerName, fromState, toState, isRemovalTransition, fromStyles, toStyles, timelines, queriedElements, preStyleProps, postStyleProps, totalTime, errors) {\n return {\n type: 0 /* AnimationTransitionInstructionType.TransitionAnimation */,\n element,\n triggerName,\n isRemovalTransition,\n fromState,\n fromStyles,\n toState,\n toStyles,\n timelines,\n queriedElements,\n preStyleProps,\n postStyleProps,\n totalTime,\n errors\n };\n}\nconst EMPTY_OBJECT = {};\nclass AnimationTransitionFactory {\n _triggerName;\n ast;\n _stateStyles;\n constructor(_triggerName, ast, _stateStyles) {\n this._triggerName = _triggerName;\n this.ast = ast;\n this._stateStyles = _stateStyles;\n }\n match(currentState, nextState, element, params) {\n return oneOrMoreTransitionsMatch(this.ast.matchers, currentState, nextState, element, params);\n }\n buildStyles(stateName, params, errors) {\n let styler = this._stateStyles.get('*');\n if (stateName !== undefined) {\n styler = this._stateStyles.get(stateName?.toString()) || styler;\n }\n return styler ? styler.buildStyles(params, errors) : new Map();\n }\n build(driver, element, currentState, nextState, enterClassName, leaveClassName, currentOptions, nextOptions, subInstructions, skipAstBuild) {\n const errors = [];\n const transitionAnimationParams = this.ast.options && this.ast.options.params || EMPTY_OBJECT;\n const currentAnimationParams = currentOptions && currentOptions.params || EMPTY_OBJECT;\n const currentStateStyles = this.buildStyles(currentState, currentAnimationParams, errors);\n const nextAnimationParams = nextOptions && nextOptions.params || EMPTY_OBJECT;\n const nextStateStyles = this.buildStyles(nextState, nextAnimationParams, errors);\n const queriedElements = new Set();\n const preStyleMap = new Map();\n const postStyleMap = new Map();\n const isRemoval = nextState === 'void';\n const animationOptions = {\n params: applyParamDefaults(nextAnimationParams, transitionAnimationParams),\n delay: this.ast.options?.delay\n };\n const timelines = skipAstBuild ? [] : buildAnimationTimelines(driver, element, this.ast.animation, enterClassName, leaveClassName, currentStateStyles, nextStateStyles, animationOptions, subInstructions, errors);\n let totalTime = 0;\n timelines.forEach(tl => {\n totalTime = Math.max(tl.duration + tl.delay, totalTime);\n });\n if (errors.length) {\n return createTransitionInstruction(element, this._triggerName, currentState, nextState, isRemoval, currentStateStyles, nextStateStyles, [], [], preStyleMap, postStyleMap, totalTime, errors);\n }\n timelines.forEach(tl => {\n const elm = tl.element;\n const preProps = getOrSetDefaultValue(preStyleMap, elm, new Set());\n tl.preStyleProps.forEach(prop => preProps.add(prop));\n const postProps = getOrSetDefaultValue(postStyleMap, elm, new Set());\n tl.postStyleProps.forEach(prop => postProps.add(prop));\n if (elm !== element) {\n queriedElements.add(elm);\n }\n });\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n checkNonAnimatableInTimelines(timelines, this._triggerName, driver);\n }\n return createTransitionInstruction(element, this._triggerName, currentState, nextState, isRemoval, currentStateStyles, nextStateStyles, timelines, [...queriedElements.values()], preStyleMap, postStyleMap, totalTime);\n }\n}\n/**\n * Checks inside a set of timelines if they try to animate a css property which is not considered\n * animatable, in that case it prints a warning on the console.\n * Besides that the function doesn't have any other effect.\n *\n * Note: this check is done here after the timelines are built instead of doing on a lower level so\n * that we can make sure that the warning appears only once per instruction (we can aggregate here\n * all the issues instead of finding them separately).\n *\n * @param timelines The built timelines for the current instruction.\n * @param triggerName The name of the trigger for the current instruction.\n * @param driver Animation driver used to perform the check.\n *\n */\nfunction checkNonAnimatableInTimelines(timelines, triggerName, driver) {\n if (!driver.validateAnimatableStyleProperty) {\n return;\n }\n const allowedNonAnimatableProps = new Set([\n // 'easing' is a utility/synthetic prop we use to represent\n // easing functions, it represents a property of the animation\n // which is not animatable but different values can be used\n // in different steps\n 'easing']);\n const invalidNonAnimatableProps = new Set();\n timelines.forEach(({\n keyframes\n }) => {\n const nonAnimatablePropsInitialValues = new Map();\n keyframes.forEach(keyframe => {\n const entriesToCheck = Array.from(keyframe.entries()).filter(([prop]) => !allowedNonAnimatableProps.has(prop));\n for (const [prop, value] of entriesToCheck) {\n if (!driver.validateAnimatableStyleProperty(prop)) {\n if (nonAnimatablePropsInitialValues.has(prop) && !invalidNonAnimatableProps.has(prop)) {\n const propInitialValue = nonAnimatablePropsInitialValues.get(prop);\n if (propInitialValue !== value) {\n invalidNonAnimatableProps.add(prop);\n }\n } else {\n nonAnimatablePropsInitialValues.set(prop, value);\n }\n }\n }\n });\n });\n if (invalidNonAnimatableProps.size > 0) {\n console.warn(`Warning: The animation trigger \"${triggerName}\" is attempting to animate the following` + ' not animatable properties: ' + Array.from(invalidNonAnimatableProps).join(', ') + '\\n' + '(to check the list of all animatable properties visit https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_animated_properties)');\n }\n}\nfunction oneOrMoreTransitionsMatch(matchFns, currentState, nextState, element, params) {\n return matchFns.some(fn => fn(currentState, nextState, element, params));\n}\nfunction applyParamDefaults(userParams, defaults) {\n const result = {\n ...defaults\n };\n Object.entries(userParams).forEach(([key, value]) => {\n if (value != null) {\n result[key] = value;\n }\n });\n return result;\n}\nclass AnimationStateStyles {\n styles;\n defaultParams;\n normalizer;\n constructor(styles, defaultParams, normalizer) {\n this.styles = styles;\n this.defaultParams = defaultParams;\n this.normalizer = normalizer;\n }\n buildStyles(params, errors) {\n const finalStyles = new Map();\n const combinedParams = applyParamDefaults(params, this.defaultParams);\n this.styles.styles.forEach(value => {\n if (typeof value !== 'string') {\n value.forEach((val, prop) => {\n if (val) {\n val = interpolateParams(val, combinedParams, errors);\n }\n const normalizedProp = this.normalizer.normalizePropertyName(prop, errors);\n val = this.normalizer.normalizeStyleValue(prop, normalizedProp, val, errors);\n finalStyles.set(prop, val);\n });\n }\n });\n return finalStyles;\n }\n}\nfunction buildTrigger(name, ast, normalizer) {\n return new AnimationTrigger(name, ast, normalizer);\n}\nclass AnimationTrigger {\n name;\n ast;\n _normalizer;\n transitionFactories = [];\n fallbackTransition;\n states = /*#__PURE__*/new Map();\n constructor(name, ast, _normalizer) {\n this.name = name;\n this.ast = ast;\n this._normalizer = _normalizer;\n ast.states.forEach(ast => {\n const defaultParams = ast.options && ast.options.params || {};\n this.states.set(ast.name, new AnimationStateStyles(ast.style, defaultParams, _normalizer));\n });\n balanceProperties(this.states, 'true', '1');\n balanceProperties(this.states, 'false', '0');\n ast.transitions.forEach(ast => {\n this.transitionFactories.push(new AnimationTransitionFactory(name, ast, this.states));\n });\n this.fallbackTransition = createFallbackTransition(name, this.states, this._normalizer);\n }\n get containsQueries() {\n return this.ast.queryCount > 0;\n }\n matchTransition(currentState, nextState, element, params) {\n const entry = this.transitionFactories.find(f => f.match(currentState, nextState, element, params));\n return entry || null;\n }\n matchStyles(currentState, params, errors) {\n return this.fallbackTransition.buildStyles(currentState, params, errors);\n }\n}\nfunction createFallbackTransition(triggerName, states, normalizer) {\n const matchers = [(fromState, toState) => true];\n const animation = {\n type: AnimationMetadataType.Sequence,\n steps: [],\n options: null\n };\n const transition = {\n type: AnimationMetadataType.Transition,\n animation,\n matchers,\n options: null,\n queryCount: 0,\n depCount: 0\n };\n return new AnimationTransitionFactory(triggerName, transition, states);\n}\nfunction balanceProperties(stateMap, key1, key2) {\n if (stateMap.has(key1)) {\n if (!stateMap.has(key2)) {\n stateMap.set(key2, stateMap.get(key1));\n }\n } else if (stateMap.has(key2)) {\n stateMap.set(key1, stateMap.get(key2));\n }\n}\nconst EMPTY_INSTRUCTION_MAP = /*#__PURE__*/new ElementInstructionMap();\nclass TimelineAnimationEngine {\n bodyNode;\n _driver;\n _normalizer;\n _animations = /*#__PURE__*/new Map();\n _playersById = /*#__PURE__*/new Map();\n players = [];\n constructor(bodyNode, _driver, _normalizer) {\n this.bodyNode = bodyNode;\n this._driver = _driver;\n this._normalizer = _normalizer;\n }\n register(id, metadata) {\n const errors = [];\n const warnings = [];\n const ast = buildAnimationAst(this._driver, metadata, errors, warnings);\n if (errors.length) {\n throw registerFailed(errors);\n } else {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (warnings.length) {\n warnRegister(warnings);\n }\n }\n this._animations.set(id, ast);\n }\n }\n _buildPlayer(i, preStyles, postStyles) {\n const element = i.element;\n const keyframes = normalizeKeyframes$1(this._normalizer, i.keyframes, preStyles, postStyles);\n return this._driver.animate(element, keyframes, i.duration, i.delay, i.easing, [], true);\n }\n create(id, element, options = {}) {\n const errors = [];\n const ast = this._animations.get(id);\n let instructions;\n const autoStylesMap = new Map();\n if (ast) {\n instructions = buildAnimationTimelines(this._driver, element, ast, ENTER_CLASSNAME, LEAVE_CLASSNAME, new Map(), new Map(), options, EMPTY_INSTRUCTION_MAP, errors);\n instructions.forEach(inst => {\n const styles = getOrSetDefaultValue(autoStylesMap, inst.element, new Map());\n inst.postStyleProps.forEach(prop => styles.set(prop, null));\n });\n } else {\n errors.push(missingOrDestroyedAnimation());\n instructions = [];\n }\n if (errors.length) {\n throw createAnimationFailed(errors);\n }\n autoStylesMap.forEach((styles, element) => {\n styles.forEach((_, prop) => {\n styles.set(prop, this._driver.computeStyle(element, prop, AUTO_STYLE));\n });\n });\n const players = instructions.map(i => {\n const styles = autoStylesMap.get(i.element);\n return this._buildPlayer(i, new Map(), styles);\n });\n const player = optimizeGroupPlayer(players);\n this._playersById.set(id, player);\n player.onDestroy(() => this.destroy(id));\n this.players.push(player);\n return player;\n }\n destroy(id) {\n const player = this._getPlayer(id);\n player.destroy();\n this._playersById.delete(id);\n const index = this.players.indexOf(player);\n if (index >= 0) {\n this.players.splice(index, 1);\n }\n }\n _getPlayer(id) {\n const player = this._playersById.get(id);\n if (!player) {\n throw missingPlayer(id);\n }\n return player;\n }\n listen(id, element, eventName, callback) {\n // triggerName, fromState, toState are all ignored for timeline animations\n const baseEvent = makeAnimationEvent(element, '', '', '');\n listenOnPlayer(this._getPlayer(id), eventName, baseEvent, callback);\n return () => {};\n }\n command(id, element, command, args) {\n if (command == 'register') {\n this.register(id, args[0]);\n return;\n }\n if (command == 'create') {\n const options = args[0] || {};\n this.create(id, element, options);\n return;\n }\n const player = this._getPlayer(id);\n switch (command) {\n case 'play':\n player.play();\n break;\n case 'pause':\n player.pause();\n break;\n case 'reset':\n player.reset();\n break;\n case 'restart':\n player.restart();\n break;\n case 'finish':\n player.finish();\n break;\n case 'init':\n player.init();\n break;\n case 'setPosition':\n player.setPosition(parseFloat(args[0]));\n break;\n case 'destroy':\n this.destroy(id);\n break;\n }\n }\n}\nconst QUEUED_CLASSNAME = 'ng-animate-queued';\nconst QUEUED_SELECTOR = '.ng-animate-queued';\nconst DISABLED_CLASSNAME = 'ng-animate-disabled';\nconst DISABLED_SELECTOR = '.ng-animate-disabled';\nconst STAR_CLASSNAME = 'ng-star-inserted';\nconst STAR_SELECTOR = '.ng-star-inserted';\nconst EMPTY_PLAYER_ARRAY = [];\nconst NULL_REMOVAL_STATE = {\n namespaceId: '',\n setForRemoval: false,\n setForMove: false,\n hasAnimation: false,\n removedBeforeQueried: false\n};\nconst NULL_REMOVED_QUERIED_STATE = {\n namespaceId: '',\n setForMove: false,\n setForRemoval: false,\n hasAnimation: false,\n removedBeforeQueried: true\n};\nconst REMOVAL_FLAG = '__ng_removed';\nclass StateValue {\n namespaceId;\n value;\n options;\n get params() {\n return this.options.params;\n }\n constructor(input, namespaceId = '') {\n this.namespaceId = namespaceId;\n const isObj = input && input.hasOwnProperty('value');\n const value = isObj ? input['value'] : input;\n this.value = normalizeTriggerValue(value);\n if (isObj) {\n // we drop the value property from options.\n const {\n value,\n ...options\n } = input;\n this.options = options;\n } else {\n this.options = {};\n }\n if (!this.options.params) {\n this.options.params = {};\n }\n }\n absorbOptions(options) {\n const newParams = options.params;\n if (newParams) {\n const oldParams = this.options.params;\n Object.keys(newParams).forEach(prop => {\n if (oldParams[prop] == null) {\n oldParams[prop] = newParams[prop];\n }\n });\n }\n }\n}\nconst VOID_VALUE = 'void';\nconst DEFAULT_STATE_VALUE = /*#__PURE__*/new StateValue(VOID_VALUE);\nclass AnimationTransitionNamespace {\n id;\n hostElement;\n _engine;\n players = [];\n _triggers = /*#__PURE__*/new Map();\n _queue = [];\n _elementListeners = /*#__PURE__*/new Map();\n _hostClassName;\n constructor(id, hostElement, _engine) {\n this.id = id;\n this.hostElement = hostElement;\n this._engine = _engine;\n this._hostClassName = 'ng-tns-' + id;\n addClass(hostElement, this._hostClassName);\n }\n listen(element, name, phase, callback) {\n if (!this._triggers.has(name)) {\n throw missingTrigger(phase, name);\n }\n if (phase == null || phase.length == 0) {\n throw missingEvent(name);\n }\n if (!isTriggerEventValid(phase)) {\n throw unsupportedTriggerEvent(phase, name);\n }\n const listeners = getOrSetDefaultValue(this._elementListeners, element, []);\n const data = {\n name,\n phase,\n callback\n };\n listeners.push(data);\n const triggersWithStates = getOrSetDefaultValue(this._engine.statesByElement, element, new Map());\n if (!triggersWithStates.has(name)) {\n addClass(element, NG_TRIGGER_CLASSNAME);\n addClass(element, NG_TRIGGER_CLASSNAME + '-' + name);\n triggersWithStates.set(name, DEFAULT_STATE_VALUE);\n }\n return () => {\n // the event listener is removed AFTER the flush has occurred such\n // that leave animations callbacks can fire (otherwise if the node\n // is removed in between then the listeners would be deregistered)\n this._engine.afterFlush(() => {\n const index = listeners.indexOf(data);\n if (index >= 0) {\n listeners.splice(index, 1);\n }\n if (!this._triggers.has(name)) {\n triggersWithStates.delete(name);\n }\n });\n };\n }\n register(name, ast) {\n if (this._triggers.has(name)) {\n // throw\n return false;\n } else {\n this._triggers.set(name, ast);\n return true;\n }\n }\n _getTrigger(name) {\n const trigger = this._triggers.get(name);\n if (!trigger) {\n throw unregisteredTrigger(name);\n }\n return trigger;\n }\n trigger(element, triggerName, value, defaultToFallback = true) {\n const trigger = this._getTrigger(triggerName);\n const player = new TransitionAnimationPlayer(this.id, triggerName, element);\n let triggersWithStates = this._engine.statesByElement.get(element);\n if (!triggersWithStates) {\n addClass(element, NG_TRIGGER_CLASSNAME);\n addClass(element, NG_TRIGGER_CLASSNAME + '-' + triggerName);\n this._engine.statesByElement.set(element, triggersWithStates = new Map());\n }\n let fromState = triggersWithStates.get(triggerName);\n const toState = new StateValue(value, this.id);\n const isObj = value && value.hasOwnProperty('value');\n if (!isObj && fromState) {\n toState.absorbOptions(fromState.options);\n }\n triggersWithStates.set(triggerName, toState);\n if (!fromState) {\n fromState = DEFAULT_STATE_VALUE;\n }\n const isRemoval = toState.value === VOID_VALUE;\n // normally this isn't reached by here, however, if an object expression\n // is passed in then it may be a new object each time. Comparing the value\n // is important since that will stay the same despite there being a new object.\n // The removal arc here is special cased because the same element is triggered\n // twice in the event that it contains animations on the outer/inner portions\n // of the host container\n if (!isRemoval && fromState.value === toState.value) {\n // this means that despite the value not changing, some inner params\n // have changed which means that the animation final styles need to be applied\n if (!objEquals(fromState.params, toState.params)) {\n const errors = [];\n const fromStyles = trigger.matchStyles(fromState.value, fromState.params, errors);\n const toStyles = trigger.matchStyles(toState.value, toState.params, errors);\n if (errors.length) {\n this._engine.reportError(errors);\n } else {\n this._engine.afterFlush(() => {\n eraseStyles(element, fromStyles);\n setStyles(element, toStyles);\n });\n }\n }\n return;\n }\n const playersOnElement = getOrSetDefaultValue(this._engine.playersByElement, element, []);\n playersOnElement.forEach(player => {\n // only remove the player if it is queued on the EXACT same trigger/namespace\n // we only also deal with queued players here because if the animation has\n // started then we want to keep the player alive until the flush happens\n // (which is where the previousPlayers are passed into the new player)\n if (player.namespaceId == this.id && player.triggerName == triggerName && player.queued) {\n player.destroy();\n }\n });\n let transition = trigger.matchTransition(fromState.value, toState.value, element, toState.params);\n let isFallbackTransition = false;\n if (!transition) {\n if (!defaultToFallback) return;\n transition = trigger.fallbackTransition;\n isFallbackTransition = true;\n }\n this._engine.totalQueuedPlayers++;\n this._queue.push({\n element,\n triggerName,\n transition,\n fromState,\n toState,\n player,\n isFallbackTransition\n });\n if (!isFallbackTransition) {\n addClass(element, QUEUED_CLASSNAME);\n player.onStart(() => {\n removeClass(element, QUEUED_CLASSNAME);\n });\n }\n player.onDone(() => {\n let index = this.players.indexOf(player);\n if (index >= 0) {\n this.players.splice(index, 1);\n }\n const players = this._engine.playersByElement.get(element);\n if (players) {\n let index = players.indexOf(player);\n if (index >= 0) {\n players.splice(index, 1);\n }\n }\n });\n this.players.push(player);\n playersOnElement.push(player);\n return player;\n }\n deregister(name) {\n this._triggers.delete(name);\n this._engine.statesByElement.forEach(stateMap => stateMap.delete(name));\n this._elementListeners.forEach((listeners, element) => {\n this._elementListeners.set(element, listeners.filter(entry => {\n return entry.name != name;\n }));\n });\n }\n clearElementCache(element) {\n this._engine.statesByElement.delete(element);\n this._elementListeners.delete(element);\n const elementPlayers = this._engine.playersByElement.get(element);\n if (elementPlayers) {\n elementPlayers.forEach(player => player.destroy());\n this._engine.playersByElement.delete(element);\n }\n }\n _signalRemovalForInnerTriggers(rootElement, context) {\n const elements = this._engine.driver.query(rootElement, NG_TRIGGER_SELECTOR, true);\n // emulate a leave animation for all inner nodes within this node.\n // If there are no animations found for any of the nodes then clear the cache\n // for the element.\n elements.forEach(elm => {\n // this means that an inner remove() operation has already kicked off\n // the animation on this element...\n if (elm[REMOVAL_FLAG]) return;\n const namespaces = this._engine.fetchNamespacesByElement(elm);\n if (namespaces.size) {\n namespaces.forEach(ns => ns.triggerLeaveAnimation(elm, context, false, true));\n } else {\n this.clearElementCache(elm);\n }\n });\n // If the child elements were removed along with the parent, their animations might not\n // have completed. Clear all the elements from the cache so we don't end up with a memory leak.\n this._engine.afterFlushAnimationsDone(() => elements.forEach(elm => this.clearElementCache(elm)));\n }\n triggerLeaveAnimation(element, context, destroyAfterComplete, defaultToFallback) {\n const triggerStates = this._engine.statesByElement.get(element);\n const previousTriggersValues = new Map();\n if (triggerStates) {\n const players = [];\n triggerStates.forEach((state, triggerName) => {\n previousTriggersValues.set(triggerName, state.value);\n // this check is here in the event that an element is removed\n // twice (both on the host level and the component level)\n if (this._triggers.has(triggerName)) {\n const player = this.trigger(element, triggerName, VOID_VALUE, defaultToFallback);\n if (player) {\n players.push(player);\n }\n }\n });\n if (players.length) {\n this._engine.markElementAsRemoved(this.id, element, true, context, previousTriggersValues);\n if (destroyAfterComplete) {\n optimizeGroupPlayer(players).onDone(() => this._engine.processLeaveNode(element));\n }\n return true;\n }\n }\n return false;\n }\n prepareLeaveAnimationListeners(element) {\n const listeners = this._elementListeners.get(element);\n const elementStates = this._engine.statesByElement.get(element);\n // if this statement fails then it means that the element was picked up\n // by an earlier flush (or there are no listeners at all to track the leave).\n if (listeners && elementStates) {\n const visitedTriggers = new Set();\n listeners.forEach(listener => {\n const triggerName = listener.name;\n if (visitedTriggers.has(triggerName)) return;\n visitedTriggers.add(triggerName);\n const trigger = this._triggers.get(triggerName);\n const transition = trigger.fallbackTransition;\n const fromState = elementStates.get(triggerName) || DEFAULT_STATE_VALUE;\n const toState = new StateValue(VOID_VALUE);\n const player = new TransitionAnimationPlayer(this.id, triggerName, element);\n this._engine.totalQueuedPlayers++;\n this._queue.push({\n element,\n triggerName,\n transition,\n fromState,\n toState,\n player,\n isFallbackTransition: true\n });\n });\n }\n }\n removeNode(element, context) {\n const engine = this._engine;\n if (element.childElementCount) {\n this._signalRemovalForInnerTriggers(element, context);\n }\n // this means that a * => VOID animation was detected and kicked off\n if (this.triggerLeaveAnimation(element, context, true)) return;\n // find the player that is animating and make sure that the\n // removal is delayed until that player has completed\n let containsPotentialParentTransition = false;\n if (engine.totalAnimations) {\n const currentPlayers = engine.players.length ? engine.playersByQueriedElement.get(element) : [];\n // when this `if statement` does not continue forward it means that\n // a previous animation query has selected the current element and\n // is animating it. In this situation want to continue forwards and\n // allow the element to be queued up for animation later.\n if (currentPlayers && currentPlayers.length) {\n containsPotentialParentTransition = true;\n } else {\n let parent = element;\n while (parent = parent.parentNode) {\n const triggers = engine.statesByElement.get(parent);\n if (triggers) {\n containsPotentialParentTransition = true;\n break;\n }\n }\n }\n }\n // at this stage we know that the element will either get removed\n // during flush or will be picked up by a parent query. Either way\n // we need to fire the listeners for this element when it DOES get\n // removed (once the query parent animation is done or after flush)\n this.prepareLeaveAnimationListeners(element);\n // whether or not a parent has an animation we need to delay the deferral of the leave\n // operation until we have more information (which we do after flush() has been called)\n if (containsPotentialParentTransition) {\n engine.markElementAsRemoved(this.id, element, false, context);\n } else {\n const removalFlag = element[REMOVAL_FLAG];\n if (!removalFlag || removalFlag === NULL_REMOVAL_STATE) {\n // we do this after the flush has occurred such\n // that the callbacks can be fired\n engine.afterFlush(() => this.clearElementCache(element));\n engine.destroyInnerAnimations(element);\n engine._onRemovalComplete(element, context);\n }\n }\n }\n insertNode(element, parent) {\n addClass(element, this._hostClassName);\n }\n drainQueuedTransitions(microtaskId) {\n const instructions = [];\n this._queue.forEach(entry => {\n const player = entry.player;\n if (player.destroyed) return;\n const element = entry.element;\n const listeners = this._elementListeners.get(element);\n if (listeners) {\n listeners.forEach(listener => {\n if (listener.name == entry.triggerName) {\n const baseEvent = makeAnimationEvent(element, entry.triggerName, entry.fromState.value, entry.toState.value);\n baseEvent['_data'] = microtaskId;\n listenOnPlayer(entry.player, listener.phase, baseEvent, listener.callback);\n }\n });\n }\n if (player.markedForDestroy) {\n this._engine.afterFlush(() => {\n // now we can destroy the element properly since the event listeners have\n // been bound to the player\n player.destroy();\n });\n } else {\n instructions.push(entry);\n }\n });\n this._queue = [];\n return instructions.sort((a, b) => {\n // if depCount == 0 them move to front\n // otherwise if a contains b then move back\n const d0 = a.transition.ast.depCount;\n const d1 = b.transition.ast.depCount;\n if (d0 == 0 || d1 == 0) {\n return d0 - d1;\n }\n return this._engine.driver.containsElement(a.element, b.element) ? 1 : -1;\n });\n }\n destroy(context) {\n this.players.forEach(p => p.destroy());\n this._signalRemovalForInnerTriggers(this.hostElement, context);\n }\n}\nclass TransitionAnimationEngine {\n bodyNode;\n driver;\n _normalizer;\n players = [];\n newHostElements = /*#__PURE__*/new Map();\n playersByElement = /*#__PURE__*/new Map();\n playersByQueriedElement = /*#__PURE__*/new Map();\n statesByElement = /*#__PURE__*/new Map();\n disabledNodes = /*#__PURE__*/new Set();\n totalAnimations = 0;\n totalQueuedPlayers = 0;\n _namespaceLookup = {};\n _namespaceList = [];\n _flushFns = [];\n _whenQuietFns = [];\n namespacesByHostElement = /*#__PURE__*/new Map();\n collectedEnterElements = [];\n collectedLeaveElements = [];\n // this method is designed to be overridden by the code that uses this engine\n onRemovalComplete = (element, context) => {};\n /** @internal */\n _onRemovalComplete(element, context) {\n this.onRemovalComplete(element, context);\n }\n constructor(bodyNode, driver, _normalizer) {\n this.bodyNode = bodyNode;\n this.driver = driver;\n this._normalizer = _normalizer;\n }\n get queuedPlayers() {\n const players = [];\n this._namespaceList.forEach(ns => {\n ns.players.forEach(player => {\n if (player.queued) {\n players.push(player);\n }\n });\n });\n return players;\n }\n createNamespace(namespaceId, hostElement) {\n const ns = new AnimationTransitionNamespace(namespaceId, hostElement, this);\n if (this.bodyNode && this.driver.containsElement(this.bodyNode, hostElement)) {\n this._balanceNamespaceList(ns, hostElement);\n } else {\n // defer this later until flush during when the host element has\n // been inserted so that we know exactly where to place it in\n // the namespace list\n this.newHostElements.set(hostElement, ns);\n // given that this host element is a part of the animation code, it\n // may or may not be inserted by a parent node that is of an\n // animation renderer type. If this happens then we can still have\n // access to this item when we query for :enter nodes. If the parent\n // is a renderer then the set data-structure will normalize the entry\n this.collectEnterElement(hostElement);\n }\n return this._namespaceLookup[namespaceId] = ns;\n }\n _balanceNamespaceList(ns, hostElement) {\n const namespaceList = this._namespaceList;\n const namespacesByHostElement = this.namespacesByHostElement;\n const limit = namespaceList.length - 1;\n if (limit >= 0) {\n let found = false;\n // Find the closest ancestor with an existing namespace so we can then insert `ns` after it,\n // establishing a top-down ordering of namespaces in `this._namespaceList`.\n let ancestor = this.driver.getParentElement(hostElement);\n while (ancestor) {\n const ancestorNs = namespacesByHostElement.get(ancestor);\n if (ancestorNs) {\n // An animation namespace has been registered for this ancestor, so we insert `ns`\n // right after it to establish top-down ordering of animation namespaces.\n const index = namespaceList.indexOf(ancestorNs);\n namespaceList.splice(index + 1, 0, ns);\n found = true;\n break;\n }\n ancestor = this.driver.getParentElement(ancestor);\n }\n if (!found) {\n // No namespace exists that is an ancestor of `ns`, so `ns` is inserted at the front to\n // ensure that any existing descendants are ordered after `ns`, retaining the desired\n // top-down ordering.\n namespaceList.unshift(ns);\n }\n } else {\n namespaceList.push(ns);\n }\n namespacesByHostElement.set(hostElement, ns);\n return ns;\n }\n register(namespaceId, hostElement) {\n let ns = this._namespaceLookup[namespaceId];\n if (!ns) {\n ns = this.createNamespace(namespaceId, hostElement);\n }\n return ns;\n }\n registerTrigger(namespaceId, name, trigger) {\n let ns = this._namespaceLookup[namespaceId];\n if (ns && ns.register(name, trigger)) {\n this.totalAnimations++;\n }\n }\n destroy(namespaceId, context) {\n if (!namespaceId) return;\n this.afterFlush(() => {});\n this.afterFlushAnimationsDone(() => {\n const ns = this._fetchNamespace(namespaceId);\n this.namespacesByHostElement.delete(ns.hostElement);\n const index = this._namespaceList.indexOf(ns);\n if (index >= 0) {\n this._namespaceList.splice(index, 1);\n }\n ns.destroy(context);\n delete this._namespaceLookup[namespaceId];\n });\n }\n _fetchNamespace(id) {\n return this._namespaceLookup[id];\n }\n fetchNamespacesByElement(element) {\n // normally there should only be one namespace per element, however\n // if @triggers are placed on both the component element and then\n // its host element (within the component code) then there will be\n // two namespaces returned. We use a set here to simply deduplicate\n // the namespaces in case (for the reason described above) there are multiple triggers\n const namespaces = new Set();\n const elementStates = this.statesByElement.get(element);\n if (elementStates) {\n for (let stateValue of elementStates.values()) {\n if (stateValue.namespaceId) {\n const ns = this._fetchNamespace(stateValue.namespaceId);\n if (ns) {\n namespaces.add(ns);\n }\n }\n }\n }\n return namespaces;\n }\n trigger(namespaceId, element, name, value) {\n if (isElementNode(element)) {\n const ns = this._fetchNamespace(namespaceId);\n if (ns) {\n ns.trigger(element, name, value);\n return true;\n }\n }\n return false;\n }\n insertNode(namespaceId, element, parent, insertBefore) {\n if (!isElementNode(element)) return;\n // special case for when an element is removed and reinserted (move operation)\n // when this occurs we do not want to use the element for deletion later\n const details = element[REMOVAL_FLAG];\n if (details && details.setForRemoval) {\n details.setForRemoval = false;\n details.setForMove = true;\n const index = this.collectedLeaveElements.indexOf(element);\n if (index >= 0) {\n this.collectedLeaveElements.splice(index, 1);\n }\n }\n // in the event that the namespaceId is blank then the caller\n // code does not contain any animation code in it, but it is\n // just being called so that the node is marked as being inserted\n if (namespaceId) {\n const ns = this._fetchNamespace(namespaceId);\n // This if-statement is a workaround for router issue #21947.\n // The router sometimes hits a race condition where while a route\n // is being instantiated a new navigation arrives, triggering leave\n // animation of DOM that has not been fully initialized, until this\n // is resolved, we need to handle the scenario when DOM is not in a\n // consistent state during the animation.\n if (ns) {\n ns.insertNode(element, parent);\n }\n }\n // only *directives and host elements are inserted before\n if (insertBefore) {\n this.collectEnterElement(element);\n }\n }\n collectEnterElement(element) {\n this.collectedEnterElements.push(element);\n }\n markElementAsDisabled(element, value) {\n if (value) {\n if (!this.disabledNodes.has(element)) {\n this.disabledNodes.add(element);\n addClass(element, DISABLED_CLASSNAME);\n }\n } else if (this.disabledNodes.has(element)) {\n this.disabledNodes.delete(element);\n removeClass(element, DISABLED_CLASSNAME);\n }\n }\n removeNode(namespaceId, element, context) {\n if (isElementNode(element)) {\n const ns = namespaceId ? this._fetchNamespace(namespaceId) : null;\n if (ns) {\n ns.removeNode(element, context);\n } else {\n this.markElementAsRemoved(namespaceId, element, false, context);\n }\n const hostNS = this.namespacesByHostElement.get(element);\n if (hostNS && hostNS.id !== namespaceId) {\n hostNS.removeNode(element, context);\n }\n } else {\n this._onRemovalComplete(element, context);\n }\n }\n markElementAsRemoved(namespaceId, element, hasAnimation, context, previousTriggersValues) {\n this.collectedLeaveElements.push(element);\n element[REMOVAL_FLAG] = {\n namespaceId,\n setForRemoval: context,\n hasAnimation,\n removedBeforeQueried: false,\n previousTriggersValues\n };\n }\n listen(namespaceId, element, name, phase, callback) {\n if (isElementNode(element)) {\n return this._fetchNamespace(namespaceId).listen(element, name, phase, callback);\n }\n return () => {};\n }\n _buildInstruction(entry, subTimelines, enterClassName, leaveClassName, skipBuildAst) {\n return entry.transition.build(this.driver, entry.element, entry.fromState.value, entry.toState.value, enterClassName, leaveClassName, entry.fromState.options, entry.toState.options, subTimelines, skipBuildAst);\n }\n destroyInnerAnimations(containerElement) {\n let elements = this.driver.query(containerElement, NG_TRIGGER_SELECTOR, true);\n elements.forEach(element => this.destroyActiveAnimationsForElement(element));\n if (this.playersByQueriedElement.size == 0) return;\n elements = this.driver.query(containerElement, NG_ANIMATING_SELECTOR, true);\n elements.forEach(element => this.finishActiveQueriedAnimationOnElement(element));\n }\n destroyActiveAnimationsForElement(element) {\n const players = this.playersByElement.get(element);\n if (players) {\n players.forEach(player => {\n // special case for when an element is set for destruction, but hasn't started.\n // in this situation we want to delay the destruction until the flush occurs\n // so that any event listeners attached to the player are triggered.\n if (player.queued) {\n player.markedForDestroy = true;\n } else {\n player.destroy();\n }\n });\n }\n }\n finishActiveQueriedAnimationOnElement(element) {\n const players = this.playersByQueriedElement.get(element);\n if (players) {\n players.forEach(player => player.finish());\n }\n }\n whenRenderingDone() {\n return new Promise(resolve => {\n if (this.players.length) {\n return optimizeGroupPlayer(this.players).onDone(() => resolve());\n } else {\n resolve();\n }\n });\n }\n processLeaveNode(element) {\n const details = element[REMOVAL_FLAG];\n if (details && details.setForRemoval) {\n // this will prevent it from removing it twice\n element[REMOVAL_FLAG] = NULL_REMOVAL_STATE;\n if (details.namespaceId) {\n this.destroyInnerAnimations(element);\n const ns = this._fetchNamespace(details.namespaceId);\n if (ns) {\n ns.clearElementCache(element);\n }\n }\n this._onRemovalComplete(element, details.setForRemoval);\n }\n if (element.classList?.contains(DISABLED_CLASSNAME)) {\n this.markElementAsDisabled(element, false);\n }\n this.driver.query(element, DISABLED_SELECTOR, true).forEach(node => {\n this.markElementAsDisabled(node, false);\n });\n }\n flush(microtaskId = -1) {\n let players = [];\n if (this.newHostElements.size) {\n this.newHostElements.forEach((ns, element) => this._balanceNamespaceList(ns, element));\n this.newHostElements.clear();\n }\n if (this.totalAnimations && this.collectedEnterElements.length) {\n for (let i = 0; i < this.collectedEnterElements.length; i++) {\n const elm = this.collectedEnterElements[i];\n addClass(elm, STAR_CLASSNAME);\n }\n }\n if (this._namespaceList.length && (this.totalQueuedPlayers || this.collectedLeaveElements.length)) {\n const cleanupFns = [];\n try {\n players = this._flushAnimations(cleanupFns, microtaskId);\n } finally {\n for (let i = 0; i < cleanupFns.length; i++) {\n cleanupFns[i]();\n }\n }\n } else {\n for (let i = 0; i < this.collectedLeaveElements.length; i++) {\n const element = this.collectedLeaveElements[i];\n this.processLeaveNode(element);\n }\n }\n this.totalQueuedPlayers = 0;\n this.collectedEnterElements.length = 0;\n this.collectedLeaveElements.length = 0;\n this._flushFns.forEach(fn => fn());\n this._flushFns = [];\n if (this._whenQuietFns.length) {\n // we move these over to a variable so that\n // if any new callbacks are registered in another\n // flush they do not populate the existing set\n const quietFns = this._whenQuietFns;\n this._whenQuietFns = [];\n if (players.length) {\n optimizeGroupPlayer(players).onDone(() => {\n quietFns.forEach(fn => fn());\n });\n } else {\n quietFns.forEach(fn => fn());\n }\n }\n }\n reportError(errors) {\n throw triggerTransitionsFailed(errors);\n }\n _flushAnimations(cleanupFns, microtaskId) {\n const subTimelines = new ElementInstructionMap();\n const skippedPlayers = [];\n const skippedPlayersMap = new Map();\n const queuedInstructions = [];\n const queriedElements = new Map();\n const allPreStyleElements = new Map();\n const allPostStyleElements = new Map();\n const disabledElementsSet = new Set();\n this.disabledNodes.forEach(node => {\n disabledElementsSet.add(node);\n const nodesThatAreDisabled = this.driver.query(node, QUEUED_SELECTOR, true);\n for (let i = 0; i < nodesThatAreDisabled.length; i++) {\n disabledElementsSet.add(nodesThatAreDisabled[i]);\n }\n });\n const bodyNode = this.bodyNode;\n const allTriggerElements = Array.from(this.statesByElement.keys());\n const enterNodeMap = buildRootMap(allTriggerElements, this.collectedEnterElements);\n // this must occur before the instructions are built below such that\n // the :enter queries match the elements (since the timeline queries\n // are fired during instruction building).\n const enterNodeMapIds = new Map();\n let i = 0;\n enterNodeMap.forEach((nodes, root) => {\n const className = ENTER_CLASSNAME + i++;\n enterNodeMapIds.set(root, className);\n nodes.forEach(node => addClass(node, className));\n });\n const allLeaveNodes = [];\n const mergedLeaveNodes = new Set();\n const leaveNodesWithoutAnimations = new Set();\n for (let i = 0; i < this.collectedLeaveElements.length; i++) {\n const element = this.collectedLeaveElements[i];\n const details = element[REMOVAL_FLAG];\n if (details && details.setForRemoval) {\n allLeaveNodes.push(element);\n mergedLeaveNodes.add(element);\n if (details.hasAnimation) {\n this.driver.query(element, STAR_SELECTOR, true).forEach(elm => mergedLeaveNodes.add(elm));\n } else {\n leaveNodesWithoutAnimations.add(element);\n }\n }\n }\n const leaveNodeMapIds = new Map();\n const leaveNodeMap = buildRootMap(allTriggerElements, Array.from(mergedLeaveNodes));\n leaveNodeMap.forEach((nodes, root) => {\n const className = LEAVE_CLASSNAME + i++;\n leaveNodeMapIds.set(root, className);\n nodes.forEach(node => addClass(node, className));\n });\n cleanupFns.push(() => {\n enterNodeMap.forEach((nodes, root) => {\n const className = enterNodeMapIds.get(root);\n nodes.forEach(node => removeClass(node, className));\n });\n leaveNodeMap.forEach((nodes, root) => {\n const className = leaveNodeMapIds.get(root);\n nodes.forEach(node => removeClass(node, className));\n });\n allLeaveNodes.forEach(element => {\n this.processLeaveNode(element);\n });\n });\n const allPlayers = [];\n const erroneousTransitions = [];\n for (let i = this._namespaceList.length - 1; i >= 0; i--) {\n const ns = this._namespaceList[i];\n ns.drainQueuedTransitions(microtaskId).forEach(entry => {\n const player = entry.player;\n const element = entry.element;\n allPlayers.push(player);\n if (this.collectedEnterElements.length) {\n const details = element[REMOVAL_FLAG];\n // animations for move operations (elements being removed and reinserted,\n // e.g. when the order of an *ngFor list changes) are currently not supported\n if (details && details.setForMove) {\n if (details.previousTriggersValues && details.previousTriggersValues.has(entry.triggerName)) {\n const previousValue = details.previousTriggersValues.get(entry.triggerName);\n // we need to restore the previous trigger value since the element has\n // only been moved and hasn't actually left the DOM\n const triggersWithStates = this.statesByElement.get(entry.element);\n if (triggersWithStates && triggersWithStates.has(entry.triggerName)) {\n const state = triggersWithStates.get(entry.triggerName);\n state.value = previousValue;\n triggersWithStates.set(entry.triggerName, state);\n }\n }\n player.destroy();\n return;\n }\n }\n const nodeIsOrphaned = !bodyNode || !this.driver.containsElement(bodyNode, element);\n const leaveClassName = leaveNodeMapIds.get(element);\n const enterClassName = enterNodeMapIds.get(element);\n const instruction = this._buildInstruction(entry, subTimelines, enterClassName, leaveClassName, nodeIsOrphaned);\n if (instruction.errors && instruction.errors.length) {\n erroneousTransitions.push(instruction);\n return;\n }\n // even though the element may not be in the DOM, it may still\n // be added at a later point (due to the mechanics of content\n // projection and/or dynamic component insertion) therefore it's\n // important to still style the element.\n if (nodeIsOrphaned) {\n player.onStart(() => eraseStyles(element, instruction.fromStyles));\n player.onDestroy(() => setStyles(element, instruction.toStyles));\n skippedPlayers.push(player);\n return;\n }\n // if an unmatched transition is queued and ready to go\n // then it SHOULD NOT render an animation and cancel the\n // previously running animations.\n if (entry.isFallbackTransition) {\n player.onStart(() => eraseStyles(element, instruction.fromStyles));\n player.onDestroy(() => setStyles(element, instruction.toStyles));\n skippedPlayers.push(player);\n return;\n }\n // this means that if a parent animation uses this animation as a sub-trigger\n // then it will instruct the timeline builder not to add a player delay, but\n // instead stretch the first keyframe gap until the animation starts. This is\n // important in order to prevent extra initialization styles from being\n // required by the user for the animation.\n const timelines = [];\n instruction.timelines.forEach(tl => {\n tl.stretchStartingKeyframe = true;\n if (!this.disabledNodes.has(tl.element)) {\n timelines.push(tl);\n }\n });\n instruction.timelines = timelines;\n subTimelines.append(element, instruction.timelines);\n const tuple = {\n instruction,\n player,\n element\n };\n queuedInstructions.push(tuple);\n instruction.queriedElements.forEach(element => getOrSetDefaultValue(queriedElements, element, []).push(player));\n instruction.preStyleProps.forEach((stringMap, element) => {\n if (stringMap.size) {\n let setVal = allPreStyleElements.get(element);\n if (!setVal) {\n allPreStyleElements.set(element, setVal = new Set());\n }\n stringMap.forEach((_, prop) => setVal.add(prop));\n }\n });\n instruction.postStyleProps.forEach((stringMap, element) => {\n let setVal = allPostStyleElements.get(element);\n if (!setVal) {\n allPostStyleElements.set(element, setVal = new Set());\n }\n stringMap.forEach((_, prop) => setVal.add(prop));\n });\n });\n }\n if (erroneousTransitions.length) {\n const errors = [];\n erroneousTransitions.forEach(instruction => {\n errors.push(transitionFailed(instruction.triggerName, instruction.errors));\n });\n allPlayers.forEach(player => player.destroy());\n this.reportError(errors);\n }\n const allPreviousPlayersMap = new Map();\n // this map tells us which element in the DOM tree is contained by\n // which animation. Further down this map will get populated once\n // the players are built and in doing so we can use it to efficiently\n // figure out if a sub player is skipped due to a parent player having priority.\n const animationElementMap = new Map();\n queuedInstructions.forEach(entry => {\n const element = entry.element;\n if (subTimelines.has(element)) {\n animationElementMap.set(element, element);\n this._beforeAnimationBuild(entry.player.namespaceId, entry.instruction, allPreviousPlayersMap);\n }\n });\n skippedPlayers.forEach(player => {\n const element = player.element;\n const previousPlayers = this._getPreviousPlayers(element, false, player.namespaceId, player.triggerName, null);\n previousPlayers.forEach(prevPlayer => {\n getOrSetDefaultValue(allPreviousPlayersMap, element, []).push(prevPlayer);\n prevPlayer.destroy();\n });\n });\n // this is a special case for nodes that will be removed either by\n // having their own leave animations or by being queried in a container\n // that will be removed once a parent animation is complete. The idea\n // here is that * styles must be identical to ! styles because of\n // backwards compatibility (* is also filled in by default in many places).\n // Otherwise * styles will return an empty value or \"auto\" since the element\n // passed to getComputedStyle will not be visible (since * === destination)\n const replaceNodes = allLeaveNodes.filter(node => {\n return replacePostStylesAsPre(node, allPreStyleElements, allPostStyleElements);\n });\n // POST STAGE: fill the * styles\n const postStylesMap = new Map();\n const allLeaveQueriedNodes = cloakAndComputeStyles(postStylesMap, this.driver, leaveNodesWithoutAnimations, allPostStyleElements, AUTO_STYLE);\n allLeaveQueriedNodes.forEach(node => {\n if (replacePostStylesAsPre(node, allPreStyleElements, allPostStyleElements)) {\n replaceNodes.push(node);\n }\n });\n // PRE STAGE: fill the ! styles\n const preStylesMap = new Map();\n enterNodeMap.forEach((nodes, root) => {\n cloakAndComputeStyles(preStylesMap, this.driver, new Set(nodes), allPreStyleElements, ɵPRE_STYLE);\n });\n replaceNodes.forEach(node => {\n const post = postStylesMap.get(node);\n const pre = preStylesMap.get(node);\n postStylesMap.set(node, new Map([...(post?.entries() ?? []), ...(pre?.entries() ?? [])]));\n });\n const rootPlayers = [];\n const subPlayers = [];\n const NO_PARENT_ANIMATION_ELEMENT_DETECTED = {};\n queuedInstructions.forEach(entry => {\n const {\n element,\n player,\n instruction\n } = entry;\n // this means that it was never consumed by a parent animation which\n // means that it is independent and therefore should be set for animation\n if (subTimelines.has(element)) {\n if (disabledElementsSet.has(element)) {\n player.onDestroy(() => setStyles(element, instruction.toStyles));\n player.disabled = true;\n player.overrideTotalTime(instruction.totalTime);\n skippedPlayers.push(player);\n return;\n }\n // this will flow up the DOM and query the map to figure out\n // if a parent animation has priority over it. In the situation\n // that a parent is detected then it will cancel the loop. If\n // nothing is detected, or it takes a few hops to find a parent,\n // then it will fill in the missing nodes and signal them as having\n // a detected parent (or a NO_PARENT value via a special constant).\n let parentWithAnimation = NO_PARENT_ANIMATION_ELEMENT_DETECTED;\n if (animationElementMap.size > 1) {\n let elm = element;\n const parentsToAdd = [];\n while (elm = elm.parentNode) {\n const detectedParent = animationElementMap.get(elm);\n if (detectedParent) {\n parentWithAnimation = detectedParent;\n break;\n }\n parentsToAdd.push(elm);\n }\n parentsToAdd.forEach(parent => animationElementMap.set(parent, parentWithAnimation));\n }\n const innerPlayer = this._buildAnimation(player.namespaceId, instruction, allPreviousPlayersMap, skippedPlayersMap, preStylesMap, postStylesMap);\n player.setRealPlayer(innerPlayer);\n if (parentWithAnimation === NO_PARENT_ANIMATION_ELEMENT_DETECTED) {\n rootPlayers.push(player);\n } else {\n const parentPlayers = this.playersByElement.get(parentWithAnimation);\n if (parentPlayers && parentPlayers.length) {\n player.parentPlayer = optimizeGroupPlayer(parentPlayers);\n }\n skippedPlayers.push(player);\n }\n } else {\n eraseStyles(element, instruction.fromStyles);\n player.onDestroy(() => setStyles(element, instruction.toStyles));\n // there still might be a ancestor player animating this\n // element therefore we will still add it as a sub player\n // even if its animation may be disabled\n subPlayers.push(player);\n if (disabledElementsSet.has(element)) {\n skippedPlayers.push(player);\n }\n }\n });\n // find all of the sub players' corresponding inner animation players\n subPlayers.forEach(player => {\n // even if no players are found for a sub animation it\n // will still complete itself after the next tick since it's Noop\n const playersForElement = skippedPlayersMap.get(player.element);\n if (playersForElement && playersForElement.length) {\n const innerPlayer = optimizeGroupPlayer(playersForElement);\n player.setRealPlayer(innerPlayer);\n }\n });\n // the reason why we don't actually play the animation is\n // because all that a skipped player is designed to do is to\n // fire the start/done transition callback events\n skippedPlayers.forEach(player => {\n if (player.parentPlayer) {\n player.syncPlayerEvents(player.parentPlayer);\n } else {\n player.destroy();\n }\n });\n // run through all of the queued removals and see if they\n // were picked up by a query. If not then perform the removal\n // operation right away unless a parent animation is ongoing.\n for (let i = 0; i < allLeaveNodes.length; i++) {\n const element = allLeaveNodes[i];\n const details = element[REMOVAL_FLAG];\n removeClass(element, LEAVE_CLASSNAME);\n // this means the element has a removal animation that is being\n // taken care of and therefore the inner elements will hang around\n // until that animation is over (or the parent queried animation)\n if (details && details.hasAnimation) continue;\n let players = [];\n // if this element is queried or if it contains queried children\n // then we want for the element not to be removed from the page\n // until the queried animations have finished\n if (queriedElements.size) {\n let queriedPlayerResults = queriedElements.get(element);\n if (queriedPlayerResults && queriedPlayerResults.length) {\n players.push(...queriedPlayerResults);\n }\n let queriedInnerElements = this.driver.query(element, NG_ANIMATING_SELECTOR, true);\n for (let j = 0; j < queriedInnerElements.length; j++) {\n let queriedPlayers = queriedElements.get(queriedInnerElements[j]);\n if (queriedPlayers && queriedPlayers.length) {\n players.push(...queriedPlayers);\n }\n }\n }\n const activePlayers = players.filter(p => !p.destroyed);\n if (activePlayers.length) {\n removeNodesAfterAnimationDone(this, element, activePlayers);\n } else {\n this.processLeaveNode(element);\n }\n }\n // this is required so the cleanup method doesn't remove them\n allLeaveNodes.length = 0;\n rootPlayers.forEach(player => {\n this.players.push(player);\n player.onDone(() => {\n player.destroy();\n const index = this.players.indexOf(player);\n this.players.splice(index, 1);\n });\n player.play();\n });\n return rootPlayers;\n }\n afterFlush(callback) {\n this._flushFns.push(callback);\n }\n afterFlushAnimationsDone(callback) {\n this._whenQuietFns.push(callback);\n }\n _getPreviousPlayers(element, isQueriedElement, namespaceId, triggerName, toStateValue) {\n let players = [];\n if (isQueriedElement) {\n const queriedElementPlayers = this.playersByQueriedElement.get(element);\n if (queriedElementPlayers) {\n players = queriedElementPlayers;\n }\n } else {\n const elementPlayers = this.playersByElement.get(element);\n if (elementPlayers) {\n const isRemovalAnimation = !toStateValue || toStateValue == VOID_VALUE;\n elementPlayers.forEach(player => {\n if (player.queued) return;\n if (!isRemovalAnimation && player.triggerName != triggerName) return;\n players.push(player);\n });\n }\n }\n if (namespaceId || triggerName) {\n players = players.filter(player => {\n if (namespaceId && namespaceId != player.namespaceId) return false;\n if (triggerName && triggerName != player.triggerName) return false;\n return true;\n });\n }\n return players;\n }\n _beforeAnimationBuild(namespaceId, instruction, allPreviousPlayersMap) {\n const triggerName = instruction.triggerName;\n const rootElement = instruction.element;\n // when a removal animation occurs, ALL previous players are collected\n // and destroyed (even if they are outside of the current namespace)\n const targetNameSpaceId = instruction.isRemovalTransition ? undefined : namespaceId;\n const targetTriggerName = instruction.isRemovalTransition ? undefined : triggerName;\n for (const timelineInstruction of instruction.timelines) {\n const element = timelineInstruction.element;\n const isQueriedElement = element !== rootElement;\n const players = getOrSetDefaultValue(allPreviousPlayersMap, element, []);\n const previousPlayers = this._getPreviousPlayers(element, isQueriedElement, targetNameSpaceId, targetTriggerName, instruction.toState);\n previousPlayers.forEach(player => {\n const realPlayer = player.getRealPlayer();\n if (realPlayer.beforeDestroy) {\n realPlayer.beforeDestroy();\n }\n player.destroy();\n players.push(player);\n });\n }\n // this needs to be done so that the PRE/POST styles can be\n // computed properly without interfering with the previous animation\n eraseStyles(rootElement, instruction.fromStyles);\n }\n _buildAnimation(namespaceId, instruction, allPreviousPlayersMap, skippedPlayersMap, preStylesMap, postStylesMap) {\n const triggerName = instruction.triggerName;\n const rootElement = instruction.element;\n // we first run this so that the previous animation player\n // data can be passed into the successive animation players\n const allQueriedPlayers = [];\n const allConsumedElements = new Set();\n const allSubElements = new Set();\n const allNewPlayers = instruction.timelines.map(timelineInstruction => {\n const element = timelineInstruction.element;\n allConsumedElements.add(element);\n // FIXME (matsko): make sure to-be-removed animations are removed properly\n const details = element[REMOVAL_FLAG];\n if (details && details.removedBeforeQueried) return new NoopAnimationPlayer(timelineInstruction.duration, timelineInstruction.delay);\n const isQueriedElement = element !== rootElement;\n const previousPlayers = flattenGroupPlayers((allPreviousPlayersMap.get(element) || EMPTY_PLAYER_ARRAY).map(p => p.getRealPlayer())).filter(p => {\n // the `element` is not apart of the AnimationPlayer definition, but\n // Mock/WebAnimations\n // use the element within their implementation. This will be added in Angular5 to\n // AnimationPlayer\n const pp = p;\n return pp.element ? pp.element === element : false;\n });\n const preStyles = preStylesMap.get(element);\n const postStyles = postStylesMap.get(element);\n const keyframes = normalizeKeyframes$1(this._normalizer, timelineInstruction.keyframes, preStyles, postStyles);\n const player = this._buildPlayer(timelineInstruction, keyframes, previousPlayers);\n // this means that this particular player belongs to a sub trigger. It is\n // important that we match this player up with the corresponding (@trigger.listener)\n if (timelineInstruction.subTimeline && skippedPlayersMap) {\n allSubElements.add(element);\n }\n if (isQueriedElement) {\n const wrappedPlayer = new TransitionAnimationPlayer(namespaceId, triggerName, element);\n wrappedPlayer.setRealPlayer(player);\n allQueriedPlayers.push(wrappedPlayer);\n }\n return player;\n });\n allQueriedPlayers.forEach(player => {\n getOrSetDefaultValue(this.playersByQueriedElement, player.element, []).push(player);\n player.onDone(() => deleteOrUnsetInMap(this.playersByQueriedElement, player.element, player));\n });\n allConsumedElements.forEach(element => addClass(element, NG_ANIMATING_CLASSNAME));\n const player = optimizeGroupPlayer(allNewPlayers);\n player.onDestroy(() => {\n allConsumedElements.forEach(element => removeClass(element, NG_ANIMATING_CLASSNAME));\n setStyles(rootElement, instruction.toStyles);\n });\n // this basically makes all of the callbacks for sub element animations\n // be dependent on the upper players for when they finish\n allSubElements.forEach(element => {\n getOrSetDefaultValue(skippedPlayersMap, element, []).push(player);\n });\n return player;\n }\n _buildPlayer(instruction, keyframes, previousPlayers) {\n if (keyframes.length > 0) {\n return this.driver.animate(instruction.element, keyframes, instruction.duration, instruction.delay, instruction.easing, previousPlayers);\n }\n // special case for when an empty transition|definition is provided\n // ... there is no point in rendering an empty animation\n return new NoopAnimationPlayer(instruction.duration, instruction.delay);\n }\n}\nclass TransitionAnimationPlayer {\n namespaceId;\n triggerName;\n element;\n _player = /*#__PURE__*/new NoopAnimationPlayer();\n _containsRealPlayer = false;\n _queuedCallbacks = /*#__PURE__*/new Map();\n destroyed = false;\n parentPlayer = null;\n markedForDestroy = false;\n disabled = false;\n queued = true;\n totalTime = 0;\n constructor(namespaceId, triggerName, element) {\n this.namespaceId = namespaceId;\n this.triggerName = triggerName;\n this.element = element;\n }\n setRealPlayer(player) {\n if (this._containsRealPlayer) return;\n this._player = player;\n this._queuedCallbacks.forEach((callbacks, phase) => {\n callbacks.forEach(callback => listenOnPlayer(player, phase, undefined, callback));\n });\n this._queuedCallbacks.clear();\n this._containsRealPlayer = true;\n this.overrideTotalTime(player.totalTime);\n this.queued = false;\n }\n getRealPlayer() {\n return this._player;\n }\n overrideTotalTime(totalTime) {\n this.totalTime = totalTime;\n }\n syncPlayerEvents(player) {\n const p = this._player;\n if (p.triggerCallback) {\n player.onStart(() => p.triggerCallback('start'));\n }\n player.onDone(() => this.finish());\n player.onDestroy(() => this.destroy());\n }\n _queueEvent(name, callback) {\n getOrSetDefaultValue(this._queuedCallbacks, name, []).push(callback);\n }\n onDone(fn) {\n if (this.queued) {\n this._queueEvent('done', fn);\n }\n this._player.onDone(fn);\n }\n onStart(fn) {\n if (this.queued) {\n this._queueEvent('start', fn);\n }\n this._player.onStart(fn);\n }\n onDestroy(fn) {\n if (this.queued) {\n this._queueEvent('destroy', fn);\n }\n this._player.onDestroy(fn);\n }\n init() {\n this._player.init();\n }\n hasStarted() {\n return this.queued ? false : this._player.hasStarted();\n }\n play() {\n !this.queued && this._player.play();\n }\n pause() {\n !this.queued && this._player.pause();\n }\n restart() {\n !this.queued && this._player.restart();\n }\n finish() {\n this._player.finish();\n }\n destroy() {\n this.destroyed = true;\n this._player.destroy();\n }\n reset() {\n !this.queued && this._player.reset();\n }\n setPosition(p) {\n if (!this.queued) {\n this._player.setPosition(p);\n }\n }\n getPosition() {\n return this.queued ? 0 : this._player.getPosition();\n }\n /** @internal */\n triggerCallback(phaseName) {\n const p = this._player;\n if (p.triggerCallback) {\n p.triggerCallback(phaseName);\n }\n }\n}\nfunction deleteOrUnsetInMap(map, key, value) {\n let currentValues = map.get(key);\n if (currentValues) {\n if (currentValues.length) {\n const index = currentValues.indexOf(value);\n currentValues.splice(index, 1);\n }\n if (currentValues.length == 0) {\n map.delete(key);\n }\n }\n return currentValues;\n}\nfunction normalizeTriggerValue(value) {\n // we use `!= null` here because it's the most simple\n // way to test against a \"falsy\" value without mixing\n // in empty strings or a zero value. DO NOT OPTIMIZE.\n return value != null ? value : null;\n}\nfunction isElementNode(node) {\n return node && node['nodeType'] === 1;\n}\nfunction isTriggerEventValid(eventName) {\n return eventName == 'start' || eventName == 'done';\n}\nfunction cloakElement(element, value) {\n const oldValue = element.style.display;\n element.style.display = value != null ? value : 'none';\n return oldValue;\n}\nfunction cloakAndComputeStyles(valuesMap, driver, elements, elementPropsMap, defaultStyle) {\n const cloakVals = [];\n elements.forEach(element => cloakVals.push(cloakElement(element)));\n const failedElements = [];\n elementPropsMap.forEach((props, element) => {\n const styles = new Map();\n props.forEach(prop => {\n const value = driver.computeStyle(element, prop, defaultStyle);\n styles.set(prop, value);\n // there is no easy way to detect this because a sub element could be removed\n // by a parent animation element being detached.\n if (!value || value.length == 0) {\n element[REMOVAL_FLAG] = NULL_REMOVED_QUERIED_STATE;\n failedElements.push(element);\n }\n });\n valuesMap.set(element, styles);\n });\n // we use a index variable here since Set.forEach(a, i) does not return\n // an index value for the closure (but instead just the value)\n let i = 0;\n elements.forEach(element => cloakElement(element, cloakVals[i++]));\n return failedElements;\n}\n/*\nSince the Angular renderer code will return a collection of inserted\nnodes in all areas of a DOM tree, it's up to this algorithm to figure\nout which nodes are roots for each animation @trigger.\n\nBy placing each inserted node into a Set and traversing upwards, it\nis possible to find the @trigger elements and well any direct *star\ninsertion nodes, if a @trigger root is found then the enter element\nis placed into the Map[@trigger] spot.\n */\nfunction buildRootMap(roots, nodes) {\n const rootMap = new Map();\n roots.forEach(root => rootMap.set(root, []));\n if (nodes.length == 0) return rootMap;\n const NULL_NODE = 1;\n const nodeSet = new Set(nodes);\n const localRootMap = new Map();\n function getRoot(node) {\n if (!node) return NULL_NODE;\n let root = localRootMap.get(node);\n if (root) return root;\n const parent = node.parentNode;\n if (rootMap.has(parent)) {\n // ngIf inside @trigger\n root = parent;\n } else if (nodeSet.has(parent)) {\n // ngIf inside ngIf\n root = NULL_NODE;\n } else {\n // recurse upwards\n root = getRoot(parent);\n }\n localRootMap.set(node, root);\n return root;\n }\n nodes.forEach(node => {\n const root = getRoot(node);\n if (root !== NULL_NODE) {\n rootMap.get(root).push(node);\n }\n });\n return rootMap;\n}\nfunction addClass(element, className) {\n element.classList?.add(className);\n}\nfunction removeClass(element, className) {\n element.classList?.remove(className);\n}\nfunction removeNodesAfterAnimationDone(engine, element, players) {\n optimizeGroupPlayer(players).onDone(() => engine.processLeaveNode(element));\n}\nfunction flattenGroupPlayers(players) {\n const finalPlayers = [];\n _flattenGroupPlayersRecur(players, finalPlayers);\n return finalPlayers;\n}\nfunction _flattenGroupPlayersRecur(players, finalPlayers) {\n for (let i = 0; i < players.length; i++) {\n const player = players[i];\n if (player instanceof ɵAnimationGroupPlayer) {\n _flattenGroupPlayersRecur(player.players, finalPlayers);\n } else {\n finalPlayers.push(player);\n }\n }\n}\nfunction objEquals(a, b) {\n const k1 = Object.keys(a);\n const k2 = Object.keys(b);\n if (k1.length != k2.length) return false;\n for (let i = 0; i < k1.length; i++) {\n const prop = k1[i];\n if (!b.hasOwnProperty(prop) || a[prop] !== b[prop]) return false;\n }\n return true;\n}\nfunction replacePostStylesAsPre(element, allPreStyleElements, allPostStyleElements) {\n const postEntry = allPostStyleElements.get(element);\n if (!postEntry) return false;\n let preEntry = allPreStyleElements.get(element);\n if (preEntry) {\n postEntry.forEach(data => preEntry.add(data));\n } else {\n allPreStyleElements.set(element, postEntry);\n }\n allPostStyleElements.delete(element);\n return true;\n}\nclass AnimationEngine {\n _driver;\n _normalizer;\n _transitionEngine;\n _timelineEngine;\n _triggerCache = {};\n // this method is designed to be overridden by the code that uses this engine\n onRemovalComplete = (element, context) => {};\n constructor(doc, _driver, _normalizer) {\n this._driver = _driver;\n this._normalizer = _normalizer;\n this._transitionEngine = new TransitionAnimationEngine(doc.body, _driver, _normalizer);\n this._timelineEngine = new TimelineAnimationEngine(doc.body, _driver, _normalizer);\n this._transitionEngine.onRemovalComplete = (element, context) => this.onRemovalComplete(element, context);\n }\n registerTrigger(componentId, namespaceId, hostElement, name, metadata) {\n const cacheKey = componentId + '-' + name;\n let trigger = this._triggerCache[cacheKey];\n if (!trigger) {\n const errors = [];\n const warnings = [];\n const ast = buildAnimationAst(this._driver, metadata, errors, warnings);\n if (errors.length) {\n throw triggerBuildFailed(name, errors);\n }\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (warnings.length) {\n warnTriggerBuild(name, warnings);\n }\n }\n trigger = buildTrigger(name, ast, this._normalizer);\n this._triggerCache[cacheKey] = trigger;\n }\n this._transitionEngine.registerTrigger(namespaceId, name, trigger);\n }\n register(namespaceId, hostElement) {\n this._transitionEngine.register(namespaceId, hostElement);\n }\n destroy(namespaceId, context) {\n this._transitionEngine.destroy(namespaceId, context);\n }\n onInsert(namespaceId, element, parent, insertBefore) {\n this._transitionEngine.insertNode(namespaceId, element, parent, insertBefore);\n }\n onRemove(namespaceId, element, context) {\n this._transitionEngine.removeNode(namespaceId, element, context);\n }\n disableAnimations(element, disable) {\n this._transitionEngine.markElementAsDisabled(element, disable);\n }\n process(namespaceId, element, property, value) {\n if (property.charAt(0) == '@') {\n const [id, action] = parseTimelineCommand(property);\n const args = value;\n this._timelineEngine.command(id, element, action, args);\n } else {\n this._transitionEngine.trigger(namespaceId, element, property, value);\n }\n }\n listen(namespaceId, element, eventName, eventPhase, callback) {\n // @@listen\n if (eventName.charAt(0) == '@') {\n const [id, action] = parseTimelineCommand(eventName);\n return this._timelineEngine.listen(id, element, action, callback);\n }\n return this._transitionEngine.listen(namespaceId, element, eventName, eventPhase, callback);\n }\n flush(microtaskId = -1) {\n this._transitionEngine.flush(microtaskId);\n }\n get players() {\n return [...this._transitionEngine.players, ...this._timelineEngine.players];\n }\n whenRenderingDone() {\n return this._transitionEngine.whenRenderingDone();\n }\n afterFlushAnimationsDone(cb) {\n this._transitionEngine.afterFlushAnimationsDone(cb);\n }\n}\n\n/**\n * Returns an instance of `SpecialCasedStyles` if and when any special (non animateable) styles are\n * detected.\n *\n * In CSS there exist properties that cannot be animated within a keyframe animation\n * (whether it be via CSS keyframes or web-animations) and the animation implementation\n * will ignore them. This function is designed to detect those special cased styles and\n * return a container that will be executed at the start and end of the animation.\n *\n * @returns an instance of `SpecialCasedStyles` if any special styles are detected otherwise `null`\n */\nfunction packageNonAnimatableStyles(element, styles) {\n let startStyles = null;\n let endStyles = null;\n if (Array.isArray(styles) && styles.length) {\n startStyles = filterNonAnimatableStyles(styles[0]);\n if (styles.length > 1) {\n endStyles = filterNonAnimatableStyles(styles[styles.length - 1]);\n }\n } else if (styles instanceof Map) {\n startStyles = filterNonAnimatableStyles(styles);\n }\n return startStyles || endStyles ? new SpecialCasedStyles(element, startStyles, endStyles) : null;\n}\n/**\n * Designed to be executed during a keyframe-based animation to apply any special-cased styles.\n *\n * When started (when the `start()` method is run) then the provided `startStyles`\n * will be applied. When finished (when the `finish()` method is called) the\n * `endStyles` will be applied as well any any starting styles. Finally when\n * `destroy()` is called then all styles will be removed.\n */\nlet SpecialCasedStyles = /*#__PURE__*/(() => {\n class SpecialCasedStyles {\n _element;\n _startStyles;\n _endStyles;\n static initialStylesByElement = /* @__PURE__ */new WeakMap();\n _state = 0 /* SpecialCasedStylesState.Pending */;\n _initialStyles;\n constructor(_element, _startStyles, _endStyles) {\n this._element = _element;\n this._startStyles = _startStyles;\n this._endStyles = _endStyles;\n let initialStyles = SpecialCasedStyles.initialStylesByElement.get(_element);\n if (!initialStyles) {\n SpecialCasedStyles.initialStylesByElement.set(_element, initialStyles = new Map());\n }\n this._initialStyles = initialStyles;\n }\n start() {\n if (this._state < 1 /* SpecialCasedStylesState.Started */) {\n if (this._startStyles) {\n setStyles(this._element, this._startStyles, this._initialStyles);\n }\n this._state = 1 /* SpecialCasedStylesState.Started */;\n }\n }\n finish() {\n this.start();\n if (this._state < 2 /* SpecialCasedStylesState.Finished */) {\n setStyles(this._element, this._initialStyles);\n if (this._endStyles) {\n setStyles(this._element, this._endStyles);\n this._endStyles = null;\n }\n this._state = 1 /* SpecialCasedStylesState.Started */;\n }\n }\n destroy() {\n this.finish();\n if (this._state < 3 /* SpecialCasedStylesState.Destroyed */) {\n SpecialCasedStyles.initialStylesByElement.delete(this._element);\n if (this._startStyles) {\n eraseStyles(this._element, this._startStyles);\n this._endStyles = null;\n }\n if (this._endStyles) {\n eraseStyles(this._element, this._endStyles);\n this._endStyles = null;\n }\n setStyles(this._element, this._initialStyles);\n this._state = 3 /* SpecialCasedStylesState.Destroyed */;\n }\n }\n }\n return SpecialCasedStyles;\n})();\nfunction filterNonAnimatableStyles(styles) {\n let result = null;\n styles.forEach((val, prop) => {\n if (isNonAnimatableStyle(prop)) {\n result = result || new Map();\n result.set(prop, val);\n }\n });\n return result;\n}\nfunction isNonAnimatableStyle(prop) {\n return prop === 'display' || prop === 'position';\n}\nclass WebAnimationsPlayer {\n element;\n keyframes;\n options;\n _specialStyles;\n _onDoneFns = [];\n _onStartFns = [];\n _onDestroyFns = [];\n _duration;\n _delay;\n _initialized = false;\n _finished = false;\n _started = false;\n _destroyed = false;\n _finalKeyframe;\n // the following original fns are persistent copies of the _onStartFns and _onDoneFns\n // and are used to reset the fns to their original values upon reset()\n // (since the _onStartFns and _onDoneFns get deleted after they are called)\n _originalOnDoneFns = [];\n _originalOnStartFns = [];\n // using non-null assertion because it's re(set) by init();\n domPlayer;\n time = 0;\n parentPlayer = null;\n currentSnapshot = /*#__PURE__*/new Map();\n constructor(element, keyframes, options, _specialStyles) {\n this.element = element;\n this.keyframes = keyframes;\n this.options = options;\n this._specialStyles = _specialStyles;\n this._duration = options['duration'];\n this._delay = options['delay'] || 0;\n this.time = this._duration + this._delay;\n }\n _onFinish() {\n if (!this._finished) {\n this._finished = true;\n this._onDoneFns.forEach(fn => fn());\n this._onDoneFns = [];\n }\n }\n init() {\n this._buildPlayer();\n this._preparePlayerBeforeStart();\n }\n _buildPlayer() {\n if (this._initialized) return;\n this._initialized = true;\n const keyframes = this.keyframes;\n // @ts-expect-error overwriting a readonly property\n this.domPlayer = this._triggerWebAnimation(this.element, keyframes, this.options);\n this._finalKeyframe = keyframes.length ? keyframes[keyframes.length - 1] : new Map();\n const onFinish = () => this._onFinish();\n this.domPlayer.addEventListener('finish', onFinish);\n this.onDestroy(() => {\n // We must remove the `finish` event listener once an animation has completed all its\n // iterations. This action is necessary to prevent a memory leak since the listener captures\n // `this`, creating a closure that prevents `this` from being garbage collected.\n this.domPlayer.removeEventListener('finish', onFinish);\n });\n }\n _preparePlayerBeforeStart() {\n // this is required so that the player doesn't start to animate right away\n if (this._delay) {\n this._resetDomPlayerState();\n } else {\n this.domPlayer.pause();\n }\n }\n _convertKeyframesToObject(keyframes) {\n const kfs = [];\n keyframes.forEach(frame => {\n kfs.push(Object.fromEntries(frame));\n });\n return kfs;\n }\n /** @internal */\n _triggerWebAnimation(element, keyframes, options) {\n return element.animate(this._convertKeyframesToObject(keyframes), options);\n }\n onStart(fn) {\n this._originalOnStartFns.push(fn);\n this._onStartFns.push(fn);\n }\n onDone(fn) {\n this._originalOnDoneFns.push(fn);\n this._onDoneFns.push(fn);\n }\n onDestroy(fn) {\n this._onDestroyFns.push(fn);\n }\n play() {\n this._buildPlayer();\n if (!this.hasStarted()) {\n this._onStartFns.forEach(fn => fn());\n this._onStartFns = [];\n this._started = true;\n if (this._specialStyles) {\n this._specialStyles.start();\n }\n }\n this.domPlayer.play();\n }\n pause() {\n this.init();\n this.domPlayer.pause();\n }\n finish() {\n this.init();\n if (this._specialStyles) {\n this._specialStyles.finish();\n }\n this._onFinish();\n this.domPlayer.finish();\n }\n reset() {\n this._resetDomPlayerState();\n this._destroyed = false;\n this._finished = false;\n this._started = false;\n this._onStartFns = this._originalOnStartFns;\n this._onDoneFns = this._originalOnDoneFns;\n }\n _resetDomPlayerState() {\n if (this.domPlayer) {\n this.domPlayer.cancel();\n }\n }\n restart() {\n this.reset();\n this.play();\n }\n hasStarted() {\n return this._started;\n }\n destroy() {\n if (!this._destroyed) {\n this._destroyed = true;\n this._resetDomPlayerState();\n this._onFinish();\n if (this._specialStyles) {\n this._specialStyles.destroy();\n }\n this._onDestroyFns.forEach(fn => fn());\n this._onDestroyFns = [];\n }\n }\n setPosition(p) {\n if (this.domPlayer === undefined) {\n this.init();\n }\n this.domPlayer.currentTime = p * this.time;\n }\n getPosition() {\n // tsc is complaining with TS2362 without the conversion to number\n return +(this.domPlayer.currentTime ?? 0) / this.time;\n }\n get totalTime() {\n return this._delay + this._duration;\n }\n beforeDestroy() {\n const styles = new Map();\n if (this.hasStarted()) {\n // note: this code is invoked only when the `play` function was called prior to this\n // (thus `hasStarted` returns true), this implies that the code that initializes\n // `_finalKeyframe` has also been executed and the non-null assertion can be safely used here\n const finalKeyframe = this._finalKeyframe;\n finalKeyframe.forEach((val, prop) => {\n if (prop !== 'offset') {\n styles.set(prop, this._finished ? val : computeStyle(this.element, prop));\n }\n });\n }\n this.currentSnapshot = styles;\n }\n /** @internal */\n triggerCallback(phaseName) {\n const methods = phaseName === 'start' ? this._onStartFns : this._onDoneFns;\n methods.forEach(fn => fn());\n methods.length = 0;\n }\n}\nclass WebAnimationsDriver {\n validateStyleProperty(prop) {\n // Perform actual validation in dev mode only, in prod mode this check is a noop.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n return validateStyleProperty(prop);\n }\n return true;\n }\n validateAnimatableStyleProperty(prop) {\n // Perform actual validation in dev mode only, in prod mode this check is a noop.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n const cssProp = camelCaseToDashCase(prop);\n return validateWebAnimatableStyleProperty(cssProp);\n }\n return true;\n }\n containsElement(elm1, elm2) {\n return containsElement(elm1, elm2);\n }\n getParentElement(element) {\n return getParentElement(element);\n }\n query(element, selector, multi) {\n return invokeQuery(element, selector, multi);\n }\n computeStyle(element, prop, defaultValue) {\n return computeStyle(element, prop);\n }\n animate(element, keyframes, duration, delay, easing, previousPlayers = []) {\n const fill = delay == 0 ? 'both' : 'forwards';\n const playerOptions = {\n duration,\n delay,\n fill\n };\n // we check for this to avoid having a null|undefined value be present\n // for the easing (which results in an error for certain browsers #9752)\n if (easing) {\n playerOptions['easing'] = easing;\n }\n const previousStyles = new Map();\n const previousWebAnimationPlayers = previousPlayers.filter(player => player instanceof WebAnimationsPlayer);\n if (allowPreviousPlayerStylesMerge(duration, delay)) {\n previousWebAnimationPlayers.forEach(player => {\n player.currentSnapshot.forEach((val, prop) => previousStyles.set(prop, val));\n });\n }\n let _keyframes = normalizeKeyframes(keyframes).map(styles => new Map(styles));\n _keyframes = balancePreviousStylesIntoKeyframes(element, _keyframes, previousStyles);\n const specialStyles = packageNonAnimatableStyles(element, _keyframes);\n return new WebAnimationsPlayer(element, _keyframes, playerOptions, specialStyles);\n }\n}\nfunction createEngine(type, doc) {\n // TODO: find a way to make this tree shakable.\n if (type === 'noop') {\n return new AnimationEngine(doc, new NoopAnimationDriver(), new NoopAnimationStyleNormalizer());\n }\n return new AnimationEngine(doc, new WebAnimationsDriver(), new WebAnimationsStyleNormalizer());\n}\nclass Animation {\n _driver;\n _animationAst;\n constructor(_driver, input) {\n this._driver = _driver;\n const errors = [];\n const warnings = [];\n const ast = buildAnimationAst(_driver, input, errors, warnings);\n if (errors.length) {\n throw validationFailed(errors);\n }\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (warnings.length) {\n warnValidation(warnings);\n }\n }\n this._animationAst = ast;\n }\n buildTimelines(element, startingStyles, destinationStyles, options, subInstructions) {\n const start = Array.isArray(startingStyles) ? normalizeStyles(startingStyles) : startingStyles;\n const dest = Array.isArray(destinationStyles) ? normalizeStyles(destinationStyles) : destinationStyles;\n const errors = [];\n subInstructions = subInstructions || new ElementInstructionMap();\n const result = buildAnimationTimelines(this._driver, element, this._animationAst, ENTER_CLASSNAME, LEAVE_CLASSNAME, start, dest, options, subInstructions, errors);\n if (errors.length) {\n throw buildingFailed(errors);\n }\n return result;\n }\n}\nconst ANIMATION_PREFIX = '@';\nconst DISABLE_ANIMATIONS_FLAG = '@.disabled';\nclass BaseAnimationRenderer {\n namespaceId;\n delegate;\n engine;\n _onDestroy;\n // We need to explicitly type this property because of an api-extractor bug\n // See https://github.com/microsoft/rushstack/issues/4390\n ɵtype = 0 /* AnimationRendererType.Regular */;\n constructor(namespaceId, delegate, engine, _onDestroy) {\n this.namespaceId = namespaceId;\n this.delegate = delegate;\n this.engine = engine;\n this._onDestroy = _onDestroy;\n }\n get data() {\n return this.delegate.data;\n }\n destroyNode(node) {\n this.delegate.destroyNode?.(node);\n }\n destroy() {\n this.engine.destroy(this.namespaceId, this.delegate);\n this.engine.afterFlushAnimationsDone(() => {\n // Call the renderer destroy method after the animations has finished as otherwise\n // styles will be removed too early which will cause an unstyled animation.\n queueMicrotask(() => {\n this.delegate.destroy();\n });\n });\n this._onDestroy?.();\n }\n createElement(name, namespace) {\n return this.delegate.createElement(name, namespace);\n }\n createComment(value) {\n return this.delegate.createComment(value);\n }\n createText(value) {\n return this.delegate.createText(value);\n }\n appendChild(parent, newChild) {\n this.delegate.appendChild(parent, newChild);\n this.engine.onInsert(this.namespaceId, newChild, parent, false);\n }\n insertBefore(parent, newChild, refChild, isMove = true) {\n this.delegate.insertBefore(parent, newChild, refChild);\n // If `isMove` true than we should animate this insert.\n this.engine.onInsert(this.namespaceId, newChild, parent, isMove);\n }\n removeChild(parent, oldChild, isHostElement) {\n // Prior to the changes in #57203, this method wasn't being called at all by `core` if the child\n // doesn't have a parent. There appears to be some animation-specific downstream logic that\n // depends on the null check happening before the animation engine. This check keeps the old\n // behavior while allowing `core` to not have to check for the parent element anymore.\n if (this.parentNode(oldChild)) {\n this.engine.onRemove(this.namespaceId, oldChild, this.delegate);\n }\n }\n selectRootElement(selectorOrNode, preserveContent) {\n return this.delegate.selectRootElement(selectorOrNode, preserveContent);\n }\n parentNode(node) {\n return this.delegate.parentNode(node);\n }\n nextSibling(node) {\n return this.delegate.nextSibling(node);\n }\n setAttribute(el, name, value, namespace) {\n this.delegate.setAttribute(el, name, value, namespace);\n }\n removeAttribute(el, name, namespace) {\n this.delegate.removeAttribute(el, name, namespace);\n }\n addClass(el, name) {\n this.delegate.addClass(el, name);\n }\n removeClass(el, name) {\n this.delegate.removeClass(el, name);\n }\n setStyle(el, style, value, flags) {\n this.delegate.setStyle(el, style, value, flags);\n }\n removeStyle(el, style, flags) {\n this.delegate.removeStyle(el, style, flags);\n }\n setProperty(el, name, value) {\n if (name.charAt(0) == ANIMATION_PREFIX && name == DISABLE_ANIMATIONS_FLAG) {\n this.disableAnimations(el, !!value);\n } else {\n this.delegate.setProperty(el, name, value);\n }\n }\n setValue(node, value) {\n this.delegate.setValue(node, value);\n }\n listen(target, eventName, callback, options) {\n return this.delegate.listen(target, eventName, callback, options);\n }\n disableAnimations(element, value) {\n this.engine.disableAnimations(element, value);\n }\n}\nclass AnimationRenderer extends BaseAnimationRenderer {\n factory;\n constructor(factory, namespaceId, delegate, engine, onDestroy) {\n super(namespaceId, delegate, engine, onDestroy);\n this.factory = factory;\n this.namespaceId = namespaceId;\n }\n setProperty(el, name, value) {\n if (name.charAt(0) == ANIMATION_PREFIX) {\n if (name.charAt(1) == '.' && name == DISABLE_ANIMATIONS_FLAG) {\n value = value === undefined ? true : !!value;\n this.disableAnimations(el, value);\n } else {\n this.engine.process(this.namespaceId, el, name.slice(1), value);\n }\n } else {\n this.delegate.setProperty(el, name, value);\n }\n }\n listen(target, eventName, callback, options) {\n if (eventName.charAt(0) == ANIMATION_PREFIX) {\n const element = resolveElementFromTarget(target);\n let name = eventName.slice(1);\n let phase = '';\n // @listener.phase is for trigger animation callbacks\n // @@listener is for animation builder callbacks\n if (name.charAt(0) != ANIMATION_PREFIX) {\n [name, phase] = parseTriggerCallbackName(name);\n }\n return this.engine.listen(this.namespaceId, element, name, phase, event => {\n const countId = event['_data'] || -1;\n this.factory.scheduleListenerCallback(countId, callback, event);\n });\n }\n return this.delegate.listen(target, eventName, callback, options);\n }\n}\nfunction resolveElementFromTarget(target) {\n switch (target) {\n case 'body':\n return document.body;\n case 'document':\n return document;\n case 'window':\n return window;\n default:\n return target;\n }\n}\nfunction parseTriggerCallbackName(triggerName) {\n const dotIndex = triggerName.indexOf('.');\n const trigger = triggerName.substring(0, dotIndex);\n const phase = triggerName.slice(dotIndex + 1);\n return [trigger, phase];\n}\nclass AnimationRendererFactory {\n delegate;\n engine;\n _zone;\n _currentId = 0;\n _microtaskId = 1;\n _animationCallbacksBuffer = [];\n _rendererCache = /*#__PURE__*/new Map();\n _cdRecurDepth = 0;\n constructor(delegate, engine, _zone) {\n this.delegate = delegate;\n this.engine = engine;\n this._zone = _zone;\n engine.onRemovalComplete = (element, delegate) => {\n delegate?.removeChild(null, element);\n };\n }\n createRenderer(hostElement, type) {\n const EMPTY_NAMESPACE_ID = '';\n // cache the delegates to find out which cached delegate can\n // be used by which cached renderer\n const delegate = this.delegate.createRenderer(hostElement, type);\n if (!hostElement || !type?.data?.['animation']) {\n const cache = this._rendererCache;\n let renderer = cache.get(delegate);\n if (!renderer) {\n // Ensure that the renderer is removed from the cache on destroy\n // since it may contain references to detached DOM nodes.\n const onRendererDestroy = () => cache.delete(delegate);\n renderer = new BaseAnimationRenderer(EMPTY_NAMESPACE_ID, delegate, this.engine, onRendererDestroy);\n // only cache this result when the base renderer is used\n cache.set(delegate, renderer);\n }\n return renderer;\n }\n const componentId = type.id;\n const namespaceId = type.id + '-' + this._currentId;\n this._currentId++;\n this.engine.register(namespaceId, hostElement);\n const registerTrigger = trigger => {\n if (Array.isArray(trigger)) {\n trigger.forEach(registerTrigger);\n } else {\n this.engine.registerTrigger(componentId, namespaceId, hostElement, trigger.name, trigger);\n }\n };\n const animationTriggers = type.data['animation'];\n animationTriggers.forEach(registerTrigger);\n return new AnimationRenderer(this, namespaceId, delegate, this.engine);\n }\n begin() {\n this._cdRecurDepth++;\n if (this.delegate.begin) {\n this.delegate.begin();\n }\n }\n _scheduleCountTask() {\n queueMicrotask(() => {\n this._microtaskId++;\n });\n }\n /** @internal */\n scheduleListenerCallback(count, fn, data) {\n if (count >= 0 && count < this._microtaskId) {\n this._zone.run(() => fn(data));\n return;\n }\n const animationCallbacksBuffer = this._animationCallbacksBuffer;\n if (animationCallbacksBuffer.length == 0) {\n queueMicrotask(() => {\n this._zone.run(() => {\n animationCallbacksBuffer.forEach(tuple => {\n const [fn, data] = tuple;\n fn(data);\n });\n this._animationCallbacksBuffer = [];\n });\n });\n }\n animationCallbacksBuffer.push([fn, data]);\n }\n end() {\n this._cdRecurDepth--;\n // this is to prevent animations from running twice when an inner\n // component does CD when a parent component instead has inserted it\n if (this._cdRecurDepth == 0) {\n this._zone.runOutsideAngular(() => {\n this._scheduleCountTask();\n this.engine.flush(this._microtaskId);\n });\n }\n if (this.delegate.end) {\n this.delegate.end();\n }\n }\n whenRenderingDone() {\n return this.engine.whenRenderingDone();\n }\n /**\n * Used during HMR to clear any cached data about a component.\n * @param componentId ID of the component that is being replaced.\n */\n componentReplaced(componentId) {\n // Flush the engine since the renderer destruction waits for animations to be done.\n this.engine.flush();\n this.delegate.componentReplaced?.(componentId);\n }\n}\n\n/**\n * @module\n * @description\n * Entry point for all animation APIs of the animation browser package.\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\n\n// This file is not used to build this module. It is only used during editing\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { AnimationDriver, NoopAnimationDriver, Animation as ɵAnimation, AnimationEngine as ɵAnimationEngine, AnimationRenderer as ɵAnimationRenderer, AnimationRendererFactory as ɵAnimationRendererFactory, AnimationStyleNormalizer as ɵAnimationStyleNormalizer, BaseAnimationRenderer as ɵBaseAnimationRenderer, NoopAnimationStyleNormalizer as ɵNoopAnimationStyleNormalizer, WebAnimationsDriver as ɵWebAnimationsDriver, WebAnimationsPlayer as ɵWebAnimationsPlayer, WebAnimationsStyleNormalizer as ɵWebAnimationsStyleNormalizer, allowPreviousPlayerStylesMerge as ɵallowPreviousPlayerStylesMerge, camelCaseToDashCase as ɵcamelCaseToDashCase, containsElement as ɵcontainsElement, createEngine as ɵcreateEngine, getParentElement as ɵgetParentElement, invokeQuery as ɵinvokeQuery, normalizeKeyframes as ɵnormalizeKeyframes, validateStyleProperty as ɵvalidateStyleProperty, validateWebAnimatableStyleProperty as ɵvalidateWebAnimatableStyleProperty };\n","/**\n * @license Angular v19.2.1\n * (c) 2010-2025 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport * as i0 from '@angular/core';\nimport { Injectable, Inject, RendererFactory2, NgZone, ANIMATION_MODULE_TYPE, NgModule, ɵperformanceMarkFeature } from '@angular/core';\nexport { ANIMATION_MODULE_TYPE } from '@angular/core';\nimport { ɵDomRendererFactory2, BrowserModule } from '@angular/platform-browser';\nimport * as i1 from '@angular/animations/browser';\nimport { ɵAnimationEngine, ɵWebAnimationsStyleNormalizer, ɵAnimationRendererFactory, ɵAnimationStyleNormalizer, AnimationDriver, NoopAnimationDriver, ɵWebAnimationsDriver } from '@angular/animations/browser';\nimport { DOCUMENT } from '@angular/common';\nlet InjectableAnimationEngine = /*#__PURE__*/(() => {\n class InjectableAnimationEngine extends ɵAnimationEngine {\n // The `ApplicationRef` is injected here explicitly to force the dependency ordering.\n // Since the `ApplicationRef` should be created earlier before the `AnimationEngine`, they\n // both have `ngOnDestroy` hooks and `flush()` must be called after all views are destroyed.\n constructor(doc, driver, normalizer) {\n super(doc, driver, normalizer);\n }\n ngOnDestroy() {\n this.flush();\n }\n static ɵfac = function InjectableAnimationEngine_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || InjectableAnimationEngine)(i0.ɵɵinject(DOCUMENT), i0.ɵɵinject(i1.AnimationDriver), i0.ɵɵinject(i1.ɵAnimationStyleNormalizer));\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: InjectableAnimationEngine,\n factory: InjectableAnimationEngine.ɵfac\n });\n }\n return InjectableAnimationEngine;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction instantiateDefaultStyleNormalizer() {\n return new ɵWebAnimationsStyleNormalizer();\n}\nfunction instantiateRendererFactory(renderer, engine, zone) {\n return new ɵAnimationRendererFactory(renderer, engine, zone);\n}\nconst SHARED_ANIMATION_PROVIDERS = [{\n provide: ɵAnimationStyleNormalizer,\n useFactory: instantiateDefaultStyleNormalizer\n}, {\n provide: ɵAnimationEngine,\n useClass: InjectableAnimationEngine\n}, {\n provide: RendererFactory2,\n useFactory: instantiateRendererFactory,\n deps: [ɵDomRendererFactory2, ɵAnimationEngine, NgZone]\n}];\n/**\n * Separate providers from the actual module so that we can do a local modification in Google3 to\n * include them in the BrowserTestingModule.\n */\nconst BROWSER_NOOP_ANIMATIONS_PROVIDERS = [{\n provide: AnimationDriver,\n useClass: NoopAnimationDriver\n}, {\n provide: ANIMATION_MODULE_TYPE,\n useValue: 'NoopAnimations'\n}, ...SHARED_ANIMATION_PROVIDERS];\n/**\n * Separate providers from the actual module so that we can do a local modification in Google3 to\n * include them in the BrowserModule.\n */\nconst BROWSER_ANIMATIONS_PROVIDERS = [\n// Note: the `ngServerMode` happen inside factories to give the variable time to initialize.\n{\n provide: AnimationDriver,\n useFactory: () => typeof ngServerMode !== 'undefined' && ngServerMode ? new NoopAnimationDriver() : new ɵWebAnimationsDriver()\n}, {\n provide: ANIMATION_MODULE_TYPE,\n useFactory: () => typeof ngServerMode !== 'undefined' && ngServerMode ? 'NoopAnimations' : 'BrowserAnimations'\n}, ...SHARED_ANIMATION_PROVIDERS];\n\n/**\n * Exports `BrowserModule` with additional dependency-injection providers\n * for use with animations. See [Animations](guide/animations).\n * @publicApi\n */\nlet BrowserAnimationsModule = /*#__PURE__*/(() => {\n class BrowserAnimationsModule {\n /**\n * Configures the module based on the specified object.\n *\n * @param config Object used to configure the behavior of the `BrowserAnimationsModule`.\n * @see {@link BrowserAnimationsModuleConfig}\n *\n * @usageNotes\n * When registering the `BrowserAnimationsModule`, you can use the `withConfig`\n * function as follows:\n * ```ts\n * @NgModule({\n * imports: [BrowserAnimationsModule.withConfig(config)]\n * })\n * class MyNgModule {}\n * ```\n */\n static withConfig(config) {\n return {\n ngModule: BrowserAnimationsModule,\n providers: config.disableAnimations ? BROWSER_NOOP_ANIMATIONS_PROVIDERS : BROWSER_ANIMATIONS_PROVIDERS\n };\n }\n static ɵfac = function BrowserAnimationsModule_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || BrowserAnimationsModule)();\n };\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: BrowserAnimationsModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: BROWSER_ANIMATIONS_PROVIDERS,\n imports: [BrowserModule]\n });\n }\n return BrowserAnimationsModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * Returns the set of dependency-injection providers\n * to enable animations in an application. See [animations guide](guide/animations)\n * to learn more about animations in Angular.\n *\n * @usageNotes\n *\n * The function is useful when you want to enable animations in an application\n * bootstrapped using the `bootstrapApplication` function. In this scenario there\n * is no need to import the `BrowserAnimationsModule` NgModule at all, just add\n * providers returned by this function to the `providers` list as show below.\n *\n * ```ts\n * bootstrapApplication(RootComponent, {\n * providers: [\n * provideAnimations()\n * ]\n * });\n * ```\n *\n * @publicApi\n */\nfunction provideAnimations() {\n ɵperformanceMarkFeature('NgEagerAnimations');\n // Return a copy to prevent changes to the original array in case any in-place\n // alterations are performed to the `provideAnimations` call results in app code.\n return [...BROWSER_ANIMATIONS_PROVIDERS];\n}\n/**\n * A null player that must be imported to allow disabling of animations.\n * @publicApi\n */\nlet NoopAnimationsModule = /*#__PURE__*/(() => {\n class NoopAnimationsModule {\n static ɵfac = function NoopAnimationsModule_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || NoopAnimationsModule)();\n };\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: NoopAnimationsModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: BROWSER_NOOP_ANIMATIONS_PROVIDERS,\n imports: [BrowserModule]\n });\n }\n return NoopAnimationsModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * Returns the set of dependency-injection providers\n * to disable animations in an application. See [animations guide](guide/animations)\n * to learn more about animations in Angular.\n *\n * @usageNotes\n *\n * The function is useful when you want to bootstrap an application using\n * the `bootstrapApplication` function, but you need to disable animations\n * (for example, when running tests).\n *\n * ```ts\n * bootstrapApplication(RootComponent, {\n * providers: [\n * provideNoopAnimations()\n * ]\n * });\n * ```\n *\n * @publicApi\n */\nfunction provideNoopAnimations() {\n // Return a copy to prevent changes to the original array in case any in-place\n // alterations are performed to the `provideNoopAnimations` call results in app code.\n return [...BROWSER_NOOP_ANIMATIONS_PROVIDERS];\n}\n\n/**\n * @module\n * @description\n * Entry point for all animation APIs of the animation browser package.\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\n\n// This file is not used to build this module. It is only used during editing\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { BrowserAnimationsModule, NoopAnimationsModule, provideAnimations, provideNoopAnimations, InjectableAnimationEngine as ɵInjectableAnimationEngine };\n","{\n \"daytime\": {\n \"earlier\": \"AM\",\n \"later\": \"PM\"\n },\n \"login\": {\n \"title\": \" Iniciar Sessió\",\n \"text\": \"Iniciar sessió al teu compte\",\n \"button\": \"Iniciar Sessió\",\n \"stressLevel\": \"Stress Level\",\n \"errorDialog\": {\n \"message\": \"Usuari o contrasenya incorrectes\",\n \"accept\": \"D'acord\"\n },\n \"placeholder\": {\n \"username\": \"Si us plau introdueix usuari\",\n \"password\": \"Si us plau introdueix contrasenya\"\n }\n },\n \"sidebar\": {\n \"bulletins\": \"Avalanche.report\",\n \"dangerSources\": \"Danger Sources\",\n \"observations\": \"Observacions\",\n \"qfa\": \"QFA\",\n \"modelling\": \"Modelització\",\n \"modellingForecast\": \"Predicció\",\n \"modellingZamg\": \"ZAMG multi model\",\n \"modellingZamgECMWF\": \"ZAMG ECMWF-EPS\",\n \"modellingZamgCLAEF\": \"ZAMG CLAEF-EPS\",\n \"modellingZamgMeteogram\": \"Meteograma GeoSphere\",\n \"modellingSnowpack\": \"SNOWPACK model\",\n \"modellingSnowpackMeteo\": \"SNOWPACK modelled meteo\",\n \"weatherbox\": \"Weatherbox\",\n \"awsome\": \"AWSOME\",\n \"snowpack\": \"SNOWPACK\",\n \"geosphere\": \"GeoSphere\"\n },\n \"menu\": {\n \"logout\": \"Surt\",\n \"language\": \"Idioma\",\n \"en\": \"Anglès\",\n \"de\": \"Alemany\",\n \"fr\": \"Francès\",\n \"it\": \"Italià\",\n \"es\": \"Castellà\",\n \"ca\": \"Català\",\n \"oc\": \"Aranès\",\n \"fullscreen\": \"Pantalla completa\",\n \"settings\": \"Configuració\",\n \"statistics\": \"Estadístiques\",\n \"admin\": \"Admin\",\n \"region\": \"Regió\",\n \"education\": \"Educació\"\n },\n \"matrix\": {\n \"label\": {\n \"snowpackStability\": \"Avaluació de l'estabilitat\",\n \"frequency\": \"Freqüència\",\n \"avalancheSize\": \"Mida d'allaus\",\n \"dangerRating\": \"Grau de perill\",\n \"override\": \"(modifica el grau de perill)\",\n \"matrix\": \"Matriu\",\n \"referToFairStability\": \"Referir-se a una estabilitat regular\",\n \"referToPoorStability\": \"Referir-se a una estabilitat pobre\",\n \"dangerLevel1\": \"Grau de perill 1 (Feble)\"\n }\n },\n \"dangerSources\": {\n \"status\": {\n \"missing\": \"falta\",\n \"available\": \"available\",\n \"forecast\": \"forecast\",\n \"analysis\": \"analysis\",\n \"loading\": \"Loading danger sources ...\",\n \"saveError\": \"Danger source could not be saved!\",\n \"loadDangerSourcesError\": \"Danger sources could not be loaded!\",\n \"loadVariantsError\": \"Danger source variants could not be loaded!\"\n },\n \"variantStatus\": {\n \"active\": \"active\",\n \"dormant\": \"dormant\",\n \"inactive\": \"inactive\"\n },\n \"tooltip\": {\n \"read\": \"Read danger sources\",\n \"edit\": \"Edit danger sources\"\n },\n \"table\": {\n \"loadMore\": \"Load {{count}} more days\",\n \"title\": {\n \"forecast\": \"Predicció\",\n \"analysis\": \"Analysis\"\n }\n },\n \"create\": {\n \"variantStatus\": \"Status\",\n \"variantEditable\": \"This variant can be edited.\",\n \"variantNotEditable\": \"This variant can not be edited.\",\n \"noVariantsForSelectedDay\": \"No variants defined for this date.\",\n \"tooltip\": {\n \"editDangerSource\": \"Edit danger source\",\n \"loadVariants\": \"Load variants from the day before\",\n \"edit\": \"Editar micro-regions\",\n \"copy\": \"Copy variant\",\n \"delete\": \"Delete variant\",\n \"compare\": \"Compare variant\",\n \"forecast\": \"Compare with forecast\"\n },\n \"createDangerSource\": \"Create danger source\",\n \"createVariant\": \"Create new variant\",\n \"noDangerSources\": \"No danger sources\",\n \"title\": {\n \"avalanche\": \"Allau\",\n \"matrix\": \"Matriu\",\n \"characteristics\": \"Característiques\",\n \"comment\": \"Comentari\"\n },\n \"label\": {\n \"glidingSnowActivity\": \"Gliding snow activity\",\n \"snowHeight\": \"Snow height\",\n \"snowHeightAverage\": \"Average snow height\",\n \"zeroDegreeIsotherm\": \"0°C isotherm\",\n \"looseSnowMoisture\": \"Loose snow moisture\",\n \"looseSnowGrainShape\": \"Loose snow grain shape\",\n \"slabGrainShape\": \"Slab grain shape\",\n \"slabThickness\": \"Slab thickness\",\n \"slabHandHardness\": \"Slab hand hardness\",\n \"slabHardnessProfile\": \"Slab hardness\",\n \"slabEnergyTransferPotential\": \"Slab energy transfer potential\",\n \"slabDistribution\": \"Slab distribution\",\n \"weakLayerGrainShape\": \"Weak layer grain shape\",\n \"weakLayerGrainSize\": \"Weak layer grain size\",\n \"weakLayerPersistent\": \"Weak layer persistent\",\n \"weakLayerThickness\": \"Weak layer thickness\",\n \"weakLayerStrength\": \"Weak layer strength\",\n \"weakLayerWet\": \"Weak layer wet\",\n \"weakLayerCrustAbove\": \"Weak layer crust above\",\n \"weakLayerCrustBelow\": \"Weak layer crust below\",\n \"weakLayerPosition\": \"Weak layer position\",\n \"weakLayerCreation\": \"Weak layer creation\",\n \"weakLayerDistribution\": \"Weak layer distribution\",\n \"dangerSpotRecognizability\": \"Danger spot recognizability\",\n \"remoteTriggering\": \"Remote triggering\",\n \"hasDaytimeDependency\": \"Dependència de l'hora\",\n \"dangerIncreaseWithElevation\": \"Danger increase with elevation\",\n \"runoutIntoGreen\": \"Runout into green\",\n \"highestDangerAspect\": \"Highest danger aspect\",\n \"dangerPeak\": \"Danger peak\",\n \"slopeGradient\": \"Gradient de pendent\",\n \"naturalRelease\": \"Natural release\",\n \"terrainTypes\": \"Terrain types\",\n \"dangerSigns\": \"Danger signs\",\n \"aspects\": \"Orientacions\"\n },\n \"editVariantDialog\": {\n \"save\": \"Desar\",\n \"cancel\": \"Cancel·lar\"\n },\n \"deleteVariantDialog\": {\n \"message\": \"Do you want to delete this variant?\",\n \"accept\": \"Si\",\n \"reject\": \"No\"\n },\n \"noRegionDialog\": {\n \"message\": \"At least one micro-region has to be yours.\",\n \"accept\": \"D'acord\"\n },\n \"discardDialog\": {\n \"message\": \"Vols descartar els canvis?\",\n \"accept\": \"Si\",\n \"reject\": \"No\"\n },\n \"saveErrorDialog\": {\n \"message\": \"There was an error saving the danger sources!\",\n \"accept\": \"D'acord\"\n },\n \"loadDialog\": {\n \"message\": \"Do you want to load all danger source variants from the day before?\",\n \"accept\": \"Si\",\n \"reject\": \"No\"\n }\n }\n },\n \"avalancheType\": {\n \"title\": \"Tipus d'allau\",\n \"label\": {\n \"slab\": \"SLAB\",\n \"loose\": \"LOOSE\",\n \"glide\": \"GLIDE\"\n },\n \"tooltip\": {\n \"slab\": \"Slab avalanche\",\n \"loose\": \"Loose snow avalanche\",\n \"glide\": \"Glide snow avalanche\"\n }\n },\n \"elevation\": {\n \"title\": \"Altitud\",\n \"high\": \"Per sota\",\n \"low\": \"Per sobre\",\n \"treeline\": \"Límit del bosc\"\n },\n \"bulletins\": {\n \"title\": \"Avalanche.report\",\n \"tooltip\": {\n \"edit\": \"Edit bulletin\",\n \"read\": \"Read bulletin\",\n \"copy\": \"Copiar el butlletí\",\n \"paste\": \"Enganxar el butlletí\",\n \"cancel\": \"Cancel·lar la còpia\",\n \"update\": \"Editar\",\n \"submit\": \"Enviar\",\n \"submitUpdate\": \"Enviar actualizacion\",\n \"publishChange\": \"Publicar ara (sense missatges)\",\n \"publishUpdate\": \"Publicar ara\",\n \"caaml\": \"Mostrar CAAML\",\n \"json\": \"Mostrar JSON\",\n \"create\": \"Crear butlletí\",\n \"preview\": \"Previsualitzar el butlletí (PDF)\",\n \"check\": \"Comprovar el butlletí\",\n \"info\": \"Mostrar l'estat de publicació\",\n \"loadSuggestionFromDangerSources\": \"Load suggestion\",\n \"deleteAllWarningRegions\": \"Delete all warning regions\",\n \"publishAll\": \"Publicar totes les regions\",\n \"mediaFile\": \"Carregar un fitxer multimèdia\"\n },\n \"status\": {\n \"submittedInfo\": \"Serà publicat a les 5PM\",\n \"resubmittedInfo\": \"Serà publicat a les 8AM\",\n \"publishedInfo\": \"Ha estat publicat\",\n \"noPublicationInfo\": \"NO serà publicat automàticament\",\n \"loadingPreview\": \"S'està creant la previsualització de PDF ...\",\n \"loading\": \"Butlletí carregant-se ...\",\n \"loadMoreBulletins\": \"Load {{count}} more bulletins\",\n \"publishing\": \"Butlletí publicant-se ...\",\n \"submitting\": \"Butlletí enviant-se ...\",\n \"saveError\": \"Bulletin could not be saved!\",\n \"loadBulletinsError\": \"Bulletins could not be loaded!\"\n },\n \"create\": {\n \"tooltip\": {\n \"edit\": \"Editar micro-regions\",\n \"copy\": \"Copiar regió\",\n \"delete\": \"Esborrar regió\",\n \"compare\": \"Compare region\",\n \"undo\": \"Undo last change in region\",\n \"redo\": \"Redo change in region\",\n \"createRegion\": \"Crear regió\",\n \"cancel\": \"Cancel·lar\",\n \"acceptSuggestion\": \"Acceptar les regions proposades\",\n \"rejectSuggestion\": \"No acceptar les regions proposades\",\n \"saveChanges\": \"Guardar els canvis\",\n \"discardChanges\": \"Descartar els canvis\",\n \"incompleteAvalancheProblem\": \"Problema d'allaus incomplet\",\n \"saveBulletin\": \"Guardar el butlletí\",\n \"discardBulletin\": \"Descartar els canvis al butlletí\",\n \"loadBulletin\": \"Carregar el butlletí d'ahir\",\n \"uploadJsonBulletin\": \"Carregar el butlletí en format JSON\",\n \"downloadJsonBulletin\": \"Descarregar el butlletí en format JSON\",\n \"daytimeDependency\": \"Dependència de l'hora\",\n \"treeline\": \"Límit del bosc\",\n \"tendency\": {\n \"decreasing\": \"El perill d'allaus disminueix\",\n \"steady\": \"El perill d'allaus roman estable\",\n \"increasing\": \"El perill d'allaus augmenta\",\n \"danger\": \"Perill d'allaus\"\n },\n \"textcat\": {\n \"edit\": \"Editar\",\n \"copy\": \"Copiar\",\n \"paste\": \"Enganxar\",\n \"example\": \"Carregar text d'exemple\",\n \"delete\": \"Esborrar\"\n },\n \"moveUpAvalancheProblem\": \"Moure el problema d'allaus cap amunt\",\n \"moveDownAvalancheProblem\": \"Moure el problema d'allaus cap avall\",\n \"dangerRatingDirectionUp\": \"Cap amunt\",\n \"dangerRatingDirectionDown\": \"Cap avall\"\n },\n \"save\": \"Desar\",\n \"discard\": \"Descartar\",\n \"back\": \"Enrera\",\n \"createAggregatedRegion\": \"Nova regió\",\n \"pasteAggregatedRegion\": \"Enganxar la regió\",\n \"pendingSuggestions\": \"Suggeriments\",\n \"rejectSuggestion\": \"Rebutjar\",\n \"acceptSuggestion\": \"Acceptar\",\n \"cancelCopyBulletin\": \"Cancel·lar\",\n \"createAvalancheProblem\": \"Nou problema\",\n \"ownRegions\": \"Regions pròpies\",\n \"foreignRegions\": \"Regions alienes\",\n \"externalRegions\": \"Regions externes\",\n \"mapSelectRegion\": \"Seleccionar regions al mapa\",\n \"statusHeader\": \"Estat del butlletí\",\n \"suggestions\": \"Suggeriments\",\n \"noBulletinsForSelectedDay\": \"Cap regió definida per aquesta data.\",\n \"autosave\": \"Gaurdat automàticament\",\n \"regionEditable\": \"Aquesta regió pot editar-se\",\n \"regionNotEditable\": \"Aquesta regió no pot editar-se\",\n \"regionLocked\": \"Aquesta regió està bloquejada\",\n \"changeDangerRatingElevation\": \"Extendre el perill d'allaus\",\n \"mapTop\": \"Mapa a sobre\",\n \"mapLeft\": \"Mapa al costat\",\n \"showNotes\": \"Mostrar notes\",\n \"hideNotes\": \"Amagar notes\",\n \"incompleteAvalancheProblem\": \"Incomplete\",\n \"label\": {\n \"importantObservations\": \"Important observations\",\n \"avalancheProblems\": \"Problema d'allaus\",\n \"aspects\": \"Orientacions\",\n \"highlights\": \"Alerta especial\",\n \"avActivityHighlights\": \"Titular de la situació d'allaus\",\n \"avActivityComment\": \"Descripció del perill d'allaus\",\n \"snowpackStructureComment\": \"Descripció de l'estructura del mantell\",\n \"dangerPatterns\": \"Patrons de perill\",\n \"tendencyComment\": \"Descripció de la tendència\",\n \"notes\": \"Notes\"\n },\n \"copyRegion\": {\n \"label\": \"Copiar regió d'alerta a un altre butlletí\",\n \"select\": \"Enganxar a ...\",\n \"currentBulletin\": \"Aquest butlletí\"\n },\n \"title\": {\n \"avalancheProblem\": \"Problemes d'allaus\",\n \"dangerDescription\": \"Descripció del perill d'allaus\",\n \"forenoon\": \"Matí\",\n \"afternoon\": \"Tarda\",\n \"snowpackStructure\": \"Estructura del mantell\",\n \"tendency\": \"Tendència\",\n \"showTranslations\": \"-mostra traduccions\",\n \"hideTranslations\": \"Amaga traduccions\"\n },\n \"placeholder\": {\n \"notes\": \"Escriu aquí...\"\n },\n \"pmDialog\": {\n \"noIFrameSupport\": \"El teu navegador no admet Iframes!\"\n },\n \"discardDialog\": {\n \"message\": \"Vols descartar els canvis?\",\n \"accept\": \"Si\",\n \"reject\": \"No\"\n },\n \"deleteAggregatedRegionDialog\": {\n \"message\": \"Vols esborrar aquesta regió?\",\n \"accept\": \"Si\",\n \"reject\": \"No\"\n },\n \"noRegionDialog\": {\n \"message\": \"At least one micro-region has to be yours.\",\n \"accept\": \"Ok\"\n },\n \"loadDialog\": {\n \"message\": \"Vols carregar els butlletins d'ahir?\",\n \"accept\": \"Si\",\n \"reject\": \"No\"\n },\n \"deleteAllWarningRegionsDialog\": {\n \"message\": \"Do you want to delete all warning regions?\",\n \"accept\": \"Si\",\n \"reject\": \"No\"\n },\n \"loadAutoSaveDialog\": {\n \"message\": \"Vols carregar els butlletins guardats automàticament?\",\n \"accept\": \"Si\",\n \"reject\": \"No\"\n },\n \"saveErrorDialog\": {\n \"message\": \"Hi ha hagut un error guardant els butlletins!\",\n \"accept\": \"D'acord\"\n },\n \"changeErrorDialog\": {\n \"message\": \"Hi ha hagut un error canviant els butlletins!\",\n \"accept\": \"D'acord\"\n },\n \"loadingErrorDialog\": {\n \"message\": \"Hi ha hagut un error llegint els butlletins!\",\n \"accept\": \"D'acord\"\n },\n \"loadingJsonFileErrorDialog\": {\n \"message\": \"S'ha produït un error en carregar els butlletins des del fitxer JSON!\",\n \"accept\": \"D'acord\"\n },\n \"avalancheProblemErrorDialog\": {\n \"message\": \"Falta el problema d'allaus, orientacions, estabilitat del mantell de neu, freqüència i/o la mida d'allaus per almenys un problema d'allaus\",\n \"accept\": \"D'acord\"\n },\n \"loadAvActivityCommentExampleTextDialog\": {\n \"message\": \"Per quina situació vols carregar un text d'exemple?\",\n \"newSnow\": \"Neu recent\",\n \"windSlab\": \"Plaques de vent\",\n \"persistentWeakLayers\": \"Capes febles persistents\",\n \"wetSnow\": \"Neu humida\",\n \"glidingSnow\": \"Lliscaments\",\n \"favourableSituation\": \"Situació favorable\",\n \"cancel\": \"Cancel·lar\"\n },\n \"removeDaytimeDependencyDialog\": {\n \"message\": \"Which avalanche problems do you want to keep?\",\n \"cancel\": \"Cancel·lar\"\n },\n \"strategicMindsetDialog\": {\n \"title\": \"Strategic Mindsets\",\n \"introduction\": \"The \\\"Strategic Mindsets\\\" are intended to express our mental attitude with regard to the avalanche situation and its development in the corresponding warning region. It should not be derived directly from the hazard assessment, but rather understood and used as an intuitive impression of the overall situation. The \\\"Strategic Mindsets\\\" are therefore primarily a communication tool. Using the mindsets and associated definitions, we forecasters can quickly and efficiently exchange information about the development of the hazard situation and find a common language for communication.\",\n \"description\": {\n \"title\": \"Description:\",\n \"text\": {\n \"assessment\": \"There is great uncertainty in the hazard assessment due to insufficient information from the field.\",\n \"stepping_out\": \"Decreasing tendency of the hazard situation (also within a danger level).\",\n \"status_quo\": \"Same hazardous situation. No significant change compared to the previous day.\",\n \"stepping_back\": \"Increasing tendency of the hazard situation (also within a danger level).\",\n \"entrenchment\": \"Almost constant, tense hazardous situation. The main danger comes from (a) persistent weak layer(s) susceptible to interference.\",\n \"free_ride\": \"Low avalanche danger with generally stable snow cover. Only small avalanches are possible in extremely steep terrain. \",\n \"high_alert\": \"Exceptional situation with high or very high avalanche danger. Spontaneous avalanches of very large or extreme magnitude are possible\",\n \"spring_diurnal\": \"Wet snow avalanches during the course of the day, which are subject to a clear diurnal cycle, are decisive for the risk assessment.\"\n }\n },\n \"communication\": {\n \"title\": \"Communication:\",\n \"text\": {\n \"assessment\": \"Avalanche situation must be checked locally. Restraint is recommended.\",\n \"stepping_out\": \"Gradual decrease in danger. However, caution is still required and the improving situation should be assessed locally before entering riskier terrain. \",\n \"status_quo\": \"Hazardous situation is unchanged. Feedback from observers helps to better outline the hazardous situation. More favourable terrain should be communicated with emphasis. \",\n \"stepping_back\": \"Clear communication of the increase in avalanche danger - even within a danger level. Information on the causes supports comprehensibility in communication. \",\n \"entrenchment\": \"Caution and restraint are required. Situation hardly changes. If possible, provide as precise information as possible on distribution and possibility to trigger. Increased communication of observations that reveal the situation and trigger restraint.\",\n \"free_ride\": \"Little text. Emphasise the generally favourable overall situation and potentially isolated hazard areas\",\n \"high_alert\": \"Communication across all channels. The focus is no longer on winter sports. Danger even in areas that are not usually at risk of avalanches.\",\n \"spring_diurnal\": \"Favourable situation in the morning, increasing during the day. Assessment should be made locally by observing the softening of the melt-freeze crust and the increasing soaking of the snow cover.\"\n }\n },\n \"examples\": {\n \"title\": \"Examples:\",\n \"text\": {\n \"assessment\": \"Start of the season.\",\n \"stepping_out\": \"Cooling leads to a decrease in the risk of wet snow avalanches after a warm and humid weather phase.\",\n \"status_quo\": \"Consistent wind-slab problem with cold temperatures, loose snow and wind.\",\n \"stepping_back\": \"Abundant fresh snowfall leads to an increase in the danger situation.\",\n \"entrenchment\": \"Critical persistent weak layers problem with potential for dangerously large avalanches. The situation is only stabilising very slowly and requires a great deal of restraint.\",\n \"free_ride\": \"Low avalanche danger, no persistent weak layers, all terrain has already been groomed.\",\n \"high_alert\": \"Danger level 4 or higher due to large amounts of fresh snow and/or problematic, persistent weak layers. \",\n \"spring_diurnal\": \"Spring situation with dry high-pressure weather and moderate temperatures with otherwise mostly stable old snow cover.\"\n }\n },\n \"strategicMindset\": {\n \"assessment\": \"High Uncertainty\",\n \"stepping_out\": \"Improving\",\n \"status_quo\": \"Status Quo\",\n \"stepping_back\": \"Deteriorating\",\n \"entrenchment\": \"Persistent Unstable\",\n \"free_ride\": \"Favorable\",\n \"high_alert\": \"High Alert\",\n \"spring_diurnal\": \"Spring Diurnal\"\n }\n },\n \"decisionTree\": {\n \"filepath\": \"./assets/img/decision_tree-en.svg\",\n \"feedbackURL\": \"https://admin.avalanche.report/umfrage-entscheidungsbaum/en/\",\n \"decisionTree\": \"Arbre de decisions\",\n \"feedback\": \"Comentaris\",\n \"save\": \"Desar\",\n \"discard\": \"Descarta\"\n }\n },\n \"table\": {\n \"title\": {\n \"date\": \"Data\",\n \"status\": {\n \"AT-02\": \"Caríntia\",\n \"AT-03\": \"Baixa Àustria\",\n \"AT-04\": \"Alta Àustria\",\n \"AT-05\": \"Salzburg\",\n \"AT-06\": \"Styria\",\n \"AT-07\": \"Tirol\",\n \"AT-08\": \"Vorarlberg\",\n \"CH\": \"Suïssa\",\n \"DE-BY\": \"Bavària\",\n \"GEOSPHERE\": \"GEOSPHERE\",\n \"IT-32-TN\": \"Trentino\",\n \"IT-32-BZ\": \"Tirol del Sud\",\n \"ES-CT-L\": \"Aran\"\n }\n },\n \"status\": {\n \"missing\": \"falta\",\n \"draft\": \"esborrany\",\n \"submitted\": \"enviat\",\n \"published\": \"publicat\",\n \"updated\": \"actualitzat\",\n \"resubmitted\": \"re-enviat\",\n \"republished\": \"re-publicat\"\n },\n \"publishBulletinsDialog\": {\n \"message\": \"Vols publicar el butlletí?\",\n \"missingDangerRating\": \"Grau de perill no especificat \",\n \"missingRegion\": \"Regions sense graduar\",\n \"duplicateRegion\": \"Regions graduades més d'un cop\",\n \"missingAvActivityHighlights\": \"Falta el titular de la situació d'allaus\",\n \"missingAvActivityComment\": \"Falta la descripció del perill d'allaus\",\n \"missingSnowpackStructureHighlights\": \"Falta titular estructura mantell\",\n \"missingSnowpackStructureComment\": \"Falta la descripció de l'estructura del mantell\",\n \"pendingSuggestions\": \"Suggeriments pendents\",\n \"incompleteTranslation\": \"Traducció incompleta\",\n \"accept\": \"Si\",\n \"reject\": \"No\"\n },\n \"publicationStatusDialog\": {\n \"headline\": \"Estat de la publicació\",\n \"publishedBy\": \"Publicat per:\",\n \"publishedAt\": \"Publicat a les:\",\n \"validFor\": \"Vàlid per:\",\n \"title\": {\n \"prod\": \"Coses serioses\",\n \"test\": \"Test system\",\n \"task\": \"Tasca\",\n \"language\": {\n \"all\": \"TOTS\",\n \"de\": \"DE\",\n \"it\": \"IT\",\n \"en\": \"EN\"\n }\n },\n\n \"email\": {\n \"label\": \"Emails\",\n \"tooltip\": \"Enviar Emails\",\n \"success\": \"{{prefix}}Correus electrònics enviats correctament!\",\n \"error\": \"{{prefix}}No s'han pogut enviar els correus electrònics!\"\n },\n \"telegram\": {\n \"label\": \"Missatges Telegram\",\n \"tooltip\": \"Enviar missatges de Telegram\",\n \"success\": \"{{prefix}}Missatges de Telegram enviats correctament!\",\n \"error\": \"{{prefix}}No s'han pogut enviar els missatges de Telegram!\"\n },\n \"push\": {\n \"label\": \"Notificacions push\",\n \"tooltip\": \"Enviar notificacions push\",\n \"success\": \"{{prefix}}Notificacions push enviades correctament!\",\n \"error\": \"{{prefix}}No s'han pogut enviar les notificacions push!\"\n },\n \"accept\": \"D'acord\"\n },\n \"mediaFileDialog\": {\n \"headline\": \"Fitxer multimèdia\",\n \"important\": \"IMPORTANT\",\n \"missingFile\": \"No s'ha seleccionat cap fitxer!\",\n \"uploadError\": \"La càrrega ha fallat!\",\n \"accept\": \"Enviar\",\n \"reject\": \"Cancel·la\"\n },\n \"publishBulletinsErrorDialog\": {\n \"message\": \"Hi ha hagut un error publicant els butlletins!\",\n \"accept\": \"D'acord\"\n },\n \"submitBulletinsDialog\": {\n \"message\": \"Vols enviar el butlletí?\",\n \"missingDangerRating\": \"Grau de perill no especificat \",\n \"missingRegion\": \"Regions sense graduar\",\n \"missingAvActivityHighlights\": \"Falta el titular de la situació d'allaus\",\n \"missingAvActivityComment\": \"Falta la descripció del perill d'allaus\",\n \"missingSnowpackStructureHighlights\": \"Falta titular estructura mantell\",\n \"missingSnowpackStructureComment\": \"Falta la descripció de l'estructura del mantell\",\n \"pendingSuggestions\": \"Suggeriments pendents\",\n \"accept\": \"Si\",\n \"reject\": \"No\"\n },\n \"submitBulletinsErrorDialog\": {\n \"message\": \"Hi ha hagut un error pujant els butlletins!\",\n \"accept\": \"D'acord\"\n },\n \"submitBulletinsDuplicateRegionDialog\": {\n \"message\": \"Regions graduades més d'un cop! El butlletí no es pot pujar\",\n \"accept\": \"D'acord\"\n },\n \"checkBulletinsErrorDialog\": {\n \"message\": \"Hi ha hagut un error comprovant els butlletins!\",\n \"accept\": \"D'acord\"\n },\n \"previewErrorDialog\": {\n \"message\": \"No s'ha pogut carregar la previsualització.\",\n \"accept\": \"D'acord\"\n },\n \"checkBulletinsDialog\": {\n \"message\": \"Comprovar el butlletí\",\n \"missingDangerRating\": \"Grau de perill no especificat \",\n \"missingRegion\": \"Regions sense graduar\",\n \"missingAvActivityHighlights\": \"Falta el titular de la situació d'allaus\",\n \"missingAvActivityComment\": \"Falta la descripció del perill d'allaus\",\n \"missingSnowpackStructureHighlights\": \"Falta titular estructura mantell\",\n \"missingSnowpackStructureComment\": \"Falta la descripció de l'estructura del mantell\",\n \"pendingSuggestions\": \"Suggeriments pendents\",\n \"incompleteTranslation\": \"Traducció incompleta\",\n \"ok\": \"(tot correcte)\",\n \"accept\": \"D'acord\"\n },\n \"publishAllDialog\": {\n \"message\": \"Vols publicar totes les regions?\",\n \"accept\": \"Si\",\n \"reject\": \"No\"\n }\n }\n },\n \"training\": {\n \"training\": \"Training\",\n \"timestamp\": \"Training timestamp\"\n },\n \"admin\": {\n \"loadingStatistics\": \"Creant el CSV ...\",\n \"server-configuration\": {\n \"title\": \"Servidor\",\n \"button\": {\n \"create\": \"Crear servidor\",\n \"save\": \"Desar\"\n },\n \"table\": {\n \"name\": \"Nom\",\n \"username\": \"Nom d'usuari\",\n \"password\": \"Contrasenya\",\n \"publishAt5PM\": \"Publica a les 5 PM\",\n \"publishAt8AM\": \"Publica a les 8 AM\",\n \"pdfDirectory\": \"Directori per PDF\",\n \"htmlDirectory\": \"Directori per HTML\",\n \"serverImagesUrl\": \"Adreça de les imatges del servidor\",\n \"dangerLevelElevationDependency\": \"Elevation dependency of danger level\",\n \"mapsPath\": \"Adreça dels mapes\",\n \"mediaPath\": \"Ruta dels fitxers multimèdia\",\n \"mapProductionUrl\": \"URL per la producció dels mapes\",\n \"apiUrl\": \"API URL\"\n },\n \"success\": \"Configuració guardada satisfactòriament\",\n \"error\": \"No es pot guardar la contrasenya\"\n },\n \"region-configuration\": {\n \"title\": \"Regió\",\n \"button\": {\n \"create\": \"Crear regió\",\n \"save\": \"Desar\"\n },\n \"table\": {\n \"general\": {\n \"title\": \"General\",\n \"id\": \"ID\",\n \"microRegions\": \"Nombre de micro-regions\",\n \"subRegions\": \"Sub-regions\",\n \"superRegions\": \"Super-regions\",\n \"neighborRegions\": \"Regions veïnes\"\n },\n \"publication\": {\n \"title\": \"Publication\",\n \"publishBulletins\": \"Publicar la predicció d'allaus\",\n \"publishBlogs\": \"Publicar entrades al blog\",\n \"createCaamlV5\": \"Crear CAAML v5\",\n \"createCaamlV6\": \"Crear CAAML v6\",\n \"createJson\": \"Crear JSON\",\n \"createMaps\": \"Crear mapes\",\n \"createPdf\": \"Crear PDF\",\n \"sendEmails\": \"Enviar correus\",\n \"createSimpleHtml\": \"Crear HTML simple\",\n \"sendTelegramMessages\": \"Enviar missatges de Telegram\",\n \"sendPushNotifications\": \"Enviar notificacions push\",\n \"pdfColor\": \"PDF color\",\n \"emailColor\": \"Email color\",\n \"pdfMapYAmPm\": \"Y per al mapa PDF (am/pm)\",\n \"pdfMapYFd\": \"Y per al mapa PDF (fd)\",\n \"pdfMapWidthAmPm\": \"Amplada del mapa per a PDF (am/pm)\",\n \"pdfMapWidthFd\": \"Amplada del mapa per a PDF (fd)\",\n \"pdfMapHeight\": \"Alçada del mapa per a PDF\",\n \"pdfFooterLogo\": \"Logotip per al peu de pàgina de PDF\",\n \"pdfFooterLogoColorPath\": \"Logotip per al peu de pàgina de PDF (color)\",\n \"pdfFooterLogoBwPath\": \"Logotip per al peu de pàgina de PDF (bw)\",\n \"mapXmax\": \"X del mapa màxim\",\n \"mapXmin\": \"X del mapa mínim\",\n \"mapYmax\": \"Y del mapa màxim\",\n \"mapYmin\": \"Y del mapa mínim\",\n \"simpleHtmlTemplateName\": \"Plantilla HTML senzilla\",\n \"geoDataDirectory\": \"Directori de geodades\",\n \"mapLogoColorPath\": \"Logotip per al mapa (color)\",\n \"mapLogoBwPath\": \"Logotip per al mapa (bw)\",\n \"mapLogoPosition\": \"Posició del logotip per al mapa\",\n \"mapCenterLat\": \"Centrar posició del mapa (latitud)\",\n \"mapCenterLng\": \"Posició del logotip per al mapa (longitud)\",\n \"imageColorbarColorPath\": \"Barra de colors (color)\",\n \"imageColorbarBwPath\": \"Barra de colors (b/w)\"\n },\n \"components\": {\n \"title\": \"Components\",\n \"enableDangerSources\": \"Enable danger sources\",\n \"enableObservations\": \"Enable observations\",\n \"enableModelling\": \"Enable modelling\",\n \"enableWeatherbox\": \"Enable weather box\"\n },\n \"configuration\": {\n \"title\": \"Configuration\",\n \"showMatrix\": \"Mostrar la matriu\",\n \"enableMediaFile\": \"Activar el fitxer multimèdia\",\n \"enableStrategicMindset\": \"Enable strategic mindset\",\n \"enableStressLevel\": \"Enable stress level\",\n \"enableAvalancheProblemCornices\": \"Habilitar el problema d'allaus CORNISES\",\n \"enableAvalancheProblemNoDistinctAvalancheProblem\": \"Habilitar el problema d'allaus CAP PROBLEMA D'ALLAUS EVIDENT\"\n }\n },\n \"success\": \"Configuració guardada satisfactòriament\",\n \"error\": \"No es pot guardar la contrasenya\"\n },\n \"users\": {\n \"title\": \"Usuaris\",\n \"button\": {\n \"create\": \" Crear usuari\"\n },\n \"tooltip\": {\n \"edit\": \"Editar usuari\",\n \"changePassword\": \"Canviar la contrasenya\",\n \"delete\": \"Esborrar usuari\"\n },\n \"table\": {\n \"name\": \"Nom\",\n \"email\": \"Email\",\n \"organization\": \"Organizació\",\n \"regions\": \"Regions\",\n \"roles\": \"Funcions\"\n },\n \"deleteUserModalDialog\": {\n \"message\": \"Voleu eliminar l’usuari?\",\n \"accept\": \"Si\",\n \"reject\": \"No\"\n },\n \"deleteUser\": {\n \"success\": \"S'ha suprimit l'usuari\",\n \"error\": \"No s'ha pogut suprimir l'usuari\"\n },\n \"createUser\": {\n \"success\": \"Usuari creat\",\n \"error\": \"No s'ha pogut crear l'usuari\"\n },\n \"updateUser\": {\n \"success\": \"Usuari actualitzat\",\n \"error\": \"L'usuari no s'ha pogut actualitzar\"\n }\n },\n \"createUser\": {\n \"table\": {\n \"image\": \"Image\",\n \"name\": \"Nom\",\n \"email\": \"Email\",\n \"organization\": \"Organizació\",\n \"password\": \"Contrasenya\",\n \"password2\": \"Repetir contrasenya\",\n \"roles\": \"Funcions\",\n \"regions\": \"Regions\"\n },\n \"error\": {\n \"name\": {\n \"required\": \"Introduir un nom\"\n },\n \"email\": {\n \"required\": \"Introduir una adreça de correu electrònic\",\n \"invalid\": \"L'adreça de correu electrònic no és vàlida\"\n },\n \"password\": {\n \"required\": \"Introduir una contrasenya\",\n \"length\": \"La contrasenya ha de tenir com a mínim 8 caràcters\",\n \"mismatch\": \"Les contrasenyes no coincideixen\"\n }\n },\n \"button\": {\n \"create\": \"Crear usuari\",\n \"update\": \"Actualitzar l'usuari\",\n \"cancel\": \"Cancel·lar\"\n }\n },\n \"observations\": {\n \"table\": \"Taula\",\n \"map\": \"Mapa\",\n \"gallery\": \"Gallery\",\n \"filters\": \"Filtres\",\n \"title\": \"Observacions\",\n \"newObservation\": \"New observation\",\n \"exportObservations\": \"Export observations\",\n \"toggleFilterBar\": \"Show/hide filter bar\",\n \"button\": {\n \"submit\": \"Descarregar\"\n },\n \"label\": {\n \"dateRange\": \"Període\",\n \"observer\": \"Observador\"\n },\n \"selectRegion\": {\n \"placeholder\": \"Regió\",\n \"selectionLabel\": \"{0} region(s) selected\"\n },\n \"selectSources\": {\n \"placeholder\": \"Fonts\",\n \"selectionLabel\": \"{0} source(s) selected\"\n },\n\n \"charts\": {\n \"charts\": \"Gràfics\",\n \"nan\": \"Sense especificar\",\n \"classify\": \"Classificar\",\n \"label\": \"Etiqueta\",\n \"invert\": \"Invertir\",\n \"reset\": \"Restablir\",\n \"aspect\": {\n \"caption\": \"Orientació\"\n },\n \"elevation\": {\n \"caption\": \"Altitud\"\n },\n \"stability\": {\n \"caption\": \"Estabilitat\"\n },\n \"observationType\": {\n \"caption\": \"Tipus d'observació\"\n },\n \"importantObservation\": {\n \"caption\": \"Important\"\n },\n \"avalancheProblem\": {\n \"caption\": \"Problema d'Allaus\"\n },\n \"dangerPattern\": {\n \"caption\": \"Patró de perill\"\n },\n \"days\": {\n \"caption\": \"Dia\"\n }\n }\n },\n \"blog\": {\n \"title\": \"Blog\",\n \"language\": {\n \"title\": \"Idioma\",\n \"de\": \"DE\",\n \"it\": \"IT\",\n \"en\": \"EN\"\n },\n \"all\": {\n \"tooltip\": \"Enviar correus electrònics, Telegram i Push\",\n \"success\": \"{{prefix}}Correu electrònic, Telegram i Push enviats correctament!\",\n \"error\": \"{{prefix}}No s'han pogut enviar el correu electrònic, Telegram i Push!\"\n },\n \"email\": {\n \"tooltip\": \"Enviar Emails\",\n \"success\": \"{{prefix}}Correu electrònic enviat correctament!\",\n \"error\": \"{{prefix}}No s'ha pogut enviar el correu electrònic!\"\n },\n \"telegram\": {\n \"tooltip\": \"Enviar a través del canal de Telegram\",\n \"success\": \"{{prefix}}Telegram enviat correctament!\",\n \"error\": \"{{prefix}}No s'ha pogut enviar el Telegram!\"\n },\n \"push\": {\n \"tooltip\": \"Enviar mitjançant notificacions push\",\n \"success\": \"{{prefix}}Push enviat correctament!\",\n \"error\": \"{{prefix}}No s'ha pogut enviar el push!\"\n }\n }\n },\n \"settings\": {\n \"title\": \"Configuració\",\n \"changePassword\": {\n \"title\": \"Canviar la contrasenya\",\n \"oldPassword\": {\n \"label\": \"Contrasenya actual\",\n \"placeholder\": \"Contrasenya actual\"\n },\n \"newPassword1\": {\n \"label\": \"Nova contrasenya\",\n \"placeholder\": \"Nova contrasenya\"\n },\n \"newPassword2\": {\n \"label\": \"Contrasenya nova (repetir)\",\n \"placeholder\": \"Nova contrasenya\"\n },\n \"submit\": \"Canviar la contrasenya\",\n \"passwordChanged\": \"Contrasenya canviada\",\n \"passwordChangeError\": \"No es pot canviar la contraenya\",\n \"passwordIncorrect\": \"La contrasenya actual és incorrecta\",\n \"error\": {\n \"oldPassword\": {\n \"required\": \"Si us plau introdueix la contrasenya actual\"\n },\n \"newPassword\": {\n \"required\": \"Si us plau introdueix la nova contrasenya\",\n \"mismatch\": \"Les contrasenyes no coincideixen\"\n }\n }\n },\n \"display\": {\n \"title\": \"Visualitzar\",\n \"table\": {\n \"showCaaml\": \"Mostrar CAAML\",\n \"showJson\": \"Mostrar JSON\"\n }\n }\n },\n \"statistics\": {\n \"title\": \"Estadístiques\",\n \"button\": {\n \"submit\": \"Descarregar\"\n },\n \"label\": {\n \"dateRange\": \"Període\",\n \"extended\": \"Ampliat\",\n \"duplicates\": \"Duplicats\"\n }\n },\n\n \"dangerRating\": {\n \"noRating\": \"Sense grau de perill\",\n \"low\": \"Feble\",\n \"moderate\": \"Moderat\",\n \"considerable\": \"Marcat\",\n \"high\": \"Fort\",\n \"veryHigh\": \"Molt fort\"\n },\n \"avalancheProblem\": {\n \"newSnow\": \"Neu recent\",\n \"new_snow\": \"Neu recent\",\n \"windSlab\": \"Plaques de vent\",\n \"wind_slab\": \"Plaques de vent\",\n \"persistentWeakLayers\": \"Capes febles persistents\",\n \"persistent_weak_layers\": \"Capes febles persistents\",\n \"wetSnow\": \"Neu humida\",\n \"wet_snow\": \"Neu humida\",\n \"glidingSnow\": \"Lliscaments\",\n \"gliding_snow\": \"Lliscaments\",\n \"cornices\": \"Cornises\",\n \"noDistinctAvalancheProblem\": \"No distinct avalanche problem\",\n \"no_distinct_avalanche_problem\": \"No distinct avalanche problem\",\n \"favourableSituation\": \"Situació favorable\",\n \"favourable_situation\": \"Situació favorable\"\n },\n \"dangerPattern\": {\n \"dp1\": \"pp.1: capa feble persistent profunda\",\n \"dp2\": \"pp.2: allaus de lliscament\",\n \"dp3\": \"pp.3: pluja\",\n \"dp4\": \"pp.4: fred després de temperat / temperat després de fred\",\n \"dp5\": \"pp.5: nevada després d'un llarg període fred\",\n \"dp6\": \"pp.6: neu freda i solta i vent\",\n \"dp7\": \"dp.7: shallow snow next to deep snow\",\n \"dp8\": \"pp.8: gebre enterrat\",\n \"dp9\": \"pp.9: neu rodona enterrada\",\n \"dp10\": \"pp.10: escenari de primavera\"\n },\n \"strategicMindset\": {\n \"title\": \"Strategic Mindset\",\n \"assessment\": \"High Uncertainty\",\n \"stepping_out\": \"Improving\",\n \"status_quo\": \"Status Quo\",\n \"stepping_back\": \"Deteriorating\",\n \"entrenchment\": \"Persistent Unstable\",\n \"free_ride\": \"Favorable\",\n \"high_alert\": \"High Alert\",\n \"spring_diurnal\": \"Spring Diurnal\"\n },\n \"observationType\": {\n \"DrySnowfallLevel\": \"Dry snowfall level\",\n \"TimeSeries\": \"Sèrie temporal\",\n \"Incident\": \"Incident\",\n \"Profile\": \"Perfil de neu\",\n \"Closure\": \"Tancament\",\n \"Blasting\": \"Voladura\",\n \"Avalanche\": \"Allau\",\n \"Evaluation\": \"Avaluació\",\n \"SimpleObservation\": \"Observació simple\",\n \"Webcam\": \"Webcam\"\n },\n \"importantObservation\": {\n \"ForBlog\": \"For blog\",\n \"SurfaceHoar\": \"Gebre de superfície\",\n \"Graupel\": \"Neu granulada\",\n \"StabilityTest\": \"Test d'estabilitat\",\n \"IceFormation\": \"Formació de gel\",\n \"VeryLightNewSnow\": \"Neu recent molt lleugera\"\n },\n \"elevationTolerance\": {\n \"exact\": \"exact\",\n \"50m\": \"±50m\",\n \"100m\": \"±100m\",\n \"200\": \"±200m\"\n },\n \"elevationPeriod\": {\n \"duringPrecipitationEvent\": \"Dry snowfall boundary for the entire precipitation event\",\n \"observationPeriod\": \"Dry snowfall boundary at the time of observation\"\n },\n \"aspect\": {\n \"N\": \"N\",\n \"NE\": \"NE\",\n \"E\": \"E\",\n \"SE\": \"SE\",\n \"S\": \"S\",\n \"SW\": \"SW\",\n \"W\": \"W\",\n \"NW\": \"NW\"\n },\n \"role\": {\n \"SUPERADMIN\": \"Super Administrator\",\n \"ADMIN\": \"Administrador\",\n \"FORECASTER\": \"Predictor\",\n \"FOREMAN\": \"Mestre d'obres\",\n \"OBSERVER\": \"Observador\"\n },\n \"tendency\": {\n \"decreasing\": \"El perill d'allaus disminueix\",\n \"steady\": \"El perill d'allaus roman estable\",\n \"increasing\": \"El perill d'allaus augmenta\"\n },\n \"snowpackStability\": {\n \"unknown\": \"desconegut\",\n \"good\": \"bona\",\n \"fair\": \"regular\",\n \"poor\": \"pobre\",\n \"very_poor\": \"molt pobre\"\n },\n \"frequency\": {\n \"none\": \"(gairebé) cap\",\n \"few\": \"unes poques\",\n \"some\": \"algunes\",\n \"many\": \"moltes\"\n },\n \"avalancheSize\": {\n \"small\": \"petita\",\n \"medium\": \"mitjana\",\n \"large\": \"gran\",\n \"very_large\": \"molt gran\",\n \"extreme\": \"extremadament gran\"\n },\n \"complexity\": {\n \"easy\": \"Fàcil\",\n \"challenging\": \"Exigent\",\n \"complex\": \"Complex\"\n },\n \"glidingSnowActivity\": {\n \"low\": \"Feble\",\n \"medium\": \"mitjana\",\n \"high\": \"fort\"\n },\n \"wetness\": {\n \"dry\": \"dry\",\n \"moist\": \"moist\",\n \"wet\": \"wet\"\n },\n \"characteristic\": {\n \"low\": \"Feble\",\n \"medium\": \"mitjana\",\n \"high\": \"fort\",\n \"very_high\": \"molt fort\"\n },\n \"thickness\": {\n \"thin\": \"thin\",\n \"thick\": \"thick\"\n },\n \"snowpackPosition\": {\n \"upper\": \"upper\",\n \"middle\": \"middle\",\n \"lower\": \"lower\",\n \"ground\": \"ground\"\n },\n \"weakLayerCrust\": {\n \"no\": \"no\",\n \"partly\": \"partly\",\n \"yes\": \"yes\"\n },\n \"creationProcess\": {\n \"radiation_recrystallization\": \"radiació\",\n \"diurnal_recrystallization\": \"diurnal\",\n \"melt_layer_recrystallization\": \"melt layer\",\n \"surface_hoar_formation\": \"surface hoar\"\n },\n \"recognizability\": {\n \"very_easy\": \"very easy\",\n \"easy\": \"easy\",\n \"hard\": \"hard\",\n \"very_hard\": \"very hard\"\n },\n \"distribution\": {\n \"isolated\": \"isolated\",\n \"specific\": \"specific\",\n \"widespread\": \"widespread\"\n },\n \"probability\": {\n \"likely\": \"likely\",\n \"possible\": \"possible\",\n \"unlikely\": \"unlikely\"\n },\n \"detailedDaytime\": {\n \"evening\": \"evening\",\n \"first_night_half\": \"first night half\",\n \"second_night_half\": \"second night half\",\n \"morning\": \"morning\",\n \"forenoon\": \"forenoon\",\n \"afternoon\": \"afternoon\"\n },\n \"slopeGradient\": {\n \"moderately_steep\": \"moderately steep\",\n \"steep\": \"steep\",\n \"very_steep\": \"very steep\",\n \"extremely_steep\": \"extremely steep\"\n },\n \"handHardness\": {\n \"fist\": \"F\",\n \"four_fingers\": \"4F\",\n \"one_finger\": \"1F\",\n \"pencil\": \"P\",\n \"knife\": \"K\",\n \"ice\": \"I\"\n },\n \"hardnessTendency\": {\n \"decreasing\": \"softer below\",\n \"steady\": \"uniform\",\n \"increasing\": \"softer above\"\n },\n \"terrainType\": {\n \"gullies\": \"gullies\",\n \"bowls\": \"bowls\",\n \"pass_areas\": \"pass areas\",\n \"ridge_lines\": \"ridge lines\",\n \"adjacent_to_ridge_lines\": \"adjacent to ridge lines\",\n \"distant_from_ridge_lines\": \"distant from ridge lines\",\n \"slope_discontinuities\": \"slope discontinuities\",\n \"convex_terrain\": \"convex terrain\",\n \"concave_terrain\": \"concave terrain\",\n \"steep_terrain\": \"steep terrain\",\n \"very_steep_terrain\": \"very steep terrain\",\n \"open_terrain\": \"open terrain\",\n \"forest\": \"forest\"\n },\n \"dangerSign\": {\n \"shooting_cracks\": \"shooting cracks\",\n \"whumpfing\": \"whumpfing\",\n \"fresh_avalanches\": \"fresh avalanches\"\n },\n \"changeRegionDialog\": {\n \"message\": \"Vols canviar de regió?\",\n \"accept\": \"Si\",\n \"reject\": \"No\"\n },\n \"zamg\": {\n \"table\": \"Taula\",\n \"map\": \"Mapa\",\n \"region\": \"Regió\",\n \"newSnow\": \"Neu recent\"\n },\n \"snowpack\": {\n \"plotType\": {\n \"LWC_stratigraphy\": \"Neu humida: contingut d'aigua líquida\",\n \"wet_snow_instability\": \"Neu humida: Inestabilitat de neu humida\",\n \"Sk38_stratigraphy\": \"Capes febles persistents: Índex d'estabilitat SK38\",\n \"stratigraphy\": \"Capes febles persistents: estratigrafia de la neu\"\n },\n \"aspect\": {\n \"flat\": \"pla\",\n \"north\": \"nord\",\n \"south\": \"sud\"\n },\n \"meteo\": {\n \"new_snow_plot_3day\": \"neu nova (3d)\",\n \"new_snow_plot_7day\": \"neu nova (7d)\",\n \"new_snow_plot_1month\": \"neu nova (31d)\",\n \"new_snow_plot_season\": \"neu nova (temporada)\",\n \"new_snow_plot_forecast\": \"neu nova (previsió)\",\n \"wet_snow_plot_3day\": \"neu humida (3d)\",\n \"wet_snow_plot_7day\": \"Neu humida (7d)\",\n \"wet_snow_plot_1month\": \"neu humida (31d)\",\n \"wet_snow_plot_season\": \"Neu humida (temporada)\",\n \"wet_snow_plot_forecast\": \"Neu humida (previsió)\",\n \"HS_table_24h\": \"taula d'alçada de la neu (1d)\",\n \"HS_table_72h\": \"taula d'alçada de la neu (3d)\",\n \"HS_table_season\": \"taula d'alçada de la neu (temporada)\",\n \"HS_table_forecast\": \"taula d'alçada de la neu (previsió)\",\n \"TA_table_24h\": \"taula de temperatures (1d)\",\n \"TA_table_72h\": \"taula de temperatures (3h)\",\n \"TA_table_season\": \"taula de temperatures (temporada)\"\n }\n },\n \"grainShape\": {\n \"PP\": {\n \"code\": \"PP\",\n \"class\": \"Precipitation Particles\"\n },\n \"PPgp\": {\n \"code\": \"PPgp\",\n \"class\": \"Neu granulada\"\n },\n \"DF\": {\n \"code\": \"DF\",\n \"class\": \"Decomposing and Fragmented precipitation particles\"\n },\n \"RG\": {\n \"code\": \"RG\",\n \"class\": \"Rounded Grains\"\n },\n \"FC\": {\n \"code\": \"FC\",\n \"class\": \"Faceted Crystals\"\n },\n \"DH\": {\n \"code\": \"DH\",\n \"class\": \"Depth Hoar\"\n },\n \"SH\": {\n \"code\": \"SH\",\n \"class\": \"Surface Hoar\"\n },\n \"MF\": {\n \"code\": \"MF\",\n \"class\": \"Melt Forms\"\n },\n \"MFcr\": {\n \"code\": \"MFcr\",\n \"class\": \"Melt-freeze crust\"\n },\n \"IF\": {\n \"code\": \"IF\",\n \"class\": \"Ice Formations\"\n }\n },\n \"button\": {\n \"yes\": \"yes\",\n \"no\": \"no\"\n },\n \"observations\": {\n \"allowEdit\": \"Edit external observation\",\n \"allowEditTooltip\": \"This will prevent overwrites from {{ value }}\",\n \"editIconTooltip\": \"Edited observation - receives no updates from {{ value }}\",\n \"aspect\": \"Orientació\",\n \"authorName\": \"Nom de l'autor\",\n \"avalancheLength\": \"Longitud d'allau\",\n \"avalancheProblem\": \"Problema d'allaus\",\n \"avalancheSize\": \"Mida d'allau\",\n \"avalancheType\": \"Tipus d'allau\",\n \"avalancheWidth\": \"Amplada d'allau\",\n \"search\": \"Cerca\",\n \"count\": \"# observacions:\",\n \"elevationTolerance\": \"Accuracy of elevation data\",\n \"elevationPeriod\": \"Elevation time period\",\n \"layers\": {\n \"observers\": \"Observers\",\n \"weatherStations\": \"Weather stations\",\n \"webcams\": \"Webcams\",\n \"observations\": \"Observacions\"\n },\n \"weatherStations\": {\n \"tooltips\": {\n \"drySnowfallLevel\": \"Dry snowfall level\",\n \"globalRadiation\": \"Global radiation\",\n \"newSnow\": \"Neu recent\",\n \"snowLine\": \"Límit de neu\",\n \"snowHeight\": \"Snow height\",\n \"snowDifference\": \"Snow difference\",\n \"airTemperature\": \"Air temperature\",\n \"airTemperatureMax\": \"Air temperature Max\",\n \"airTemperatureMin\": \"Air temperature Min\",\n \"surfaceTemperature\": \"Surface temperature\",\n \"surfaceHoar\": \"Potential surface hoar formation\",\n \"surfaceHoarCalc\": \"Potential surface hoar formation (Lehning et. al.)\",\n \"dewPoint\": \"Dew point temperature\",\n \"relativeHumidity\": \"Relative humidity\",\n \"windDirection\": \"Wind direction\",\n \"windSpeed\": \"Wind speed\",\n \"windGust\": \"Wind gust\"\n }\n },\n \"button\": {\n \"add\": \"Afegir observació\",\n \"save\": \"Guardar observació\",\n \"delete\": \"Eliminar observació\",\n \"deleteConfirm\": \"Eliminar observació?\",\n \"discard\": \"Descarta\",\n \"copyDate\": \"Copy event date\"\n },\n \"comment\": \"Comentari\",\n \"content\": \"Contingut\",\n \"dangerRating\": \"Grau de perill\",\n \"elevation\": \"Altitud\",\n \"elevationRange\": \"Elevation range\",\n \"elevationLowerBound\": \"Elevation lower bound\",\n \"elevationUpperBound\": \"Elevation upper bound\",\n \"eventDate\": \"Data d'esdeveniment\",\n \"eventType\": \"Tipus d'esdeveniment\",\n \"eventTypes\": {\n \"IMPORTANT\": \"Esdeveniment important\",\n \"NEIGHBOR_REGION\": \"Regió veïna\",\n \"NORMAL\": \"Esdeveniment normal\",\n \"PERSON_DEAD\": \"Esdeveniment amb persones implicades (mortes)\",\n \"PERSON_INJURED\": \"Esdeveniment amb persones implicades (ferides)\",\n \"PERSON_NO\": \"Esdeveniment sense persones implicades\",\n \"PERSON_UNINJURED\": \"Esdeveniment amb persones implicades (il·leses)\",\n \"PERSON_UNKNOWN\": \"Esdeveniment (desconegut)\",\n \"TRAFFIC\": \"Trànsit\"\n },\n \"externalURL\": \"External URL (e.g. to photo database)\",\n \"fractureDepth\": \"Profunditat cicatriu\",\n \"hasCoordinates\": \"Té coordenades\",\n \"incline\": \"Pendent\",\n \"latitude\": \"Laltitud\",\n \"locationName\": \"Localitat\",\n \"longitude\": \"Longitud\",\n \"observationType\": \"Observation type\",\n \"personInvolvement\": \"Person involvement\",\n \"reportDate\": \"Data de l'informe\",\n \"showTable\": \"Taula\",\n \"withoutCoordinates\": \"Observacions sense coordenades:\",\n \"sidebar\": {\n \"filter\": {\n \"title\": \"Filtre\"\n },\n \"legend\": {\n \"title\": \"Llegenda\"\n },\n \"sources\": {\n \"title\": \"Fonts de dades\"\n },\n \"views\": {\n \"title\": \"Vistes\"\n }\n }\n },\n \"personInvolvement\": {\n \"Dead\": \"Esdeveniment amb persones implicades (mortes)\",\n \"Injured\": \"Esdeveniment amb persones implicades (ferides)\",\n \"No\": \"Esdeveniment sense persones implicades\",\n \"Uninjured\": \"Esdeveniment amb persones implicades (il·leses)\",\n \"Unknown\": \"Esdeveniment (desconegut)\"\n },\n \"units\": {\n \"cm\": \"cm\",\n \"mm\": \"mm\",\n \"m\": \"m\"\n },\n \"qfa\": {\n \"day\": \"Dia\",\n \"time\": \"Hora\",\n \"back\": \"Enrera\",\n \"parameters\": {\n \"DUST\": \"pols sahariana\",\n \"N\": \"Cobertura de núvols total en /8\",\n \"Nh\": \"Cobertura de núvols alts en /8\",\n \"Nm\": \"Cobertura de núvols mitjans en /8\",\n \"Nl\": \"Cobertura de núvols baixos en /8\",\n \"N-CU\": \"Cobertura de núvols cumulus en /8\",\n \"AUSL.T\": \"temperatura desencadenant\",\n \"SHW-IX\": \"Index Showalter\",\n \"WX -CUF\": \"Temps significatiu: NIL (cap), RASH (pluja), TS (tempesta)\",\n \"RR\": \"precipitaió total [mm]\",\n \"RR-str\": \"precipitatió estratiforme\",\n \"CONV\": \"precipitació convectiva [mm]\",\n \"SN\": \"precipitació en forma de neu [mm]\",\n \"SN--RA\": \"límit de la neu [m]\",\n \"QAO \": \"{{value}} hPa eq. vent mitjà, direcció i velocitat, [°] i [m/s]\",\n \"QAN\": \"vent mitjà al terra, direcció i velocitat, [º] i [m/s]\",\n \"QANmax\": \"vent màx. (ràfagues) al terra [m/s]\",\n \"T \": \"{{value}} hPa eq. temperatura [°C]\",\n \"T m\": \"temperatura a {{value}}m [°C]\",\n \"T 2m\": \"temperatura a 2m [°C]\",\n \"Tk 2m\": \"temperatura a 2m [°K]\",\n \"T GND\": \"temperatura al terra\",\n \"Max-ADI\": \"temperatura màxima de barreja [°C]\",\n \"Min Max\": \"temperatura mín./màx. en les darreres 24h\",\n \"FROST\": \"alçada isozero [m]\",\n \"W cm\": \"500 hPa eq. vent vertical [cm/s]\",\n \"W --\": \"700 hPa eq. vent vertical [cm/s]\",\n \"W s\": \"{{value}} hPa eq. vent vertical [cm/s]\",\n \"H \": \"{{value}} hPa alçada geopotencial [m]\",\n \"RF \": \"{{value}} hPa eq. humitat relativa [%]\"\n }\n }\n}\n","{\n \"daytime\": {\n \"earlier\": \"Früher\",\n \"later\": \"Später\"\n },\n \"login\": {\n \"title\": \"Login\",\n \"text\": \"Melde dich mit deinem Account an\",\n \"button\": \"Login\",\n \"stressLevel\": \"Stresslevel\",\n \"errorDialog\": {\n \"message\": \"Benutzername oder Passwort falsch!\",\n \"accept\": \"Ok\"\n },\n \"placeholder\": {\n \"username\": \"Bitte Benutzernamen eingeben\",\n \"password\": \"Bitte Passwort eingeben\"\n }\n },\n \"sidebar\": {\n \"bulletins\": \"Lawinen.report\",\n \"dangerSources\": \"Gefahrenquellen\",\n \"observations\": \"Beobachtungen\",\n \"qfa\": \"QFA\",\n \"modelling\": \"Modellierung\",\n \"modellingForecast\": \"Vorhersage\",\n \"modellingZamg\": \"ZAMG Multimodel\",\n \"modellingZamgECMWF\": \"ZAMG ECMWF-EPS\",\n \"modellingZamgCLAEF\": \"ZAMG CLAEF-EPS\",\n \"modellingZamgMeteogram\": \"GeoSphere Meteogramm\",\n \"modellingSnowpack\": \"SNOWPACK Modell\",\n \"modellingSnowpackMeteo\": \"Modellierte Meteodaten SNOWPACK\",\n \"weatherbox\": \"Wetterbox\",\n \"awsome\": \"AWSOME\",\n \"snowpack\": \"SNOWPACK\",\n \"geosphere\": \"GeoSphere\"\n },\n \"menu\": {\n \"logout\": \"Logout\",\n \"language\": \"Sprache\",\n \"en\": \"Englisch\",\n \"de\": \"Deutsch\",\n \"fr\": \"Französisch\",\n \"it\": \"Italienisch\",\n \"es\": \"Spanisch\",\n \"ca\": \"Katalanisch\",\n \"oc\": \"Aranesisch\",\n \"fullscreen\": \"Vollbildschirm\",\n \"settings\": \"Einstellungen\",\n \"statistics\": \"Statistik\",\n \"admin\": \"Admin\",\n \"region\": \"Region\",\n \"education\": \"Ausbildung\"\n },\n \"matrix\": {\n \"label\": {\n \"snowpackStability\": \"Schneedeckenstabilität\",\n \"frequency\": \"Häufigkeit\",\n \"avalancheSize\": \"Lawinengröße\",\n \"dangerRating\": \"Gefahrenstufe\",\n \"override\": \"(Gefahrenstufe überschreiben)\",\n \"matrix\": \"Matrix\",\n \"referToFairStability\": \"Siehe mittlere Stabilität\",\n \"referToPoorStability\": \"Siehe schlechte Stabilität\",\n \"dangerLevel1\": \"Gefahrenstufe 1 (Gering)\"\n }\n },\n \"dangerSources\": {\n \"status\": {\n \"missing\": \"fehlt\",\n \"available\": \"verfügbar\",\n \"forecast\": \"Vorhersage\",\n \"analysis\": \"Analyse\",\n \"loading\": \"Gefahrenquellen werden geladen ...\",\n \"saveError\": \"Gefahrenquelle konnte nicht gespeichert werden!\",\n \"loadDangerSourcesError\": \"Gefahrenquellen konnten nicht geladen werden!\",\n \"loadVariantsError\": \"Varianten der Gefahrenquellen konnten nicht geladen werden!\"\n },\n \"variantStatus\": {\n \"active\": \"aktiv\",\n \"dormant\": \"schlafend\",\n \"inactive\": \"inaktiv\"\n },\n \"tooltip\": {\n \"read\": \"Gefahrenquellen lesen\",\n \"edit\": \"Gefahrenquellen bearbeiten\"\n },\n \"table\": {\n \"loadMore\": \"{{count}} Tage mehr laden\",\n \"title\": {\n \"forecast\": \"Vorhersage\",\n \"analysis\": \"Analyse\"\n }\n },\n \"create\": {\n \"variantStatus\": \"Status\",\n \"variantEditable\": \"Diese Variante kann bearbeitet werden.\",\n \"variantNotEditable\": \"Diese Variante kann nicht bearbeitet werden.\",\n \"noVariantsForSelectedDay\": \"Für dieses Datum sind keine Varianten definiert.\",\n \"tooltip\": {\n \"editDangerSource\": \"Gefahrenquelle bearbeiten\",\n \"loadVariants\": \"Varianten von gestern laden\",\n \"edit\": \"Kleinstregionen editieren\",\n \"copy\": \"Variante kopieren\",\n \"delete\": \"Variante löschen\",\n \"compare\": \"Variante vergleichen\",\n \"forecast\": \"Mit Vorhersage vergleichen\"\n },\n \"createDangerSource\": \"Gefahrenquelle erstellen\",\n \"createVariant\": \"Neue Variante erstellen\",\n \"noDangerSources\": \"Keine Gefahrenquellen\",\n \"title\": {\n \"avalanche\": \"Lawine\",\n \"matrix\": \"Matrix\",\n \"characteristics\": \"Merkmale\",\n \"comment\": \"Kommentar\"\n },\n \"label\": {\n \"glidingSnowActivity\": \"Gleitschneeaktivität\",\n \"snowHeight\": \"Schneehöhe\",\n \"snowHeightAverage\": \"Durchschnittliche Schneehöhe\",\n \"zeroDegreeIsotherm\": \"0°C isotherm\",\n \"looseSnowMoisture\": \"Feuchte des Lockerschnees\",\n \"looseSnowGrainShape\": \"Kornform des Lockerschnees\",\n \"slabGrainShape\": \"Kornform des Bretts\",\n \"slabThickness\": \"Dicke des Bretts\",\n \"slabHandHardness\": \"Handhärte des Bretts\",\n \"slabHardnessProfile\": \"Härte des Bretts\",\n \"slabEnergyTransferPotential\": \"Energieübertragungspotential des Bretts\",\n \"slabDistribution\": \"Verteilung des Bretts\",\n \"weakLayerGrainShape\": \"Kornform der Schwachschicht\",\n \"weakLayerGrainSize\": \"Korngröße der Schwachschicht\",\n \"weakLayerPersistent\": \"Persistenz der Schwachschicht\",\n \"weakLayerThickness\": \"Dicke der Schwachschicht\",\n \"weakLayerStrength\": \"Festigkeit der Schwachschicht\",\n \"weakLayerWet\": \"Ist die Schwachschicht feucht?\",\n \"weakLayerCrustAbove\": \"Kruste oberhalb der Schwachschicht\",\n \"weakLayerCrustBelow\": \"Kruste unterhalb der Schwachschicht\",\n \"weakLayerPosition\": \"Position der Schwachschicht\",\n \"weakLayerCreation\": \"Entstehung der Schwachschicht\",\n \"weakLayerDistribution\": \"Verteilung der Schwachschicht\",\n \"dangerSpotRecognizability\": \"Erkennbarkeit der Gefahrenstellen\",\n \"remoteTriggering\": \"Fernauslösungen\",\n \"hasDaytimeDependency\": \"Tageszeitliche Abhängigkeit\",\n \"dangerIncreaseWithElevation\": \"Zunahme der Gefahr mit der Höhe\",\n \"runoutIntoGreen\": \"Auslauf bis ins Grüne\",\n \"highestDangerAspect\": \"Exposition der höchsten Gefahr\",\n \"dangerPeak\": \"Gefahrenspitze\",\n \"slopeGradient\": \"Hangneigung\",\n \"naturalRelease\": \"Spontane Lawinen\",\n \"terrainTypes\": \"Geländeformen\",\n \"dangerSigns\": \"Gefahrenzeichen\",\n \"aspects\": \"Expositionen\"\n },\n \"editVariantDialog\": {\n \"save\": \"Speichern\",\n \"cancel\": \"Abbrechen\"\n },\n \"deleteVariantDialog\": {\n \"message\": \"Willst du diese Variante löschen?\",\n \"accept\": \"Ja\",\n \"reject\": \"Nein\"\n },\n \"noRegionDialog\": {\n \"message\": \"Zumindest eine Kleinstregion muss deine sein.\",\n \"accept\": \"Ok\"\n },\n \"discardDialog\": {\n \"message\": \"Willst du die Änderungen verwerfen?\",\n \"accept\": \"Ja\",\n \"reject\": \"Nein\"\n },\n \"saveErrorDialog\": {\n \"message\": \"Beim Speichern der Gefahrenquellen ist ein Fehler aufgetreten!\",\n \"accept\": \"Ok\"\n },\n \"loadDialog\": {\n \"message\": \"Willst du alle Gefahrenquellen Varianten vom Vortrag laden?\",\n \"accept\": \"Ja\",\n \"reject\": \"Nein\"\n }\n }\n },\n \"avalancheType\": {\n \"title\": \"Lawinenart\",\n \"label\": {\n \"slab\": \"SCHNEEBRETT\",\n \"loose\": \"LOCKERSCHNEE\",\n \"glide\": \"GLEITSCHNEE\"\n },\n \"tooltip\": {\n \"slab\": \"Schneebrettlawine\",\n \"loose\": \"Lockerschneelawine\",\n \"glide\": \"Gleitschneelawine\"\n }\n },\n \"elevation\": {\n \"title\": \"Seehöhe\",\n \"high\": \"Unter\",\n \"low\": \"Über\",\n \"treeline\": \"Waldgrenze\"\n },\n \"bulletins\": {\n \"title\": \"Lawinen.report\",\n \"tooltip\": {\n \"edit\": \"Bulletin bearbeiten\",\n \"read\": \"Bulletin lesen\",\n \"copy\": \"Lawinenvorhersage kopieren\",\n \"paste\": \"Lawinenvorhersage einfügen\",\n \"cancel\": \"Kopieren abbrechen\",\n \"update\": \"Bearbeiten\",\n \"submit\": \"Abschicken\",\n \"submitUpdate\": \"Update abschicken\",\n \"publishChange\": \"Sofort publizieren (keine Nachrichten)\",\n \"publishUpdate\": \"Sofort publizieren\",\n \"caaml\": \"CAAML anzeigen\",\n \"json\": \"JSON anzeigen\",\n \"create\": \"Lawinenvorhersage erstellen\",\n \"preview\": \"Vorschau anzeigen (PDF)\",\n \"check\": \"Lawinenvorhersage prüfen\",\n \"info\": \"Publikationsstatus anzeigen\",\n \"loadSuggestionFromDangerSources\": \"Vorschlag laden\",\n \"deleteAllWarningRegions\": \"Alle Warnregionen löschen\",\n \"publishAll\": \"Alle Regionen publizieren\",\n \"mediaFile\": \"Mediendatei hochladen\"\n },\n \"status\": {\n \"submittedInfo\": \"Wird um 17 Uhr publiziert\",\n \"resubmittedInfo\": \"Wird um 8 Uhr publiziert\",\n \"publishedInfo\": \"Wurde publiziert\",\n \"noPublicationInfo\": \"Wird NICHT automatisch publiziert\",\n \"loadingPreview\": \"Erzeuge PDF Vorschau ...\",\n \"loading\": \"Bulletin lädt ...\",\n \"loadMoreBulletins\": \"{{count}} weitere Bulletins laden\",\n \"publishing\": \"Bulletin wird publiziert ...\",\n \"submitting\": \"Bulletin wird abgeschickt ...\",\n \"saveError\": \"Bulletin konnte nicht gespeichert werden!\",\n \"loadBulletinsError\": \"Bulletins konnten nicht geladen werden!\"\n },\n \"create\": {\n \"tooltip\": {\n \"edit\": \"Kleinstregionen editieren\",\n \"copy\": \"Region kopieren\",\n \"delete\": \"Region löschen\",\n \"compare\": \"Region vergleichen\",\n \"undo\": \"Letzte Änderung in der Warnregion rückgängig machen\",\n \"redo\": \"Letzte Änderung in der Warnregion wiederherstellen\",\n \"createRegion\": \"Neue Region\",\n \"cancel\": \"Abbrechen\",\n \"acceptSuggestion\": \"Vorgeschlagene Regionen annehmen\",\n \"rejectSuggestion\": \"Vorgeschlagene Regionen ablehnen\",\n \"saveChanges\": \"Änderungen speichern\",\n \"discardChanges\": \"Änderungen verwerfen\",\n \"incompleteAvalancheProblem\": \"Unvollständiges Lawinenproblem\",\n \"saveBulletin\": \"Lawinenvorhersage speichern\",\n \"discardBulletin\": \"Änderungen an der Lawinenvorhersage verwerfen\",\n \"loadBulletin\": \"Lawinenvorhersage vom Vortag laden\",\n \"uploadJsonBulletin\": \"Upload Bulletin in JSON Format\",\n \"downloadJsonBulletin\": \"Download Bulletin in JSON Format\",\n \"daytimeDependency\": \"Tageszeitliche Abhängigkeit\",\n \"treeline\": \"Waldgrenze\",\n \"tendency\": {\n \"decreasing\": \"Lawinengefahr nimmt ab\",\n \"steady\": \"Lawinengefahr bleibt unverändert\",\n \"increasing\": \"Lawinengefahr steigt\",\n \"danger\": \"Lawinengefahr\"\n },\n \"textcat\": {\n \"edit\": \"Bearbeiten\",\n \"copy\": \"Kopieren\",\n \"paste\": \"Einfügen\",\n \"example\": \"Beispieltext laden\",\n \"delete\": \"Löschen\"\n },\n \"moveUpAvalancheProblem\": \"Lawinenproblem nach oben schieben\",\n \"moveDownAvalancheProblem\": \"Lawinenproblem nach unten schieben\",\n \"dangerRatingDirectionUp\": \"Aufwärts\",\n \"dangerRatingDirectionDown\": \"Abwärts\"\n },\n \"save\": \" Speichern\",\n \"discard\": \" Verwerfen\",\n \"back\": \" Zurück\",\n \"createAggregatedRegion\": \" Neue Region\",\n \"pasteAggregatedRegion\": \" Region einfügen\",\n \"pendingSuggestions\": \"Vorschläge\",\n \"rejectSuggestion\": \"Ablehnen\",\n \"acceptSuggestion\": \"Akzeptieren\",\n \"cancelCopyBulletin\": \" Abbrechen\",\n \"createAvalancheProblem\": \" Neues Lawinenproblem\",\n \"ownRegions\": \"Eigene Regionen\",\n \"foreignRegions\": \"Fremde Regionen\",\n \"externalRegions\": \"Externe Regionen\",\n \"mapSelectRegion\": \"Regionen in der Karte auswählen.\",\n \"statusHeader\": \"Status des Bulletins\",\n \"suggestions\": \"Vorschläge\",\n \"noBulletinsForSelectedDay\": \"Keine Regionen für dieses Datum vorhanden.\",\n \"autosave\": \"Automatisch gespeichert\",\n \"regionEditable\": \"Diese Region kann bearbeitet werden.\",\n \"regionNotEditable\": \"Diese Region kann nicht bearbeitet werden.\",\n \"regionLocked\": \"Diese Region ist gesperrt.\",\n \"changeDangerRatingElevation\": \"Erweitere die Gefahrenstufe\",\n \"mapTop\": \"Karte oben\",\n \"mapLeft\": \"Karte seitlich\",\n \"showNotes\": \"Notizen anzeigen\",\n \"hideNotes\": \"Notizen ausblenden\",\n \"incompleteAvalancheProblem\": \"Unvollständig\",\n \"label\": {\n \"importantObservations\": \"Wichtige Beobachtungen\",\n \"avalancheProblems\": \"Lawinenproblem\",\n \"aspects\": \"Expositionen\",\n \"highlights\": \"Besondere Warnung\",\n \"avActivityHighlights\": \"Schlagzeile Gefahrensituation\",\n \"avActivityComment\": \"Beurteilung der Lawinengefahr\",\n \"snowpackStructureComment\": \"Beschreibung des Schneedeckenaufbaus\",\n \"dangerPatterns\": \"Gefahrenmuster\",\n \"tendencyComment\": \"Beschreibung der Tendenz\",\n \"notes\": \"Notizen\"\n },\n \"copyRegion\": {\n \"label\": \"Warnregion zu anderem Bulletin kopieren\",\n \"select\": \"Einfügen in ...\",\n \"currentBulletin\": \"Dieses Bulletin\"\n },\n \"title\": {\n \"avalancheProblem\": \"Lawinenprobleme\",\n \"dangerDescription\": \"Gefahrenbeurteilung\",\n \"forenoon\": \"Vormittag\",\n \"afternoon\": \"Nachmittag\",\n \"snowpackStructure\": \"Schneedeckenaufbau\",\n \"tendency\": \"Tendenz\",\n \"showTranslations\": \" Übersetzungen anzeigen\",\n \"hideTranslations\": \" Übersetzungen verbergen\"\n },\n \"placeholder\": {\n \"notes\": \"Schreib deine Notizen hier ...\"\n },\n \"pmDialog\": {\n \"noIFrameSupport\": \"Dein Browser unterstützt keine IFrames!\"\n },\n \"discardDialog\": {\n \"message\": \"Willst du die Änderungen verwerfen?\",\n \"accept\": \"Ja\",\n \"reject\": \"Nein\"\n },\n \"deleteAggregatedRegionDialog\": {\n \"message\": \"Willst du die Region löschen?\",\n \"accept\": \"Ja\",\n \"reject\": \"Nein\"\n },\n \"noRegionDialog\": {\n \"message\": \"Zumindest eine Kleinstregion muss deine sein.\",\n \"accept\": \"Ok\"\n },\n \"loadDialog\": {\n \"message\": \"Willst du die Lawinenvorhersage vom Vortag laden?\",\n \"accept\": \"Ja\",\n \"reject\": \"Nein\"\n },\n \"deleteAllWarningRegionsDialog\": {\n \"message\": \"Willst du alle Regionen löschen?\",\n \"accept\": \"Ja\",\n \"reject\": \"Nein\"\n },\n \"loadAutoSaveDialog\": {\n \"message\": \"Willst du die automatisch gespeicherte Lawinenvorhersage laden?\",\n \"accept\": \"Ja\",\n \"reject\": \"Nein\"\n },\n \"saveErrorDialog\": {\n \"message\": \"Beim Speichern der Lawinenvorhersage ist ein Fehler aufgetreten!\",\n \"accept\": \"Ok\"\n },\n \"changeErrorDialog\": {\n \"message\": \"Beim Ändern der Lawinenvorhersage ist ein Fehler aufgetreten!\",\n \"accept\": \"Ok\"\n },\n \"loadingErrorDialog\": {\n \"message\": \"Beim Laden der Lawinenvorhersage ist ein Fehler aufgetreten!\",\n \"accept\": \"Ok\"\n },\n \"loadingJsonFileErrorDialog\": {\n \"message\": \"Beim Laden des Bulletins aus der JSON Datei ist ein Fehler aufgetreten!\",\n \"accept\": \"Ok\"\n },\n \"avalancheProblemErrorDialog\": {\n \"message\": \"Lawinenproblem, Exposition, Schneedeckenstabilität, Häufigkeit und/oder Lawinengröße fehlen bei mindestens einem Lawinenproblem\",\n \"accept\": \"Ok\"\n },\n \"loadAvActivityCommentExampleTextDialog\": {\n \"message\": \"Für welche Situation möchtest du einen Beispieltext laden?\",\n \"newSnow\": \"Neuschnee\",\n \"windSlab\": \"Triebschnee\",\n \"persistentWeakLayers\": \"Altschnee\",\n \"wetSnow\": \"Nassschnee\",\n \"glidingSnow\": \"Gleitschnee\",\n \"favourableSituation\": \"Günstige Situation\",\n \"cancel\": \"Abbrechen\"\n },\n \"removeDaytimeDependencyDialog\": {\n \"message\": \"Welche Lawinenprobleme möchtest du behalten?\",\n \"cancel\": \"Abbrechen\"\n },\n \"strategicMindsetDialog\": {\n \"title\": \"Strategisches Mindset\",\n \"introduction\": \"Mit den „Strategic Mindsets“ soll unsere mentale Einstellung im Hinblick auf die Lawinensituation bzw. dessen Entwicklung in der entsprechenden Warnregion zum Ausdruck gebracht werden. Sie soll keine direkte Ableitung aus der Gefahrenbeurteilung darstellen, sondern vielmehr als intuitiver Eindruck der Gesamtsituation verstanden und verwendet werden. In erster Linie handelt es sich bei den „Strategic Mindsets“ also über ein Kommunikationsinstrument. Über die Mindsets und damit verbundenen Definitionen können wir Prognostikerinnen uns schnell und effizient über die Entwicklung der Gefahrensituation austauschen und eine gemeinsame Sprache in der Kommunikation finden. \",\n \"description\": {\n \"title\": \"Beschreibung:\",\n \"text\": {\n \"assessment\": \"Es besteht große Unsicherheit in der Gefahrenbeurteilung aufgrund unzureichender Informationen aus dem Gelände.\",\n \"stepping_out\": \"Abnehmende Tendenz der Gefahrensituation (auch innerhalb einer Gefahrenstufe).\",\n \"status_quo\": \"Gleichbleibende Gefahrensituation. Keine wesentliche Änderung zum Vortag.\",\n \"stepping_back\": \"Ansteigende Tendenz der Gefahrensituation (auch innerhalb einer Gefahrenstufe).\",\n \"entrenchment\": \"Annäherend gleichbleibende, angespannte Gefahrensituation. Die Hauptgefahr geht von (einer) störanfälligen, persistente(n) Schwachschicht(en) aus.\",\n \"free_ride\": \"Geringe Lawinengefahr mit allgemein stabiler Schneedecke. Es sind nur kleine, oberflächliche Lawinen im extremen Steilgelände möglich. \",\n \"high_alert\": \"Außergewöhnliche Situation mit großer oder sehr großer Lawinengefahr. Spontane Lawinen sehr großen oder extremen Ausmaßes sind möglich\",\n \"spring_diurnal\": \"Nassschneelawinen im Tagesverlauf, welche einem klaren tageszeitlichen Gang unterliegen sind maßgeblich für die Gefahreneinschätzung.\"\n }\n },\n \"communication\": {\n \"title\": \"Kommunikation:\",\n \"text\": {\n \"assessment\": \"Lawinensituation muss lokal genau überprüft werden. Zurückhaltung wird empfohlen.\",\n \"stepping_out\": \"Allmählicher Rückgang der Gefahr. Es ist jedoch weiterhin Vorsicht geboten, die sich bessernde Situation sollte lokal beurteilt werden, bevor risikoreicheres Gelände betreten wird. \",\n \"status_quo\": \"Gefahrensituation ist unverändert. Rückmeldungen von Beobachtern helfen, die Gefahrensituation besser zu umreißen. Günstigeres Gelände sollte hervorgehoben kommuniziert werden.\",\n \"stepping_back\": \"Klare Kommunikation des Anstiegs der Lawinengefahr - auch innerhalb einer Gefahrenstufe. Informationen zu den Ursachen unterstützen die Verständlichkeit in der Kommunikation.\",\n \"entrenchment\": \"Zurückhaltung und Vorsicht ist geboten. Situation ändert sich kaum. Wenn möglich möglichst genaue Informationen zu Verbreitung und Störanfälligkeit. Verstärkte Kommunikation von Beobachtungen, welche die Situation offenkundig machen und Zurückhaltung triggern.\",\n \"free_ride\": \"Wenig Text. Hervorheben der allgemein günstigen Gesamtsituation und potenziell isolierter Gefahrenbereiche.\",\n \"high_alert\": \"Kommunikation über alle Kanäle. Fokus liegt nicht mehr auf Wintersport. Gefahr auch in Bereichen, welche für gewöhnlich nicht lawinengefährdet sind.\",\n \"spring_diurnal\": \"Am Morgen günstige Situation, im Tagesverlauf Anstieg. Beurteilung sollte lokal durch Beobachten des Aufweichens der nächtlichen Schmelzharschkruste und der zunehmenden Durchnässung der Schneedecke erfolgen.\"\n }\n },\n \"examples\": {\n \"title\": \"Beispiele:\",\n \"text\": {\n \"assessment\": \"Saisonbeginn.\",\n \"stepping_out\": \"Abkühlung führt nach einer feucht- warmen Wetterphase zu einem Rückgang der Gefahr von Nassschneelawinen.\",\n \"status_quo\": \"Gleichbleibend gefahrenbestimmendes Triebschneeproblem bei kalten Temperaturen, lockerem Schnee und Wind.\",\n \"stepping_back\": \"Ergiebiger Neuschneefall führt zu einem Anstieg der Gefahrensituation.\",\n \"entrenchment\": \"Kritisches Altschneeproblem mit Potenzial für gefährlich große Lawinen. Die Situation stabilisiert sich nur sehr langsam und erfordert viel Zurückhaltung.\",\n \"free_ride\": \"Geringe Lawinengefahr, keine persistenten Schwachschichten, jedwedes Gelände wurde bereits angespurt.\",\n \"high_alert\": \"Gefahrenstufe 4 oder höher aufgrund großer Neuschneemengen und/oder problematischer, anhaltender Schwachschichten.\",\n \"spring_diurnal\": \"Frühjahrssituation mit trockenem Hochdruckwetter und moderaten Temperaturen bei ansonsten überwiegend stabiler Altschneedecke.\"\n }\n },\n \"strategicMindset\": {\n \"assessment\": \"Große Unsicherheit\",\n \"stepping_out\": \"Verbesserung\",\n \"status_quo\": \"Status Quo\",\n \"stepping_back\": \"Verschlechterung\",\n \"entrenchment\": \"Persistent Instabil\",\n \"free_ride\": \"Günstige Situation\",\n \"high_alert\": \"High Alert\",\n \"spring_diurnal\": \"Frühjahrssituation\"\n }\n },\n \"decisionTree\": {\n \"filepath\": \"./assets/img/decision_tree-de.svg\",\n \"feedbackURL\": \"https://admin.avalanche.report/umfrage-entscheidungsbaum/de/\",\n \"decisionTree\": \"Entscheidungsbaum\",\n \"feedback\": \"Feedback\",\n \"save\": \"Speichern\",\n \"discard\": \"Verwerfen\"\n }\n },\n \"table\": {\n \"title\": {\n \"date\": \"Datum\",\n \"status\": {\n \"AT-02\": \"Kärnten\",\n \"AT-03\": \"Niederösterreich\",\n \"AT-04\": \"Oberösterreich\",\n \"AT-05\": \"Salzburg\",\n \"AT-06\": \"Steiermark\",\n \"AT-07\": \"Tirol\",\n \"AT-08\": \"Vorarlberg\",\n \"CH\": \"Schweiz\",\n \"DE-BY\": \"Bayern\",\n \"GEOSPHERE\": \"GEOSPHERE\",\n \"IT-32-TN\": \"Trentino\",\n \"IT-32-BZ\": \"Südtirol\",\n \"ES-CT-L\": \"Aran\"\n }\n },\n \"status\": {\n \"missing\": \"fehlt\",\n \"draft\": \"Entwurf\",\n \"submitted\": \"gesendet\",\n \"published\": \"publiziert\",\n \"updated\": \"verändert\",\n \"resubmitted\": \"Update gesendet\",\n \"republished\": \"Update publiziert\"\n },\n \"publishBulletinsDialog\": {\n \"message\": \"Willst du die Lawinenvorhersage publizieren?\",\n \"missingDangerRating\": \"Gefahrenstufe nicht definiert\",\n \"missingRegion\": \"Regionen nicht beurteilt\",\n \"duplicateRegion\": \"Regionen mehrfach beurteilt\",\n \"missingAvActivityHighlights\": \"Schlagzeile Gefahrensituation fehlt\",\n \"missingAvActivityComment\": \"Beurteilung der Lawinengefahr fehlt\",\n \"missingSnowpackStructureHighlights\": \"Schlagzeile des Schneedeckenaufbaus fehlt\",\n \"missingSnowpackStructureComment\": \"Beurteilung des Schneedeckenaufbaus fehlt\",\n \"pendingSuggestions\": \"Unbeantwortete Vorschläge\",\n \"incompleteTranslation\": \"Unvollständige Übersetzung\",\n \"accept\": \"Ja\",\n \"reject\": \"Nein\"\n },\n \"publicationStatusDialog\": {\n \"headline\": \"Status der Publikation\",\n \"publishedBy\": \"Publiziert von: \",\n \"publishedAt\": \"Publiziert um: \",\n \"validFor\": \"Gültig für: \",\n \"title\": {\n \"prod\": \"Produktives System\",\n \"test\": \"Test System\",\n \"task\": \"Vorgang\",\n \"language\": {\n \"all\": \"ALLE\",\n \"de\": \"DE\",\n \"it\": \"IT\",\n \"en\": \"EN\"\n }\n },\n\n \"email\": {\n \"label\": \"E-Mails\",\n \"tooltip\": \"E-Mails versenden\",\n \"success\": \"{{prefix}}Emails erfolgreich verschickt!\",\n \"error\": \"{{prefix}}Emails konnten nicht verschickt werden!\"\n },\n \"telegram\": {\n \"label\": \"Telegram Nachrichten\",\n \"tooltip\": \"Telegram Nachrichten verschicken\",\n \"success\": \"{{prefix}}Telegram Nachrichten erfolgreich verschickt!\",\n \"error\": \"{{prefix}}Telegram Nachrichten konnten nicht verschickt werden!\"\n },\n \"push\": {\n \"label\": \"Push Nachrichten\",\n \"tooltip\": \"Push Nachrichten verschicken\",\n \"success\": \"{{prefix}}Push Nachrichten erfolgreich verschickt!\",\n \"error\": \"{{prefix}}Push Nachrichten konnten nicht verschickt werden!\"\n },\n \"accept\": \"Ok\"\n },\n \"mediaFileDialog\": {\n \"headline\": \"Mediendatei\",\n \"important\": \"WICHTIG\",\n \"missingFile\": \"Keine Datei ausgewählt!\",\n \"uploadError\": \"Upload fehlgeschlagen!\",\n \"accept\": \"Senden\",\n \"reject\": \"Abbrechen\"\n },\n \"publishBulletinsErrorDialog\": {\n \"message\": \"Beim Publizieren der Lawinenvorhersage ist ein Fehler aufgetreten!\",\n \"accept\": \"Ok\"\n },\n \"submitBulletinsDialog\": {\n \"message\": \"Willst du die Lawinenvorhersage absenden?\",\n \"missingDangerRating\": \"Gefahrenstufe nicht definiert\",\n \"missingRegion\": \"Regionen nicht beurteilt\",\n \"missingAvActivityHighlights\": \"Schlagzeile der Lawinengefahr fehlt\",\n \"missingAvActivityComment\": \"Beurteilung der Lawinengefahr fehlt\",\n \"missingSnowpackStructureHighlights\": \"Schlagzeile des Schneedeckenaufbaus fehlt\",\n \"missingSnowpackStructureComment\": \"Beurteilung des Schneedeckenaufbaus fehlt\",\n \"pendingSuggestions\": \"Unbeantwortete Vorschläge\",\n \"accept\": \"Ja\",\n \"reject\": \"Nein\"\n },\n \"submitBulletinsErrorDialog\": {\n \"message\": \"Beim Absenden der Lawinenvorhersage ist ein Fehler aufgetreten!\",\n \"accept\": \"Ok\"\n },\n \"submitBulletinsDuplicateRegionDialog\": {\n \"message\": \"Regionen sind mehrfach beurteilt! Lawinenvorhersage kann nicht abgesendet werden.\",\n \"accept\": \"Ok\"\n },\n \"checkBulletinsErrorDialog\": {\n \"message\": \"Beim Überprüfen der Lawinenvorhersage ist ein Fehler aufgetreten!\",\n \"accept\": \"Ok\"\n },\n \"previewErrorDialog\": {\n \"message\": \"Vorschau konnte nicht geladen werden!\",\n \"accept\": \"Ok\"\n },\n \"checkBulletinsDialog\": {\n \"message\": \"Lawinenvorhersage prüfen\",\n \"missingDangerRating\": \"Gefahrenstufe nicht definiert\",\n \"missingRegion\": \"Regionen nicht beurteilt\",\n \"missingAvActivityHighlights\": \"Schlagzeile der Lawinengefahr fehlt\",\n \"missingAvActivityComment\": \"Beurteilung der Lawinengefahr fehlt\",\n \"missingSnowpackStructureHighlights\": \"Schlagzeile des Schneedeckenaufbaus fehlt\",\n \"missingSnowpackStructureComment\": \"Beurteilung des Schneedeckenaufbaus fehlt\",\n \"pendingSuggestions\": \"Unbeantwortete Vorschläge\",\n \"incompleteTranslation\": \"Unvollständige Übersetzung\",\n \"ok\": \"(alles ok)\",\n \"accept\": \"Ok\"\n },\n \"publishAllDialog\": {\n \"message\": \"Willst du alle Regionen publizieren?\",\n \"accept\": \"Ja\",\n \"reject\": \"Nein\"\n }\n }\n },\n \"training\": {\n \"training\": \"Training\",\n \"timestamp\": \"Trainingszeitpunkt\"\n },\n \"admin\": {\n \"loadingStatistics\": \"CSV wird erzeugt ...\",\n \"server-configuration\": {\n \"title\": \"Server\",\n \"button\": {\n \"create\": \"Neuer Server\",\n \"save\": \"Speichern\"\n },\n \"table\": {\n \"name\": \"Name\",\n \"username\": \"Benutzername\",\n \"password\": \"Passwort\",\n \"publishAt5PM\": \"Publizieren um 17:00 Uhr\",\n \"publishAt8AM\": \"Publizieren um 08:00 Uhr\",\n \"pdfDirectory\": \"Ordner für PDF\",\n \"htmlDirectory\": \"Ordner für HTML\",\n \"serverImagesUrl\": \"Pfad zu Bildern am Server\",\n \"dangerLevelElevationDependency\": \"Höhenabhängigkeit der Gefahrenstufe\",\n \"mapsPath\": \"Pfad zu Karten\",\n \"mediaPath\": \"Pfad zu Mediendateien\",\n \"mapProductionUrl\": \"URL zur Kartenproduktion\",\n \"apiUrl\": \"API URL\"\n },\n \"success\": \"Konfiguration erfolgreich gespeichert\",\n \"error\": \"Konfiguration konnte nicht gespeichert werden\"\n },\n \"region-configuration\": {\n \"title\": \"Region\",\n \"button\": {\n \"create\": \"Neue Region\",\n \"save\": \"Speichern\"\n },\n \"table\": {\n \"general\": {\n \"title\": \"Allgemein\",\n \"id\": \"ID\",\n \"microRegions\": \"Anzahl an Mikroregionen\",\n \"subRegions\": \"Subregionen\",\n \"superRegions\": \"Superregionen\",\n \"neighborRegions\": \"Nachbarregionen\"\n },\n \"publication\": {\n \"title\": \"Publikation\",\n \"publishBulletins\": \"Lawinenvorhersage veröffentlichen\",\n \"publishBlogs\": \"Blogs veröffentlichen\",\n \"createCaamlV5\": \"CAAML v5 erzeugen\",\n \"createCaamlV6\": \"CAAML v6 erzeugen\",\n \"createJson\": \"JSON erzeugen\",\n \"createMaps\": \"Karten erstellen\",\n \"createPdf\": \"PDF erzeugen\",\n \"sendEmails\": \"Emails verschicken\",\n \"createSimpleHtml\": \"Einfaches HTML erzeugen\",\n \"sendTelegramMessages\": \"Telegram Nachrichten verschicken\",\n \"sendPushNotifications\": \"Push Nachrichten verschicken\",\n \"pdfColor\": \"PDF Farbe\",\n \"emailColor\": \"Email Farbe\",\n \"pdfMapYAmPm\": \"Y für PDF Karte (am/pm)\",\n \"pdfMapYFd\": \"Y für PDF Karte (fd)\",\n \"pdfMapWidthAmPm\": \"Kartenbreite für PDF (am/pm)\",\n \"pdfMapWidthFd\": \"Kartenbreite für PDF (fd)\",\n \"pdfMapHeight\": \"Kartenhöhe für PDF\",\n \"pdfFooterLogo\": \"Logo für PDF Footer\",\n \"pdfFooterLogoColorPath\": \"Logo für PDF Footer (farbe)\",\n \"pdfFooterLogoBwPath\": \"Logo für PDF Footer (schwarz-weiß)\",\n \"mapXmax\": \"Karte X max\",\n \"mapXmin\": \"Karte X min\",\n \"mapYmax\": \"Karte Y max\",\n \"mapYmin\": \"Karte Y min\",\n \"simpleHtmlTemplateName\": \"Vorlage für einfaches HTML\",\n \"geoDataDirectory\": \"Ordner für Geodaten\",\n \"mapLogoColorPath\": \"Logo für Karte (farbe)\",\n \"mapLogoBwPath\": \"Logo für Karte (schwarz-weiß)\",\n \"mapLogoPosition\": \"Logoposition für Karte\",\n \"mapCenterLat\": \"Mittelpunkt der Karte (lat)\",\n \"mapCenterLng\": \"Mittelpunkt der Karte (long)\",\n \"imageColorbarColorPath\": \"Farbleiste (farbe)\",\n \"imageColorbarBwPath\": \"Farbleiste (schwarz-weiß)\"\n },\n \"components\": {\n \"title\": \"Komponenten\",\n \"enableDangerSources\": \"Gefahrenquellen aktivieren\",\n \"enableObservations\": \"Beobachtungen aktivieren\",\n \"enableModelling\": \"Modellierung aktivieren\",\n \"enableWeatherbox\": \"Wetterbox aktivieren\"\n },\n \"configuration\": {\n \"title\": \"Konfiguration\",\n \"showMatrix\": \"Matrix anzeigen\",\n \"enableMediaFile\": \"Mediendateien aktivieren\",\n \"enableStrategicMindset\": \"Strategisches Mindset aktivieren\",\n \"enableStressLevel\": \"Stresslevel aktivieren\",\n \"enableAvalancheProblemCornices\": \"Lawinenproblem WECHTEN aktivieren\",\n \"enableAvalancheProblemNoDistinctAvalancheProblem\": \"Lawinenproblem KEIN AUSGEPRÄGTES PROBLEM aktivieren\"\n }\n },\n \"success\": \"Konfiguration erfolgreich gespeichert\",\n \"error\": \"Konfiguration konnte nicht gespeichert werden\"\n },\n \"users\": {\n \"title\": \"Benutzer\",\n \"button\": {\n \"create\": \"Benutzer anlegen\"\n },\n \"tooltip\": {\n \"edit\": \"Benutzer bearbeiten\",\n \"changePassword\": \"Passwort ändern\",\n \"delete\": \"Benutzer löschen\"\n },\n \"table\": {\n \"name\": \"Name\",\n \"email\": \"E-Mail\",\n \"organization\": \"Organisation\",\n \"regions\": \"Regionen\",\n \"roles\": \"Rollen\"\n },\n \"deleteUserModalDialog\": {\n \"message\": \"Willst du den Benutzer löschen?\",\n \"accept\": \"Ja\",\n \"reject\": \"Nein\"\n },\n \"deleteUser\": {\n \"success\": \"Benutzer gelöscht\",\n \"error\": \"Benutzer konnte nicht gelöscht werden\"\n },\n \"createUser\": {\n \"success\": \"Benutzer erstellt\",\n \"error\": \"Benutzer konnte nicht angelegt werden\"\n },\n \"updateUser\": {\n \"success\": \"Benutzer aktualisiert\",\n \"error\": \"Benutzer konnte nicht aktualisiert werden\"\n }\n },\n \"createUser\": {\n \"table\": {\n \"image\": \"Bild\",\n \"name\": \"Name\",\n \"email\": \"E-Mail\",\n \"organization\": \"Organisation\",\n \"password\": \"Passwort\",\n \"password2\": \"Passwort wiederholen\",\n \"roles\": \"Rollen\",\n \"regions\": \"Regionen\"\n },\n \"error\": {\n \"name\": {\n \"required\": \"Bitte Namen eingeben\"\n },\n \"email\": {\n \"required\": \"Bitte E-Mail Adresse eingeben\",\n \"invalid\": \"E-Mail Adresse ist ungültig\"\n },\n \"password\": {\n \"required\": \"Bitte Passwort eingeben\",\n \"length\": \"Passwort muss mindestens 8 Zeichen lang sein\",\n \"mismatch\": \"Passwörter stimmen nicht überein\"\n }\n },\n \"button\": {\n \"create\": \"Benutzer anlegen\",\n \"update\": \"Benutzer aktualisieren\",\n \"cancel\": \"Abbrechen\"\n }\n },\n \"observations\": {\n \"table\": \"Tabelle\",\n \"map\": \"Karte\",\n \"gallery\": \"Galerie\",\n \"filters\": \"Filter\",\n \"title\": \"Rückmeldungen\",\n \"newObservation\": \"Neue Beobachtung\",\n \"exportObservations\": \"Beobachtungen exportieren\",\n \"toggleFilterBar\": \"Filter anzeigen/verbergen\",\n \"button\": {\n \"submit\": \"Herunterladen\"\n },\n \"label\": {\n \"dateRange\": \"Zeitspanne\",\n \"observer\": \"Beobachter\"\n },\n \"selectRegion\": {\n \"placeholder\": \"Region\",\n \"selectionLabel\": \"{0} Region(en) ausgewählt\"\n },\n \"selectSources\": {\n \"placeholder\": \"Quellen\",\n \"selectionLabel\": \"{0} Quelle(n) ausgewählt\"\n },\n\n \"charts\": {\n \"charts\": \"Diagramme\",\n \"nan\": \"Ohne Angabe\",\n \"classify\": \"Klassifizieren\",\n \"label\": \"Bezeichnung\",\n \"invert\": \"Invert\",\n \"reset\": \"Reset\",\n \"aspect\": {\n \"caption\": \"Exposition\"\n },\n \"elevation\": {\n \"caption\": \"Seehöhe\"\n },\n \"stability\": {\n \"caption\": \"Stabilität\"\n },\n \"observationType\": {\n \"caption\": \"Beobachtungstyp\"\n },\n \"importantObservation\": {\n \"caption\": \"Wichtig\"\n },\n \"avalancheProblem\": {\n \"caption\": \"Lawinenproblem\"\n },\n \"dangerPattern\": {\n \"caption\": \"Gefahrenmuster\"\n },\n \"days\": {\n \"caption\": \"Kalendertag\"\n }\n }\n },\n \"blog\": {\n \"title\": \"Blog\",\n \"language\": {\n \"title\": \"Sprache\",\n \"de\": \"DE\",\n \"it\": \"IT\",\n \"en\": \"EN\"\n },\n \"all\": {\n \"tooltip\": \"Emails, Telegram Nachrichten und Push Nachrichten verschicken\",\n \"success\": \"{{prefix}}Email, Telegram Nachrichten und Push Nachrichten erfolgreich verschickt!\",\n \"error\": \"{{prefix}}Email, Telegram Nachrichten und Push Nachrichten konnten nicht verschickt werden!\"\n },\n \"email\": {\n \"tooltip\": \"E-Mails versenden\",\n \"success\": \"{{prefix}}Emails erfolgreich verschickt!\",\n \"error\": \"{{prefix}}Emails konnten nicht verschickt werden!\"\n },\n \"telegram\": {\n \"tooltip\": \"Publizieren via Telegram Kanal\",\n \"success\": \"{{prefix}}Telegram Nachrichten erfolgreich verschickt!\",\n \"error\": \"{{prefix}}Telegram Nachrichten konnten nicht verschickt werden!\"\n },\n \"push\": {\n \"tooltip\": \"Push Nachrichten verschicken\",\n \"success\": \"{{prefix}}Push Nachrichten erfolgreich verschickt!\",\n \"error\": \"{{prefix}}Push Nachrichten konnten nicht verschickt werden!\"\n }\n }\n },\n \"settings\": {\n \"title\": \"Einstellungen\",\n \"changePassword\": {\n \"title\": \"Passwort ändern\",\n \"oldPassword\": {\n \"label\": \"Derzeitiges Passwort\",\n \"placeholder\": \"Derzeitiges Passwort\"\n },\n \"newPassword1\": {\n \"label\": \"Neues Passwort\",\n \"placeholder\": \"Neues Passwort\"\n },\n \"newPassword2\": {\n \"label\": \"Neues Passwort (wiederholen)\",\n \"placeholder\": \"Neues Passwort\"\n },\n \"submit\": \"Passwort ändern\",\n \"passwordChanged\": \"Passwort erfolgreich geändert\",\n \"passwordChangeError\": \"Passwort konnte nicht geändert werden\",\n \"passwordIncorrect\": \"Derzeitiges Passwort falsch\",\n \"error\": {\n \"oldPassword\": {\n \"required\": \"Bitte gib dein derzeitiges Passwort ein\"\n },\n \"newPassword\": {\n \"required\": \"Bitte gib ein neues Passwort ein\",\n \"mismatch\": \"Passwörter stimmen nicht überein\"\n }\n }\n },\n \"display\": {\n \"title\": \"Anzeige\",\n \"table\": {\n \"showCaaml\": \"CAAML anzeigen\",\n \"showJson\": \"JSON anzeigen\"\n }\n }\n },\n \"statistics\": {\n \"title\": \"Statistik\",\n \"button\": {\n \"submit\": \"Herunterladen\"\n },\n \"label\": {\n \"dateRange\": \"Zeitspanne\",\n \"extended\": \"Erweitert\",\n \"duplicates\": \"Duplikate\"\n }\n },\n\n \"dangerRating\": {\n \"noRating\": \"keine Beurteilung\",\n \"low\": \"gering\",\n \"moderate\": \"mäßig\",\n \"considerable\": \"erheblich\",\n \"high\": \"groß\",\n \"veryHigh\": \"sehr groß\"\n },\n \"avalancheProblem\": {\n \"newSnow\": \"Neuschnee\",\n \"new_snow\": \"New snow\",\n \"windSlab\": \"Triebschnee\",\n \"wind_slab\": \"Triebschnee\",\n \"persistentWeakLayers\": \"Altschnee\",\n \"persistent_weak_layers\": \"Altschnee\",\n \"wetSnow\": \"Nassschnee\",\n \"wet_snow\": \"Nassschneeproblem\",\n \"glidingSnow\": \"Gleitschnee\",\n \"gliding_snow\": \"Gleitschneeproblem\",\n \"cornices\": \"Wechten\",\n \"noDistinctAvalancheProblem\": \" Kein ausgeprägtes Lawinenproblem\",\n \"no_distinct_avalanche_problem\": \" Kein ausgeprägtes Lawinenproblem\",\n \"favourableSituation\": \"Günstige Situation\",\n \"favourable_situation\": \"Günstige Situation\"\n },\n \"dangerPattern\": {\n \"dp1\": \"gm.1: bodennahe schwachschicht\",\n \"dp2\": \"gm.2: gleitschnee\",\n \"dp3\": \"gm.3: regen\",\n \"dp4\": \"gm.4: kalt auf warm / warm auf kalt\",\n \"dp5\": \"gm.5: schnee nach langer kälteperiode\",\n \"dp6\": \"gm.6: lockerer schnee und wind\",\n \"dp7\": \"gm.7: schneearm neben schneereich\",\n \"dp8\": \"gm.8: eingeschneiter oberflächenreif\",\n \"dp9\": \"gm.9: eingeschneiter graupel\",\n \"dp10\": \"gm.10: frühjahrssituation\"\n },\n \"strategicMindset\": {\n \"title\": \"Strategisches Mindset\",\n \"assessment\": \"Große Unsicherheit\",\n \"stepping_out\": \"Verbesserung\",\n \"status_quo\": \"Status Quo\",\n \"stepping_back\": \"Verschlechterung\",\n \"entrenchment\": \"Persistent Instabil\",\n \"free_ride\": \"Günstige Situation\",\n \"high_alert\": \"High Alert\",\n \"spring_diurnal\": \"Frühjahrssituation\"\n },\n \"observationType\": {\n \"DrySnowfallLevel\": \"Trockene Schneefallgrenze\",\n \"TimeSeries\": \"Zeitreihe\",\n \"Incident\": \"Ereignis\",\n \"Profile\": \"Schneeprofil\",\n \"Closure\": \"Sperre\",\n \"Blasting\": \"Sprengung\",\n \"Avalanche\": \"Lawine\",\n \"Evaluation\": \"Evaluierung\",\n \"SimpleObservation\": \"Einfache Beobachtung\",\n \"Webcam\": \"Webcam\"\n },\n \"importantObservation\": {\n \"ForBlog\": \"Für den Blog\",\n \"SurfaceHoar\": \"Oberflächenreif\",\n \"Graupel\": \"Graupel\",\n \"StabilityTest\": \"Stabilitätstest\",\n \"IceFormation\": \"Eisbildung\",\n \"VeryLightNewSnow\": \"Sehr leichter Neuschnee\"\n },\n \"elevationTolerance\": {\n \"exact\": \"exakt\",\n \"50m\": \"±50m\",\n \"100m\": \"±100m\",\n \"200\": \"±200m\"\n },\n \"elevationPeriod\": {\n \"duringPrecipitationEvent\": \"Trockene Schneefallgrenze des gesamten Niederschlagsereignisses\",\n \"observationPeriod\": \"Trockene Schneefallgrenze zum Beobachtungszeitpunkt\"\n },\n \"aspect\": {\n \"N\": \"N\",\n \"NE\": \"NO\",\n \"E\": \"O\",\n \"SE\": \"SO\",\n \"S\": \"S\",\n \"SW\": \"SW\",\n \"W\": \"W\",\n \"NW\": \"NW\"\n },\n \"role\": {\n \"SUPERADMIN\": \"Super Administrator\",\n \"ADMIN\": \"Administrator\",\n \"FORECASTER\": \"Lawinenwarner\",\n \"FOREMAN\": \"Vorarbeiter\",\n \"OBSERVER\": \"Beobachter\"\n },\n \"tendency\": {\n \"decreasing\": \" Lawinengefahr sinkt\",\n \"steady\": \" Lawinengefahr bleibt gleich\",\n \"increasing\": \" Lawinengefahr steigt\"\n },\n \"snowpackStability\": {\n \"unknown\": \"unbekannt\",\n \"good\": \"gut\",\n \"fair\": \"mittel\",\n \"poor\": \"schlecht\",\n \"very_poor\": \"sehr schlecht\"\n },\n \"frequency\": {\n \"none\": \"(fast) keine\",\n \"few\": \"wenige\",\n \"some\": \"einige\",\n \"many\": \"viele\"\n },\n \"avalancheSize\": {\n \"small\": \"klein\",\n \"medium\": \"mittel\",\n \"large\": \"groß\",\n \"very_large\": \"sehr groß\",\n \"extreme\": \"extrem\"\n },\n \"complexity\": {\n \"easy\": \"Einfach\",\n \"challenging\": \"Fordernd\",\n \"complex\": \"Komplex\"\n },\n \"glidingSnowActivity\": {\n \"low\": \"gering\",\n \"medium\": \"mittel\",\n \"high\": \"groß\"\n },\n \"wetness\": {\n \"dry\": \"trocken\",\n \"moist\": \"feucht\",\n \"wet\": \"nass\"\n },\n \"characteristic\": {\n \"low\": \"gering\",\n \"medium\": \"mittel\",\n \"high\": \"groß\",\n \"very_high\": \"sehr groß\"\n },\n \"thickness\": {\n \"thin\": \"dünn\",\n \"thick\": \"dick\"\n },\n \"snowpackPosition\": {\n \"upper\": \"oben\",\n \"middle\": \"mittig\",\n \"lower\": \"unten\",\n \"ground\": \"Boden\"\n },\n \"weakLayerCrust\": {\n \"no\": \"nein\",\n \"partly\": \"teilweise\",\n \"yes\": \"ja\"\n },\n \"creationProcess\": {\n \"radiation_recrystallization\": \"Radiation recrystallization\",\n \"diurnal_recrystallization\": \"Diurnal recrystallization\",\n \"melt_layer_recrystallization\": \"Melt-layer recrystallization\",\n \"surface_hoar_formation\": \"Oberflächenreif\"\n },\n \"recognizability\": {\n \"very_easy\": \"sehr leicht\",\n \"easy\": \"leicht\",\n \"hard\": \"schwer\",\n \"very_hard\": \"sehr schwer\"\n },\n \"distribution\": {\n \"isolated\": \"vereinzelt\",\n \"specific\": \"eingrenzbar\",\n \"widespread\": \"weitverbreitet\"\n },\n \"probability\": {\n \"likely\": \"wahrscheinlich\",\n \"possible\": \"möglich\",\n \"unlikely\": \"unwahrscheinlich\"\n },\n \"detailedDaytime\": {\n \"evening\": \"Abend\",\n \"first_night_half\": \"Erste Nachthälfte\",\n \"second_night_half\": \"Zweite Nachthälfte\",\n \"morning\": \"Am Morgen\",\n \"forenoon\": \"Vormittag\",\n \"afternoon\": \"Nachmittag\"\n },\n \"slopeGradient\": {\n \"moderately_steep\": \"mäßig steil\",\n \"steep\": \"steil\",\n \"very_steep\": \"sehr steil\",\n \"extremely_steep\": \"extrem steil\"\n },\n \"handHardness\": {\n \"fist\": \"F\",\n \"four_fingers\": \"4F\",\n \"one_finger\": \"1F\",\n \"pencil\": \"P\",\n \"knife\": \"K\",\n \"ice\": \"I\"\n },\n \"hardnessTendency\": {\n \"decreasing\": \"unten weicher\",\n \"steady\": \"gleichmäßig\",\n \"increasing\": \"oben weicher\"\n },\n \"terrainType\": {\n \"gullies\": \"Rinnen\",\n \"bowls\": \"Mulden\",\n \"pass_areas\": \"Passlagen\",\n \"ridge_lines\": \"Kammlagen\",\n \"adjacent_to_ridge_lines\": \"kammnah\",\n \"distant_from_ridge_lines\": \"kammfern\",\n \"slope_discontinuities\": \"Geländekanten\",\n \"convex_terrain\": \"Konvexes Gelände\",\n \"concave_terrain\": \"Konkaves Gelände\",\n \"steep_terrain\": \"Steiles Gelände\",\n \"very_steep_terrain\": \"Sehr steiles Gelände\",\n \"open_terrain\": \"Offenes Gelände\",\n \"forest\": \"Wald\"\n },\n \"dangerSign\": {\n \"shooting_cracks\": \"Rissbildung\",\n \"whumpfing\": \"Setzungsgeräusche\",\n \"fresh_avalanches\": \"Frische Lawinen\"\n },\n \"changeRegionDialog\": {\n \"message\": \"Möchtest du die Region ändern?\",\n \"accept\": \"Ja\",\n \"reject\": \"Nein\"\n },\n \"zamg\": {\n \"table\": \"Tabelle\",\n \"map\": \"Karte\",\n \"region\": \"Region\",\n \"newSnow\": \"New snow\"\n },\n \"snowpack\": {\n \"plotType\": {\n \"LWC_stratigraphy\": \"Nassschnee: Wassergehalt\",\n \"wet_snow_instability\": \"Nassschnee: Stabilität nasse Schneedecke\",\n \"Sk38_stratigraphy\": \"Altschnee: SK38 Stabilitätsindex\",\n \"stratigraphy\": \"Altschnee: Schneeckenaufbau\"\n },\n \"aspect\": {\n \"flat\": \"Flachfeld\",\n \"north\": \"Nordhang\",\n \"south\": \"Südhang\"\n },\n \"meteo\": {\n \"new_snow_plot_3day\": \"Neuschnee (3T)\",\n \"new_snow_plot_7day\": \"Neuschnee (7T)\",\n \"new_snow_plot_1month\": \"Neuschnee (31T)\",\n \"new_snow_plot_season\": \"Neuschnee (Saison)\",\n \"new_snow_plot_forecast\": \"Neuschnee (Prognose)\",\n \"wet_snow_plot_3day\": \"Nassschnee (3T)\",\n \"wet_snow_plot_7day\": \"Nassschnee (7T)\",\n \"wet_snow_plot_1month\": \"Nassschnee (31T)\",\n \"wet_snow_plot_season\": \"Nassschnee (Saison)\",\n \"wet_snow_plot_forecast\": \"Nassschnee (Prognose)\",\n \"HS_table_24h\": \"Tabelle Schneehöhe (1T)\",\n \"HS_table_72h\": \"Tabelle Schneehöhe (3T)\",\n \"HS_table_season\": \"Tabelle Schneehöhe (Saison)\",\n \"HS_table_forecast\": \"Tabelle Schneehöhe (Prognose)\",\n \"TA_table_24h\": \"Tabelle Temperatur (1T)\",\n \"TA_table_72h\": \"Tabelle Temperatur (3T)\",\n \"TA_table_season\": \"Tabelle Temperatur (Saison)\"\n }\n },\n \"grainShape\": {\n \"PP\": {\n \"code\": \"PP\",\n \"class\": \"Neuschnee\"\n },\n \"PPgp\": {\n \"code\": \"PPgp\",\n \"class\": \"Graupel\"\n },\n \"DF\": {\n \"code\": \"DF\",\n \"class\": \"Filz\"\n },\n \"RG\": {\n \"code\": \"RG\",\n \"class\": \"kleine runde Kristalle\"\n },\n \"FC\": {\n \"code\": \"FC\",\n \"class\": \"kantige Kristalle\"\n },\n \"DH\": {\n \"code\": \"DH\",\n \"class\": \"Tiefenreif\"\n },\n \"SH\": {\n \"code\": \"SH\",\n \"class\": \"Oberflächenreif\"\n },\n \"MF\": {\n \"code\": \"MF\",\n \"class\": \"Schmelzformen\"\n },\n \"MFcr\": {\n \"code\": \"MFcr\",\n \"class\": \"Schmelzkruste\"\n },\n \"IF\": {\n \"code\": \"IF\",\n \"class\": \"Eislamelle\"\n }\n },\n \"button\": {\n \"yes\": \"ja\",\n \"no\": \"nein\"\n },\n \"observations\": {\n \"allowEdit\": \"Externe Beobachtung bearbeiten\",\n \"allowEditTooltip\": \"Dies verhindert das Überschreiben von {{ value }}\",\n \"editIconTooltip\": \"Exercice\",\n \"aspect\": \"Exposition\",\n \"authorName\": \"Autor Name\",\n \"avalancheLength\": \"Lawinenlänge\",\n \"avalancheProblem\": \"Lawinenproblem\",\n \"avalancheSize\": \"Lawinengröße\",\n \"avalancheType\": \"Lawinenart\",\n \"avalancheWidth\": \"Lawinenbreite\",\n \"search\": \"Suchen\",\n \"count\": \"# Beobachtungen:\",\n \"elevationTolerance\": \"Genauigkeit der Höhenangabe\",\n \"elevationPeriod\": \"Zeitraum der Beobachtung\",\n \"layers\": {\n \"observers\": \"Beobachter\",\n \"weatherStations\": \"Wetterstationen\",\n \"webcams\": \"Webcams\",\n \"observations\": \"Beobachtungen\"\n },\n \"weatherStations\": {\n \"tooltips\": {\n \"drySnowfallLevel\": \"Trockene Schneefallgrenze\",\n \"globalRadiation\": \"Globalstrahlung\",\n \"newSnow\": \"Neuschnee\",\n \"snowLine\": \"Schneefallgrenze\",\n \"snowHeight\": \"Schneehöhe\",\n \"snowDifference\": \"Schneehöhendifferenz\",\n \"airTemperature\": \"Lufttemperatur\",\n \"airTemperatureMax\": \"Maximale Lufttemperatur\",\n \"airTemperatureMin\": \"Minimale Lufttemperatur\",\n \"surfaceTemperature\": \"Oberflächentemperatur\",\n \"surfaceHoar\": \"Potential zur Oberflächenreifbildung\",\n \"surfaceHoarCalc\": \"Potential zur Oberflächenreifbildung (Lehning et. al.)\",\n \"dewPoint\": \"Taupunkt-Temperatur\",\n \"relativeHumidity\": \"Relative Luftfeuchtigkeit\",\n \"windDirection\": \"Windrichtung\",\n \"windSpeed\": \"Windgeschwindigkeit\",\n \"windGust\": \"Wind Böe\"\n }\n },\n \"button\": {\n \"add\": \"Beobachtung erstellen\",\n \"save\": \"Beobachtung speichern\",\n \"delete\": \"Beobachtung löschen\",\n \"deleteConfirm\": \"Beobachtung wirklich löschen?\",\n \"discard\": \"Verwerfen\",\n \"copyDate\": \"Ereignisdatum kopieren\"\n },\n \"comment\": \"Kommentar\",\n \"content\": \"Inhalt\",\n \"dangerRating\": \"Gefahrenstufe\",\n \"elevation\": \"Seehöhe\",\n \"elevationRange\": \"Höhenband\",\n \"elevationLowerBound\": \"Untere Höhengrenze\",\n \"elevationUpperBound\": \"Obere Höhengrenze\",\n \"eventDate\": \"Ereignisdatum\",\n \"eventType\": \"Ereignisart\",\n \"eventTypes\": {\n \"IMPORTANT\": \"Wichtiges Ereignis\",\n \"NEIGHBOR_REGION\": \"Nachbarregion\",\n \"NORMAL\": \"Normales Ereignis\",\n \"PERSON_DEAD\": \"Personenbeteiligung (tot)\",\n \"PERSON_INJURED\": \"Personenbeteiligung (verletzt)\",\n \"PERSON_NO\": \"Keine Personenbeteiligung\",\n \"PERSON_UNINJURED\": \"Personenbeteiligung (unverletzt)\",\n \"PERSON_UNKNOWN\": \"Ereignis (unbekannt)\",\n \"TRAFFIC\": \"Verkehr\"\n },\n \"externalURL\": \"Externe URL (z.B. in Bilder-Datenbank)\",\n \"fractureDepth\": \"Anrisshöhe\",\n \"hasCoordinates\": \"Koordinaten vorhanden\",\n \"incline\": \"Hangneigung\",\n \"latitude\": \"Breitengrad\",\n \"locationName\": \"Ort\",\n \"longitude\": \"Längengrad\",\n \"observationType\": \"Beobachtungstyp\",\n \"personInvolvement\": \"Personenbeteiligung\",\n \"reportDate\": \"Meldedatum\",\n \"showTable\": \"Tabelle\",\n \"withoutCoordinates\": \"Beobachtungen ohne Koordinaten:\",\n \"sidebar\": {\n \"filter\": {\n \"title\": \"Filter\"\n },\n \"legend\": {\n \"title\": \"Legende\"\n },\n \"sources\": {\n \"title\": \"Datenquellen\"\n },\n \"views\": {\n \"title\": \"Ansichten\"\n }\n }\n },\n \"personInvolvement\": {\n \"Dead\": \"Personenbeteiligung (tot)\",\n \"Injured\": \"Personenbeteiligung (verletzt)\",\n \"No\": \"Keine Personenbeteiligung\",\n \"Uninjured\": \"Personenbeteiligung (unverletzt)\",\n \"Unknown\": \"Ereignis (unbekannt)\"\n },\n \"units\": {\n \"cm\": \"cm\",\n \"mm\": \"mm\",\n \"m\": \"m\"\n },\n \"qfa\": {\n \"day\": \"Kalendertag\",\n \"time\": \"Zeit\",\n \"back\": \" Zurück\",\n \"parameters\": {\n \"DUST\": \"Saharastaub\",\n \"N\": \"Gesamtbewölkung in /8\",\n \"Nh\": \"hohe Bewölkung in /8\",\n \"Nm\": \"mittelhohe Bewölkung in /8\",\n \"Nl\": \"niedrige Bewölkung in /8\",\n \"N-CU\": \"Cumulusbewölkung in /8\",\n \"AUSL.T\": \"Triggertemperatur\",\n \"SHW-IX\": \"Showalter-Index\",\n \"WX -CUF\": \"signifikantes Wetter: NIL (keine), RASH (Regen), TS (Gewitter)\",\n \"RR\": \"Gesamtniederschlag [mm]\",\n \"RR-str\": \"schichtweiser Niederschlag\",\n \"CONV\": \"konvektiver Niederschlag [mm]\",\n \"SN\": \"Niederschlag in Form von Schnee [mm]\",\n \"SN--RA\": \"Schneefallgrenze [m]\",\n \"QAO \": \"{{value}} hPa eq. Mittelwind, Windrichtung und -stärke, [°] und [m/s]\",\n \"QAN\": \"Mittlerer Bodenwind, Windrichtung aund -stärke, [°] und [m/s]\",\n \"QANmax\": \"Bodenwind max. (Böe) [m/s]\",\n \"T \": \"{{value}} hPa equivalente Temperatur [°C]\",\n \"T m\": \"Temperatur auf {{value}}m [°C]\",\n \"T 2m\": \"Temperatur auf 2m [°C]\",\n \"Tk 2m\": \"Temperatur auf 2m [°K]\",\n \"T GND\": \"Bodentemperatur\",\n \"Max-ADI\": \"maximum mixing temperature [°C]\",\n \"Min Max\": \"Minimum/Maximum Temperatur der letzten 24h\",\n \"FROST\": \"Nullgrad Grenze [m]\",\n \"W cm\": \"500 hPa equivalent vertikaler Wind [cm/s]\",\n \"W --\": \"700 hPa equivalent vertikaler Wind [cm/s]\",\n \"W s\": \"{{value}} hPa equivalent vertikaler Wind [cm/s]\",\n \"H \": \"{{value}} hPa geopotentielle Höhe [m]\",\n \"RF \": \"{{value}} hPa equivalente relative Feuchte [%]\"\n }\n }\n}\n","{\n \"daytime\": {\n \"earlier\": \"Earlier\",\n \"later\": \"Later\"\n },\n \"login\": {\n \"title\": \"Login\",\n \"text\": \"Sign In to your account\",\n \"button\": \"Login\",\n \"stressLevel\": \"Stress Level\",\n \"errorDialog\": {\n \"message\": \"Incorrect username or password!\",\n \"accept\": \"Ok\"\n },\n \"placeholder\": {\n \"username\": \"Please enter your username\",\n \"password\": \"Please enter your password\"\n }\n },\n \"sidebar\": {\n \"bulletins\": \"Avalanche.report\",\n \"dangerSources\": \"Danger Sources\",\n \"observations\": \"Observations\",\n \"qfa\": \"QFA\",\n \"modelling\": \"Modelling\",\n \"modellingForecast\": \"Forecast\",\n \"modellingZamg\": \"ZAMG multi model\",\n \"modellingZamgECMWF\": \"ZAMG ECMWF-EPS\",\n \"modellingZamgCLAEF\": \"ZAMG CLAEF-EPS\",\n \"modellingZamgMeteogram\": \"GeoSphere meteogram\",\n \"modellingSnowpack\": \"SNOWPACK model\",\n \"modellingSnowpackMeteo\": \"SNOWPACK modelled meteo\",\n \"weatherbox\": \"Weatherbox\",\n \"awsome\": \"AWSOME\",\n \"snowpack\": \"SNOWPACK\",\n \"geosphere\": \"GeoSphere\"\n },\n \"menu\": {\n \"logout\": \"Logout\",\n \"language\": \"Language\",\n \"en\": \"English\",\n \"de\": \"German\",\n \"fr\": \"French\",\n \"it\": \"Italian\",\n \"es\": \"Spanish\",\n \"ca\": \"Catalan\",\n \"oc\": \"Aranese\",\n \"fullscreen\": \"Fullscreen\",\n \"settings\": \"Settings\",\n \"statistics\": \"Statistics\",\n \"admin\": \"Admin\",\n \"region\": \"Region\",\n \"education\": \"Education\"\n },\n \"matrix\": {\n \"label\": {\n \"snowpackStability\": \"Snowpack Stability\",\n \"frequency\": \"Frequency\",\n \"avalancheSize\": \"Avalanche Size\",\n \"dangerRating\": \"Danger Rating\",\n \"override\": \"(override danger rating)\",\n \"matrix\": \"Matrix\",\n \"referToFairStability\": \"Refer to fair stability\",\n \"referToPoorStability\": \"Refer to poor stability\",\n \"dangerLevel1\": \"Danger level 1 (Low)\"\n }\n },\n \"dangerSources\": {\n \"status\": {\n \"missing\": \"missing\",\n \"available\": \"available\",\n \"forecast\": \"forecast\",\n \"analysis\": \"analysis\",\n \"loading\": \"Loading danger sources ...\",\n \"saveError\": \"Danger source could not be saved!\",\n \"loadDangerSourcesError\": \"Danger sources could not be loaded!\",\n \"loadVariantsError\": \"Danger source variants could not be loaded!\"\n },\n \"variantStatus\": {\n \"active\": \"active\",\n \"dormant\": \"dormant\",\n \"inactive\": \"inactive\"\n },\n \"tooltip\": {\n \"read\": \"Read danger sources\",\n \"edit\": \"Edit danger sources\"\n },\n \"table\": {\n \"loadMore\": \"Load {{count}} more days\",\n \"title\": {\n \"forecast\": \"Forecast\",\n \"analysis\": \"Analysis\"\n }\n },\n \"create\": {\n \"variantStatus\": \"Status\",\n \"variantEditable\": \"This variant can be edited.\",\n \"variantNotEditable\": \"This variant can not be edited.\",\n \"noVariantsForSelectedDay\": \"No variants defined for this date.\",\n \"tooltip\": {\n \"editDangerSource\": \"Edit danger source\",\n \"loadVariants\": \"Load variants from the day before\",\n \"edit\": \"Edit micro regions\",\n \"copy\": \"Copy variant\",\n \"delete\": \"Delete variant\",\n \"compare\": \"Compare variant\",\n \"forecast\": \"Compare with forecast\"\n },\n \"createDangerSource\": \"Create danger source\",\n \"createVariant\": \"Create new variant\",\n \"noDangerSources\": \"No danger sources\",\n \"title\": {\n \"avalanche\": \"Avalanche\",\n \"matrix\": \"Matrix\",\n \"characteristics\": \"Characteristics\",\n \"comment\": \"Comment\"\n },\n \"label\": {\n \"glidingSnowActivity\": \"Gliding snow activity\",\n \"snowHeight\": \"Snow height\",\n \"snowHeightAverage\": \"Average snow height\",\n \"zeroDegreeIsotherm\": \"0°C isotherm\",\n \"looseSnowMoisture\": \"Loose snow moisture\",\n \"looseSnowGrainShape\": \"Loose snow grain shape\",\n \"slabGrainShape\": \"Slab grain shape\",\n \"slabThickness\": \"Slab thickness\",\n \"slabHandHardness\": \"Slab hand hardness\",\n \"slabHardnessProfile\": \"Slab hardness\",\n \"slabEnergyTransferPotential\": \"Slab energy transfer potential\",\n \"slabDistribution\": \"Slab distribution\",\n \"weakLayerGrainShape\": \"Weak layer grain shape\",\n \"weakLayerGrainSize\": \"Weak layer grain size\",\n \"weakLayerPersistent\": \"Weak layer persistent\",\n \"weakLayerThickness\": \"Weak layer thickness\",\n \"weakLayerStrength\": \"Weak layer strength\",\n \"weakLayerWet\": \"Weak layer wet\",\n \"weakLayerCrustAbove\": \"Weak layer crust above\",\n \"weakLayerCrustBelow\": \"Weak layer crust below\",\n \"weakLayerPosition\": \"Weak layer position\",\n \"weakLayerCreation\": \"Weak layer creation\",\n \"weakLayerDistribution\": \"Weak layer distribution\",\n \"dangerSpotRecognizability\": \"Danger spot recognizability\",\n \"remoteTriggering\": \"Remote triggering\",\n \"hasDaytimeDependency\": \"Daytime dependency\",\n \"dangerIncreaseWithElevation\": \"Danger increase with elevation\",\n \"runoutIntoGreen\": \"Runout into green\",\n \"highestDangerAspect\": \"Highest danger aspect\",\n \"dangerPeak\": \"Danger peak\",\n \"slopeGradient\": \"Slope gradient\",\n \"naturalRelease\": \"Natural release\",\n \"terrainTypes\": \"Terrain types\",\n \"dangerSigns\": \"Danger signs\",\n \"aspects\": \"Aspects\"\n },\n \"editVariantDialog\": {\n \"save\": \"Save\",\n \"cancel\": \"Cancel\"\n },\n \"deleteVariantDialog\": {\n \"message\": \"Do you want to delete this variant?\",\n \"accept\": \"Yes\",\n \"reject\": \"No\"\n },\n \"noRegionDialog\": {\n \"message\": \"At least one micro-region has to be yours.\",\n \"accept\": \"Ok\"\n },\n \"discardDialog\": {\n \"message\": \"Do you want to discard the changes?\",\n \"accept\": \"Yes\",\n \"reject\": \"No\"\n },\n \"saveErrorDialog\": {\n \"message\": \"There was an error saving the danger sources!\",\n \"accept\": \"Ok\"\n },\n \"loadDialog\": {\n \"message\": \"Do you want to load all danger source variants from the day before?\",\n \"accept\": \"Yes\",\n \"reject\": \"No\"\n }\n }\n },\n \"avalancheType\": {\n \"title\": \"Avalanche type\",\n \"label\": {\n \"slab\": \"SLAB\",\n \"loose\": \"LOOSE\",\n \"glide\": \"GLIDE\"\n },\n \"tooltip\": {\n \"slab\": \"Slab avalanche\",\n \"loose\": \"Loose snow avalanche\",\n \"glide\": \"Glide snow avalanche\"\n }\n },\n \"elevation\": {\n \"title\": \"Elevation\",\n \"high\": \"Below\",\n \"low\": \"Above\",\n \"treeline\": \"Treeline\"\n },\n \"bulletins\": {\n \"title\": \"Avalanche.report\",\n \"tooltip\": {\n \"edit\": \"Edit bulletin\",\n \"read\": \"Read bulletin\",\n \"copy\": \"Copy bulletin\",\n \"paste\": \"Paste bulletin\",\n \"cancel\": \"Cancel copy\",\n \"update\": \"Edit\",\n \"submit\": \"Submit\",\n \"submitUpdate\": \"Submit update\",\n \"publishChange\": \"Publish now (no messages)\",\n \"publishUpdate\": \"Publish now\",\n \"caaml\": \"Show CAAML\",\n \"json\": \"Show JSON\",\n \"create\": \"Create bulletin\",\n \"preview\": \"Preview bulletin (PDF)\",\n \"check\": \"Check bulletin\",\n \"info\": \"Show publication status\",\n \"loadSuggestionFromDangerSources\": \"Load suggestion\",\n \"deleteAllWarningRegions\": \"Delete all warning regions\",\n \"publishAll\": \"Publish all regions\",\n \"mediaFile\": \"Upload media file\"\n },\n \"status\": {\n \"submittedInfo\": \"Will be published at 5PM\",\n \"resubmittedInfo\": \"Will be published at 8AM\",\n \"publishedInfo\": \"Has been published\",\n \"noPublicationInfo\": \"Will NOT be published automatically\",\n \"loadingPreview\": \"Creating PDF preview ...\",\n \"loading\": \"Loading bulletin ...\",\n \"loadMoreBulletins\": \"Load {{count}} more bulletins\",\n \"publishing\": \"Publishing bulletin ...\",\n \"submitting\": \"Submitting bulletin ...\",\n \"saveError\": \"Bulletin could not be saved!\",\n \"loadBulletinsError\": \"Bulletins could not be loaded!\"\n },\n \"create\": {\n \"tooltip\": {\n \"edit\": \"Edit micro regions\",\n \"copy\": \"Copy region\",\n \"delete\": \"Delete region\",\n \"compare\": \"Compare region\",\n \"undo\": \"Undo last change in region\",\n \"redo\": \"Redo change in region\",\n \"createRegion\": \"Create region\",\n \"cancel\": \"Cancel\",\n \"acceptSuggestion\": \"Accept suggested regions\",\n \"rejectSuggestion\": \"Decline suggested regions\",\n \"saveChanges\": \"Save changes\",\n \"discardChanges\": \"Discard changes\",\n \"incompleteAvalancheProblem\": \"Incomplete avalanche problem\",\n \"saveBulletin\": \"Save bulletin\",\n \"discardBulletin\": \"Discard bulletin changes\",\n \"loadBulletin\": \"Load bulletin from the day before\",\n \"uploadJsonBulletin\": \"Upload bulletin in JSON format\",\n \"downloadJsonBulletin\": \"Download bulletin in JSON format\",\n \"daytimeDependency\": \"Daytime dependency\",\n \"treeline\": \"Treeline\",\n \"tendency\": {\n \"decreasing\": \"Avalanche danger decreases\",\n \"steady\": \"Avalanche danger stays the same\",\n \"increasing\": \"Avalanche danger increases\",\n \"danger\": \"Avalanche danger\"\n },\n \"textcat\": {\n \"edit\": \"Edit\",\n \"copy\": \"Copy\",\n \"paste\": \"Paste\",\n \"example\": \"Load example text\",\n \"delete\": \"Delete\"\n },\n \"moveUpAvalancheProblem\": \"Move avalanche problem up\",\n \"moveDownAvalancheProblem\": \"Move avalanche problem down\",\n \"dangerRatingDirectionUp\": \"Upwards\",\n \"dangerRatingDirectionDown\": \"Downwards\"\n },\n \"save\": \" Save\",\n \"discard\": \" Discard\",\n \"back\": \" Back\",\n \"createAggregatedRegion\": \" New region\",\n \"pasteAggregatedRegion\": \" Paste region\",\n \"pendingSuggestions\": \"Suggestions\",\n \"rejectSuggestion\": \"Reject\",\n \"acceptSuggestion\": \"Accept\",\n \"cancelCopyBulletin\": \" Cancel\",\n \"createAvalancheProblem\": \" New problem\",\n \"ownRegions\": \"Own regions\",\n \"foreignRegions\": \"Foreign regions\",\n \"externalRegions\": \"External regions\",\n \"mapSelectRegion\": \"Select regions on the map.\",\n \"statusHeader\": \"Status of the bulletin\",\n \"suggestions\": \"Suggestions\",\n \"noBulletinsForSelectedDay\": \"No regions defined for this date.\",\n \"autosave\": \"Saved automatically\",\n \"regionEditable\": \"This region can be edited.\",\n \"regionNotEditable\": \"This region can not be edited.\",\n \"regionLocked\": \"This region is locked.\",\n \"changeDangerRatingElevation\": \"Extend the danger level\",\n \"mapTop\": \"Map above\",\n \"mapLeft\": \"Map aside\",\n \"showNotes\": \"Show notes\",\n \"hideNotes\": \"Hide notes\",\n \"incompleteAvalancheProblem\": \"Incomplete\",\n \"label\": {\n \"importantObservations\": \"Important observations\",\n \"avalancheProblems\": \"Avalanche problem\",\n \"aspects\": \"Aspects\",\n \"highlights\": \"Special alert\",\n \"avActivityHighlights\": \"Headline avalanche situation\",\n \"avActivityComment\": \"Description of avalanche danger\",\n \"snowpackStructureComment\": \"Description of snowpack structure\",\n \"dangerPatterns\": \"Danger patterns\",\n \"tendencyComment\": \"Description of tendency\",\n \"notes\": \"Notes\"\n },\n \"copyRegion\": {\n \"label\": \"Copy warning region to another bulletin\",\n \"select\": \"Paste into ...\",\n \"currentBulletin\": \"This bulletin\"\n },\n \"title\": {\n \"avalancheProblem\": \"Avalanche problems\",\n \"dangerDescription\": \"Description of avalanche danger\",\n \"forenoon\": \"Forenoon\",\n \"afternoon\": \"Afternoon\",\n \"snowpackStructure\": \"Snowpack structure\",\n \"tendency\": \"Tendency\",\n \"showTranslations\": \" Show translations\",\n \"hideTranslations\": \" Hide translations\"\n },\n \"placeholder\": {\n \"notes\": \"Write your notes here ...\"\n },\n \"pmDialog\": {\n \"noIFrameSupport\": \"Your browser does not support IFrames!\"\n },\n \"discardDialog\": {\n \"message\": \"Do you want to discard the changes?\",\n \"accept\": \"Yes\",\n \"reject\": \"No\"\n },\n \"deleteAggregatedRegionDialog\": {\n \"message\": \"Do you want to delete this region?\",\n \"accept\": \"Yes\",\n \"reject\": \"No\"\n },\n \"noRegionDialog\": {\n \"message\": \"At least one micro-region has to be yours.\",\n \"accept\": \"Ok\"\n },\n \"loadDialog\": {\n \"message\": \"Do you want to load the bulletins from the day before?\",\n \"accept\": \"Yes\",\n \"reject\": \"No\"\n },\n \"deleteAllWarningRegionsDialog\": {\n \"message\": \"Do you want to delete all warning regions?\",\n \"accept\": \"Yes\",\n \"reject\": \"No\"\n },\n \"loadAutoSaveDialog\": {\n \"message\": \"Do you want to load the automatically saved bulletins?\",\n \"accept\": \"Yes\",\n \"reject\": \"No\"\n },\n \"saveErrorDialog\": {\n \"message\": \"There was an error saving the bulletins!\",\n \"accept\": \"Ok\"\n },\n \"changeErrorDialog\": {\n \"message\": \"There was an error changing the bulletins!\",\n \"accept\": \"Ok\"\n },\n \"loadingErrorDialog\": {\n \"message\": \"There was an error loading the bulletins!\",\n \"accept\": \"Ok\"\n },\n \"loadingJsonFileErrorDialog\": {\n \"message\": \"There was an error loading the bulletins from the JSON file!\",\n \"accept\": \"Ok\"\n },\n \"avalancheProblemErrorDialog\": {\n \"message\": \"Avalanche problem, aspects, snowpack stability, frequency and/or avalanche size is missing for at least one avalanche problem\",\n \"accept\": \"Ok\"\n },\n \"loadAvActivityCommentExampleTextDialog\": {\n \"message\": \"For which situation do you want to load an example text?\",\n \"newSnow\": \"New snow\",\n \"windSlab\": \"Wind slab\",\n \"persistentWeakLayers\": \"Persistent weak layers\",\n \"wetSnow\": \"Wet snow\",\n \"glidingSnow\": \"Gliding snow\",\n \"favourableSituation\": \"Favourable situation\",\n \"cancel\": \"Cancel\"\n },\n \"removeDaytimeDependencyDialog\": {\n \"message\": \"Which avalanche problems do you want to keep?\",\n \"cancel\": \"Cancel\"\n },\n \"strategicMindsetDialog\": {\n \"title\": \"Strategic Mindsets\",\n \"introduction\": \"The \\\"Strategic Mindsets\\\" are intended to express our mental attitude with regard to the avalanche situation and its development in the corresponding warning region. It should not be derived directly from the hazard assessment, but rather understood and used as an intuitive impression of the overall situation. The \\\"Strategic Mindsets\\\" are therefore primarily a communication tool. Using the mindsets and associated definitions, we forecasters can quickly and efficiently exchange information about the development of the hazard situation and find a common language for communication.\",\n \"description\": {\n \"title\": \"Description:\",\n \"text\": {\n \"assessment\": \"There is great uncertainty in the hazard assessment due to insufficient information from the field.\",\n \"stepping_out\": \"Decreasing tendency of the hazard situation (also within a danger level).\",\n \"status_quo\": \"Same hazardous situation. No significant change compared to the previous day.\",\n \"stepping_back\": \"Increasing tendency of the hazard situation (also within a danger level).\",\n \"entrenchment\": \"Almost constant, tense hazardous situation. The main danger comes from (a) persistent weak layer(s) susceptible to interference.\",\n \"free_ride\": \"Low avalanche danger with generally stable snow cover. Only small avalanches are possible in extremely steep terrain. \",\n \"high_alert\": \"Exceptional situation with high or very high avalanche danger. Spontaneous avalanches of very large or extreme magnitude are possible\",\n \"spring_diurnal\": \"Wet snow avalanches during the course of the day, which are subject to a clear diurnal cycle, are decisive for the risk assessment.\"\n }\n },\n \"communication\": {\n \"title\": \"Communication:\",\n \"text\": {\n \"assessment\": \"Avalanche situation must be checked locally. Restraint is recommended.\",\n \"stepping_out\": \"Gradual decrease in danger. However, caution is still required and the improving situation should be assessed locally before entering riskier terrain. \",\n \"status_quo\": \"Hazardous situation is unchanged. Feedback from observers helps to better outline the hazardous situation. More favourable terrain should be communicated with emphasis. \",\n \"stepping_back\": \"Clear communication of the increase in avalanche danger - even within a danger level. Information on the causes supports comprehensibility in communication. \",\n \"entrenchment\": \"Caution and restraint are required. Situation hardly changes. If possible, provide as precise information as possible on distribution and possibility to trigger. Increased communication of observations that reveal the situation and trigger restraint.\",\n \"free_ride\": \"Little text. Emphasise the generally favourable overall situation and potentially isolated hazard areas\",\n \"high_alert\": \"Communication across all channels. The focus is no longer on winter sports. Danger even in areas that are not usually at risk of avalanches.\",\n \"spring_diurnal\": \"Favourable situation in the morning, increasing during the day. Assessment should be made locally by observing the softening of the melt-freeze crust and the increasing soaking of the snow cover.\"\n }\n },\n \"examples\": {\n \"title\": \"Examples:\",\n \"text\": {\n \"assessment\": \"Start of the season.\",\n \"stepping_out\": \"Cooling leads to a decrease in the risk of wet snow avalanches after a warm and humid weather phase.\",\n \"status_quo\": \"Consistent wind-slab problem with cold temperatures, loose snow and wind.\",\n \"stepping_back\": \"Abundant fresh snowfall leads to an increase in the danger situation.\",\n \"entrenchment\": \"Critical persistent weak layers problem with potential for dangerously large avalanches. The situation is only stabilising very slowly and requires a great deal of restraint.\",\n \"free_ride\": \"Low avalanche danger, no persistent weak layers, all terrain has already been groomed.\",\n \"high_alert\": \"Danger level 4 or higher due to large amounts of fresh snow and/or problematic, persistent weak layers. \",\n \"spring_diurnal\": \"Spring situation with dry high-pressure weather and moderate temperatures with otherwise mostly stable old snow cover.\"\n }\n },\n \"strategicMindset\": {\n \"assessment\": \"High Uncertainty\",\n \"stepping_out\": \"Improving\",\n \"status_quo\": \"Status Quo\",\n \"stepping_back\": \"Deteriorating\",\n \"entrenchment\": \"Persistent Unstable\",\n \"free_ride\": \"Favorable\",\n \"high_alert\": \"High Alert\",\n \"spring_diurnal\": \"Spring Diurnal\"\n }\n },\n \"decisionTree\": {\n \"filepath\": \"./assets/img/decision_tree-en.svg\",\n \"feedbackURL\": \"https://admin.avalanche.report/umfrage-entscheidungsbaum/en/\",\n \"decisionTree\": \"Decision tree\",\n \"feedback\": \"Feedback\",\n \"save\": \"Save\",\n \"discard\": \"Discard\"\n }\n },\n \"table\": {\n \"title\": {\n \"date\": \"Date\",\n \"status\": {\n \"AT-02\": \"Carinthia\",\n \"AT-03\": \"Lower Austria\",\n \"AT-04\": \"Upper Austria\",\n \"AT-05\": \"Salzburg\",\n \"AT-06\": \"Styria\",\n \"AT-07\": \"Tyrol\",\n \"AT-08\": \"Vorarlberg\",\n \"CH\": \"Switzerland\",\n \"DE-BY\": \"Bavaria\",\n \"GEOSPHERE\": \"GEOSPHERE\",\n \"IT-32-TN\": \"Trentino\",\n \"IT-32-BZ\": \"South Tyrol\",\n \"ES-CT-L\": \"Aran\"\n }\n },\n \"status\": {\n \"missing\": \"missing\",\n \"draft\": \"draft\",\n \"submitted\": \"submitted\",\n \"published\": \"published\",\n \"updated\": \"updated\",\n \"resubmitted\": \"resubmitted\",\n \"republished\": \"republished\"\n },\n \"publishBulletinsDialog\": {\n \"message\": \"Do you want to publish the bulletin?\",\n \"missingDangerRating\": \"Danger rating not set\",\n \"missingRegion\": \"Regions not rated\",\n \"duplicateRegion\": \"Regions rated multiple times\",\n \"missingAvActivityHighlights\": \"Headline avalanche situation missing\",\n \"missingAvActivityComment\": \"Description of avalanche danger missing\",\n \"missingSnowpackStructureHighlights\": \"Headline snowpack structure missing\",\n \"missingSnowpackStructureComment\": \"Description of snowpack structure missing\",\n \"pendingSuggestions\": \"Pending suggestions\",\n \"incompleteTranslation\": \"Incomplete translation\",\n \"accept\": \"Yes\",\n \"reject\": \"No\"\n },\n \"publicationStatusDialog\": {\n \"headline\": \"Publication Status\",\n \"publishedBy\": \"Published by: \",\n \"publishedAt\": \"Published at: \",\n \"validFor\": \"Valid for: \",\n \"title\": {\n \"prod\": \"Serious stuff\",\n \"test\": \"Test system\",\n \"task\": \"Task\",\n \"language\": {\n \"all\": \"ALL\",\n \"de\": \"DE\",\n \"it\": \"IT\",\n \"en\": \"EN\"\n }\n },\n\n \"email\": {\n \"label\": \"Emails\",\n \"tooltip\": \"Send Emails\",\n \"success\": \"{{prefix}}Emails successfully sent!\",\n \"error\": \"{{prefix}}Emails could not be sent!\"\n },\n \"telegram\": {\n \"label\": \"Telegram Messages\",\n \"tooltip\": \"Send Telegram Messages\",\n \"success\": \"{{prefix}}Telegram Messages successfully sent!\",\n \"error\": \"{{prefix}}Telegram Messages could not be sent!\"\n },\n \"push\": {\n \"label\": \"Push Notifications\",\n \"tooltip\": \"Send Push Notifications\",\n \"success\": \"{{prefix}}Push Notifications successfully sent!\",\n \"error\": \"{{prefix}}Push Notifications could not be sent!\"\n },\n \"accept\": \"Ok\"\n },\n \"mediaFileDialog\": {\n \"headline\": \"Media File\",\n \"important\": \"IMPORTANT\",\n \"missingFile\": \"No file selected!\",\n \"uploadError\": \"Upload failed!\",\n \"accept\": \"Send\",\n \"reject\": \"Cancel\"\n },\n \"publishBulletinsErrorDialog\": {\n \"message\": \"There was an error publishing the bulletins!\",\n \"accept\": \"Ok\"\n },\n \"submitBulletinsDialog\": {\n \"message\": \"Do you want to submit the bulletin?\",\n \"missingDangerRating\": \"Danger rating not set\",\n \"missingRegion\": \"Regions not rated\",\n \"missingAvActivityHighlights\": \"Headline avalanche situation missing\",\n \"missingAvActivityComment\": \"Description of avalanche danger missing\",\n \"missingSnowpackStructureHighlights\": \"Headline snowpack structure missing\",\n \"missingSnowpackStructureComment\": \"Description of snowpack structure missing\",\n \"pendingSuggestions\": \"Pending suggestions\",\n \"accept\": \"Yes\",\n \"reject\": \"No\"\n },\n \"submitBulletinsErrorDialog\": {\n \"message\": \"There was an error submitting the bulletins!\",\n \"accept\": \"Ok\"\n },\n \"submitBulletinsDuplicateRegionDialog\": {\n \"message\": \"Regions rated multiple times! Bulletin can not be submitted.\",\n \"accept\": \"Ok\"\n },\n \"checkBulletinsErrorDialog\": {\n \"message\": \"There was an error checking the bulletins!\",\n \"accept\": \"Ok\"\n },\n \"previewErrorDialog\": {\n \"message\": \"Preview could not be loaded!\",\n \"accept\": \"Ok\"\n },\n \"checkBulletinsDialog\": {\n \"message\": \"Check bulletin\",\n \"missingDangerRating\": \"Danger rating not set\",\n \"missingRegion\": \"Regions not rated\",\n \"missingAvActivityHighlights\": \"Headline avalanche situation missing\",\n \"missingAvActivityComment\": \"Description of avalanche danger missing\",\n \"missingSnowpackStructureHighlights\": \"Headline snowpack structure missing\",\n \"missingSnowpackStructureComment\": \"Description of snowpack structure missing\",\n \"pendingSuggestions\": \"Pending suggestions\",\n \"incompleteTranslation\": \"Incomplete translation\",\n \"ok\": \"(everything alright)\",\n \"accept\": \"Ok\"\n },\n \"publishAllDialog\": {\n \"message\": \"Do you want to publish all regions?\",\n \"accept\": \"Yes\",\n \"reject\": \"No\"\n }\n }\n },\n \"training\": {\n \"training\": \"Training\",\n \"timestamp\": \"Training timestamp\"\n },\n \"admin\": {\n \"loadingStatistics\": \"Creating CSV ...\",\n \"server-configuration\": {\n \"title\": \"Server\",\n \"button\": {\n \"create\": \"Create server\",\n \"save\": \"Save\"\n },\n \"table\": {\n \"name\": \"Name\",\n \"username\": \"Username\",\n \"password\": \"Password\",\n \"publishAt5PM\": \"Publish at 5PM\",\n \"publishAt8AM\": \"Publish at 8AM\",\n \"pdfDirectory\": \"Directory for PDF\",\n \"htmlDirectory\": \"Directory for HTML\",\n \"serverImagesUrl\": \"Path to server images\",\n \"dangerLevelElevationDependency\": \"Elevation dependency of danger level\",\n \"mapsPath\": \"Path to maps\",\n \"mediaPath\": \"Path to media files\",\n \"mapProductionUrl\": \"URL for map production\",\n \"apiUrl\": \"API URL\"\n },\n \"success\": \"Configuration successfully saved\",\n \"error\": \"Configuration could not be saved\"\n },\n \"region-configuration\": {\n \"title\": \"Region\",\n \"button\": {\n \"create\": \"Create region\",\n \"save\": \"Save\"\n },\n \"table\": {\n \"general\": {\n \"title\": \"General\",\n \"id\": \"ID\",\n \"microRegions\": \"Number of micro regions\",\n \"subRegions\": \"Sub regions\",\n \"superRegions\": \"Super regions\",\n \"neighborRegions\": \"Neighbouring regions\"\n },\n \"publication\": {\n \"title\": \"Publication\",\n \"publishBulletins\": \"Publish avalanche forecast\",\n \"publishBlogs\": \"Publish blog posts\",\n \"createCaamlV5\": \"Create CAAML v5\",\n \"createCaamlV6\": \"Create CAAML v6\",\n \"createJson\": \"Create JSON\",\n \"createMaps\": \"Create maps\",\n \"createPdf\": \"Create PDF\",\n \"sendEmails\": \"Send emails\",\n \"createSimpleHtml\": \"Create simple HTML\",\n \"sendTelegramMessages\": \"Send telegram messages\",\n \"sendPushNotifications\": \"Send push notifications\",\n \"pdfColor\": \"PDF color\",\n \"emailColor\": \"Email color\",\n \"pdfMapYAmPm\": \"Y for PDF map (am/pm)\",\n \"pdfMapYFd\": \"Y for PDF map (fd)\",\n \"pdfMapWidthAmPm\": \"Map width for PDF (am/pm)\",\n \"pdfMapWidthFd\": \"Map width for PDF (fd)\",\n \"pdfMapHeight\": \"Map height for PDF\",\n \"pdfFooterLogo\": \"Logo for PDF footer\",\n \"pdfFooterLogoColorPath\": \"Logo for PDF footer (color)\",\n \"pdfFooterLogoBwPath\": \"Logo for PDF footer (bw)\",\n \"mapXmax\": \"Map X max\",\n \"mapXmin\": \"Map X min\",\n \"mapYmax\": \"Map Y max\",\n \"mapYmin\": \"Map Y min\",\n \"simpleHtmlTemplateName\": \"Simple HTML template\",\n \"geoDataDirectory\": \"Geodata directory\",\n \"mapLogoColorPath\": \"Logo for map (color)\",\n \"mapLogoBwPath\": \"Logo for map (bw)\",\n \"mapLogoPosition\": \"Logo position for map\",\n \"mapCenterLat\": \"Center position of map (lat)\",\n \"mapCenterLng\": \"Center position of map (long)\",\n \"imageColorbarColorPath\": \"Colorbar (color)\",\n \"imageColorbarBwPath\": \"Colorbar (b/w)\"\n },\n \"components\": {\n \"title\": \"Components\",\n \"enableDangerSources\": \"Enable danger sources\",\n \"enableObservations\": \"Enable observations\",\n \"enableModelling\": \"Enable modelling\",\n \"enableWeatherbox\": \"Enable weather box\"\n },\n \"configuration\": {\n \"title\": \"Configuration\",\n \"showMatrix\": \"Show matrix\",\n \"enableMediaFile\": \"Enable media file\",\n \"enableStrategicMindset\": \"Enable strategic mindset\",\n \"enableStressLevel\": \"Enable stress level\",\n \"enableAvalancheProblemCornices\": \"Enable avalanche problem CORNICES\",\n \"enableAvalancheProblemNoDistinctAvalancheProblem\": \"Enable avalanche problem NO DISTINCT AVALANCHE PROBLEM\"\n }\n },\n \"success\": \"Configuration successfully saved\",\n \"error\": \"Configuration could not be saved\"\n },\n \"users\": {\n \"title\": \"Users\",\n \"button\": {\n \"create\": \" Create user\"\n },\n \"tooltip\": {\n \"edit\": \"Edit user\",\n \"changePassword\": \"Change password\",\n \"delete\": \"Delete user\"\n },\n \"table\": {\n \"name\": \"Name\",\n \"email\": \"Email\",\n \"organization\": \"Organization\",\n \"regions\": \"Regions\",\n \"roles\": \"Roles\"\n },\n \"deleteUserModalDialog\": {\n \"message\": \"Do you want to delete the user?\",\n \"accept\": \"Yes\",\n \"reject\": \"No\"\n },\n \"deleteUser\": {\n \"success\": \"User deleted\",\n \"error\": \"User could not be deleted\"\n },\n \"createUser\": {\n \"success\": \"User created\",\n \"error\": \"User could not be created\"\n },\n \"updateUser\": {\n \"success\": \"User updated\",\n \"error\": \"User could not be updated\"\n }\n },\n \"createUser\": {\n \"table\": {\n \"image\": \"Image\",\n \"name\": \"Name\",\n \"email\": \"Email\",\n \"organization\": \"Organization\",\n \"password\": \"Password\",\n \"password2\": \"Repeat password\",\n \"roles\": \"Roles\",\n \"regions\": \"Regions\"\n },\n \"error\": {\n \"name\": {\n \"required\": \"Please enter a name\"\n },\n \"email\": {\n \"required\": \"Please enter an email address\",\n \"invalid\": \"Email address is invalid\"\n },\n \"password\": {\n \"required\": \"Please enter a password\",\n \"length\": \"Password has to be at least 8 characters\",\n \"mismatch\": \"Passwords do not match\"\n }\n },\n \"button\": {\n \"create\": \"Create user\",\n \"update\": \"Update user\",\n \"cancel\": \"Cancel\"\n }\n },\n \"observations\": {\n \"table\": \"Table\",\n \"map\": \"Map\",\n \"gallery\": \"Gallery\",\n \"filters\": \"Filters\",\n \"title\": \"Observations\",\n \"newObservation\": \"New observation\",\n \"exportObservations\": \"Export observations\",\n \"toggleFilterBar\": \"Show/hide filter bar\",\n \"button\": {\n \"submit\": \"Download\"\n },\n \"label\": {\n \"dateRange\": \"Period\",\n \"observer\": \"Observer\"\n },\n \"selectRegion\": {\n \"placeholder\": \"Region\",\n \"selectionLabel\": \"{0} region(s) selected\"\n },\n \"selectSources\": {\n \"placeholder\": \"Sources\",\n \"selectionLabel\": \"{0} source(s) selected\"\n },\n\n \"charts\": {\n \"charts\": \"Charts\",\n \"nan\": \"Without specification\",\n \"classify\": \"Classify\",\n \"label\": \"Label\",\n \"invert\": \"Invert\",\n \"reset\": \"Reset\",\n \"aspect\": {\n \"caption\": \"Aspect\"\n },\n \"elevation\": {\n \"caption\": \"Elevation\"\n },\n \"stability\": {\n \"caption\": \"Stability\"\n },\n \"observationType\": {\n \"caption\": \"Observation Type\"\n },\n \"importantObservation\": {\n \"caption\": \"Important\"\n },\n \"avalancheProblem\": {\n \"caption\": \"Avalanche Problem\"\n },\n \"dangerPattern\": {\n \"caption\": \"Danger Pattern\"\n },\n \"dangerSource\": {\n \"caption\": \"Danger Source\"\n },\n \"days\": {\n \"caption\": \"Day\"\n }\n }\n },\n \"blog\": {\n \"title\": \"Blog\",\n \"language\": {\n \"title\": \"Language\",\n \"de\": \"DE\",\n \"it\": \"IT\",\n \"en\": \"EN\"\n },\n \"all\": {\n \"tooltip\": \"Send Emails, Telegram and Push\",\n \"success\": \"{{prefix}}Email, Telegram and Push successfully sent!\",\n \"error\": \"{{prefix}}Email, Telegram and Push could not be sent!\"\n },\n \"email\": {\n \"tooltip\": \"Send Emails\",\n \"success\": \"{{prefix}}Email successfully sent!\",\n \"error\": \"{{prefix}}Email could not be sent!\"\n },\n \"telegram\": {\n \"tooltip\": \"Send via Telegram Channel\",\n \"success\": \"{{prefix}}Telegram successfully sent!\",\n \"error\": \"{{prefix}}Telegram could not be sent!\"\n },\n \"push\": {\n \"tooltip\": \"Send via Push Notifications\",\n \"success\": \"{{prefix}}Push successfully sent!\",\n \"error\": \"{{prefix}}Push could not be sent!\"\n }\n }\n },\n \"settings\": {\n \"title\": \"Settings\",\n \"changePassword\": {\n \"title\": \"Change password\",\n \"oldPassword\": {\n \"label\": \"Current password\",\n \"placeholder\": \"Current password\"\n },\n \"newPassword1\": {\n \"label\": \"New password\",\n \"placeholder\": \"New password\"\n },\n \"newPassword2\": {\n \"label\": \"New password (repeat)\",\n \"placeholder\": \"New password\"\n },\n \"submit\": \"Change password\",\n \"passwordChanged\": \"Password successfully changed\",\n \"passwordChangeError\": \"Password could not be changed\",\n \"passwordIncorrect\": \"Current password incorrect\",\n \"error\": {\n \"oldPassword\": {\n \"required\": \"Please enter your current password\"\n },\n \"newPassword\": {\n \"required\": \"Please enter a new password\",\n \"mismatch\": \"Passwords do not match\"\n }\n }\n },\n \"display\": {\n \"title\": \"Display\",\n \"table\": {\n \"showCaaml\": \"Show CAAML\",\n \"showJson\": \"Show JSON\"\n }\n }\n },\n \"statistics\": {\n \"title\": \"Statistics\",\n \"bulletins\": \"Avalanche Bulletins\",\n \"dangerSources\": \"Danger Sources\",\n \"button\": {\n \"submit\": \"Download\"\n },\n \"label\": {\n \"dateRange\": \"Period\",\n \"extended\": \"Extended\",\n \"duplicates\": \"Duplicates\"\n }\n },\n\n \"dangerRating\": {\n \"noRating\": \"no rating\",\n \"low\": \"low\",\n \"moderate\": \"moderate\",\n \"considerable\": \"considerable\",\n \"high\": \"high\",\n \"veryHigh\": \"very high\"\n },\n \"avalancheProblem\": {\n \"newSnow\": \"New snow\",\n \"new_snow\": \"New snow\",\n \"windSlab\": \"Wind slab\",\n \"wind_slab\": \"Wind slab\",\n \"persistentWeakLayers\": \"Persistent weak layers\",\n \"persistent_weak_layers\": \"Persistent weak layers\",\n \"wetSnow\": \"Wet snow\",\n \"wet_snow\": \"Wet snow\",\n \"glidingSnow\": \"Gliding snow\",\n \"gliding_snow\": \"Gliding snow\",\n \"cornices\": \"Cornices\",\n \"noDistinctAvalancheProblem\": \"No distinct avalanche problem\",\n \"no_distinct_avalanche_problem\": \"No distinct avalanche problem\",\n \"favourableSituation\": \"Favourable situation\",\n \"favourable_situation\": \"Favourable situation\"\n },\n \"dangerPattern\": {\n \"dp1\": \"dp.1: deep persistent weak layer\",\n \"dp2\": \"dp.2: gliding avalanches\",\n \"dp3\": \"dp.3: rain\",\n \"dp4\": \"dp.4: cold following warm / warm following cold\",\n \"dp5\": \"dp.5: snowfall after a long period of cold\",\n \"dp6\": \"dp.6: cold, loose snow and wind\",\n \"dp7\": \"dp.7: shallow snow next to deep snow\",\n \"dp8\": \"dp.8: buried surface hoar\",\n \"dp9\": \"dp.9: buried graupel\",\n \"dp10\": \"dp.10: springtime scenario\"\n },\n \"strategicMindset\": {\n \"title\": \"Strategic Mindset\",\n \"assessment\": \"High Uncertainty\",\n \"stepping_out\": \"Improving\",\n \"status_quo\": \"Status Quo\",\n \"stepping_back\": \"Deteriorating\",\n \"entrenchment\": \"Persistent Unstable\",\n \"free_ride\": \"Favorable\",\n \"high_alert\": \"High Alert\",\n \"spring_diurnal\": \"Spring Diurnal\"\n },\n \"observationType\": {\n \"DrySnowfallLevel\": \"Dry snowfall level\",\n \"TimeSeries\": \"Time series\",\n \"Incident\": \"Incident\",\n \"Profile\": \"Snow profile\",\n \"Closure\": \"Closure\",\n \"Blasting\": \"Blasting\",\n \"Avalanche\": \"Avalanche\",\n \"Evaluation\": \"Evaluation\",\n \"SimpleObservation\": \"Simple observation\",\n \"Webcam\": \"Webcam\"\n },\n \"importantObservation\": {\n \"ForBlog\": \"For blog\",\n \"SurfaceHoar\": \"Surface hoar\",\n \"Graupel\": \"Graupel\",\n \"StabilityTest\": \"Stability test\",\n \"IceFormation\": \"Ice formation\",\n \"VeryLightNewSnow\": \"Very light new snow\"\n },\n \"elevationTolerance\": {\n \"exact\": \"exact\",\n \"50m\": \"±50m\",\n \"100m\": \"±100m\",\n \"200\": \"±200m\"\n },\n \"elevationPeriod\": {\n \"duringPrecipitationEvent\": \"Dry snowfall boundary for the entire precipitation event\",\n \"observationPeriod\": \"Dry snowfall boundary at the time of observation\"\n },\n \"aspect\": {\n \"N\": \"N\",\n \"NE\": \"NE\",\n \"E\": \"E\",\n \"SE\": \"SE\",\n \"S\": \"S\",\n \"SW\": \"SW\",\n \"W\": \"W\",\n \"NW\": \"NW\"\n },\n \"role\": {\n \"SUPERADMIN\": \"Super Administrator\",\n \"ADMIN\": \"Administrator\",\n \"FORECASTER\": \"Forecaster\",\n \"FOREMAN\": \"Foreman\",\n \"OBSERVER\": \"Observer\"\n },\n \"tendency\": {\n \"decreasing\": \" Avalanche danger decreases\",\n \"steady\": \" Avalanche danger stays the same\",\n \"increasing\": \" Avalanche danger increases\"\n },\n \"snowpackStability\": {\n \"unknown\": \"unknown\",\n \"good\": \"good\",\n \"fair\": \"fair\",\n \"poor\": \"poor\",\n \"very_poor\": \"very poor\"\n },\n \"frequency\": {\n \"none\": \"(nearly) none\",\n \"few\": \"a few\",\n \"some\": \"some\",\n \"many\": \"many\"\n },\n \"avalancheSize\": {\n \"small\": \"small\",\n \"medium\": \"medium\",\n \"large\": \"large\",\n \"very_large\": \"very large\",\n \"extreme\": \"extreme\"\n },\n \"complexity\": {\n \"easy\": \" Easy\",\n \"challenging\": \" Challenging\",\n \"complex\": \" Complex\"\n },\n \"glidingSnowActivity\": {\n \"low\": \"low\",\n \"medium\": \"medium\",\n \"high\": \"high\"\n },\n \"wetness\": {\n \"dry\": \"dry\",\n \"moist\": \"moist\",\n \"wet\": \"wet\"\n },\n \"characteristic\": {\n \"low\": \"low\",\n \"medium\": \"medium\",\n \"high\": \"high\",\n \"very_high\": \"very high\"\n },\n \"thickness\": {\n \"thin\": \"thin\",\n \"thick\": \"thick\"\n },\n \"snowpackPosition\": {\n \"upper\": \"upper\",\n \"middle\": \"middle\",\n \"lower\": \"lower\",\n \"ground\": \"ground\"\n },\n \"weakLayerCrust\": {\n \"no\": \"no\",\n \"partly\": \"partly\",\n \"yes\": \"yes\"\n },\n \"creationProcess\": {\n \"radiation_recrystallization\": \"radiation\",\n \"diurnal_recrystallization\": \"diurnal\",\n \"melt_layer_recrystallization\": \"melt layer\",\n \"surface_hoar_formation\": \"surface hoar\"\n },\n \"recognizability\": {\n \"very_easy\": \"very easy\",\n \"easy\": \"easy\",\n \"hard\": \"hard\",\n \"very_hard\": \"very hard\"\n },\n \"distribution\": {\n \"isolated\": \"isolated\",\n \"specific\": \"specific\",\n \"widespread\": \"widespread\"\n },\n \"probability\": {\n \"likely\": \"likely\",\n \"possible\": \"possible\",\n \"unlikely\": \"unlikely\"\n },\n \"detailedDaytime\": {\n \"evening\": \"evening\",\n \"first_night_half\": \"first night half\",\n \"second_night_half\": \"second night half\",\n \"morning\": \"morning\",\n \"forenoon\": \"forenoon\",\n \"afternoon\": \"afternoon\"\n },\n \"slopeGradient\": {\n \"moderately_steep\": \"moderately steep\",\n \"steep\": \"steep\",\n \"very_steep\": \"very steep\",\n \"extremely_steep\": \"extremely steep\"\n },\n \"handHardness\": {\n \"fist\": \"F\",\n \"four_fingers\": \"4F\",\n \"one_finger\": \"1F\",\n \"pencil\": \"P\",\n \"knife\": \"K\",\n \"ice\": \"I\"\n },\n \"hardnessTendency\": {\n \"decreasing\": \"softer below\",\n \"steady\": \"uniform\",\n \"increasing\": \"softer above\"\n },\n \"terrainType\": {\n \"gullies\": \"gullies\",\n \"bowls\": \"bowls\",\n \"pass_areas\": \"pass areas\",\n \"ridge_lines\": \"ridge lines\",\n \"adjacent_to_ridge_lines\": \"adjacent to ridge lines\",\n \"distant_from_ridge_lines\": \"distant from ridge lines\",\n \"slope_discontinuities\": \"slope discontinuities\",\n \"convex_terrain\": \"convex terrain\",\n \"concave_terrain\": \"concave terrain\",\n \"steep_terrain\": \"steep terrain\",\n \"very_steep_terrain\": \"very steep terrain\",\n \"open_terrain\": \"open terrain\",\n \"forest\": \"forest\"\n },\n \"dangerSign\": {\n \"shooting_cracks\": \"shooting cracks\",\n \"whumpfing\": \"whumpfing\",\n \"fresh_avalanches\": \"fresh avalanches\"\n },\n \"changeRegionDialog\": {\n \"message\": \"Do you want to change the region?\",\n \"accept\": \"Yes\",\n \"reject\": \"No\"\n },\n \"zamg\": {\n \"table\": \"Table\",\n \"map\": \"Map\",\n \"region\": \"Region\",\n \"newSnow\": \"New snow\"\n },\n \"snowpack\": {\n \"plotType\": {\n \"LWC_stratigraphy\": \"wet snow: liquid water content\",\n \"wet_snow_instability\": \"wet snow: wet snow instability\",\n \"Sk38_stratigraphy\": \"persistent weak layers: SK38 stability index\",\n \"stratigraphy\": \"persistent weak layers: snow stratigraphy\"\n },\n \"aspect\": {\n \"flat\": \"flat\",\n \"north\": \"north\",\n \"south\": \"south\"\n },\n \"meteo\": {\n \"new_snow_plot_3day\": \"new snow (3d)\",\n \"new_snow_plot_7day\": \"new snow (7d)\",\n \"new_snow_plot_1month\": \"new snow (31d)\",\n \"new_snow_plot_season\": \"new snow (season)\",\n \"new_snow_plot_forecast\": \"new snow (forecast)\",\n \"wet_snow_plot_3day\": \"wet snow (3d)\",\n \"wet_snow_plot_7day\": \"wet snow (7d)\",\n \"wet_snow_plot_1month\": \"wet snow (31d)\",\n \"wet_snow_plot_season\": \"wet snow (season)\",\n \"wet_snow_plot_forecast\": \"wet snow (forecast)\",\n \"HS_table_24h\": \"snow height table (1d)\",\n \"HS_table_72h\": \"snow height table (3d)\",\n \"HS_table_season\": \"snow height table (season)\",\n \"HS_table_forecast\": \"snow height table (forecast)\",\n \"TA_table_24h\": \"temperature table (1d)\",\n \"TA_table_72h\": \"temperature table (3h)\",\n \"TA_table_season\": \"temperature table (season)\"\n }\n },\n \"grainShape\": {\n \"PP\": {\n \"code\": \"PP\",\n \"class\": \"Precipitation Particles\"\n },\n \"PPgp\": {\n \"code\": \"PPgp\",\n \"class\": \"Graupel\"\n },\n \"DF\": {\n \"code\": \"DF\",\n \"class\": \"Decomposing and Fragmented precipitation particles\"\n },\n \"RG\": {\n \"code\": \"RG\",\n \"class\": \"Rounded Grains\"\n },\n \"FC\": {\n \"code\": \"FC\",\n \"class\": \"Faceted Crystals\"\n },\n \"DH\": {\n \"code\": \"DH\",\n \"class\": \"Depth Hoar\"\n },\n \"SH\": {\n \"code\": \"SH\",\n \"class\": \"Surface Hoar\"\n },\n \"MF\": {\n \"code\": \"MF\",\n \"class\": \"Melt Forms\"\n },\n \"MFcr\": {\n \"code\": \"MFcr\",\n \"class\": \"Melt-freeze crust\"\n },\n \"IF\": {\n \"code\": \"IF\",\n \"class\": \"Ice Formations\"\n }\n },\n \"button\": {\n \"yes\": \"yes\",\n \"no\": \"no\"\n },\n \"observations\": {\n \"allowEdit\": \"Edit external observation\",\n \"allowEditTooltip\": \"This will prevent overwrites from {{ value }}\",\n \"editIconTooltip\": \"Edited observation - receives no updates from {{ value }}\",\n \"aspect\": \"Aspect\",\n \"authorName\": \"Author name\",\n \"avalancheLength\": \"Avalanche length\",\n \"avalancheProblem\": \"Avalanche problem\",\n \"avalancheSize\": \"Avalanche size\",\n \"avalancheType\": \"Avalanche type\",\n \"avalancheWidth\": \"Avalanche width\",\n \"search\": \"Search\",\n \"count\": \"# observations:\",\n \"elevationTolerance\": \"Accuracy of elevation data\",\n \"elevationPeriod\": \"Elevation time period\",\n \"layers\": {\n \"observers\": \"Observers\",\n \"weatherStations\": \"Weather stations\",\n \"webcams\": \"Webcams\",\n \"observations\": \"Observations\"\n },\n \"weatherStations\": {\n \"tooltips\": {\n \"drySnowfallLevel\": \"Dry snowfall level\",\n \"globalRadiation\": \"Global radiation\",\n \"newSnow\": \"New snow\",\n \"snowLine\": \"Snow line\",\n \"snowHeight\": \"Snow height\",\n \"snowDifference\": \"Snow difference\",\n \"airTemperature\": \"Air temperature\",\n \"airTemperatureMax\": \"Air temperature Max\",\n \"airTemperatureMin\": \"Air temperature Min\",\n \"surfaceTemperature\": \"Surface temperature\",\n \"surfaceHoar\": \"Potential surface hoar formation\",\n \"surfaceHoarCalc\": \"Potential surface hoar formation (Lehning et. al.)\",\n \"dewPoint\": \"Dew point temperature\",\n \"relativeHumidity\": \"Relative humidity\",\n \"windDirection\": \"Wind direction\",\n \"windSpeed\": \"Wind speed\",\n \"windGust\": \"Wind gust\"\n }\n },\n \"button\": {\n \"add\": \"Add observation\",\n \"save\": \"Save observation\",\n \"delete\": \"Delete observation\",\n \"deleteConfirm\": \"Delete observation?\",\n \"discard\": \"Discard\",\n \"copyDate\": \"Copy event date\"\n },\n \"comment\": \"Comment\",\n \"content\": \"Content\",\n \"dangerRating\": \"Danger rating\",\n \"dangerSource\": \"Danger source\",\n \"elevation\": \"Elevation\",\n \"elevationRange\": \"Elevation range\",\n \"elevationLowerBound\": \"Elevation lower bound\",\n \"elevationUpperBound\": \"Elevation upper bound\",\n \"eventDate\": \"Event date\",\n \"eventType\": \"Event type\",\n \"eventTypes\": {\n \"IMPORTANT\": \"Important event\",\n \"NEIGHBOR_REGION\": \"Neighbouring region\",\n \"NORMAL\": \"Normal event\",\n \"PERSON_DEAD\": \"Event involving persons (dead)\",\n \"PERSON_INJURED\": \"Event involving persons (injured)\",\n \"PERSON_NO\": \"Event not involving persons\",\n \"PERSON_UNINJURED\": \"Event involving persons (uninjured)\",\n \"PERSON_UNKNOWN\": \"Event (unknown)\",\n \"TRAFFIC\": \"Traffic\"\n },\n \"externalURL\": \"External URL (e.g. to photo database)\",\n \"fractureDepth\": \"Fracture depth\",\n \"hasCoordinates\": \"Has coordinates\",\n \"incline\": \"Incline\",\n \"latitude\": \"Latitude\",\n \"locationName\": \"Location\",\n \"longitude\": \"Longitude\",\n \"observationType\": \"Observation type\",\n \"personInvolvement\": \"Person involvement\",\n \"reportDate\": \"Report date\",\n \"showTable\": \"Table\",\n \"withoutCoordinates\": \"Observations without coordinates:\",\n \"sidebar\": {\n \"filter\": {\n \"title\": \"Filter\"\n },\n \"legend\": {\n \"title\": \"Legend\"\n },\n \"sources\": {\n \"title\": \"Data Sources\"\n },\n \"views\": {\n \"title\": \"Views\"\n }\n }\n },\n \"personInvolvement\": {\n \"Dead\": \"Event involving persons (dead)\",\n \"Injured\": \"Event involving persons (injured)\",\n \"No\": \"Event not involving persons\",\n \"Uninjured\": \"Event involving persons (uninjured)\",\n \"Unknown\": \"Event (unknown)\"\n },\n \"units\": {\n \"cm\": \"cm\",\n \"mm\": \"mm\",\n \"m\": \"m\"\n },\n \"qfa\": {\n \"day\": \"Day\",\n \"time\": \"Time\",\n \"back\": \" Back\",\n \"parameters\": {\n \"DUST\": \"sahara dust\",\n \"N\": \"total cloud cover in /8\",\n \"Nh\": \"high cloud cover in /8\",\n \"Nm\": \"medium high cloud cover in /8\",\n \"Nl\": \"low cloud cover in /8\",\n \"N-CU\": \"cumulus cloud cover in /8\",\n \"AUSL.T\": \"trigger temperature\",\n \"SHW-IX\": \"Showalter-Index\",\n \"WX -CUF\": \"significant weather: NIL (none), RASH (rain), TS (thunder storm)\",\n \"RR\": \"total precipitation [mm]\",\n \"RR-str\": \"stratiform precipitation\",\n \"CONV\": \"convective precipitation [mm]\",\n \"SN\": \"precipitation in form of snow [mm]\",\n \"SN--RA\": \"snowline [m]\",\n \"QAO \": \"{{value}} hPa eq. mean wind, direction and strength, [°] and [m/s]\",\n \"QAN\": \"mean wind on the ground, direction and strength, [°] and [m/s]\",\n \"QANmax\": \"max. wind (gusts) on the ground [m/s]\",\n \"T \": \"{{value}} hPa eq. temperature [°C]\",\n \"T m\": \"temperature on {{value}}m [°C]\",\n \"T 2m\": \"temperature on 2m [°C]\",\n \"Tk 2m\": \"temperature on 2m [°K]\",\n \"T GND\": \"ground temperature\",\n \"Max-ADI\": \"maximum mixing temperature [°C]\",\n \"Min Max\": \"min./max. temperature in the last 24h\",\n \"FROST\": \"zero degree line [m]\",\n \"W cm\": \"500 hPa eq. vertical wind [cm/s]\",\n \"W --\": \"700 hPa eq. vertical wind [cm/s]\",\n \"W s\": \"{{value}} hPa eq. vertical wind [cm/s]\",\n \"H \": \"{{value}} hPa geopotential height [m]\",\n \"RF \": \"{{value}} hPa eq. relative moisture [%]\"\n }\n }\n}\n","{\n \"daytime\": {\n \"earlier\": \"AM\",\n \"later\": \"PM\"\n },\n \"login\": {\n \"title\": \"Iniciar sesión\",\n \"text\": \"Iniciar sesión en tu cuenta\",\n \"button\": \"Iniciar sesión\",\n \"stressLevel\": \"Stress Level\",\n \"errorDialog\": {\n \"message\": \"Usuario o contraseña incorrectas\",\n \"accept\": \"De acuerdo\"\n },\n \"placeholder\": {\n \"username\": \"Por favor, introduce tu nombre de usuario\",\n \"password\": \"Por favor, introduce tu contraseña\"\n }\n },\n \"sidebar\": {\n \"bulletins\": \"Avalanche.report\",\n \"dangerSources\": \"Danger Sources\",\n \"observations\": \"Observaciones\",\n \"qfa\": \"FAQ\",\n \"modelling\": \"Modelización\",\n \"modellingForecast\": \"Previsión\",\n \"modellingZamg\": \"ZAMG multi modelo\",\n \"modellingZamgECMWF\": \"ZAMG ECMWF-EPS\",\n \"modellingZamgCLAEF\": \"ZAMG CLAEF-EPS\",\n \"modellingZamgMeteogram\": \"Meteograma GeoSphere\",\n \"modellingSnowpack\": \"modelo SNOWPACK\",\n \"modellingSnowpackMeteo\": \"SNOWPACK modelled meteo\",\n \"weatherbox\": \"Weatherbox\",\n \"awsome\": \"AWSOME\",\n \"snowpack\": \"SNOWPACK\",\n \"geosphere\": \"GeoSphere\"\n },\n \"menu\": {\n \"logout\": \"Cerrar sesión\",\n \"language\": \"Idioma\",\n \"en\": \"Inglés\",\n \"de\": \"Alemán\",\n \"fr\": \"Francés\",\n \"it\": \"Italiano\",\n \"es\": \"Español\",\n \"ca\": \"Catalán\",\n \"oc\": \"Aranés\",\n \"fullscreen\": \"Pantalla completa\",\n \"settings\": \"Ajustes\",\n \"statistics\": \"Estadisticas\",\n \"admin\": \"Admin\",\n \"region\": \"Región\",\n \"education\": \"Educación\"\n },\n \"matrix\": {\n \"label\": {\n \"snowpackStability\": \"Estabilidad del manto nivoso\",\n \"frequency\": \"Frecuencia\",\n \"avalancheSize\": \"Tamaño de alud\",\n \"dangerRating\": \"Clasificación del peligro\",\n \"override\": \"(modificar grado de peligro)\",\n \"matrix\": \"Matriz\",\n \"referToFairStability\": \"Referirse a estabilidad regular\",\n \"referToPoorStability\": \"Referirse a estabilidad pobre\",\n \"dangerLevel1\": \"Grado de peligro 1 (Débil)\"\n }\n },\n \"dangerSources\": {\n \"status\": {\n \"missing\": \"ausente\",\n \"available\": \"available\",\n \"forecast\": \"forecast\",\n \"analysis\": \"analysis\",\n \"loading\": \"Loading danger sources ...\",\n \"saveError\": \"Danger source could not be saved!\",\n \"loadDangerSourcesError\": \"Danger sources could not be loaded!\",\n \"loadVariantsError\": \"Danger source variants could not be loaded!\"\n },\n \"variantStatus\": {\n \"active\": \"active\",\n \"dormant\": \"dormant\",\n \"inactive\": \"inactive\"\n },\n \"tooltip\": {\n \"read\": \"Read danger sources\",\n \"edit\": \"Edit danger sources\"\n },\n \"table\": {\n \"loadMore\": \"Load {{count}} more days\",\n \"title\": {\n \"forecast\": \"Previsión\",\n \"analysis\": \"Analysis\"\n }\n },\n \"create\": {\n \"variantStatus\": \"Status\",\n \"variantEditable\": \"This variant can be edited.\",\n \"variantNotEditable\": \"This variant can not be edited.\",\n \"noVariantsForSelectedDay\": \"No variants defined for this date.\",\n \"tooltip\": {\n \"editDangerSource\": \"Edit danger source\",\n \"loadVariants\": \"Load variants from the day before\",\n \"edit\": \"Editar micro-regiones\",\n \"copy\": \"Copy variant\",\n \"delete\": \"Delete variant\",\n \"compare\": \"Compare variant\",\n \"forecast\": \"Compare with forecast\"\n },\n \"createDangerSource\": \"Create danger source\",\n \"createVariant\": \"Create new variant\",\n \"noDangerSources\": \"No danger sources\",\n \"title\": {\n \"avalanche\": \"Alud\",\n \"matrix\": \"Matriz\",\n \"characteristics\": \"Características\",\n \"comment\": \"Comentario\"\n },\n \"label\": {\n \"glidingSnowActivity\": \"Gliding snow activity\",\n \"snowHeight\": \"Snow height\",\n \"snowHeightAverage\": \"Average snow height\",\n \"zeroDegreeIsotherm\": \"0°C isotherm\",\n \"looseSnowMoisture\": \"Loose snow moisture\",\n \"looseSnowGrainShape\": \"Loose snow grain shape\",\n \"slabGrainShape\": \"Slab grain shape\",\n \"slabThickness\": \"Slab thickness\",\n \"slabHandHardness\": \"Slab hand hardness\",\n \"slabHardnessProfile\": \"Slab hardness\",\n \"slabEnergyTransferPotential\": \"Slab energy transfer potential\",\n \"slabDistribution\": \"Slab distribution\",\n \"weakLayerGrainShape\": \"Weak layer grain shape\",\n \"weakLayerGrainSize\": \"Weak layer grain size\",\n \"weakLayerPersistent\": \"Weak layer persistent\",\n \"weakLayerThickness\": \"Weak layer thickness\",\n \"weakLayerStrength\": \"Weak layer strength\",\n \"weakLayerWet\": \"Weak layer wet\",\n \"weakLayerCrustAbove\": \"Weak layer crust above\",\n \"weakLayerCrustBelow\": \"Weak layer crust below\",\n \"weakLayerPosition\": \"Weak layer position\",\n \"weakLayerCreation\": \"Weak layer creation\",\n \"weakLayerDistribution\": \"Weak layer distribution\",\n \"dangerSpotRecognizability\": \"Danger spot recognizability\",\n \"remoteTriggering\": \"Remote triggering\",\n \"hasDaytimeDependency\": \"Dependencia diurna\",\n \"dangerIncreaseWithElevation\": \"Danger increase with elevation\",\n \"runoutIntoGreen\": \"Runout into green\",\n \"highestDangerAspect\": \"Highest danger aspect\",\n \"dangerPeak\": \"Danger peak\",\n \"slopeGradient\": \"Gradiente de pendiente\",\n \"naturalRelease\": \"Natural release\",\n \"terrainTypes\": \"Terrain types\",\n \"dangerSigns\": \"Danger signs\",\n \"aspects\": \"Orientaciones\"\n },\n \"editVariantDialog\": {\n \"save\": \"Guardar\",\n \"cancel\": \"Cancelar\"\n },\n \"deleteVariantDialog\": {\n \"message\": \"Do you want to delete this variant?\",\n \"accept\": \"Si\",\n \"reject\": \"No\"\n },\n \"noRegionDialog\": {\n \"message\": \"At least one micro-region has to be yours.\",\n \"accept\": \"De acuerdo\"\n },\n \"discardDialog\": {\n \"message\": \"¿Quieres descartar los cambios?\",\n \"accept\": \"Si\",\n \"reject\": \"No\"\n },\n \"saveErrorDialog\": {\n \"message\": \"There was an error saving the danger sources!\",\n \"accept\": \"De acuerdo\"\n },\n \"loadDialog\": {\n \"message\": \"Do you want to load all danger source variants from the day before?\",\n \"accept\": \"Si\",\n \"reject\": \"No\"\n }\n }\n },\n \"avalancheType\": {\n \"title\": \"Tipo de alud\",\n \"label\": {\n \"slab\": \"SLAB\",\n \"loose\": \"LOOSE\",\n \"glide\": \"GLIDE\"\n },\n \"tooltip\": {\n \"slab\": \"Slab avalanche\",\n \"loose\": \"Loose snow avalanche\",\n \"glide\": \"Glide snow avalanche\"\n }\n },\n \"elevation\": {\n \"title\": \"Altitud\",\n \"high\": \"Debajo\",\n \"low\": \"Encima\",\n \"treeline\": \"Límite superior del bosque\"\n },\n \"bulletins\": {\n \"title\": \"Avalanche.report\",\n \"tooltip\": {\n \"edit\": \"Edit bulletin\",\n \"read\": \"Read bulletin\",\n \"copy\": \"Copiar boletín\",\n \"paste\": \"Pegar boletín\",\n \"cancel\": \"Cancelar copia\",\n \"update\": \"Editar\",\n \"submit\": \"Enviar\",\n \"submitUpdate\": \"Enviar actualización\",\n \"publishChange\": \"Publicar ahora (sin mensajes)\",\n \"publishUpdate\": \"Publicar ahora\",\n \"caaml\": \"Muestra CAAML\",\n \"json\": \"Muestra JSON\",\n \"create\": \"Crear boletín\",\n \"preview\": \"Vista previa del boletín (PDF)\",\n \"check\": \"Comprobar boletín\",\n \"info\": \"Muestra estado de la publicación\",\n \"loadSuggestionFromDangerSources\": \"Load suggestion\",\n \"deleteAllWarningRegions\": \"Delete all warning regions\",\n \"publishAll\": \"Publicar todas las regiones\",\n \"mediaFile\": \"Subir archivo multimedia\"\n },\n \"status\": {\n \"submittedInfo\": \"Será publicado a las 5PM\",\n \"resubmittedInfo\": \"Será publicado a las 8AM\",\n \"publishedInfo\": \"Ha sido publicado\",\n \"noPublicationInfo\": \"NO será publicado automàticamente\",\n \"loadingPreview\": \"Creando vista previa en PDF ...\",\n \"loading\": \"Cargando boletín ...\",\n \"loadMoreBulletins\": \"Load {{count}} more bulletins\",\n \"publishing\": \"Publicando boletín ...\",\n \"submitting\": \"Enviando boletín ...\",\n \"saveError\": \"Bulletin could not be saved!\",\n \"loadBulletinsError\": \"Bulletins could not be loaded!\"\n },\n \"create\": {\n \"tooltip\": {\n \"edit\": \"Editar micro-regiones\",\n \"copy\": \"Copiar región\",\n \"delete\": \"Borrar región\",\n \"compare\": \"Compare region\",\n \"undo\": \"Undo last change in region\",\n \"redo\": \"Redo change in region\",\n \"createRegion\": \"Crear región\",\n \"cancel\": \"Cancelar\",\n \"acceptSuggestion\": \"Aceptar la región sugerida\",\n \"rejectSuggestion\": \"Rechazar la región sugerida\",\n \"saveChanges\": \"Guardar los cambios\",\n \"discardChanges\": \"Descartar los cambios\",\n \"incompleteAvalancheProblem\": \"Problema de aludes incompleto\",\n \"saveBulletin\": \"Guardar el boletín\",\n \"discardBulletin\": \"Descartar los cambios del boletín\",\n \"loadBulletin\": \"Cargar el boletín del día anterior\",\n \"uploadJsonBulletin\": \"Subir el boletín en formato JSON\",\n \"downloadJsonBulletin\": \"Descargar el boletín en formato JSON\",\n \"daytimeDependency\": \"Dependencia diurna\",\n \"treeline\": \"Límite superior del bosque\",\n \"tendency\": {\n \"decreasing\": \"El peligro de aludes desciende\",\n \"steady\": \"El peligro de aludes se mantiene igual\",\n \"increasing\": \"El peligro de aludes aumenta\",\n \"danger\": \"Peligro de aludes\"\n },\n \"textcat\": {\n \"edit\": \"Editar\",\n \"copy\": \"Copiar\",\n \"paste\": \"Pegar\",\n \"example\": \"Cargar texto de ejemplo\",\n \"delete\": \"Borrar\"\n },\n \"moveUpAvalancheProblem\": \"Mover el problema de aludes hacia arriba\",\n \"moveDownAvalancheProblem\": \"Mover el problema de aludes hacia abajo\",\n \"dangerRatingDirectionUp\": \"Hacia arriba\",\n \"dangerRatingDirectionDown\": \"Hacia abajo\"\n },\n \"save\": \"Guardar\",\n \"discard\": \"Descartar\",\n \"back\": \"Volver\",\n \"createAggregatedRegion\": \"Nueva región\",\n \"pasteAggregatedRegion\": \"Pegar región\",\n \"pendingSuggestions\": \"Sugerencias\",\n \"rejectSuggestion\": \"Rechazar\",\n \"acceptSuggestion\": \"Aceptar\",\n \"cancelCopyBulletin\": \" Cancelar\",\n \"createAvalancheProblem\": \"Nuevo problema\",\n \"ownRegions\": \"Regiones propias\",\n \"foreignRegions\": \"Regiones extranjeras\",\n \"externalRegions\": \"Regiones externas\",\n \"mapSelectRegion\": \"Seleccionar regiones en el mapa\",\n \"statusHeader\": \"Estado del boletín\",\n \"suggestions\": \"Sugerencias\",\n \"noBulletinsForSelectedDay\": \"Ninguna región definida para esta fecha\",\n \"autosave\": \"Guardado automáticamente\",\n \"regionEditable\": \"Esta región puede ser editada.\",\n \"regionNotEditable\": \"Esta región no puede editar-se.\",\n \"regionLocked\": \"Esta región está bloqueada.\",\n \"changeDangerRatingElevation\": \"Extender el peligro de aludes\",\n \"mapTop\": \"Mapa arriba\",\n \"mapLeft\": \"Mapa al lado\",\n \"showNotes\": \"Mostrar notas\",\n \"hideNotes\": \"Ocultar notas\",\n \"incompleteAvalancheProblem\": \"Incomplete\",\n \"label\": {\n \"importantObservations\": \"Important observations\",\n \"avalancheProblems\": \"Problema de aludes\",\n \"aspects\": \"Orientaciones\",\n \"highlights\": \"Alerta especial\",\n \"avActivityHighlights\": \"Titular de la situación de aludes\",\n \"avActivityComment\": \"Descripción del peligro de aludes\",\n \"snowpackStructureComment\": \"Descripción de la estructura del manto\",\n \"dangerPatterns\": \"Patrón de peligro\",\n \"tendencyComment\": \"Descripción de la tendencia\",\n \"notes\": \"Notas\"\n },\n \"copyRegion\": {\n \"label\": \"Copiar región de alerta a otro boletín\",\n \"select\": \"Pegar en ...\",\n \"currentBulletin\": \"Este boletín\"\n },\n \"title\": {\n \"avalancheProblem\": \"Problemas de aludes\",\n \"dangerDescription\": \"Descripción del peligro de aludes\",\n \"forenoon\": \"Mañana\",\n \"afternoon\": \"Tarde\",\n \"snowpackStructure\": \"Estructura del manto\",\n \"tendency\": \"Tendencia\",\n \"showTranslations\": \"Mostrar traducciones\",\n \"hideTranslations\": \"Ocultar traducciones\"\n },\n \"placeholder\": {\n \"notes\": \"Escribir aquí...\"\n },\n \"pmDialog\": {\n \"noIFrameSupport\": \"Tu navegador no soporta IFrames!\"\n },\n \"discardDialog\": {\n \"message\": \"¿Quieres descartar los cambios?\",\n \"accept\": \"Si\",\n \"reject\": \"No\"\n },\n \"deleteAggregatedRegionDialog\": {\n \"message\": \"¿Quieres borrar esta región?\",\n \"accept\": \"Si\",\n \"reject\": \"No\"\n },\n \"noRegionDialog\": {\n \"message\": \"At least one micro-region has to be yours.\",\n \"accept\": \"De acuerdo\"\n },\n \"loadDialog\": {\n \"message\": \"¿Quieres cargar los boletines del día anterior?\",\n \"accept\": \"Si\",\n \"reject\": \"No\"\n },\n \"deleteAllWarningRegionsDialog\": {\n \"message\": \"Do you want to delete all warning regions?\",\n \"accept\": \"Si\",\n \"reject\": \"No\"\n },\n \"loadAutoSaveDialog\": {\n \"message\": \"¿Quieres cargar automáticamente los boletines guardados?\",\n \"accept\": \"Si\",\n \"reject\": \"No\"\n },\n \"saveErrorDialog\": {\n \"message\": \"¡Se ha producido un error guardando los boletines!\",\n \"accept\": \"De acuerdo\"\n },\n \"changeErrorDialog\": {\n \"message\": \"Se ha producido un error cargando los boletines\",\n \"accept\": \"De acuerdo\"\n },\n \"loadingErrorDialog\": {\n \"message\": \"Se ha producido un error cargando los boletines\",\n \"accept\": \"De acuerdo\"\n },\n \"loadingJsonFileErrorDialog\": {\n \"message\": \"¡Hubo un error al cargar los boletines desde el archivo JSON!\",\n \"accept\": \"De acuerdo\"\n },\n \"avalancheProblemErrorDialog\": {\n \"message\": \"Falta el problema de alud, las orientaciones, la estabilidad del manto nivoso, la frecuencia y/o el tamaño de alud para al menos un problema de alud\",\n \"accept\": \"De acuerdo\"\n },\n \"loadAvActivityCommentExampleTextDialog\": {\n \"message\": \"¿Para que situación quieres cargar un texto de ejemplo?\",\n \"newSnow\": \"Nieve reciente\",\n \"windSlab\": \"Placas de viento\",\n \"persistentWeakLayers\": \"Capas débiles persistentes\",\n \"wetSnow\": \"Nieve húmeda\",\n \"glidingSnow\": \"Deslizamientos basales\",\n \"favourableSituation\": \"Situación favorable\",\n \"cancel\": \"Cancelar\"\n },\n \"removeDaytimeDependencyDialog\": {\n \"message\": \"Which avalanche problems do you want to keep?\",\n \"cancel\": \"Cancelar\"\n },\n \"strategicMindsetDialog\": {\n \"title\": \"Strategic Mindsets\",\n \"introduction\": \"The \\\"Strategic Mindsets\\\" are intended to express our mental attitude with regard to the avalanche situation and its development in the corresponding warning region. It should not be derived directly from the hazard assessment, but rather understood and used as an intuitive impression of the overall situation. The \\\"Strategic Mindsets\\\" are therefore primarily a communication tool. Using the mindsets and associated definitions, we forecasters can quickly and efficiently exchange information about the development of the hazard situation and find a common language for communication.\",\n \"description\": {\n \"title\": \"Description:\",\n \"text\": {\n \"assessment\": \"There is great uncertainty in the hazard assessment due to insufficient information from the field.\",\n \"stepping_out\": \"Decreasing tendency of the hazard situation (also within a danger level).\",\n \"status_quo\": \"Same hazardous situation. No significant change compared to the previous day.\",\n \"stepping_back\": \"Increasing tendency of the hazard situation (also within a danger level).\",\n \"entrenchment\": \"Almost constant, tense hazardous situation. The main danger comes from (a) persistent weak layer(s) susceptible to interference.\",\n \"free_ride\": \"Low avalanche danger with generally stable snow cover. Only small avalanches are possible in extremely steep terrain. \",\n \"high_alert\": \"Exceptional situation with high or very high avalanche danger. Spontaneous avalanches of very large or extreme magnitude are possible\",\n \"spring_diurnal\": \"Wet snow avalanches during the course of the day, which are subject to a clear diurnal cycle, are decisive for the risk assessment.\"\n }\n },\n \"communication\": {\n \"title\": \"Communication:\",\n \"text\": {\n \"assessment\": \"Avalanche situation must be checked locally. Restraint is recommended.\",\n \"stepping_out\": \"Gradual decrease in danger. However, caution is still required and the improving situation should be assessed locally before entering riskier terrain. \",\n \"status_quo\": \"Hazardous situation is unchanged. Feedback from observers helps to better outline the hazardous situation. More favourable terrain should be communicated with emphasis. \",\n \"stepping_back\": \"Clear communication of the increase in avalanche danger - even within a danger level. Information on the causes supports comprehensibility in communication. \",\n \"entrenchment\": \"Caution and restraint are required. Situation hardly changes. If possible, provide as precise information as possible on distribution and possibility to trigger. Increased communication of observations that reveal the situation and trigger restraint.\",\n \"free_ride\": \"Little text. Emphasise the generally favourable overall situation and potentially isolated hazard areas\",\n \"high_alert\": \"Communication across all channels. The focus is no longer on winter sports. Danger even in areas that are not usually at risk of avalanches.\",\n \"spring_diurnal\": \"Favourable situation in the morning, increasing during the day. Assessment should be made locally by observing the softening of the melt-freeze crust and the increasing soaking of the snow cover.\"\n }\n },\n \"examples\": {\n \"title\": \"Examples:\",\n \"text\": {\n \"assessment\": \"Start of the season.\",\n \"stepping_out\": \"Cooling leads to a decrease in the risk of wet snow avalanches after a warm and humid weather phase.\",\n \"status_quo\": \"Consistent wind-slab problem with cold temperatures, loose snow and wind.\",\n \"stepping_back\": \"Abundant fresh snowfall leads to an increase in the danger situation.\",\n \"entrenchment\": \"Critical persistent weak layers problem with potential for dangerously large avalanches. The situation is only stabilising very slowly and requires a great deal of restraint.\",\n \"free_ride\": \"Low avalanche danger, no persistent weak layers, all terrain has already been groomed.\",\n \"high_alert\": \"Danger level 4 or higher due to large amounts of fresh snow and/or problematic, persistent weak layers. \",\n \"spring_diurnal\": \"Spring situation with dry high-pressure weather and moderate temperatures with otherwise mostly stable old snow cover.\"\n }\n },\n \"strategicMindset\": {\n \"assessment\": \"High Uncertainty\",\n \"stepping_out\": \"Improving\",\n \"status_quo\": \"Status Quo\",\n \"stepping_back\": \"Deteriorating\",\n \"entrenchment\": \"Persistent Unstable\",\n \"free_ride\": \"Favorable\",\n \"high_alert\": \"High Alert\",\n \"spring_diurnal\": \"Spring Diurnal\"\n }\n },\n \"decisionTree\": {\n \"filepath\": \"./assets/img/decision_tree-en.svg\",\n \"feedbackURL\": \"https://admin.avalanche.report/umfrage-entscheidungsbaum/en/\",\n \"decisionTree\": \"Árbol de decisión\",\n \"feedback\": \"Comentarios\",\n \"save\": \"Guardar\",\n \"discard\": \"Descartar\"\n }\n },\n \"table\": {\n \"title\": {\n \"date\": \"Fecha\",\n \"status\": {\n \"AT-02\": \"Carintia\",\n \"AT-03\": \"Baja Austria\",\n \"AT-04\": \"Alta Austria\",\n \"AT-05\": \"Salzburgo\",\n \"AT-06\": \"Estiria\",\n \"AT-07\": \"Tirol\",\n \"AT-08\": \"Vorarlberg\",\n \"CH\": \"Suiza\",\n \"DE-BY\": \"Baviera\",\n \"GEOSPHERE\": \"GEOSPHERE\",\n \"IT-32-TN\": \"Trentino\",\n \"IT-32-BZ\": \"Sud Tirol\",\n \"ES-CT-L\": \"Aran\"\n }\n },\n \"status\": {\n \"missing\": \"ausente\",\n \"draft\": \"borrador\",\n \"submitted\": \"enviado\",\n \"published\": \"publicado\",\n \"updated\": \"actualizado\",\n \"resubmitted\": \"reenviado\",\n \"republished\": \"republicado\"\n },\n \"publishBulletinsDialog\": {\n \"message\": \"¿Quieres publicar el boletín?\",\n \"missingDangerRating\": \"Grado de peligro no establecido\",\n \"missingRegion\": \"Regiones no establecidas\",\n \"duplicateRegion\": \"Regiones establecidas varias veces\",\n \"missingAvActivityHighlights\": \"Falta el titular de la situación de aludes\",\n \"missingAvActivityComment\": \"Falta la descripción del peligro de aludes\",\n \"missingSnowpackStructureHighlights\": \"Falta el titular de la estructura del manto\",\n \"missingSnowpackStructureComment\": \"Falta la descripción de la estructura del manto\",\n \"pendingSuggestions\": \"Sugerencias pendientes\",\n \"incompleteTranslation\": \"Traducción incompleta\",\n \"accept\": \"Si\",\n \"reject\": \"No\"\n },\n \"publicationStatusDialog\": {\n \"headline\": \"Estado de publicación\",\n \"publishedBy\": \"Publicado por:\",\n \"publishedAt\": \"Publicado a las:\",\n \"validFor\": \"Válido para:\",\n \"title\": {\n \"prod\": \"Cosas serias\",\n \"test\": \"Test system\",\n \"task\": \"Tarea\",\n \"language\": {\n \"all\": \"TODOS\",\n \"de\": \"DE\",\n \"it\": \"IT\",\n \"en\": \"EN\"\n }\n },\n\n \"email\": {\n \"label\": \"Correos electrónicos\",\n \"tooltip\": \"Enviar correos electrónicos\",\n \"success\": \"{{prefix}}¡Correos electrónicos enviados con éxito!\",\n \"error\": \"{{prefix}}¡No se pudieron enviar los correos electrónicos!\"\n },\n \"telegram\": {\n \"label\": \"Mensajes de Telegram\",\n \"tooltip\": \"Enviar mensajes de Telegram\",\n \"success\": \"{{prefix}}¡Mensajes de Telegram enviados con éxito!\",\n \"error\": \"{{prefix}}¡No se pudieron enviar los mensajes de Telegram!\"\n },\n \"push\": {\n \"label\": \"Notificaciones push\",\n \"tooltip\": \"Enviar notificaciones push\",\n \"success\": \"{{prefix}}¡Notificaciones push enviadas con éxito!\",\n \"error\": \"{{prefix}}¡No se pudieron enviar notificaciones push!\"\n },\n \"accept\": \"De acuerdo\"\n },\n \"mediaFileDialog\": {\n \"headline\": \"Archivo multimedia\",\n \"important\": \"IMPORTANTE\",\n \"missingFile\": \"¡Ningún archivo seleccionado!\",\n \"uploadError\": \"¡Subida fallida!\",\n \"accept\": \"Enviar\",\n \"reject\": \"Cancelar\"\n },\n \"publishBulletinsErrorDialog\": {\n \"message\": \"¡Se ha producido un error publicando los boletines!\",\n \"accept\": \"De acuerdo\"\n },\n \"submitBulletinsDialog\": {\n \"message\": \"¿Quieres enviar el boletín?\",\n \"missingDangerRating\": \"Grado de peligro no establecido\",\n \"missingRegion\": \"Regiones no establecidas\",\n \"missingAvActivityHighlights\": \"Falta el titular de la situación de aludes\",\n \"missingAvActivityComment\": \"Falta la descripción del peligro de aludes\",\n \"missingSnowpackStructureHighlights\": \"Falta el titular de la estructura del manto\",\n \"missingSnowpackStructureComment\": \"Falta la descripción de la estructura del manto\",\n \"pendingSuggestions\": \"Sugerencias pendientes\",\n \"accept\": \"Si\",\n \"reject\": \"No\"\n },\n \"submitBulletinsErrorDialog\": {\n \"message\": \"¡Se ha producido un error enviando los boletines!\",\n \"accept\": \"De acuerdo\"\n },\n \"submitBulletinsDuplicateRegionDialog\": {\n \"message\": \"¡Regiones establecidas varias veces! Los boletines no se pueden enviar.\",\n \"accept\": \"De acuerdo\"\n },\n \"checkBulletinsErrorDialog\": {\n \"message\": \"Se ha producido un error comprobando los boletines\",\n \"accept\": \"De acuerdo\"\n },\n \"previewErrorDialog\": {\n \"message\": \"¡No se pudo cargar la vista previa!\",\n \"accept\": \"De acuerdo\"\n },\n \"checkBulletinsDialog\": {\n \"message\": \"Comprobar boletín\",\n \"missingDangerRating\": \"Grado de peligro no establecido\",\n \"missingRegion\": \"Regiones no establecidas\",\n \"missingAvActivityHighlights\": \"Falta el titular de la situación de aludes\",\n \"missingAvActivityComment\": \"Falta la descripción del peligro de aludes\",\n \"missingSnowpackStructureHighlights\": \"Falta el titular de la estructura del manto\",\n \"missingSnowpackStructureComment\": \"Falta la descripción de la estructura del manto\",\n \"pendingSuggestions\": \"Sugerencias pendientes\",\n \"incompleteTranslation\": \"Traducción incompleta\",\n \"ok\": \"(todo bien)\",\n \"accept\": \"De acuerdo\"\n },\n \"publishAllDialog\": {\n \"message\": \"¿Quieres publicar todas las regiones?\",\n \"accept\": \"Si\",\n \"reject\": \"No\"\n }\n }\n },\n \"training\": {\n \"training\": \"Training\",\n \"timestamp\": \"Training timestamp\"\n },\n \"admin\": {\n \"loadingStatistics\": \"Creando CSV ...\",\n \"server-configuration\": {\n \"title\": \"Servidor\",\n \"button\": {\n \"create\": \"Crear servidor\",\n \"save\": \"Guardar\"\n },\n \"table\": {\n \"name\": \"Nombre\",\n \"username\": \"Nombre de usuario\",\n \"password\": \"Password\",\n \"publishAt5PM\": \"Publicar a las 5PM\",\n \"publishAt8AM\": \"Publicar a las 8PM\",\n \"pdfDirectory\": \"Directorio para PDF\",\n \"htmlDirectory\": \"Directorio para HTML\",\n \"serverImagesUrl\": \"Ruta de acceso al servidor de imágenes\",\n \"dangerLevelElevationDependency\": \"Elevation dependency of danger level\",\n \"mapsPath\": \"Ruta de acceso a mapas\",\n \"mediaPath\": \"Ruta a los ficheros multimedia\",\n \"mapProductionUrl\": \"URL para producción de mapas\",\n \"apiUrl\": \"API URL\"\n },\n \"success\": \"Configuración guardada con éxito\",\n \"error\": \"No se puede guardar la configuración\"\n },\n \"region-configuration\": {\n \"title\": \"Región\",\n \"button\": {\n \"create\": \"Crear región\",\n \"save\": \"Guardar\"\n },\n \"table\": {\n \"general\": {\n \"title\": \"General\",\n \"id\": \"ID\",\n \"microRegions\": \"Nombre de micro-regiones\",\n \"subRegions\": \"Sub-regiones\",\n \"superRegions\": \"Super-regiones\",\n \"neighborRegions\": \"Regiones vecinas\"\n },\n \"publication\": {\n \"title\": \"Publication\",\n \"publishBulletins\": \"Publicar la predicción de aludes\",\n \"publishBlogs\": \"Publicar las entradas de blog\",\n \"createCaamlV5\": \"Crear CAAML v5\",\n \"createCaamlV6\": \"Crear CAAML v6\",\n \"createJson\": \"Crear JSON\",\n \"createMaps\": \"Crear mapas\",\n \"createPdf\": \"Crear PDF\",\n \"sendEmails\": \"Enviar correos\",\n \"createSimpleHtml\": \"Crear HTML simple\",\n \"sendTelegramMessages\": \"Enviar mensajes de telegram\",\n \"sendPushNotifications\": \"Enviar notificaciones push\",\n \"pdfColor\": \"PDF color\",\n \"emailColor\": \"E-mail color\",\n \"pdfMapYAmPm\": \"Y para el mapa PDF (am/pm)\",\n \"pdfMapYFd\": \"Y para el mapa PDF (fd)\",\n \"pdfMapWidthAmPm\": \"Anchura del mapa para PDF (am/pm)\",\n \"pdfMapWidthFd\": \"Anchura del mapa para PDF (fd)\",\n \"pdfMapHeight\": \"Altura del mapa para PDF\",\n \"pdfFooterLogo\": \"Logotipo para el pie de página del PDF\",\n \"pdfFooterLogoColorPath\": \"Logotipo para el pie de página del PDF (color)\",\n \"pdfFooterLogoBwPath\": \"Logotipo para el pie de página del PDF (bw)\",\n \"mapXmax\": \"X del mapa máximo\",\n \"mapXmin\": \"X del mapa mínimo\",\n \"mapYmax\": \"Y del mapa máximo\",\n \"mapYmin\": \"Y del mapa mínimo\",\n \"simpleHtmlTemplateName\": \"Plantilla HTML simple\",\n \"geoDataDirectory\": \"Directorio de geodatos\",\n \"mapLogoColorPath\": \"Logotipo para el mapa (color)\",\n \"mapLogoBwPath\": \"Logotipo para el mapa (bw)\",\n \"mapLogoPosition\": \"Posición del logotipo para el mapa\",\n \"mapCenterLat\": \"Centrar posición del mapa (latitud)\",\n \"mapCenterLng\": \"Centrar posición del mapa (longitud)\",\n \"imageColorbarColorPath\": \"Barra de colores (color)\",\n \"imageColorbarBwPath\": \"Barra de colores (b/w)\"\n },\n \"components\": {\n \"title\": \"Components\",\n \"enableDangerSources\": \"Enable danger sources\",\n \"enableObservations\": \"Enable observations\",\n \"enableModelling\": \"Enable modelling\",\n \"enableWeatherbox\": \"Enable weather box\"\n },\n \"configuration\": {\n \"title\": \"Configuration\",\n \"showMatrix\": \"Mostrar matriz\",\n \"enableMediaFile\": \"Habilitar ficheros multimedia\",\n \"enableStrategicMindset\": \"Enable strategic mindset\",\n \"enableStressLevel\": \"Enable stress level\",\n \"enableAvalancheProblemCornices\": \"Habilitar problema de alud CORNISAS\",\n \"enableAvalancheProblemNoDistinctAvalancheProblem\": \"Habilitar problema de alud NINGÚN PROBLEMA DE ALUDES EVIDENTE\"\n }\n },\n \"success\": \"Configuración guardada con éxito\",\n \"error\": \"No se puede guardar la configuración\"\n },\n \"users\": {\n \"title\": \"Usuarios\",\n \"button\": {\n \"create\": \"Crear usuario\"\n },\n \"tooltip\": {\n \"edit\": \"Editar usuario\",\n \"changePassword\": \"Canvia la contraseña\",\n \"delete\": \"Eliminar usuario\"\n },\n \"table\": {\n \"name\": \"Nombre\",\n \"email\": \"Email\",\n \"organization\": \"Organización\",\n \"regions\": \"Regiones\",\n \"roles\": \"Roles\"\n },\n \"deleteUserModalDialog\": {\n \"message\": \"¿Quieres eliminar al usuario?\",\n \"accept\": \"Si\",\n \"reject\": \"No\"\n },\n \"deleteUser\": {\n \"success\": \"Usuario eliminado\",\n \"error\": \"El usuario no pudo ser eliminado\"\n },\n \"createUser\": {\n \"success\": \"Usuario creado\",\n \"error\": \"No se pudo crear el usuario\"\n },\n \"updateUser\": {\n \"success\": \"Usuario actualizado\",\n \"error\": \"El usuario no pudo ser actualizado\"\n }\n },\n \"createUser\": {\n \"table\": {\n \"image\": \"Image\",\n \"name\": \"Nombre\",\n \"email\": \"Email\",\n \"organization\": \"Organización\",\n \"password\": \"Password\",\n \"password2\": \"Repetir password\",\n \"roles\": \"Roles\",\n \"regions\": \"Regiones\"\n },\n \"error\": {\n \"name\": {\n \"required\": \"Por favor ingrese un nombre\"\n },\n \"email\": {\n \"required\": \"Por favor introduzca una dirección de correo eléctronico\",\n \"invalid\": \"La dirección de correo electrónico es inválida\"\n },\n \"password\": {\n \"required\": \"Por favor introduzca un password\",\n \"length\": \"La contraseña debe tener al menos 8 caracteres\",\n \"mismatch\": \"Las contraseñas no coinciden\"\n }\n },\n \"button\": {\n \"create\": \"Crear usuario\",\n \"update\": \"Actualizar usuario\",\n \"cancel\": \"Cancelar\"\n }\n },\n \"observations\": {\n \"table\": \"Tabla\",\n \"map\": \"Mapa\",\n \"gallery\": \"Gallery\",\n \"filters\": \"Flitros\",\n \"title\": \"Observaciones\",\n \"newObservation\": \"New observation\",\n \"exportObservations\": \"Export observations\",\n \"toggleFilterBar\": \"Show/hide filter bar\",\n \"button\": {\n \"submit\": \"Descargar\"\n },\n \"label\": {\n \"dateRange\": \"Periodo\",\n \"observer\": \"Observador\"\n },\n \"selectRegion\": {\n \"placeholder\": \"Región\",\n \"selectionLabel\": \"{0} region(s) selected\"\n },\n \"selectSources\": {\n \"placeholder\": \"Fuentes\",\n \"selectionLabel\": \"{0} source(s) selected\"\n },\n\n \"charts\": {\n \"charts\": \"Mapas\",\n \"nan\": \"Sin especificación\",\n \"classify\": \"Classificar\",\n \"label\": \"Etiqueta\",\n \"invert\": \"Invertir\",\n \"reset\": \"Restablecer\",\n \"aspect\": {\n \"caption\": \"Orientación\"\n },\n \"elevation\": {\n \"caption\": \"Altitud\"\n },\n \"stability\": {\n \"caption\": \"Estabilidad\"\n },\n \"observationType\": {\n \"caption\": \"Tipo de observación\"\n },\n \"importantObservation\": {\n \"caption\": \"Important\"\n },\n \"avalancheProblem\": {\n \"caption\": \"Problema de aludes\"\n },\n \"dangerPattern\": {\n \"caption\": \"Patrón de peligro\"\n },\n \"days\": {\n \"caption\": \"Día\"\n }\n }\n },\n \"blog\": {\n \"title\": \"Blog\",\n \"language\": {\n \"title\": \"Idioma\",\n \"de\": \"DE\",\n \"it\": \"IT\",\n \"en\": \"EN\"\n },\n \"all\": {\n \"tooltip\": \"Enviar correos electrónicos, Telegram y Push\",\n \"success\": \"{{prefix}}¡Correos electrónicos, Telegram y Push enviados con éxito!\",\n \"error\": \"{{prefix}}¡No se pudo enviar el correo electrónico, Telegram y Push!\"\n },\n \"email\": {\n \"tooltip\": \"Enviar correos electrónicos\",\n \"success\": \"{{prefix}}Correo electrónico enviado con éxito!\",\n \"error\": \"{{prefix}}¡El correo electrónico no pudo ser enviado!\"\n },\n \"telegram\": {\n \"tooltip\": \"Enviar a través del canal de Telegram\",\n \"success\": \"{{prefix}}¡Telegram enviado con éxito!\",\n \"error\": \"{{prefix}}¡No se pudo enviar el Telegram!\"\n },\n \"push\": {\n \"tooltip\": \"Enviar a través de notificaciones push\",\n \"success\": \"{{prefix}}¡Push enviado con éxito!\",\n \"error\": \"{{prefix}}¡No se pudo enviar el push!\"\n }\n }\n },\n \"settings\": {\n \"title\": \"Ajustes\",\n \"changePassword\": {\n \"title\": \"Cambiar la contraseña \",\n \"oldPassword\": {\n \"label\": \"Contraseña actual \",\n \"placeholder\": \"Contraseña actual \"\n },\n \"newPassword1\": {\n \"label\": \"Nueva contraseña\",\n \"placeholder\": \"Nueva contraseña\"\n },\n \"newPassword2\": {\n \"label\": \"Nuevo password (repetir)\",\n \"placeholder\": \"Nueva contraseña\"\n },\n \"submit\": \"Canvia la contraseña\",\n \"passwordChanged\": \"Contraseña cambiada con éxito\",\n \"passwordChangeError\": \"La contraseña no se ha podido cambiar\",\n \"passwordIncorrect\": \"Contraseña actual incorrecta\",\n \"error\": {\n \"oldPassword\": {\n \"required\": \"Por favor, introduce tu contraseña actual\"\n },\n \"newPassword\": {\n \"required\": \"Por favor, introduce una nueva contraseña\",\n \"mismatch\": \"Las contraseñas no coinciden\"\n }\n }\n },\n \"display\": {\n \"title\": \"Mostrar\",\n \"table\": {\n \"showCaaml\": \"Mostrar CAAML\",\n \"showJson\": \"MostrarJSON\"\n }\n }\n },\n \"statistics\": {\n \"title\": \"Estadisticas\",\n \"button\": {\n \"submit\": \"Descargar\"\n },\n \"label\": {\n \"dateRange\": \"Periodo\",\n \"extended\": \"Extensión\",\n \"duplicates\": \"Duplicados\"\n }\n },\n\n \"dangerRating\": {\n \"noRating\": \"Sin clasificar\",\n \"low\": \"débil\",\n \"moderate\": \"limitado\",\n \"considerable\": \"notable\",\n \"high\": \"fuerte\",\n \"veryHigh\": \"muy fuerte\"\n },\n \"avalancheProblem\": {\n \"newSnow\": \"Nieve reciente\",\n \"new_snow\": \"Nieve reciente\",\n \"windSlab\": \"Placas de viento\",\n \"wind_slab\": \"Placas de viento\",\n \"persistentWeakLayers\": \"Capas débiles persistentes\",\n \"persistent_weak_layers\": \"Capas débiles persistentes\",\n \"wetSnow\": \"Nieve húmeda\",\n \"wet_snow\": \"Nieve húmeda\",\n \"glidingSnow\": \"Deslizamientos basales\",\n \"gliding_snow\": \"Deslizamientos basales\",\n \"cornices\": \"Cornisas\",\n \"noDistinctAvalancheProblem\": \"No distinct avalanche problem\",\n \"no_distinct_avalanche_problem\": \"No distinct avalanche problem\",\n \"favourableSituation\": \"Situación favorable\",\n \"favourable_situation\": \"Situación favorable\"\n },\n \"dangerPattern\": {\n \"dp1\": \"pp.1: capas débiles persistentes\",\n \"dp2\": \"pp.2: avalanchas de fondo\",\n \"dp3\": \"pp.3: lluvia\",\n \"dp4\": \"pp.4: frío sobre cálido / cálido sobre frío\",\n \"dp5\": \"pp.5: nevada reciente después de un largo periodo cálido\",\n \"dp6\": \"pp.6: frío, nieve suelta y viento\",\n \"dp7\": \"dp.7: shallow snow next to deep snow\",\n \"dp8\": \"pp.8: escarcha de superfície enterrada\",\n \"dp9\": \"pp.9: nieve redonda enterrada\",\n \"dp10\": \"pp.10: escenario de primavera\"\n },\n \"strategicMindset\": {\n \"title\": \"Strategic Mindset\",\n \"assessment\": \"High Uncertainty\",\n \"stepping_out\": \"Improving\",\n \"status_quo\": \"Status Quo\",\n \"stepping_back\": \"Deteriorating\",\n \"entrenchment\": \"Persistent Unstable\",\n \"free_ride\": \"Favorable\",\n \"high_alert\": \"High Alert\",\n \"spring_diurnal\": \"Spring Diurnal\"\n },\n \"observationType\": {\n \"DrySnowfallLevel\": \"Dry snowfall level\",\n \"TimeSeries\": \"Series temporales\",\n \"Incident\": \"Incidente\",\n \"Profile\": \"Perfil de nieve\",\n \"Closure\": \"Cierre\",\n \"Blasting\": \"Voladura\",\n \"Avalanche\": \"Alud\",\n \"Evaluation\": \"Evaluación\",\n \"SimpleObservation\": \"Observación simple\",\n \"Webcam\": \"Webcam\"\n },\n \"importantObservation\": {\n \"ForBlog\": \"For blog\",\n \"SurfaceHoar\": \"Escarcha de superfície\",\n \"Graupel\": \"Nieve granulada\",\n \"StabilityTest\": \"Test de estabilidad\",\n \"IceFormation\": \"Formación de hielo\",\n \"VeryLightNewSnow\": \"Nieve reciente muy ligera\"\n },\n \"elevationTolerance\": {\n \"exact\": \"exact\",\n \"50m\": \"±50m\",\n \"100m\": \"±100m\",\n \"200\": \"±200m\"\n },\n \"elevationPeriod\": {\n \"duringPrecipitationEvent\": \"Dry snowfall boundary for the entire precipitation event\",\n \"observationPeriod\": \"Dry snowfall boundary at the time of observation\"\n },\n \"aspect\": {\n \"N\": \"N\",\n \"NE\": \"NE\",\n \"E\": \"E\",\n \"SE\": \"SE\",\n \"S\": \"S\",\n \"SW\": \"SW\",\n \"W\": \"W\",\n \"NW\": \"NW\"\n },\n \"role\": {\n \"SUPERADMIN\": \"Super Administrator\",\n \"ADMIN\": \"Administrador\",\n \"FORECASTER\": \"Predictor\",\n \"FOREMAN\": \"Jefe\",\n \"OBSERVER\": \"Observador\"\n },\n \"tendency\": {\n \"decreasing\": \"El peligro de aludes desciende\",\n \"steady\": \"El peligro de aludes se mantiene igual\",\n \"increasing\": \"El peligro de aludes aumenta\"\n },\n \"snowpackStability\": {\n \"unknown\": \"desconocido\",\n \"good\": \"buena\",\n \"fair\": \"regular\",\n \"poor\": \"pobre\",\n \"very_poor\": \"muy pobre\"\n },\n \"frequency\": {\n \"none\": \"(casi) ninguno\",\n \"few\": \"unos pocos\",\n \"some\": \"algunos\",\n \"many\": \"muchos\"\n },\n \"avalancheSize\": {\n \"small\": \"pequeña\",\n \"medium\": \"mediana\",\n \"large\": \"grande\",\n \"very_large\": \"muy grande\",\n \"extreme\": \"extremadamente grande\"\n },\n \"complexity\": {\n \"easy\": \"Fácil\",\n \"challenging\": \"Exigente\",\n \"complex\": \"Complejo\"\n },\n \"glidingSnowActivity\": {\n \"low\": \"débil\",\n \"medium\": \"mediana\",\n \"high\": \"fuerte\"\n },\n \"wetness\": {\n \"dry\": \"dry\",\n \"moist\": \"moist\",\n \"wet\": \"wet\"\n },\n \"characteristic\": {\n \"low\": \"débil\",\n \"medium\": \"mediana\",\n \"high\": \"fuerte\",\n \"very_high\": \"muy fuerte\"\n },\n \"thickness\": {\n \"thin\": \"thin\",\n \"thick\": \"thick\"\n },\n \"snowpackPosition\": {\n \"upper\": \"upper\",\n \"middle\": \"middle\",\n \"lower\": \"lower\",\n \"ground\": \"ground\"\n },\n \"weakLayerCrust\": {\n \"no\": \"no\",\n \"partly\": \"partly\",\n \"yes\": \"yes\"\n },\n \"creationProcess\": {\n \"radiation_recrystallization\": \"radiación\",\n \"diurnal_recrystallization\": \"diurnal\",\n \"melt_layer_recrystallization\": \"melt layer\",\n \"surface_hoar_formation\": \"surface hoar\"\n },\n \"recognizability\": {\n \"very_easy\": \"very easy\",\n \"easy\": \"easy\",\n \"hard\": \"hard\",\n \"very_hard\": \"very hard\"\n },\n \"distribution\": {\n \"isolated\": \"isolated\",\n \"specific\": \"specific\",\n \"widespread\": \"widespread\"\n },\n \"probability\": {\n \"likely\": \"likely\",\n \"possible\": \"possible\",\n \"unlikely\": \"unlikely\"\n },\n \"detailedDaytime\": {\n \"evening\": \"evening\",\n \"first_night_half\": \"first night half\",\n \"second_night_half\": \"second night half\",\n \"morning\": \"morning\",\n \"forenoon\": \"forenoon\",\n \"afternoon\": \"afternoon\"\n },\n \"slopeGradient\": {\n \"moderately_steep\": \"moderately steep\",\n \"steep\": \"steep\",\n \"very_steep\": \"very steep\",\n \"extremely_steep\": \"extremely steep\"\n },\n \"handHardness\": {\n \"fist\": \"F\",\n \"four_fingers\": \"4F\",\n \"one_finger\": \"1F\",\n \"pencil\": \"P\",\n \"knife\": \"K\",\n \"ice\": \"I\"\n },\n \"hardnessTendency\": {\n \"decreasing\": \"softer below\",\n \"steady\": \"uniform\",\n \"increasing\": \"softer above\"\n },\n \"terrainType\": {\n \"gullies\": \"gullies\",\n \"bowls\": \"bowls\",\n \"pass_areas\": \"pass areas\",\n \"ridge_lines\": \"ridge lines\",\n \"adjacent_to_ridge_lines\": \"adjacent to ridge lines\",\n \"distant_from_ridge_lines\": \"distant from ridge lines\",\n \"slope_discontinuities\": \"slope discontinuities\",\n \"convex_terrain\": \"convex terrain\",\n \"concave_terrain\": \"concave terrain\",\n \"steep_terrain\": \"steep terrain\",\n \"very_steep_terrain\": \"very steep terrain\",\n \"open_terrain\": \"open terrain\",\n \"forest\": \"forest\"\n },\n \"dangerSign\": {\n \"shooting_cracks\": \"shooting cracks\",\n \"whumpfing\": \"whumpfing\",\n \"fresh_avalanches\": \"fresh avalanches\"\n },\n \"changeRegionDialog\": {\n \"message\": \"¿Quieres cambiar la región?\",\n \"accept\": \"Si\",\n \"reject\": \"No\"\n },\n \"zamg\": {\n \"table\": \"Tabla\",\n \"map\": \"Mapa\",\n \"region\": \"Región\",\n \"newSnow\": \"Nieve reciente\"\n },\n \"snowpack\": {\n \"plotType\": {\n \"LWC_stratigraphy\": \"nieve húmeda: contenido de agua líquida\",\n \"wet_snow_instability\": \"nieve húmeda: inestabilidad de nieve húmeda \",\n \"Sk38_stratigraphy\": \"capas débiles persistentes: índice de estabilidad SK38\",\n \"stratigraphy\": \"capas débiles persistentes: estratigrafia de la nieve\"\n },\n \"aspect\": {\n \"flat\": \"llano\",\n \"north\": \"norte\",\n \"south\": \"sur\"\n },\n \"meteo\": {\n \"new_snow_plot_3day\": \"nieve reciente (3d)\",\n \"new_snow_plot_7day\": \"nieve reciente (7d)\",\n \"new_snow_plot_1month\": \"nieve reciente (31d)\",\n \"new_snow_plot_season\": \"nieve reciente (temporada)\",\n \"new_snow_plot_forecast\": \"nieve reciente (predicción)\",\n \"wet_snow_plot_3day\": \"nieve húmeda (3d)\",\n \"wet_snow_plot_7day\": \"nieve húmeda (7d)\",\n \"wet_snow_plot_1month\": \"nieve húmeda (31d)\",\n \"wet_snow_plot_season\": \"nieve húmeda (temporada)\",\n \"wet_snow_plot_forecast\": \"nieve húmeda (predicción)\",\n \"HS_table_24h\": \"tabla altura de nieve (1d)\",\n \"HS_table_72h\": \"tabla altura de nieve (3d)\",\n \"HS_table_season\": \"tabla altura de nieve (temporada)\",\n \"HS_table_forecast\": \"tabla altura de nieve (predicción)\",\n \"TA_table_24h\": \"tabla temperatura (1d)\",\n \"TA_table_72h\": \"tabla temperatura (3d)\",\n \"TA_table_season\": \"tabla temperatura (temporada)\"\n }\n },\n \"grainShape\": {\n \"PP\": {\n \"code\": \"PP\",\n \"class\": \"Precipitation Particles\"\n },\n \"PPgp\": {\n \"code\": \"PPgp\",\n \"class\": \"Nieve granulada\"\n },\n \"DF\": {\n \"code\": \"DF\",\n \"class\": \"Decomposing and Fragmented precipitation particles\"\n },\n \"RG\": {\n \"code\": \"RG\",\n \"class\": \"Rounded Grains\"\n },\n \"FC\": {\n \"code\": \"FC\",\n \"class\": \"Faceted Crystals\"\n },\n \"DH\": {\n \"code\": \"DH\",\n \"class\": \"Depth Hoar\"\n },\n \"SH\": {\n \"code\": \"SH\",\n \"class\": \"Surface Hoar\"\n },\n \"MF\": {\n \"code\": \"MF\",\n \"class\": \"Melt Forms\"\n },\n \"MFcr\": {\n \"code\": \"MFcr\",\n \"class\": \"Melt-freeze crust\"\n },\n \"IF\": {\n \"code\": \"IF\",\n \"class\": \"Ice Formations\"\n }\n },\n \"button\": {\n \"yes\": \"yes\",\n \"no\": \"no\"\n },\n \"observations\": {\n \"allowEdit\": \"Edit external observation\",\n \"allowEditTooltip\": \"This will prevent overwrites from {{ value }}\",\n \"editIconTooltip\": \"Edited observation - receives no updates from {{ value }}\",\n \"aspect\": \"Orientación\",\n \"authorName\": \"Nombre del autor\",\n \"avalancheLength\": \"Longitud de alud\",\n \"avalancheProblem\": \"Problema de aludes\",\n \"avalancheSize\": \"Tamaño de alud\",\n \"avalancheType\": \"Tipo de alud\",\n \"avalancheWidth\": \"Ancho de alud\",\n \"search\": \"Busca\",\n \"count\": \"# observaciones:\",\n \"elevationTolerance\": \"Accuracy of elevation data\",\n \"elevationPeriod\": \"Elevation time period\",\n \"layers\": {\n \"observers\": \"Observers\",\n \"weatherStations\": \"Weather stations\",\n \"webcams\": \"Webcams\",\n \"observations\": \"Observaciones\"\n },\n \"weatherStations\": {\n \"tooltips\": {\n \"drySnowfallLevel\": \"Dry snowfall level\",\n \"globalRadiation\": \"Global radiation\",\n \"newSnow\": \"Nieve reciente\",\n \"snowLine\": \"Límite de nieve\",\n \"snowHeight\": \"Snow height\",\n \"snowDifference\": \"Snow difference\",\n \"airTemperature\": \"Air temperature\",\n \"airTemperatureMax\": \"Air temperature Max\",\n \"airTemperatureMin\": \"Air temperature Min\",\n \"surfaceTemperature\": \"Surface temperature\",\n \"surfaceHoar\": \"Potential surface hoar formation\",\n \"surfaceHoarCalc\": \"Potential surface hoar formation (Lehning et. al.)\",\n \"dewPoint\": \"Dew point temperature\",\n \"relativeHumidity\": \"Relative humidity\",\n \"windDirection\": \"Wind direction\",\n \"windSpeed\": \"Wind speed\",\n \"windGust\": \"Wind gust\"\n }\n },\n \"button\": {\n \"add\": \"Añadir observación\",\n \"save\": \"Guardar observación\",\n \"delete\": \"Eliminar observación\",\n \"deleteConfirm\": \"Eliminar observación?\",\n \"discard\": \"Descartar\",\n \"copyDate\": \"Copy event date\"\n },\n \"comment\": \"Comentario\",\n \"content\": \"Contenido\",\n \"dangerRating\": \"Clasificación del peligro\",\n \"elevation\": \"Altitud\",\n \"elevationRange\": \"Elevation range\",\n \"elevationLowerBound\": \"Elevation lower bound\",\n \"elevationUpperBound\": \"Elevation upper bound\",\n \"eventDate\": \"Fecha del evento\",\n \"eventType\": \"Tipo de evento\",\n \"eventTypes\": {\n \"IMPORTANT\": \"Evento importante\",\n \"NEIGHBOR_REGION\": \"Región vecina\",\n \"NORMAL\": \"Evento normal\",\n \"PERSON_DEAD\": \"Evento con personas implicadas (muertos)\",\n \"PERSON_INJURED\": \"Evento con personas implicadas (heridos)\",\n \"PERSON_NO\": \"Evento sin personas implicadas\",\n \"PERSON_UNINJURED\": \"Evento con personas implicadas (ilesos)\",\n \"PERSON_UNKNOWN\": \"Evento (desconocido)\",\n \"TRAFFIC\": \"Tránsito\"\n },\n \"externalURL\": \"External URL (e.g. to photo database)\",\n \"fractureDepth\": \"Profundiad de cicatriz\",\n \"hasCoordinates\": \"Tiene coordenadas\",\n \"incline\": \"Inclinación\",\n \"latitude\": \"Laltitud\",\n \"locationName\": \"Localización\",\n \"longitude\": \"Longitud\",\n \"observationType\": \"Observation type\",\n \"personInvolvement\": \"Person involvement\",\n \"reportDate\": \"Fecha del informe\",\n \"showTable\": \"Tabla\",\n \"withoutCoordinates\": \"Observaciones sin coordenadas:\",\n \"sidebar\": {\n \"filter\": {\n \"title\": \"Filtrar\"\n },\n \"legend\": {\n \"title\": \"Leyenda\"\n },\n \"sources\": {\n \"title\": \"Fuentes de datos\"\n },\n \"views\": {\n \"title\": \"Vistas\"\n }\n }\n },\n \"personInvolvement\": {\n \"Dead\": \"Evento con personas implicadas (muertos)\",\n \"Injured\": \"Evento con personas implicadas (heridos)\",\n \"No\": \"Evento sin personas implicadas\",\n \"Uninjured\": \"Evento con personas implicadas (ilesos)\",\n \"Unknown\": \"Evento (desconocido)\"\n },\n \"units\": {\n \"cm\": \"cm\",\n \"mm\": \"mm\",\n \"m\": \"m\"\n },\n \"qfa\": {\n \"day\": \"Día\",\n \"time\": \"Hora\",\n \"back\": \"Volver\",\n \"parameters\": {\n \"DUST\": \"Polvo del Sahara \",\n \"N\": \"Cobertura total de nubes en /8\",\n \"Nh\": \"Cobertura total de nubes altas en /8\",\n \"Nm\": \"Cobertura total de nubes medias en /8\",\n \"Nl\": \"Cobertura total de nubes bajas en /8\",\n \"N-CU\": \"Cobertura total de cúmulos en /8\",\n \"AUSL.T\": \"temperatura de desencadenamiento\",\n \"SHW-IX\": \"Índice Showalter\",\n \"WX -CUF\": \"tiempo significativo: NIL (ninguno), RASH (lluvia), TS (tormenta eléctrica)\\n\\n\",\n \"RR\": \"Precipitación total [mm]\",\n \"RR-str\": \"precipitaciones estratiformes\",\n \"CONV\": \"Precipitación convectiva [mm]\",\n \"SN\": \"Precipitación en forma de nieve [mm]\",\n \"SN--RA\": \"cota de nieve [m]\",\n \"QAO \": \"{{value}} hPa eq. viento promedio, dirección i velocidad, [°] and [m/s]\",\n \"QAN\": \"viento promedio al suelo, dirección y velocidad, [°] and [m/s]\",\n \"QANmax\": \"viento máx. (rachas) al suelo [m/s]\",\n \"T \": \"{{value}} hPa eq. Temperatura [°C]\",\n \"T m\": \"Temperatura a {{value}}m [°C]\",\n \"T 2m\": \"Temperatura a 2m [°C]\",\n \"Tk 2m\": \"Temperatura a 2m [°K]\",\n \"T GND\": \"temperatura del suelo\",\n \"Max-ADI\": \"Temperatura máxima de mezcla [°C]\",\n \"Min Max\": \"temperatura mín./máx. en las últimas 24h\",\n \"FROST\": \"altura de la isozero [m]\",\n \"W cm\": \"500 hPa eq. viento vertical [cm/s]\",\n \"W --\": \"700 hPa eq. viento vertical [cm/s]\",\n \"W s\": \"{{value}} hPa eq. viento vertical [cm/s]\",\n \"H \": \"{{value}} hPa altura geopotencial [m]\",\n \"RF \": \"{{value}} hPa eq. humedad relativa [%]\"\n }\n }\n}\n","{\n \"daytime\": {\n \"earlier\": \"Plus tôt\",\n \"later\": \"Plus tard\"\n },\n \"login\": {\n \"title\": \"Se connecter\",\n \"text\": \"Connectez-vous à votre compte\",\n \"button\": \"Se connecter\",\n \"stressLevel\": \"Niveau de stress\",\n \"errorDialog\": {\n \"message\": \"Identifiant ou mot de passe incorrect\",\n \"accept\": \"Ok\"\n },\n \"placeholder\": {\n \"username\": \"Veuillez entrer votre identifiant\",\n \"password\": \"Veuillez saisir votre mot de passe\"\n }\n },\n \"sidebar\": {\n \"bulletins\": \"Avalanche.report\",\n \"dangerSources\": \"Sources de danger\",\n \"observations\": \"Observations\",\n \"qfa\": \"QFA\",\n \"modelling\": \"Modélisation\",\n \"modellingForecast\": \"Prévisions\",\n \"modellingZamg\": \"ZAMG multi-modèle\",\n \"modellingZamgECMWF\": \"ZAMG ECMWF-EPS\",\n \"modellingZamgCLAEF\": \"ZAMG CLAEF-EPS\",\n \"modellingZamgMeteogram\": \"GeoSphere météogramme\",\n \"modellingSnowpack\": \"SNOWPACK model\",\n \"modellingSnowpackMeteo\": \"SNOWPACK modelled meteo\",\n \"weatherbox\": \"Boîte météo\",\n \"awsome\": \"AWSOME\",\n \"snowpack\": \"SNOWPACK\",\n \"geosphere\": \"GeoSphere\"\n },\n \"menu\": {\n \"logout\": \"Se déconnecter\",\n \"language\": \"Langue\",\n \"en\": \"Anglais\",\n \"de\": \"Allemand\",\n \"fr\": \"Français\",\n \"it\": \"Italien\",\n \"es\": \"Espagnol\",\n \"ca\": \"Catalan\",\n \"oc\": \"Aranais\",\n \"fullscreen\": \"Plein écran\",\n \"settings\": \"Paramètres\",\n \"statistics\": \"Statistiques\",\n \"admin\": \"Admin\",\n \"region\": \"Région de prévision\",\n \"education\": \"Pédagogie\"\n },\n \"matrix\": {\n \"label\": {\n \"snowpackStability\": \"Stabilité du manteau neigeux\",\n \"frequency\": \"Fréquence\",\n \"avalancheSize\": \"Taille d'avalanche\",\n \"dangerRating\": \"Degré de danger \",\n \"override\": \"(remplacer degré de danger)\",\n \"matrix\": \"Matrice\",\n \"referToFairStability\": \"Voir stabilité moyenne\",\n \"referToPoorStability\": \"Voir stabilité faible\",\n \"dangerLevel1\": \"Indice de risque 1 (Faible)\"\n }\n },\n \"dangerSources\": {\n \"status\": {\n \"missing\": \"manquant\",\n \"available\": \"disponible\",\n \"forecast\": \"Prévisions\",\n \"analysis\": \"analyse\",\n \"loading\": \"Chargement des sources de danger...\",\n \"saveError\": \"Impossible de sauvegarder la source de danger !\",\n \"loadDangerSourcesError\": \"Impossible de charger les sources de danger !\",\n \"loadVariantsError\": \"Impossible d'éditer ce type de source.\"\n },\n \"variantStatus\": {\n \"active\": \"active\",\n \"dormant\": \"endormie\",\n \"inactive\": \"inactive\"\n },\n \"tooltip\": {\n \"read\": \"Lire sources de danger\",\n \"edit\": \"Éditer sources de danger\"\n },\n \"table\": {\n \"loadMore\": \"Charger {{count}} jours de plus\",\n \"title\": {\n \"forecast\": \"Prévisions\",\n \"analysis\": \"Analyse\"\n }\n },\n \"create\": {\n \"variantStatus\": \"Statut\",\n \"variantEditable\": \"Ce type de source peut être édité.\",\n \"variantNotEditable\": \"Impossible d'éditer ce type de source.\",\n \"noVariantsForSelectedDay\": \"Pas de type de source défini pour cette date.\",\n \"tooltip\": {\n \"editDangerSource\": \"Éditer source de danger\",\n \"loadVariants\": \"Charger les types de source de la veille\",\n \"edit\": \"Éditer les microrégions\",\n \"copy\": \"Copier type de source\",\n \"delete\": \"Effacer type de source\",\n \"compare\": \"Comparer type de source\",\n \"forecast\": \"Comparer avec les prévisions\"\n },\n \"createDangerSource\": \"Créer source de danger\",\n \"createVariant\": \"Créer nouveau type de source\",\n \"noDangerSources\": \"Aucune source de danger\",\n \"title\": {\n \"avalanche\": \"Avalanche\",\n \"matrix\": \"Matrice\",\n \"characteristics\": \"Caractéristiques\",\n \"comment\": \"Commentaire\"\n },\n \"label\": {\n \"glidingSnowActivity\": \"Activité de neige glissante\",\n \"snowHeight\": \"Hauteur de neige\",\n \"snowHeightAverage\": \"Average snow height\",\n \"zeroDegreeIsotherm\": \"Isotherme 0 °C\",\n \"looseSnowMoisture\": \"Humidité de la neige meuble\",\n \"looseSnowGrainShape\": \"Forme des grains de neige meuble\",\n \"slabGrainShape\": \"Forme des grains de neige de la plaque\",\n \"slabThickness\": \"Épaisseur de la plaque\",\n \"slabHandHardness\": \"Dureté de la plaque au test manuel\",\n \"slabHardnessProfile\": \"Dureté de la plaque\",\n \"slabEnergyTransferPotential\": \"Potentiel de transfert d'énergie de la plaque\",\n \"slabDistribution\": \"Répartition de la plaque\",\n \"weakLayerGrainShape\": \"Forme des grains de la couche fragile\",\n \"weakLayerGrainSize\": \"Taille des grains de la couche fragile\",\n \"weakLayerPersistent\": \"Persistance de la couche fragile\",\n \"weakLayerThickness\": \"Épaisseur de la couche fragile\",\n \"weakLayerStrength\": \"Résistance de la couche fragile\",\n \"weakLayerWet\": \"La couche fragile, est-elle mouillée ?\",\n \"weakLayerCrustAbove\": \"Croûte sur la couche fragile\",\n \"weakLayerCrustBelow\": \"Croûte sous la couche fragile\",\n \"weakLayerPosition\": \"Position de la couche fragile\",\n \"weakLayerCreation\": \"Formation de la couche fragile\",\n \"weakLayerDistribution\": \"Répartition de la couche fragile\",\n \"dangerSpotRecognizability\": \"Reconnaître les endroits dangereux\",\n \"remoteTriggering\": \"Déclenchement à distance\",\n \"hasDaytimeDependency\": \"Selon le moment de la journée\",\n \"dangerIncreaseWithElevation\": \"Augmentation du danger avec l'altitude\",\n \"runoutIntoGreen\": \"Zone de dépôt hors neige\",\n \"highestDangerAspect\": \"Risque le plus élevé\",\n \"dangerPeak\": \"Pic de danger\",\n \"slopeGradient\": \"Pente\",\n \"naturalRelease\": \"Avalanches spontanées\",\n \"terrainTypes\": \"Types de terrain\",\n \"dangerSigns\": \"Signes de danger\",\n \"aspects\": \"Expositions\"\n },\n \"editVariantDialog\": {\n \"save\": \"Sauvegarder\",\n \"cancel\": \"Annuler\"\n },\n \"deleteVariantDialog\": {\n \"message\": \"Effacer ce type de source ?\",\n \"accept\": \"Oui\",\n \"reject\": \"Non\"\n },\n \"noRegionDialog\": {\n \"message\": \"Vous devez avoir au moins une microrégion.\",\n \"accept\": \"Ok\"\n },\n \"discardDialog\": {\n \"message\": \"Abandonner les modifications ?\",\n \"accept\": \"Oui\",\n \"reject\": \"Non\"\n },\n \"saveErrorDialog\": {\n \"message\": \"Erreur en sauvegardant les sources de dangers !\",\n \"accept\": \"Ok\"\n },\n \"loadDialog\": {\n \"message\": \"Charger tous les types de sources de danger de la veille ?\",\n \"accept\": \"Oui\",\n \"reject\": \"Non\"\n }\n }\n },\n \"avalancheType\": {\n \"title\": \"Type d'avalanche\",\n \"label\": {\n \"slab\": \"PLAQUE DE NEIGE\",\n \"loose\": \"NEIGE MEUBLE\",\n \"glide\": \"NEIGE GLISSANTE\"\n },\n \"tooltip\": {\n \"slab\": \"Avalanche de plaque\",\n \"loose\": \"Avalanche de neige meuble\",\n \"glide\": \"Avalanche de glissement\"\n }\n },\n \"elevation\": {\n \"title\": \"Altitude\",\n \"high\": \"Au-dessous\",\n \"low\": \"Au-dessus\",\n \"treeline\": \"Limite de la forêt\"\n },\n \"bulletins\": {\n \"title\": \"Avalanche.report\",\n \"tooltip\": {\n \"edit\": \"Éditer le bulletin\",\n \"read\": \"Lire le bulletin\",\n \"copy\": \"Copier le bulletin\",\n \"paste\": \"Coller le bulletin\",\n \"cancel\": \"Annuler la copie\",\n \"update\": \"Editer\",\n \"submit\": \"Envoyer\",\n \"submitUpdate\": \"Envoyer la mise à jour\",\n \"publishChange\": \"Publication directe (pas de messages)\",\n \"publishUpdate\": \"Publication directe\",\n \"caaml\": \"Afficher CAAML\",\n \"json\": \"Afficher JSON\",\n \"create\": \"Créer le bulletin\",\n \"preview\": \"Aperçu du bulletin (PDF)\",\n \"check\": \"Vérifier le bulletin\",\n \"info\": \"Afficher l'état de la publication\",\n \"loadSuggestionFromDangerSources\": \"Load suggestion\",\n \"deleteAllWarningRegions\": \"Delete all warning regions\",\n \"publishAll\": \"Publier toutes les régions de prévision\",\n \"mediaFile\": \"Télécharger un fichier média\"\n },\n \"status\": {\n \"submittedInfo\": \"Publication prévue à 17h00\",\n \"resubmittedInfo\": \"Publication prévue à 08h00\",\n \"publishedInfo\": \"Publié\",\n \"noPublicationInfo\": \"PAS de publication automatique\",\n \"loadingPreview\": \"Créer un aperçu PDF\",\n \"loading\": \"Chargement du bulletin...\",\n \"loadMoreBulletins\": \"Charger {{count}} autres bulletins\",\n \"publishing\": \"Bulletin en cours de publication...\",\n \"submitting\": \"Bulletin en cours d'envoi...\",\n \"saveError\": \"Impossible de sauvegarder le bulletin !\",\n \"loadBulletinsError\": \"Impossible de charger les bulletins !\"\n },\n \"create\": {\n \"tooltip\": {\n \"edit\": \"Éditer les microrégions\",\n \"copy\": \"Copier la région de prévision\",\n \"delete\": \"Effacer la région de prévision\",\n \"compare\": \"Compare region\",\n \"undo\": \"Annuler dernière modification dans région de prévision\",\n \"redo\": \"Rétablir dernière modification dans région de prévision\",\n \"createRegion\": \"Créer région de prévision\",\n \"cancel\": \"Annuler\",\n \"acceptSuggestion\": \"Accepter les régions proposées\",\n \"rejectSuggestion\": \"Refuser les régions proposées\",\n \"saveChanges\": \"Sauvegarder les modifications\",\n \"discardChanges\": \"Abandonner les modifications\",\n \"incompleteAvalancheProblem\": \"Situation avalancheuse typique incomplète\",\n \"saveBulletin\": \"Enregistrer le bulletin\",\n \"discardBulletin\": \"Abandonner les modifications du bulletin\",\n \"loadBulletin\": \"Téléchargement du bulletin de la veille\",\n \"uploadJsonBulletin\": \"Mettre en ligne au format JSON\",\n \"downloadJsonBulletin\": \"Télécharger au format JSON\",\n \"daytimeDependency\": \"Selon le moment de la journée\",\n \"treeline\": \"Limite de la forêt\",\n \"tendency\": {\n \"decreasing\": \"Le danger d'avalanche diminue\",\n \"steady\": \"Le danger d'avalanche reste inchangé\",\n \"increasing\": \"Le danger d'avalanche augmente\",\n \"danger\": \"Danger d'avalanche\"\n },\n \"textcat\": {\n \"edit\": \"Éditer\",\n \"copy\": \"Copier\",\n \"paste\": \"Coller\",\n \"example\": \"Télécharger exemple de texte\",\n \"delete\": \"Effacer\"\n },\n \"moveUpAvalancheProblem\": \"Déplacer situation avalancheuse typique en haut\",\n \"moveDownAvalancheProblem\": \"Déplacer situation avalancheuse typique en bas\",\n \"dangerRatingDirectionUp\": \"Vers le haut\",\n \"dangerRatingDirectionDown\": \"Vers le bas\"\n },\n \"save\": \"Sauvegarder\",\n \"discard\": \"Abandonner\",\n \"back\": \"Retour\",\n \"createAggregatedRegion\": \"Nouvelle région de prévision\",\n \"pasteAggregatedRegion\": \"Coller région de prévision\",\n \"pendingSuggestions\": \"Suggestions\",\n \"rejectSuggestion\": \"Refuser\",\n \"acceptSuggestion\": \"Accepter\",\n \"cancelCopyBulletin\": \"Annuler\",\n \"createAvalancheProblem\": \"Situation avalancheuse typique nouvelle\",\n \"ownRegions\": \"Mes régions de prévision\",\n \"foreignRegions\": \"Régions étrangères\",\n \"externalRegions\": \"Régions externes\",\n \"mapSelectRegion\": \"Sélectionner des régions sur la carte.\",\n \"statusHeader\": \"Statut du bulletin\",\n \"suggestions\": \"Suggestions\",\n \"noBulletinsForSelectedDay\": \"Pas de région définie pour cette date.\",\n \"autosave\": \"Sauvegardé automatiquement\",\n \"regionEditable\": \"Cette région de prévision peut être éditée.\",\n \"regionNotEditable\": \"Impossible d'éditer cette région de prévision.\",\n \"regionLocked\": \"Cette région de prévision est verrouillée.\",\n \"changeDangerRatingElevation\": \"Extension de l'indice de risque\",\n \"mapTop\": \"Carte au-dessus\",\n \"mapLeft\": \"Carte sur le côté\",\n \"showNotes\": \"Afficher les notes\",\n \"hideNotes\": \"Masquer les notes\",\n \"incompleteAvalancheProblem\": \"Incomplet\",\n \"label\": {\n \"importantObservations\": \"Observations importantes\",\n \"avalancheProblems\": \"Situation avalancheuse typique\",\n \"aspects\": \"Expositions\",\n \"highlights\": \"Vigilance particulière \",\n \"avActivityHighlights\": \"Titre situation avalancheuse\",\n \"avActivityComment\": \"Description du danger d'avalanche\",\n \"snowpackStructureComment\": \"Description structure du manteau neigeux\",\n \"dangerPatterns\": \"Modèle de risques\",\n \"tendencyComment\": \"Description de la tendance\",\n \"notes\": \"Notes\"\n },\n \"copyRegion\": {\n \"label\": \"Copier la région de prévision dans un autre bulletin\",\n \"select\": \"Copier dans...\",\n \"currentBulletin\": \"Ce bulletin\"\n },\n \"title\": {\n \"avalancheProblem\": \"Situations avalancheuses typiques\",\n \"dangerDescription\": \"Description du danger d'avalanche\",\n \"forenoon\": \"Matin\",\n \"afternoon\": \"Après-midi\",\n \"snowpackStructure\": \"Structure du manteau neigeux\",\n \"tendency\": \"Tendance\",\n \"showTranslations\": \"Afficher traductions\",\n \"hideTranslations\": \"Masquer traductions\"\n },\n \"placeholder\": {\n \"notes\": \"Écrivez ici ...\"\n },\n \"pmDialog\": {\n \"noIFrameSupport\": \"Votre navigateur ne supporte pas les IFrames !\"\n },\n \"discardDialog\": {\n \"message\": \"Abandonner les modifications ?\",\n \"accept\": \"Oui\",\n \"reject\": \"Non\"\n },\n \"deleteAggregatedRegionDialog\": {\n \"message\": \"Effacer cette région ?\",\n \"accept\": \"Oui\",\n \"reject\": \"Non\"\n },\n \"noRegionDialog\": {\n \"message\": \"Vous devez avoir au moins une microrégion.\",\n \"accept\": \"Ok\"\n },\n \"loadDialog\": {\n \"message\": \"Télécharger les bulletins de la veille ?\",\n \"accept\": \"Oui\",\n \"reject\": \"Non\"\n },\n \"deleteAllWarningRegionsDialog\": {\n \"message\": \"Do you want to delete all warning regions?\",\n \"accept\": \"Oui\",\n \"reject\": \"Non\"\n },\n \"loadAutoSaveDialog\": {\n \"message\": \"Télécharger le bulletin sauvegardé automatiquement ?\",\n \"accept\": \"Oui\",\n \"reject\": \"Non\"\n },\n \"saveErrorDialog\": {\n \"message\": \"Erreur en sauvegardant les bulletins !\",\n \"accept\": \"Ok\"\n },\n \"changeErrorDialog\": {\n \"message\": \"Erreur lors de la modification des bulletins !\",\n \"accept\": \"Ok\"\n },\n \"loadingErrorDialog\": {\n \"message\": \"Erreur lors du téléchargement des bulletins !\",\n \"accept\": \"Ok\"\n },\n \"loadingJsonFileErrorDialog\": {\n \"message\": \"Erreur de chargement des bulletins du fichier JSON\",\n \"accept\": \"Ok\"\n },\n \"avalancheProblemErrorDialog\": {\n \"message\": \"Problème d'avalanche, expositions, stabilité du manteau neigeux, fréquence et/ou taille de l'avalanche manquent pour au moins un problème d'avalanche.\",\n \"accept\": \"Ok\"\n },\n \"loadAvActivityCommentExampleTextDialog\": {\n \"message\": \"Pour quelle situation souhaitez-vous charger un exemple de texte\",\n \"newSnow\": \"Neige fraîche\",\n \"windSlab\": \"Plaque à vent\",\n \"persistentWeakLayers\": \"Neige ancienne (Sous-couche fragile persistante)\",\n \"wetSnow\": \"Avalanches mouillées (Neige humide)\",\n \"glidingSnow\": \"Avalanches de glissement (Avalanches de fond)\",\n \"favourableSituation\": \"Situation favorable\",\n \"cancel\": \"Annuler\"\n },\n \"removeDaytimeDependencyDialog\": {\n \"message\": \"Quelles sont les situations avalancheuses que vous souhaitez conserver ?\",\n \"cancel\": \"Annuler\"\n },\n \"strategicMindsetDialog\": {\n \"title\": \"États d'esprit stratégiques\",\n \"introduction\": \"L'« état d'esprit stratégique » a pour but d'exprimer notre attitude mentale à l'égard de la situation avalancheuse et de son évolution dans la région de prévision correspondante. Il ne doit pas découler directement de l'évaluation des dangers, mais plutôt être compris et utilisé comme une impression intuitive de la situation globale. Les « états d'esprit stratégiques » sont donc avant tout un outil de communication. En les utilisant ainsi que les définitions associées, nous, prévisionnistes, pouvons échanger rapidement et efficacement des informations sur l'évolution de la situation de danger et trouver un langage commun pour la communication.\",\n \"description\": {\n \"title\": \"Description :\",\n \"text\": {\n \"assessment\": \"L'évaluation du danger est très incertaine en raison d'informations insuffisantes provenant du terrain.\",\n \"stepping_out\": \"Tendance à la baisse du danger d'avalanche (y compris à l'intérieur d'un indice de danger).\",\n \"status_quo\": \"Même situation de danger. Pas de changement significatif par rapport à la veille.\",\n \"stepping_back\": \"Tendance à l'augmentation du danger d'avalanche (y compris à l'intérieur d'un indice de danger).\",\n \"entrenchment\": \"Situation avalancheuse presque constante et tendue. Le principal danger provient d'une ou plusieurs couches faibles persistantes susceptibles de se déclencher.\",\n \"free_ride\": \"Faible risque d'avalanche avec une couverture neigeuse généralement stable. Seules de petites avalanches sont possibles sur les terrains extrêmement escarpés.\",\n \"high_alert\": \"Situation avalancheuse exceptionnelle avec un indice de risque fort à très fort. Des avalanches spontanées très grandes ou d'ampleur exceptionnelle sont possibles.\",\n \"spring_diurnal\": \"Des avalanches de neige mouillée durant la journée qui sont soumises à un net réchauffement durant la journée sont décisives pour l'évaluation des risques.\"\n }\n },\n \"communication\": {\n \"title\": \"Communication :\",\n \"text\": {\n \"assessment\": \"La situation avalancheuse doit être évaluée sur place. Sortie déconseillée.\",\n \"stepping_out\": \"Diminution progressive du danger. Toutefois, la prudence reste de mise et il convient d'évaluer localement l'amélioration de la situation avant de s'engager sur un terrain plus risqué. \",\n \"status_quo\": \"La situation de danger reste inchangée. Les retours d'observateurs permet de mieux définir la situation de danger. Dans la communication, il faudrait mettre en avant les terrains plus favorables. \",\n \"stepping_back\": \"Communication claire de l'augmentation du danger d'avalanche - y compris dans un même indice de risque. Communiquer sur les causes garantit une meilleure compréhension. \",\n \"entrenchment\": \"Prudence et vigilance s'imposent. La situation n'évolue guère. Si possible, fournir des informations aussi précises que possible sur la distribution et un possible déclenchement. Intensifier la communication des observations illustrant la situation pour susciter la vigilance.\",\n \"free_ride\": \"Peu de texte. Souligner la situation générale favorable et les zones de danger potentiellement isolées.\",\n \"high_alert\": \"Communication sur tous les canaux. L'accent n'est plus mis sur les sports d'hiver. Le danger existe même dans des zones qui, habituellement, ne sont pas exposées au risque d'avalanche.\",\n \"spring_diurnal\": \"Situation favorable le matin, s'accentuant durant la journée. L'évaluation doit se faire localement en observant le ramollissement de la croûte de regel et la saturation croissante en eau du manteau neigeux.\"\n }\n },\n \"examples\": {\n \"title\": \"Exemples :\",\n \"text\": {\n \"assessment\": \"Début de saison.\",\n \"stepping_out\": \"Le refroidissement entraîne une diminution du risque d'avalanches de neige mouillée après une phase de temps chaud et humide.\",\n \"status_quo\": \"Problème constant de plaques à vent avec des températures froides, de la neige meuble et du vent.\",\n \"stepping_back\": \"L'abondance de neige fraîche entraîne une augmentation des situations avalancheuses.\",\n \"entrenchment\": \"Problème sérieux de couches faibles persistantes avec risque d'avalanches de grande ampleur. La situation ne se stabilise que très lentement et nécessite une grande vigilance.\",\n \"free_ride\": \"Faible danger d'avalanche, pas de couches faibles persistantes, tous les terrains ont déjà été damés.\",\n \"high_alert\": \"Indice de danger 4 ou plus en raison de grandes quantités de neige fraîche et/ou de couches faibles problématiques et persistantes. \",\n \"spring_diurnal\": \"Situation printanière avec un temps anticyclonique sec et des températures modérées ainsi qu'un manteau neigeux ancien généralement stable.\"\n }\n },\n \"strategicMindset\": {\n \"assessment\": \"Grande incertitude\",\n \"stepping_out\": \"En cours d'amélioration\",\n \"status_quo\": \"Statu quo\",\n \"stepping_back\": \"En cours de détérioration\",\n \"entrenchment\": \"Persistante instable\",\n \"free_ride\": \"Favorable\",\n \"high_alert\": \"Vigilance rouge\",\n \"spring_diurnal\": \"Situation de printemps\"\n }\n },\n \"decisionTree\": {\n \"filepath\": \"./assets/img/decision_tree-en.svg\",\n \"feedbackURL\": \"https://admin.avalanche.report/umfrage-entscheidungsbaum/en/\",\n \"decisionTree\": \"Arbre de décision\",\n \"feedback\": \"Retour d'informations\",\n \"save\": \"Sauvegarder\",\n \"discard\": \"Abandonner\"\n }\n },\n \"table\": {\n \"title\": {\n \"date\": \"Date\",\n \"status\": {\n \"AT-02\": \"Carinthie\",\n \"AT-03\": \"Basse-Autriche\",\n \"AT-04\": \"Haute-Autriche\",\n \"AT-05\": \"Salzbourg\",\n \"AT-06\": \"Styrie\",\n \"AT-07\": \"Tyrol\",\n \"AT-08\": \"Vorarlberg\",\n \"CH\": \"Suisse\",\n \"DE-BY\": \"Bavière\",\n \"GEOSPHERE\": \"GEOSPHERE\",\n \"IT-32-TN\": \"Trentin\",\n \"IT-32-BZ\": \"Tyrol du Sud\",\n \"ES-CT-L\": \"Aran\"\n }\n },\n \"status\": {\n \"missing\": \"manquant\",\n \"draft\": \"ébauche\",\n \"submitted\": \"envoyé\",\n \"published\": \"publié\",\n \"updated\": \"mis à jour\",\n \"resubmitted\": \"envoyé à nouveau\",\n \"republished\": \"publié à nouveau\"\n },\n \"publishBulletinsDialog\": {\n \"message\": \"Publier le bulletin ?\",\n \"missingDangerRating\": \"Indice de risque non défini\",\n \"missingRegion\": \"Régions non évaluée\",\n \"duplicateRegion\": \"Régions notées plusieurs fois\",\n \"missingAvActivityHighlights\": \"Titre situation avalancheuse manque\",\n \"missingAvActivityComment\": \"Description du danger d'avalanche manque\",\n \"missingSnowpackStructureHighlights\": \"Titre structure du manteau neigeux manque\",\n \"missingSnowpackStructureComment\": \"Description structure du manteau neigeux manque\",\n \"pendingSuggestions\": \"Propositions en attente\",\n \"incompleteTranslation\": \"Traduction incomplète\",\n \"accept\": \"Oui\",\n \"reject\": \"Non\"\n },\n \"publicationStatusDialog\": {\n \"headline\": \"Statut de publication\",\n \"publishedBy\": \"Publié par :\",\n \"publishedAt\": \"Publié à :\",\n \"validFor\": \"Valide pour:\",\n \"title\": {\n \"prod\": \"Système productif\",\n \"test\": \"Test système\",\n \"task\": \"Tâche\",\n \"language\": {\n \"all\": \"TOUT\",\n \"de\": \"DE\",\n \"it\": \"IT\",\n \"en\": \"EN\"\n }\n },\n\n \"email\": {\n \"label\": \"E-mails\",\n \"tooltip\": \"Envoyer e-mails\",\n \"success\": \"{{prefix}}mails envoyés\",\n \"error\": \"Échec envoi {{prefix}}mails !\"\n },\n \"telegram\": {\n \"label\": \"Messages Telegram\",\n \"tooltip\": \"Envoyer messages Telegram\",\n \"success\": \"{{prefix}}messages Telegram envoyés\",\n \"error\": \"Échec envoi {{prefix}}messages Telegram !\"\n },\n \"push\": {\n \"label\": \"Notifications push\",\n \"tooltip\": \"Envoyer notifications push\",\n \"success\": \"{{prefix}}notifications push envoyés\",\n \"error\": \"Échec envoi {{prefix}}notifications push !\"\n },\n \"accept\": \"Ok\"\n },\n \"mediaFileDialog\": {\n \"headline\": \"Fichier média\",\n \"important\": \"IMPORTANT\",\n \"missingFile\": \"Aucun fichier sélectionné !\",\n \"uploadError\": \"Échec du téléchargement !\",\n \"accept\": \"Envoyer\",\n \"reject\": \"Annuler\"\n },\n \"publishBulletinsErrorDialog\": {\n \"message\": \"Erreur lors de la publication des bulletins !\",\n \"accept\": \"Ok\"\n },\n \"submitBulletinsDialog\": {\n \"message\": \"Envoyer le bulletin ?\",\n \"missingDangerRating\": \"Indice de risque non défini\",\n \"missingRegion\": \"Régions non évaluée\",\n \"missingAvActivityHighlights\": \"Titre situation avalancheuse manque\",\n \"missingAvActivityComment\": \"Description du danger d'avalanche manque\",\n \"missingSnowpackStructureHighlights\": \"Titre structure du manteau neigeux manque\",\n \"missingSnowpackStructureComment\": \"Description structure du manteau neigeux manque\",\n \"pendingSuggestions\": \"Propositions en attente\",\n \"accept\": \"Oui\",\n \"reject\": \"Non\"\n },\n \"submitBulletinsErrorDialog\": {\n \"message\": \"Erreur lors de l'envoi des bulletins !\",\n \"accept\": \"Ok\"\n },\n \"submitBulletinsDuplicateRegionDialog\": {\n \"message\": \"Régions de prévision évaluées plusieurs fois ! Impossible d'envoyer le bulletin.\",\n \"accept\": \"Ok\"\n },\n \"checkBulletinsErrorDialog\": {\n \"message\": \"Erreur lors du contrôle des bulletins !\",\n \"accept\": \"Ok\"\n },\n \"previewErrorDialog\": {\n \"message\": \"Impossible de charger l'aperçu\",\n \"accept\": \"Ok\"\n },\n \"checkBulletinsDialog\": {\n \"message\": \"Contrôler le bulletin\",\n \"missingDangerRating\": \"Indice de risque non défini\",\n \"missingRegion\": \"Régions non évaluée\",\n \"missingAvActivityHighlights\": \"Titre situation avalancheuse manque\",\n \"missingAvActivityComment\": \"Description du danger d'avalanche manque\",\n \"missingSnowpackStructureHighlights\": \"Titre structure du manteau neigeux manque\",\n \"missingSnowpackStructureComment\": \"Description structure du manteau neigeux manque\",\n \"pendingSuggestions\": \"Propositions en attente\",\n \"incompleteTranslation\": \"Traduction incomplète\",\n \"ok\": \"(tout bon)\",\n \"accept\": \"Ok\"\n },\n \"publishAllDialog\": {\n \"message\": \"Publier toutes les régions ?\",\n \"accept\": \"Oui\",\n \"reject\": \"Non\"\n }\n }\n },\n \"training\": {\n \"training\": \"Exercice\",\n \"timestamp\": \"Moment de l'exercice\"\n },\n \"admin\": {\n \"loadingStatistics\": \"CSV en cours de création...\",\n \"server-configuration\": {\n \"title\": \"Serveur\",\n \"button\": {\n \"create\": \"Ajouter serveur\",\n \"save\": \"Sauvegarder\"\n },\n \"table\": {\n \"name\": \"Nom\",\n \"username\": \"Nom d'utilisateur\",\n \"password\": \"Mot de passe\",\n \"publishAt5PM\": \"Publier à 17h00\",\n \"publishAt8AM\": \"Publier à 08h00\",\n \"pdfDirectory\": \"Répertoire pour PDF\",\n \"htmlDirectory\": \"Répertoire pour HTML\",\n \"serverImagesUrl\": \"Chemin vers les images du serveur\",\n \"dangerLevelElevationDependency\": \"Elevation dependency of danger level\",\n \"mapsPath\": \"Chemin vers les cartes\",\n \"mediaPath\": \"Chemin vers les fichiers média\",\n \"mapProductionUrl\": \"URL pour la production des cartes\",\n \"apiUrl\": \"API URL\"\n },\n \"success\": \"Configuration sauvegardée avec succès\",\n \"error\": \"Impossible de sauvegarder la configuration\"\n },\n \"region-configuration\": {\n \"title\": \"Région de prévision\",\n \"button\": {\n \"create\": \"Créer région de prévision\",\n \"save\": \"Sauvegarder\"\n },\n \"table\": {\n \"general\": {\n \"title\": \"Général\",\n \"id\": \"ID\",\n \"microRegions\": \"Nombre de microrégions\",\n \"subRegions\": \"Sous-régions\",\n \"superRegions\": \"Super-régions\",\n \"neighborRegions\": \"Régions voisines\"\n },\n \"publication\": {\n \"title\": \"Publication\",\n \"publishBulletins\": \"Publier prévision d'avalanches\",\n \"publishBlogs\": \"Publier articles de blog\",\n \"createCaamlV5\": \"Créer CAAML v5\",\n \"createCaamlV6\": \"Créer CAAML v6\",\n \"createJson\": \"Créer JSON\",\n \"createMaps\": \"Créer cartes\",\n \"createPdf\": \"Créer PDF\",\n \"sendEmails\": \"Envoyer mails\",\n \"createSimpleHtml\": \"Créer HTML simple\",\n \"sendTelegramMessages\": \"Envoyer messages Telegram\",\n \"sendPushNotifications\": \"Envoyer notifications push\",\n \"pdfColor\": \"PDF couleur\",\n \"emailColor\": \"Mail couleur\",\n \"pdfMapYAmPm\": \"Y pour carte PDF (am/pm)\",\n \"pdfMapYFd\": \"Y pour carte PDF (fd)\",\n \"pdfMapWidthAmPm\": \"Largeur de carte pour PDF (am/pm)\",\n \"pdfMapWidthFd\": \"Largeur de carte pour PDF (fd)\",\n \"pdfMapHeight\": \"Hauteur de carte pour PDF\",\n \"pdfFooterLogo\": \"Logo pour pied de page PDF\",\n \"pdfFooterLogoColorPath\": \"Logo pour pied de page PDF (couleur)\",\n \"pdfFooterLogoBwPath\": \"Logo pour pied de page PDF (noir et blanc)\",\n \"mapXmax\": \"Carte X max\",\n \"mapXmin\": \"Carte X min\",\n \"mapYmax\": \"Carte Y max\",\n \"mapYmin\": \"Carte Y min\",\n \"simpleHtmlTemplateName\": \"Modèle HTML simple\",\n \"geoDataDirectory\": \"Répertoire géodonnées\",\n \"mapLogoColorPath\": \"Logo pour carte (couleur)\",\n \"mapLogoBwPath\": \"Logo pour carte (noir et blanc)\",\n \"mapLogoPosition\": \"Position du logo pour carte\",\n \"mapCenterLat\": \"Centre de la carte (lat)\",\n \"mapCenterLng\": \"Centre de la carte (long)\",\n \"imageColorbarColorPath\": \"Barre de couleurs (couleur)\",\n \"imageColorbarBwPath\": \"Barre de couleurs (noir et blanc)\"\n },\n \"components\": {\n \"title\": \"Composantes\",\n \"enableDangerSources\": \"Activer sources de dangers\",\n \"enableObservations\": \"Activer observations\",\n \"enableModelling\": \"Activer modélisation\",\n \"enableWeatherbox\": \"Activer boîte météo\"\n },\n \"configuration\": {\n \"title\": \"Configuration\",\n \"showMatrix\": \"Afficher matrice\",\n \"enableMediaFile\": \"Activer fichier média\",\n \"enableStrategicMindset\": \"Activer état d'esprit stratégique\",\n \"enableStressLevel\": \"Activer niveau de stress\",\n \"enableAvalancheProblemCornices\": \"Activer situation avalancheuse CONGÈRES\",\n \"enableAvalancheProblemNoDistinctAvalancheProblem\": \"Activer situation avalancheuse PAS DE SITUATION PARTICULIÈRE\"\n }\n },\n \"success\": \"Configuration sauvegardée avec succès\",\n \"error\": \"Impossible de sauvegarder la configuration\"\n },\n \"users\": {\n \"title\": \"Utilisateurs\",\n \"button\": {\n \"create\": \"Créer utilisateur\"\n },\n \"tooltip\": {\n \"edit\": \"Éditer utilisateur\",\n \"changePassword\": \"Modifier le mot de passe\",\n \"delete\": \"Supprimer utilisateur\"\n },\n \"table\": {\n \"name\": \"Nom\",\n \"email\": \"Mail\",\n \"organization\": \"Organisation\",\n \"regions\": \"Régions de prévision\",\n \"roles\": \"Fonctions\"\n },\n \"deleteUserModalDialog\": {\n \"message\": \"Voulez-vous supprimer l'utilisateur ?\",\n \"accept\": \"Oui\",\n \"reject\": \"Non\"\n },\n \"deleteUser\": {\n \"success\": \"Utilisateur supprimé\",\n \"error\": \"Impossible de supprimer l'utilisateur\"\n },\n \"createUser\": {\n \"success\": \"Utilisateur créé\",\n \"error\": \"Impossible de créer l'utilisateur\"\n },\n \"updateUser\": {\n \"success\": \"Utilisateur mis à jour\",\n \"error\": \"Mise à jour utilisateur impossible\"\n }\n },\n \"createUser\": {\n \"table\": {\n \"image\": \"Image\",\n \"name\": \"Nom\",\n \"email\": \"Mail\",\n \"organization\": \"Organisation\",\n \"password\": \"Mot de passe\",\n \"password2\": \"Répéter le mot de passe\",\n \"roles\": \"Fonctions\",\n \"regions\": \"Régions de prévision\"\n },\n \"error\": {\n \"name\": {\n \"required\": \"Veuillez saisir un nom\"\n },\n \"email\": {\n \"required\": \"Veuillez saisir une adresse mail\",\n \"invalid\": \"Adresse mail invalide\"\n },\n \"password\": {\n \"required\": \"Veuillez saisir le mot de passe\",\n \"length\": \"Le mot de passe doit contenir au moins 8 caractères\",\n \"mismatch\": \"Les mots de passe ne sont pas identiques\"\n }\n },\n \"button\": {\n \"create\": \"Créer utilisateur\",\n \"update\": \"Mettre à jour l'utilisateur\",\n \"cancel\": \"Annuler\"\n }\n },\n \"observations\": {\n \"table\": \"Tableau\",\n \"map\": \"Carte\",\n \"gallery\": \"Galerie\",\n \"filters\": \"Filtres\",\n \"title\": \"Observations\",\n \"newObservation\": \"Ajouter une observation\",\n \"exportObservations\": \"Exporter observations\",\n \"toggleFilterBar\": \"Afficher/masquer barre de filtres\",\n \"button\": {\n \"submit\": \"Télécharger\"\n },\n \"label\": {\n \"dateRange\": \"Période\",\n \"observer\": \"Observateur\"\n },\n \"selectRegion\": {\n \"placeholder\": \"Région de prévision\",\n \"selectionLabel\": \"{0} région(s) sélectionnée(s)\"\n },\n \"selectSources\": {\n \"placeholder\": \"Sources\",\n \"selectionLabel\": \"{0} source(s) sélectionnée(s)\"\n },\n\n \"charts\": {\n \"charts\": \"Diagramme\",\n \"nan\": \"Pas d'informations\",\n \"classify\": \"Classifier\",\n \"label\": \"Description\",\n \"invert\": \"Inverser\",\n \"reset\": \"Réinitialiser\",\n \"aspect\": {\n \"caption\": \"Exposition\"\n },\n \"elevation\": {\n \"caption\": \"Altitude\"\n },\n \"stability\": {\n \"caption\": \"Stabilité\"\n },\n \"observationType\": {\n \"caption\": \"Type d'observation\"\n },\n \"importantObservation\": {\n \"caption\": \"Important\"\n },\n \"avalancheProblem\": {\n \"caption\": \"Situation avalancheuse typique\"\n },\n \"dangerPattern\": {\n \"caption\": \"Modèle de risques\"\n },\n \"days\": {\n \"caption\": \"Jour\"\n }\n }\n },\n \"blog\": {\n \"title\": \"Blog\",\n \"language\": {\n \"title\": \"Langue\",\n \"de\": \"DE\",\n \"it\": \"IT\",\n \"en\": \"EN\"\n },\n \"all\": {\n \"tooltip\": \"Envoyer mails, messages Telegram et notifications push\",\n \"success\": \"{{prefix}}mail, message Telegram et notification push envoyés\",\n \"error\": \"Échec envoi {{prefix}}mail, message Telegram et notification push !\"\n },\n \"email\": {\n \"tooltip\": \"Envoyer mails\",\n \"success\": \"{{prefix}}mail envoyé\",\n \"error\": \"Échec envoi {{prefix}}mail !\"\n },\n \"telegram\": {\n \"tooltip\": \"Envoyer via un canal Telegram\",\n \"success\": \"{{prefix}}message Telegram envoyé\",\n \"error\": \"Échec envoi {{prefix}}message Telegram !\"\n },\n \"push\": {\n \"tooltip\": \"Envoyer notifications push\",\n \"success\": \"{{prefix}}notification push envoyé\",\n \"error\": \"Échec envoi {{prefix}}notification push !\"\n }\n }\n },\n \"settings\": {\n \"title\": \"Paramètres\",\n \"changePassword\": {\n \"title\": \"Modifier le mot de passe\",\n \"oldPassword\": {\n \"label\": \"Mot de passe actuel\",\n \"placeholder\": \"Mot de passe actuel\"\n },\n \"newPassword1\": {\n \"label\": \"Nouveau mot de passe\",\n \"placeholder\": \"Nouveau mot de passe\"\n },\n \"newPassword2\": {\n \"label\": \"Nouveau mot de passe (répéter)\",\n \"placeholder\": \"Nouveau mot de passe\"\n },\n \"submit\": \"Modifier le mot de passe\",\n \"passwordChanged\": \"Mot de passe changé avec succès\",\n \"passwordChangeError\": \"Impossible de changer le mot de passe\",\n \"passwordIncorrect\": \"Mot de passe actuel incorrect\",\n \"error\": {\n \"oldPassword\": {\n \"required\": \"Saisissez votre mot de passe actuel\"\n },\n \"newPassword\": {\n \"required\": \"Saisissez votre nouveau mot de passe \",\n \"mismatch\": \"Les mots de passe ne sont pas identiques\"\n }\n }\n },\n \"display\": {\n \"title\": \"Afficher\",\n \"table\": {\n \"showCaaml\": \"Afficher CAAML\",\n \"showJson\": \"Afficher JSON\"\n }\n }\n },\n \"statistics\": {\n \"title\": \"Statistiques\",\n \"button\": {\n \"submit\": \"Télécharger\"\n },\n \"label\": {\n \"dateRange\": \"Période\",\n \"extended\": \"Étendue\",\n \"duplicates\": \"Doublons\"\n }\n },\n\n \"dangerRating\": {\n \"noRating\": \"pas noté\",\n \"low\": \"faible\",\n \"moderate\": \"limité\",\n \"considerable\": \"marqué\",\n \"high\": \"fort\",\n \"veryHigh\": \"très fort\"\n },\n \"avalancheProblem\": {\n \"newSnow\": \"Neige fraîche\",\n \"new_snow\": \"Neige fraîche\",\n \"windSlab\": \"Plaque à vent\",\n \"wind_slab\": \"Plaque à vent\",\n \"persistentWeakLayers\": \"Neige ancienne (Sous-couches fragiles persistantes)\",\n \"persistent_weak_layers\": \"Neige ancienne (Sous-couches fragiles persistantes)\",\n \"wetSnow\": \"Avalanches mouillées (Neige humide)\",\n \"wet_snow\": \"Avalanches mouillées (Neige humide)\",\n \"glidingSnow\": \"Avalanches de glissement (Avalanches de fond)\",\n \"gliding_snow\": \"Avalanches de glissement (Avalanches de fond)\",\n \"cornices\": \"Congères\",\n \"noDistinctAvalancheProblem\": \"Pas de situation avalancheuse particulière\",\n \"no_distinct_avalanche_problem\": \"Pas de situation avalancheuse particulière\",\n \"favourableSituation\": \"Situation favorable\",\n \"favourable_situation\": \"Situation favorable\"\n },\n \"dangerPattern\": {\n \"dp1\": \"mr.1 : sous-couche fragile persistante\",\n \"dp2\": \"mr.2 : neige glissante\",\n \"dp3\": \"mr.3 : pluie\",\n \"dp4\": \"mr.4 : froid suivant chaud / chaud suivant froid\",\n \"dp5\": \"mr.5 : chute de neige après une longue période de froid\",\n \"dp6\": \"mr.6 : neige meuble et vent\",\n \"dp7\": \"mr.7 : enneigement faible à coté d'enneigement abondant\",\n \"dp8\": \"mr.8 : givre de surface recouvert de neige\",\n \"dp9\": \"mr.9 : neige roulée recouverte de neige\",\n \"dp10\": \"mr.10 : situation de printemps\"\n },\n \"strategicMindset\": {\n \"title\": \"État d'esprit stratégique\",\n \"assessment\": \"Grande incertitude\",\n \"stepping_out\": \"En cours d'amélioration\",\n \"status_quo\": \"Statu quo\",\n \"stepping_back\": \"En cours de détérioration\",\n \"entrenchment\": \"Persistante instable\",\n \"free_ride\": \"Favorable\",\n \"high_alert\": \"Vigilance rouge\",\n \"spring_diurnal\": \"Situation de printemps\"\n },\n \"observationType\": {\n \"DrySnowfallLevel\": \"Dry snowfall level\",\n \"TimeSeries\": \"Série chronologique\",\n \"Incident\": \"Incident\",\n \"Profile\": \"Profil de neige\",\n \"Closure\": \"Fermeture\",\n \"Blasting\": \"Minage\",\n \"Avalanche\": \"Avalanche\",\n \"Evaluation\": \"Évaluation\",\n \"SimpleObservation\": \"Observation simple\",\n \"Webcam\": \"Webcam\"\n },\n \"importantObservation\": {\n \"ForBlog\": \"Pour le blog\",\n \"SurfaceHoar\": \"Givre de surface\",\n \"Graupel\": \"Neige roulée\",\n \"StabilityTest\": \"Test de stabilité\",\n \"IceFormation\": \"Formation de glace\",\n \"VeryLightNewSnow\": \"Neige fraîche très légère\"\n },\n \"elevationTolerance\": {\n \"exact\": \"exact\",\n \"50m\": \"±50m\",\n \"100m\": \"±100m\",\n \"200\": \"±200m\"\n },\n \"elevationPeriod\": {\n \"duringPrecipitationEvent\": \"Dry snowfall boundary for the entire precipitation event\",\n \"observationPeriod\": \"Dry snowfall boundary at the time of observation\"\n },\n \"aspect\": {\n \"N\": \"N\",\n \"NE\": \"NE\",\n \"E\": \"E\",\n \"SE\": \"SE\",\n \"S\": \"S\",\n \"SW\": \"SO\",\n \"W\": \"O\",\n \"NW\": \"NO\"\n },\n \"role\": {\n \"SUPERADMIN\": \"Superadministrateur\",\n \"ADMIN\": \"Administrateur\",\n \"FORECASTER\": \"Prévisionniste\",\n \"FOREMAN\": \"Contremaître\",\n \"OBSERVER\": \"Observateur\"\n },\n \"tendency\": {\n \"decreasing\": \"Le danger d'avalanche diminue\",\n \"steady\": \"Le danger d'avalanche reste inchangé\",\n \"increasing\": \"Le danger d'avalanche augmente\"\n },\n \"snowpackStability\": {\n \"unknown\": \"inconnue\",\n \"good\": \"bonne\",\n \"fair\": \"moyenne\",\n \"poor\": \"mauvaise\",\n \"very_poor\": \"très mauvaise\"\n },\n \"frequency\": {\n \"none\": \"(pratiquement) pas\",\n \"few\": \"quelques-uns\",\n \"some\": \"plusieurs\",\n \"many\": \"beaucoup\"\n },\n \"avalancheSize\": {\n \"small\": \"petit\",\n \"medium\": \"moyen\",\n \"large\": \"large\",\n \"very_large\": \"très large\",\n \"extreme\": \"extrême\"\n },\n \"complexity\": {\n \"easy\": \"Facile\",\n \"challenging\": \"Exigeant\",\n \"complex\": \"Complexe\"\n },\n \"glidingSnowActivity\": {\n \"low\": \"faible\",\n \"medium\": \"moyen\",\n \"high\": \"fort\"\n },\n \"wetness\": {\n \"dry\": \"sec\",\n \"moist\": \"mouillé\",\n \"wet\": \"humide\"\n },\n \"characteristic\": {\n \"low\": \"faible\",\n \"medium\": \"moyen\",\n \"high\": \"fort\",\n \"very_high\": \"très fort\"\n },\n \"thickness\": {\n \"thin\": \"mince\",\n \"thick\": \"épais\"\n },\n \"snowpackPosition\": {\n \"upper\": \"au-dessus\",\n \"middle\": \"au milieu\",\n \"lower\": \"en-dessous\",\n \"ground\": \"sol\"\n },\n \"weakLayerCrust\": {\n \"no\": \"non\",\n \"partly\": \"partly\",\n \"yes\": \"oui\"\n },\n \"creationProcess\": {\n \"radiation_recrystallization\": \"rayonnement\",\n \"diurnal_recrystallization\": \"Croûte de regel\",\n \"melt_layer_recrystallization\": \"couche de fonte\",\n \"surface_hoar_formation\": \"surface hoar\"\n },\n \"recognizability\": {\n \"very_easy\": \"très facile\",\n \"easy\": \"facile\",\n \"hard\": \"difficile\",\n \"very_hard\": \"très difficile\"\n },\n \"distribution\": {\n \"isolated\": \"isolé\",\n \"specific\": \"définissable\",\n \"widespread\": \"étendu\"\n },\n \"probability\": {\n \"likely\": \"probable\",\n \"possible\": \"possible\",\n \"unlikely\": \"improbable\"\n },\n \"detailedDaytime\": {\n \"evening\": \"soir\",\n \"first_night_half\": \"première partie de nuit\",\n \"second_night_half\": \"seconde partie de nuit\",\n \"morning\": \"tôt le matin\",\n \"forenoon\": \"matin\",\n \"afternoon\": \"après-midi\"\n },\n \"slopeGradient\": {\n \"moderately_steep\": \"modérément raides\",\n \"steep\": \"raides\",\n \"very_steep\": \"très raides\",\n \"extremely_steep\": \"extrêmement raides\"\n },\n \"handHardness\": {\n \"fist\": \"F\",\n \"four_fingers\": \"4F\",\n \"one_finger\": \"1F\",\n \"pencil\": \"P\",\n \"knife\": \"K\",\n \"ice\": \"I\"\n },\n \"hardnessTendency\": {\n \"decreasing\": \"plus meuble au-dessous\",\n \"steady\": \"régulier\",\n \"increasing\": \"plus meuble au-dessus\"\n },\n \"terrainType\": {\n \"gullies\": \"couloirs\",\n \"bowls\": \"creux\",\n \"pass_areas\": \"zones de col\",\n \"ridge_lines\": \"lignes de crête\",\n \"adjacent_to_ridge_lines\": \"adjacent to ridge lines\",\n \"distant_from_ridge_lines\": \"distant from ridge lines\",\n \"slope_discontinuities\": \"slope discontinuities\",\n \"convex_terrain\": \"convex terrain\",\n \"concave_terrain\": \"concave terrain\",\n \"steep_terrain\": \"steep terrain\",\n \"very_steep_terrain\": \"very steep terrain\",\n \"open_terrain\": \"open terrain\",\n \"forest\": \"forest\"\n },\n \"dangerSign\": {\n \"shooting_cracks\": \"fissures\",\n \"whumpfing\": \"bruit d'effondrement\",\n \"fresh_avalanches\": \"fresh avalanches\"\n },\n \"changeRegionDialog\": {\n \"message\": \"Voulez-vous changer de région de prévision ?\",\n \"accept\": \"Oui\",\n \"reject\": \"Non\"\n },\n \"zamg\": {\n \"table\": \"Tableau\",\n \"map\": \"Carte\",\n \"region\": \"Région de prévision\",\n \"newSnow\": \"Neige fraîche\"\n },\n \"snowpack\": {\n \"plotType\": {\n \"LWC_stratigraphy\": \"neige humide: teneur en eau liquide\",\n \"wet_snow_instability\": \"neige humide: instabilité de la neige mouillée\",\n \"Sk38_stratigraphy\": \"couches fragiles persistantes: SK38 index de stabilité\",\n \"stratigraphy\": \"couches fragiles persistantes : stratigraphie de la neige\"\n },\n \"aspect\": {\n \"flat\": \"terrain plat\",\n \"north\": \"versant nord\",\n \"south\": \"versant sud\"\n },\n \"meteo\": {\n \"new_snow_plot_3day\": \"neige fraîche (3j)\",\n \"new_snow_plot_7day\": \"neige fraîche (7j)\",\n \"new_snow_plot_1month\": \"neige fraîche (31j)\",\n \"new_snow_plot_season\": \"neige fraîche (toute la saison)\",\n \"new_snow_plot_forecast\": \"neige fraîche (prévisons)\",\n \"wet_snow_plot_3day\": \"neige humide (3j)\",\n \"wet_snow_plot_7day\": \"neige humide (7j)\",\n \"wet_snow_plot_1month\": \"neige humide (31j)\",\n \"wet_snow_plot_season\": \"neige humide (toute la saison)\",\n \"wet_snow_plot_forecast\": \"neige humide (prévisions)\",\n \"HS_table_24h\": \"tableau hauteur de neige (1j)\",\n \"HS_table_72h\": \"tableau hauteur de neige (3j)\",\n \"HS_table_season\": \"tableau hauteur de neige (toute la saison)\",\n \"HS_table_forecast\": \"tableau hauteur de neige (prévisions)\",\n \"TA_table_24h\": \"tableau température (1j)\",\n \"TA_table_72h\": \"tableau température (3j)\",\n \"TA_table_season\": \"tableau température (toute la saison)\"\n }\n },\n \"grainShape\": {\n \"PP\": {\n \"code\": \"PP\",\n \"class\": \"Neige fraîche\"\n },\n \"PPgp\": {\n \"code\": \"PPgp\",\n \"class\": \"Neige roulée\"\n },\n \"DF\": {\n \"code\": \"DF\",\n \"class\": \"Particules reconnaissables\"\n },\n \"RG\": {\n \"code\": \"RG\",\n \"class\": \"Grains arrondis\"\n },\n \"FC\": {\n \"code\": \"FC\",\n \"class\": \"Grains anguleux\"\n },\n \"DH\": {\n \"code\": \"DH\",\n \"class\": \"Givre de profondeur\"\n },\n \"SH\": {\n \"code\": \"SH\",\n \"class\": \"Givre de surface\"\n },\n \"MF\": {\n \"code\": \"MF\",\n \"class\": \"Formes de fonte\"\n },\n \"MFcr\": {\n \"code\": \"MFcr\",\n \"class\": \"Croûte de regel\"\n },\n \"IF\": {\n \"code\": \"IF\",\n \"class\": \"Formations de glace\"\n }\n },\n \"button\": {\n \"yes\": \"oui\",\n \"no\": \"non\"\n },\n \"observations\": {\n \"allowEdit\": \"Éditer observations externes\",\n \"allowEditTooltip\": \"Cela évitera l'écrasement par {{ value }}\",\n \"editIconTooltip\": \"Observation éditée - sans mise à jour par {{ value }}\",\n \"aspect\": \"Exposition\",\n \"authorName\": \"Nom de l'auteur\",\n \"avalancheLength\": \"Longueur d'avalanche\",\n \"avalancheProblem\": \"Situation avalancheuse typique\",\n \"avalancheSize\": \"Taille d'avalanche\",\n \"avalancheType\": \"Type d'avalanche\",\n \"avalancheWidth\": \"Largeur d'avalanche\",\n \"search\": \"Rechercher\",\n \"count\": \"# observations :\",\n \"elevationTolerance\": \"Accuracy of elevation data\",\n \"elevationPeriod\": \"Elevation time period\",\n \"layers\": {\n \"observers\": \"Observateurs\",\n \"weatherStations\": \"Stations météo \",\n \"webcams\": \"Webcams\",\n \"observations\": \"Observations\"\n },\n \"weatherStations\": {\n \"tooltips\": {\n \"drySnowfallLevel\": \"Dry snowfall level\",\n \"globalRadiation\": \"Rayonnement global\",\n \"newSnow\": \"Neige fraîche\",\n \"snowLine\": \"Limite de l'enneigement\",\n \"snowHeight\": \"Hauteur de neige\",\n \"snowDifference\": \"Snow difference\",\n \"airTemperature\": \"Température de l'air\",\n \"airTemperatureMax\": \"Température maximale de l'air\",\n \"airTemperatureMin\": \"Température minimale de l'air\",\n \"surfaceTemperature\": \"Température à la surface\",\n \"surfaceHoar\": \"Formation potentielle de givre de surface\",\n \"surfaceHoarCalc\": \"Potential surface hoar formation (Lehning et. al.)\",\n \"dewPoint\": \"Température de rosée\",\n \"relativeHumidity\": \"Humidité relative\",\n \"windDirection\": \"Direction du vent\",\n \"windSpeed\": \"Vitesse du vent\",\n \"windGust\": \"Rafale de vent\"\n }\n },\n \"button\": {\n \"add\": \"Ajouter une observation\",\n \"save\": \"Enregistrer l'observation\",\n \"delete\": \"Supprimer l'observation\",\n \"deleteConfirm\": \"Supprimer l'observation ?\",\n \"discard\": \"Abandonner\",\n \"copyDate\": \"Copier date de l'événement\"\n },\n \"comment\": \"Commentaire\",\n \"content\": \"Contenu\",\n \"dangerRating\": \"Indice de risques\",\n \"elevation\": \"Altitude\",\n \"elevationRange\": \"Plage d'altitude\",\n \"elevationLowerBound\": \"Limite inférieure\",\n \"elevationUpperBound\": \"Limite supérieure\",\n \"eventDate\": \"Date de l'événement\",\n \"eventType\": \"Type d'événement\",\n \"eventTypes\": {\n \"IMPORTANT\": \"Événement important\",\n \"NEIGHBOR_REGION\": \"Région voisine\",\n \"NORMAL\": \"Événement normal\",\n \"PERSON_DEAD\": \"Personnes emportées (décès)\",\n \"PERSON_INJURED\": \"Personnes emportées (blessures)\",\n \"PERSON_NO\": \"Pas de personnes emportées\",\n \"PERSON_UNINJURED\": \"Personnes emportées (aucun blessé)\",\n \"PERSON_UNKNOWN\": \"Événement (inconnu)\",\n \"TRAFFIC\": \"Trafic\"\n },\n \"externalURL\": \"URL externe (p. ex. banque d'images)\",\n \"fractureDepth\": \"Épaisseur de la cassure\",\n \"hasCoordinates\": \"Coordonnées disponibles\",\n \"incline\": \"Inclinaison de pente\",\n \"latitude\": \"Latitude\",\n \"locationName\": \"Localisation\",\n \"longitude\": \"Longitude\",\n \"observationType\": \"Type d'observation\",\n \"personInvolvement\": \"Implication de personnes\",\n \"reportDate\": \"Date du rapport\",\n \"showTable\": \"Tableau\",\n \"withoutCoordinates\": \"Observations sans coordonnées :\",\n \"sidebar\": {\n \"filter\": {\n \"title\": \"Filtre\"\n },\n \"legend\": {\n \"title\": \"Légende\"\n },\n \"sources\": {\n \"title\": \"Sources des données\"\n },\n \"views\": {\n \"title\": \"Vues\"\n }\n }\n },\n \"personInvolvement\": {\n \"Dead\": \"Personnes emportées (décès)\",\n \"Injured\": \"Personnes emportées (blessures)\",\n \"No\": \"Pas de personnes emportées\",\n \"Uninjured\": \"Personnes emportées (aucun blessé)\",\n \"Unknown\": \"Événement (inconnu)\"\n },\n \"units\": {\n \"cm\": \"cm\",\n \"mm\": \"mm\",\n \"m\": \"m\"\n },\n \"qfa\": {\n \"day\": \"Jour\",\n \"time\": \"Heure\",\n \"back\": \"Retour\",\n \"parameters\": {\n \"DUST\": \"poussière du Sahara\",\n \"N\": \"couverture nuageuse en /8\",\n \"Nh\": \"couverture nuageuse élevée en /8\",\n \"Nm\": \"couverture nuageuse moyenne en /8\",\n \"Nl\": \"faible couverture nuageuse en /8\",\n \"N-CU\": \"couverture de cumulus en /8\",\n \"AUSL.T\": \"Température de déclenchement\",\n \"SHW-IX\": \"Index Showalter\",\n \"WX -CUF\": \"temps significatif : NIL (rien), RASH (pluie), TS (orage)\",\n \"RR\": \"pluviométrie totale [mm]\",\n \"RR-str\": \"précipitations stratiformes\",\n \"CONV\": \"précipitations convectives [mm]\",\n \"SN\": \"précipitations sous forme de neige [mm]\",\n \"SN--RA\": \"limite de l'enneigement [m]\",\n \"QAO \": \"{{value}} hPa eq. vent moyen, direction et force, [°] et [m/s]\",\n \"QAN\": \"vent moyen au sol, direction et force, [°] et [m/s]\",\n \"QANmax\": \"vent maximal (rafales) au sol, [m/s]\",\n \"T \": \"{{value}} hPa eq. température [°C]\",\n \"T m\": \"température à {{value}}m [°C]\",\n \"T 2m\": \"température à 2m [°C]\",\n \"Tk 2m\": \"température à 2m [°K]\",\n \"T GND\": \"température au sol\",\n \"Max-ADI\": \"température maximale de mélange [°C]\",\n \"Min Max\": \"température min./max. ces dernières 24h\",\n \"FROST\": \"ligne de zéro degré [m]\",\n \"W cm\": \"500 hPa eq. vent vertical [cm/s]\",\n \"W --\": \"700 hPa eq. vent vertical [cm/s]\",\n \"W s\": \"{{value}} hPa eq. vent vertical [cm/s]\",\n \"H \": \"{{value}} hPa hauteur géopotentielle [m]\",\n \"RF \": \"{{value}} hPa eq. humidité relative [%]\"\n }\n }\n}\n","{\n \"daytime\": {\n \"earlier\": \"inizio giornata\",\n \"later\": \"nel corso della giornata\"\n },\n \"login\": {\n \"title\": \"Login\",\n \"text\": \"Accedi al tuo account\",\n \"button\": \"Login\",\n \"stressLevel\": \"Livello di stress\",\n \"errorDialog\": {\n \"message\": \"Errore nome utente o password!\",\n \"accept\": \"Ok\"\n },\n \"placeholder\": {\n \"username\": \"Inserire nome utente\",\n \"password\": \"Inserire password\"\n }\n },\n \"sidebar\": {\n \"bulletins\": \"Valanghe.report\",\n \"dangerSources\": \"Origini di pericolo\",\n \"observations\": \"Osservazioni\",\n \"qfa\": \"QFA\",\n \"modelling\": \"Modelli\",\n \"modellingForecast\": \"Previsione\",\n \"modellingZamg\": \"Multi modelli dello ZAMG \",\n \"modellingZamgECMWF\": \"ZAMG ECMWF-EPS\",\n \"modellingZamgCLAEF\": \"ZAMG CLAEF-EPS\",\n \"modellingZamgMeteogram\": \"GeoSphere meteogramma\",\n \"modellingSnowpack\": \"Modello SNOWPACK\",\n \"modellingSnowpackMeteo\": \"Dati meteo simulati SNOWPACK\",\n \"weatherbox\": \"Dashboard meteo\",\n \"awsome\": \"AWSOME\",\n \"snowpack\": \"SNOWPACK\",\n \"geosphere\": \"GeoSphere\"\n },\n \"menu\": {\n \"logout\": \"Logout\",\n \"language\": \"Lingue\",\n \"en\": \"Inglese\",\n \"de\": \"Tedesco\",\n \"fr\": \"Francese\",\n \"it\": \"Italiano\",\n \"es\": \"Spagnolo\",\n \"ca\": \"Catalano\",\n \"oc\": \"Aranese\",\n \"fullscreen\": \"A schermo pieno\",\n \"settings\": \"Impostazioni\",\n \"statistics\": \"Statistiche\",\n \"admin\": \"Admin\",\n \"region\": \"Meteo-nivo zona\",\n \"education\": \"Formazione\"\n },\n \"matrix\": {\n \"label\": {\n \"snowpackStability\": \"Stabilità del manto nevoso\",\n \"frequency\": \"Frequenza\",\n \"avalancheSize\": \"Dimensione valanga\",\n \"dangerRating\": \"Grado del pericolo\",\n \"override\": \"(modifica valutazione grado del pericolo)\",\n \"matrix\": \"Matrice\",\n \"referToFairStability\": \"Fare riferimento alla classe \\\"Discreta\\\"\",\n \"referToPoorStability\": \"Fare riferimento alla classe \\\"Scarsa\\\"\",\n \"dangerLevel1\": \"Grado di pericolo 1 (debole)\"\n }\n },\n \"dangerSources\": {\n \"status\": {\n \"missing\": \"manca\",\n \"available\": \"disponibile\",\n \"forecast\": \"previsione\",\n \"analysis\": \"analisi\",\n \"loading\": \"Caricamento origini di pericolo ...\",\n \"saveError\": \"L'origine di pericolo non poteva essere salvata!\",\n \"loadDangerSourcesError\": \"L'origine di pericolo non può essere caricato!\",\n \"loadVariantsError\": \"Le variazioni dell'origine di pericolo non può essere caricato!\"\n },\n \"variantStatus\": {\n \"active\": \"attivo\",\n \"dormant\": \"quiescente\",\n \"inactive\": \"inattivo\"\n },\n \"tooltip\": {\n \"read\": \"Leggi origine di pericolo\",\n \"edit\": \"Modifica l'origine di pericolo\"\n },\n \"table\": {\n \"loadMore\": \"Carica {{count}} più giorni\",\n \"title\": {\n \"forecast\": \"Previsione\",\n \"analysis\": \"Analisi\"\n }\n },\n \"create\": {\n \"variantStatus\": \"Status\",\n \"variantEditable\": \"Questa variazione può essere modificata.\",\n \"variantNotEditable\": \"Questa variazione non può essere modificata.\",\n \"noVariantsForSelectedDay\": \"Non sono state definite variazioni per questa data.\",\n \"tooltip\": {\n \"editDangerSource\": \"Modifica l'origine di pericolo\",\n \"loadVariants\": \"Carica le variazioni del giorno precedente\",\n \"edit\": \"Modifica le micro-zone\",\n \"copy\": \"Copia variazione\",\n \"delete\": \"elimina la variazione\",\n \"compare\": \"paragona le variazioni\",\n \"forecast\": \"paragona con la previsione\"\n },\n \"createDangerSource\": \"crea un'origine di pericolo\",\n \"createVariant\": \"crea una nuova variazione\",\n \"noDangerSources\": \"nessuna origine di pericolo\",\n \"title\": {\n \"avalanche\": \"valanga\",\n \"matrix\": \"Matrice\",\n \"characteristics\": \"Caratteristiche\",\n \"comment\": \"Commento\"\n },\n \"label\": {\n \"glidingSnowActivity\": \"attività di slittamento\",\n \"snowHeight\": \"altezza neve\",\n \"snowHeightAverage\": \"Average snow height\",\n \"zeroDegreeIsotherm\": \"Isoterma a 0°C\",\n \"looseSnowMoisture\": \"Umidità neve a debole coesione\",\n \"looseSnowGrainShape\": \"Tipologia grano neve a debole coesione\",\n \"slabGrainShape\": \"Tipologia grano lastrone\",\n \"slabThickness\": \"Spessore lastrone\",\n \"slabHandHardness\": \"Durezza mano lastrone\",\n \"slabHardnessProfile\": \"Durezza lastrone\",\n \"slabEnergyTransferPotential\": \"Potenzialità del lastrone di supportare la propagazione\",\n \"slabDistribution\": \"Distribuzione del lastrone\",\n \"weakLayerGrainShape\": \"Tipologia grani dello strato debole\",\n \"weakLayerGrainSize\": \"Dimensione grani dello strato debole\",\n \"weakLayerPersistent\": \"Persistenza dello strato debole\",\n \"weakLayerThickness\": \"Spessore dello strato debole\",\n \"weakLayerStrength\": \"Resistenza al taglio strato debole\",\n \"weakLayerWet\": \"Umidità dello strato debole\",\n \"weakLayerCrustAbove\": \"Crosta al di sopra dello strato debole\",\n \"weakLayerCrustBelow\": \"Crosta al di sotto dello strato debole\",\n \"weakLayerPosition\": \"Posizione dello strato debole nel manto nevoso\",\n \"weakLayerCreation\": \"Formazione di uno strato debole\",\n \"weakLayerDistribution\": \"Distribuzione dello strato debole\",\n \"dangerSpotRecognizability\": \"Riconoscibilità dei punti pericolosi\",\n \"remoteTriggering\": \"Distacco a distanza\",\n \"hasDaytimeDependency\": \"Dipendenza diurna\",\n \"dangerIncreaseWithElevation\": \"Pericolo aumenta con la quota\",\n \"runoutIntoGreen\": \"Valanghe arrivano fino ai prati\",\n \"highestDangerAspect\": \"Esposizione al pericolo più elevato\",\n \"dangerPeak\": \"Picco del pericolo\",\n \"slopeGradient\": \"Inclinazione del pendio\",\n \"naturalRelease\": \"Distacco spontaneo\",\n \"terrainTypes\": \"Tipo di terreno\",\n \"dangerSigns\": \"Segni d'allarme\",\n \"aspects\": \"Esposizione\"\n },\n \"editVariantDialog\": {\n \"save\": \"Salva\",\n \"cancel\": \"Cancella\"\n },\n \"deleteVariantDialog\": {\n \"message\": \"Vuoi cancellare questa variante?\",\n \"accept\": \"Sì\",\n \"reject\": \"No\"\n },\n \"noRegionDialog\": {\n \"message\": \"Almeno una micro-area deve appartenere la tua Provincia.\",\n \"accept\": \"Ok\"\n },\n \"discardDialog\": {\n \"message\": \"Vuoi scartare le modifiche?\",\n \"accept\": \"Sì\",\n \"reject\": \"No\"\n },\n \"saveErrorDialog\": {\n \"message\": \"Si è verificato un errore nel salvataggio delle origini di pericolo!\",\n \"accept\": \"Ok\"\n },\n \"loadDialog\": {\n \"message\": \"Vuoi caricare tutte le varianti di origine del pericolo del giorno precedente?\",\n \"accept\": \"Sì\",\n \"reject\": \"No\"\n }\n }\n },\n \"avalancheType\": {\n \"title\": \"Tipi di valanghe\",\n \"label\": {\n \"slab\": \"LASTRONE\",\n \"loose\": \"A DEBOLE COESIONE\",\n \"glide\": \"SLITTAMENTO\"\n },\n \"tooltip\": {\n \"slab\": \"Valanga di neve a lastroni\",\n \"loose\": \"Valanga di neve a debole coesione\",\n \"glide\": \"Valanga di slittamento\"\n }\n },\n \"elevation\": {\n \"title\": \"Quota\",\n \"high\": \"al di sotto\",\n \"low\": \"al di sopra\",\n \"treeline\": \"Limite del bosco\"\n },\n \"bulletins\": {\n \"title\": \"Valanghe.report\",\n \"tooltip\": {\n \"edit\": \"Modifica bollettino\",\n \"read\": \"Leggi bollettino\",\n \"copy\": \"Copia bollettino valanghe\",\n \"paste\": \"Incolla bollettino valanghe\",\n \"cancel\": \"Annulla la copia\",\n \"update\": \"Modifica\",\n \"submit\": \"Invia\",\n \"submitUpdate\": \"Invia update\",\n \"publishChange\": \"Pubblica ora (senza messaggi)\",\n \"publishUpdate\": \"Pubblica ora\",\n \"caaml\": \"Mostra CAAML\",\n \"json\": \"Mostra JSON\",\n \"create\": \"Crea bollettino valanghe\",\n \"preview\": \"Anteprima del bollettino valanghe (PDF)\",\n \"check\": \"Controlla bollettino valanghe\",\n \"info\": \"Mostra lo stato pubblicazione\",\n \"loadSuggestionFromDangerSources\": \"Load suggestion\",\n \"deleteAllWarningRegions\": \"Delete all warning regions\",\n \"publishAll\": \"Pubblica tutte le meteo-nivo zone\",\n \"mediaFile\": \"Carica file media\"\n },\n \"status\": {\n \"submittedInfo\": \"Verrà pubblicato alle 17:00\",\n \"resubmittedInfo\": \"Verrà pubblicato alle 08:00\",\n \"publishedInfo\": \"È stato pubblicato\",\n \"noPublicationInfo\": \"NON verrà pubblicato automaticamente\",\n \"loadingPreview\": \"Creare un'anteprima in PDF ...\",\n \"loading\": \"Carica bollettino ...\",\n \"loadMoreBulletins\": \"Carica {{count}} più bollettini\",\n \"publishing\": \"Pubblica bollettino ...\",\n \"submitting\": \"Invia bollettino ...\",\n \"saveError\": \"Non é stato possibile salvare il bollettino!\",\n \"loadBulletinsError\": \"Non é stato possibile caricare il bollettino!\"\n },\n \"create\": {\n \"tooltip\": {\n \"edit\": \"Modifica le micro-zone\",\n \"copy\": \"Copia meteo-nivo zona\",\n \"delete\": \"Elimina regione\",\n \"compare\": \"Compare region\",\n \"undo\": \"Annulla l'ultima modifica apportata alla meteo-nivo zona\",\n \"redo\": \"Ripeti l'ultima modifica nella meteo-nivo zona\",\n \"createRegion\": \"Crea meteo-nivo zona\",\n \"cancel\": \"Cancella\",\n \"acceptSuggestion\": \"Accetta meteo-nivo zone suggerite\",\n \"rejectSuggestion\": \"Scarta meteo-nivo zone suggerite\",\n \"saveChanges\": \"Salva modifiche\",\n \"discardChanges\": \"Scarta modifiche\",\n \"incompleteAvalancheProblem\": \"Problema valanghivo incompleto\",\n \"saveBulletin\": \"Salva bollettino valanghe\",\n \"discardBulletin\": \"Scarta modifiche del bollettino valanghe\",\n \"loadBulletin\": \"Copia il bollettino valanghe del giorno precedente\",\n \"uploadJsonBulletin\": \"Carica il bollettino valanghe in formato JSON\",\n \"downloadJsonBulletin\": \"Scarica il bollettino valanghe in formato JSON\",\n \"daytimeDependency\": \"Dipendenza diurna\",\n \"treeline\": \"Limite del bosco\",\n \"tendency\": {\n \"decreasing\": \"Pericolo valanghe in diminuazione\",\n \"steady\": \"Pericolo valanghe stabile\",\n \"increasing\": \"Pericolo valanghe in aumento\",\n \"danger\": \"Pericolo valanghe\"\n },\n \"textcat\": {\n \"edit\": \"Modifica\",\n \"copy\": \"Copia\",\n \"paste\": \"Incolla\",\n \"example\": \"Carica testo campione\",\n \"delete\": \"Elimina\"\n },\n \"moveUpAvalancheProblem\": \"Sposta problema valanghivo verso l'alto\",\n \"moveDownAvalancheProblem\": \"Sposta problema valanghivo verso il basso\",\n \"dangerRatingDirectionUp\": \"Verso l'alto\",\n \"dangerRatingDirectionDown\": \"Verso il basso\"\n },\n \"save\": \" Salva\",\n \"discard\": \" Scarta\",\n \"back\": \" Indietro\",\n \"createAggregatedRegion\": \" Nuova meteo-nivo zona\",\n \"pasteAggregatedRegion\": \"Incolla meteo-nivo zona\",\n \"pendingSuggestions\": \"Proposte\",\n \"rejectSuggestion\": \"Rifiuta\",\n \"acceptSuggestion\": \"Accetta\",\n \"cancelCopyBulletin\": \"Cancella\",\n \"createAvalancheProblem\": \"Nuovo problema valanghivo\",\n \"ownRegions\": \"Proprie meteo-nivo zone\",\n \"foreignRegions\": \"Altre meteo-nivo zone\",\n \"externalRegions\": \"Meteo-nivo zone esterne\",\n \"mapSelectRegion\": \"Seleziona micro-zone sulla mappa\",\n \"statusHeader\": \"Stato del bollettino\",\n \"suggestions\": \"Proposte\",\n \"noBulletinsForSelectedDay\": \"Nessun micro-zona definita per questa data.\",\n \"autosave\": \"Salvato automaticamente\",\n \"regionEditable\": \"Questa meteo-nivo zona può essere modificata.\",\n \"regionNotEditable\": \"Questa meteo-nivo zona non può essere modificata.\",\n \"regionLocked\": \"Questa meteo-nivo zona è bloccata.\",\n \"changeDangerRatingElevation\": \"Estendi il pericolo valanghe\",\n \"mapTop\": \"Mappa in alto\",\n \"mapLeft\": \"Mappa a lato\",\n \"showNotes\": \"Mostra gli appunti\",\n \"hideNotes\": \"Nascondi gli appunti\",\n \"incompleteAvalancheProblem\": \"Incompleto\",\n \"label\": {\n \"importantObservations\": \"Osservazioni importanti\",\n \"avalancheProblems\": \"Problema valanghivo\",\n \"aspects\": \"Esposizione\",\n \"highlights\": \"Allerta speciale\",\n \"avActivityHighlights\": \"Titolo situazione pericolo valanghe\",\n \"avActivityComment\": \"Descrizione pericolo valanghe\",\n \"snowpackStructureComment\": \"Descrizione struttura manto nevoso\",\n \"dangerPatterns\": \"Situazioni tipo\",\n \"tendencyComment\": \"Descrizione della tendenza\",\n \"notes\": \"Commenti\"\n },\n \"copyRegion\": {\n \"label\": \"Copia la meteo-nivo zona in un altro bollettino\",\n \"select\": \"Incolla in ...\",\n \"currentBulletin\": \"Questo bollettino\"\n },\n \"title\": {\n \"avalancheProblem\": \"Problemi valanghivi\",\n \"dangerDescription\": \"Descrizione pericolo valanghe\",\n \"forenoon\": \"Mattina\",\n \"afternoon\": \"Pomeriggio\",\n \"snowpackStructure\": \"Struttura manto nevoso\",\n \"tendency\": \"Tendenza\",\n \"showTranslations\": \" Mostra traduzione\",\n \"hideTranslations\": \" Nascondi traduzione\"\n },\n \"placeholder\": {\n \"notes\": \"Scrivi tuo commenti qui...\"\n },\n \"pmDialog\": {\n \"noIFrameSupport\": \"Il tuo browser non supporta IFrames!\"\n },\n \"discardDialog\": {\n \"message\": \"Vuoi scartare le modifiche?\",\n \"accept\": \"Sí\",\n \"reject\": \"No\"\n },\n \"deleteAggregatedRegionDialog\": {\n \"message\": \"Vuoi cancellare la meteo-nivo zona?\",\n \"accept\": \"Sí\",\n \"reject\": \"No\"\n },\n \"noRegionDialog\": {\n \"message\": \"Almeno una micro-area deve appartenere la tua Provincia.\",\n \"accept\": \"Ok\"\n },\n \"loadDialog\": {\n \"message\": \"Vuoi caricare il bollettino valanghe del giorno precedente?\",\n \"accept\": \"Sí\",\n \"reject\": \"No\"\n },\n \"deleteAllWarningRegionsDialog\": {\n \"message\": \"Do you want to delete all warning regions?\",\n \"accept\": \"Sì\",\n \"reject\": \"No\"\n },\n \"loadAutoSaveDialog\": {\n \"message\": \"Vuoi caricare il bollettino valanghe salvato automaticamente?\",\n \"accept\": \"Sí\",\n \"reject\": \"No\"\n },\n \"saveErrorDialog\": {\n \"message\": \"Errore salvando il bollettino valanghe!\",\n \"accept\": \"Ok\"\n },\n \"changeErrorDialog\": {\n \"message\": \"Errore durante la modificazione del bollettino valanghe!\",\n \"accept\": \"Ok\"\n },\n \"loadingErrorDialog\": {\n \"message\": \"Errore durante il caricamento del bollettino valanghe!\",\n \"accept\": \"Ok\"\n },\n \"loadingJsonFileErrorDialog\": {\n \"message\": \"C'è stato un errore nel caricamento dei bollettini dal file JSON!\",\n \"accept\": \"Ok\"\n },\n \"avalancheProblemErrorDialog\": {\n \"message\": \"Manca il problema tipico valanghivo, l'esposizione, la stabilità del manto nevoso, la frequenza e/o la dimensione valanghe per almeno un problema valanghivo\",\n \"accept\": \"Ok\"\n },\n \"loadAvActivityCommentExampleTextDialog\": {\n \"message\": \"Per quale situazione vuoi caricare il testo?\",\n \"newSnow\": \"Neve fresca\",\n \"windSlab\": \"Lastroni da vento\",\n \"persistentWeakLayers\": \"Strati deboli persistenti\",\n \"wetSnow\": \"Neve bagnata\",\n \"glidingSnow\": \"Valanghe di slittamento\",\n \"favourableSituation\": \"Situazione favorevole\",\n \"cancel\": \"Cancella\"\n },\n \"removeDaytimeDependencyDialog\": {\n \"message\": \"Quali problemi valanghivi vuoi mantenere?\",\n \"cancel\": \"Cancella\"\n },\n \"strategicMindsetDialog\": {\n \"title\": \"Strategic Mindsets\",\n \"introduction\": \"Gli “Strategic Mindsets” sono intesi come espressione del nostro atteggiamento mentale nei confronti della situazione valanghiva e del suo sviluppo nella regione corrispondente. Non dovrebbero derivare direttamente dalla valutazione del pericolo, ma piuttosto essere compresi e utilizzati come un'impressione intuitiva della situazione generale. I “Strategic Mindsets” sono quindi principalmente uno strumento di comunicazione. Utilizzando i mindset e le definizioni associate, noi previsori possiamo scambiare in modo rapido ed efficiente informazioni sullo sviluppo della situazione di pericolo e trovare un linguaggio comune per la comunicazione.\",\n \"description\": {\n \"title\": \"Descrizione:\",\n \"text\": {\n \"assessment\": \"C'è una grande incertezza nella valutazione del pericolo a causa delleinformazioni insufficienti osservati sul terreno.\",\n \"stepping_out\": \"Tendenza alla diminuzione della situazione di pericolo (anche all'interno di un grado di pericolo).\",\n \"status_quo\": \"Stessa situazione di pericolo.Nessun cambiamento significativo rispetto al giorno precedente.\",\n \"stepping_back\": \"Tendenza all'aumento della situazione di pericolo (anche all'interno di un livello di pericolo).\",\n \"entrenchment\": \"Situazione di pericolo quasi costante e tesa. Il pericolo principale deriva da (a) uno strato debole persistente(s) suscettibile al distacco.\",\n \"free_ride\": \"Debole pericolo di valanghe con un manto nevoso generalmente stabile. Sono possibili solo valanghe di dimensioni piccole nei terreni estremamente ripidi. \",\n \"high_alert\": \"Situazione eccezionale con pericolo di valanghe forte o molto forte. Sono possibili valanghe spontanee di dimensioni molto grandi o estreme \",\n \"spring_diurnal\": \"Determinanti per la valutazione del rischio sono valanghe di neve umida nel corso della giornata che sono soggetti ad un cicolo diurno chiaro.\"\n }\n },\n \"communication\": {\n \"title\": \"Comunicazione\",\n \"text\": {\n \"assessment\": \"La situazione valanghiva deve essere verificata a livello locale. Un comportamento prudente è opportuno.\",\n \"stepping_out\": \"Graduale diminuzione del pericolo. Tuttavia, occorre ancora prudenza e valutare localmente il miglioramento della situazione prima di addentrarsi in terreni più rischiosi. \",\n \"status_quo\": \"La situazione di pericolo è invariata. Il riscontro degli osservatori aiuta a delineare meglio la situazione di pericolo. I terreni più favorevoli devono essere comunicati e messi in evidenza.\",\n \"stepping_back\": \"Comunicazione chiara dell'aumento del pericolo di valanghe, anche all'interno di un grado di pericolo. Informazioni sulle cause supportano la comprensibilità della comunicazione.\",\n \"entrenchment\": \"Sono necessarie cautela e moderazione. È difficile che la situazione cambi. Se possibile, fornire informazioni il più possibile precise sulla distribuzione e sulla suscettibilità al distacco. Maggiore comunicazione delle osservazioni che rendono evidente la situazione e inducono alla un comportamento prudente.\",\n \"free_ride\": \"Poco testo. Sottolineare la situazione generale favorevole e le zone di pericolo potenzialmente isolate.\",\n \"high_alert\": \"Comunicazione su tutti i canali. L'attenzione non è più rivolta agli sport invernali. Pericolo anche in aree solitamente non a rischio di valanghe.\",\n \"spring_diurnal\": \"Situazione favorevole al mattino, pericolo in aumento durante il giorno. La valutazione va fatta localmente osservando l'ammorbidimento della crosta da fusione e rigelo e la crescente umidificazione del manto nevoso.\"\n }\n },\n \"examples\": {\n \"title\": \"Esempi:\",\n \"text\": {\n \"assessment\": \"Inizio stagione.\",\n \"stepping_out\": \"Un raffreddamento porta a una diminuzione del pericolo di valanghe di neve bagnata dopo una fase di tempo caldo e umido.\",\n \"status_quo\": \"Problema persistente di lastroni da vento con temperature fredde, neve a debole coesione e vento.\",\n \"stepping_back\": \"Nevicate abbondanti portano a un aumento della situazione di pericolo.\",\n \"entrenchment\": \"Problema critico di strati deboli persistenti con potenziale per valanghe pericolosamente grandi. La situazione si sta stabilizzando solo molto lentamente e richiede molta prudenza.\",\n \"free_ride\": \"Pericolo di valanghe debole, assenza di strati deboli persistenti, tutti i pendii sono già stati tracciati.\",\n \"high_alert\": \"Grado di pericolo 4 o superiore a causa di grandi quantità di neve fresca e/o strati deboli problematici e persistenti. \",\n \"spring_diurnal\": \"Situazione primaverile con tempo secco e alta pressione e temperature moderate con un manto nevoso vecchio per lo più stabile.\"\n }\n },\n \"strategicMindset\": {\n \"assessment\": \"Incertezza elevata\",\n \"stepping_out\": \"Miglioramento\",\n \"status_quo\": \"Status quo\",\n \"stepping_back\": \"Decelerazione\",\n \"entrenchment\": \"Persistente instabile\",\n \"free_ride\": \"Favorevole\",\n \"high_alert\": \"Massima allerta\",\n \"spring_diurnal\": \"Situazione primaverile\"\n }\n },\n \"decisionTree\": {\n \"filepath\": \"./assets/img/decision_tree-it.svg\",\n \"feedbackURL\": \"https://admin.avalanche.report/umfrage-entscheidungsbaum/en/\",\n \"decisionTree\": \"Albero decisionale\",\n \"feedback\": \"Feedback\",\n \"save\": \"Salva\",\n \"discard\": \"Scarta\"\n }\n },\n \"table\": {\n \"title\": {\n \"date\": \"Data\",\n \"status\": {\n \"AT-02\": \"Carinzia\",\n \"AT-03\": \"Bassa Austria\",\n \"AT-04\": \"Alta Austria\",\n \"AT-05\": \"Salisburghese\",\n \"AT-06\": \"Stiria\",\n \"AT-07\": \"Tirolo\",\n \"AT-08\": \"Vorarlberg\",\n \"CH\": \"Svizzera\",\n \"DE-BY\": \"Baviera\",\n \"GEOSPHERE\": \"GEOSPHERE\",\n \"IT-32-TN\": \"Trentino\",\n \"IT-32-BZ\": \"Alto Adige\",\n \"ES-CT-L\": \"Aran\"\n }\n },\n \"status\": {\n \"missing\": \"manca\",\n \"draft\": \"bozza\",\n \"submitted\": \"inviato\",\n \"published\": \"pubblicato\",\n \"updated\": \"aggiornato\",\n \"resubmitted\": \"versione aggiornata inviata\",\n \"republished\": \"versione aggiornata pubblicata\"\n },\n \"publishBulletinsDialog\": {\n \"message\": \"Vuoi pubblicare il bollettino valanghe?\",\n \"missingDangerRating\": \"Grado di pericolo non definito\",\n \"missingRegion\": \" Meteo-nivo zone non valutate\",\n \"duplicateRegion\": \"Meteo-nivo zone valutate più volte\",\n \"missingAvActivityHighlights\": \"Manca il titolo situazione di pericolo\",\n \"missingAvActivityComment\": \"Manca la valutazione pericolo valanghe\",\n \"missingSnowpackStructureHighlights\": \"Manca il titolo della descrizione manto nevoso\",\n \"missingSnowpackStructureComment\": \"Manca la descrizione del manto nevoso\",\n \"pendingSuggestions\": \"Proposta non confermata\",\n \"incompleteTranslation\": \"Traduzione incompleta\",\n \"accept\": \"Sí\",\n \"reject\": \"No\"\n },\n \"publicationStatusDialog\": {\n \"headline\": \"Stato della pubblicazione\",\n \"publishedBy\": \"Pubblicato da: \",\n \"publishedAt\": \"Pubblicato alle: \",\n \"validFor\": \"Valido per: \",\n \"title\": {\n \"prod\": \"Cose serie\",\n \"test\": \"Test system\",\n \"task\": \"Attività\",\n \"language\": {\n \"all\": \"TUTTO\",\n \"de\": \"DE\",\n \"it\": \"IT\",\n \"en\": \"EN\"\n }\n },\n\n \"email\": {\n \"label\": \"Email\",\n \"tooltip\": \"Inviare Email\",\n \"success\": \"{{prefix}}Email inviati con successo!\",\n \"error\": \"{{prefix}}Non è stato possibile inviare le Email!\"\n },\n \"telegram\": {\n \"label\": \"Messagio Telegram\",\n \"tooltip\": \"Invia messaggio via Telegram\",\n \"success\": \"{{prefix}}Messaggi via Telegram inviati con successo!\",\n \"error\": \"{{prefix}}Messaggi di Telegram non possono essere inviati!\"\n },\n \"push\": {\n \"label\": \"Notifica push\",\n \"tooltip\": \"Invia notifica push\",\n \"success\": \"{{prefix}}Notifiche push inviate con successo!\",\n \"error\": \"{{prefix}}Non è stato possibile inviare le notifiche push!\"\n },\n \"accept\": \"Ok\"\n },\n \"mediaFileDialog\": {\n \"headline\": \"File media\",\n \"important\": \"IMPORTANTE\",\n \"missingFile\": \"Nessun file selezionato!\",\n \"uploadError\": \"Upload fallito!\",\n \"accept\": \"Invia\",\n \"reject\": \"Cancella\"\n },\n \"publishBulletinsErrorDialog\": {\n \"message\": \"Errore pubblicando il bollettino valanghe!\",\n \"accept\": \"Ok\"\n },\n \"submitBulletinsDialog\": {\n \"message\": \"Vuoi inviare il bollettino valanghe?\",\n \"missingDangerRating\": \"Grado di pericolo non definito\",\n \"missingRegion\": \"Micro-zone non valutate\",\n \"missingAvActivityHighlights\": \"Manca titolo situazione di pericolo\",\n \"missingAvActivityComment\": \"Manca valutazione pericolo valanghe\",\n \"missingSnowpackStructureHighlights\": \"Manca il titolo della descrizione manto nevoso\",\n \"missingSnowpackStructureComment\": \"Manca la descrizione del manto nevoso\",\n \"pendingSuggestions\": \"Proposta non confermata\",\n \"accept\": \"Sí\",\n \"reject\": \"No\"\n },\n \"submitBulletinsErrorDialog\": {\n \"message\": \"Errore durante l'invio del bollettino valanghe!\",\n \"accept\": \"Ok\"\n },\n \"submitBulletinsDuplicateRegionDialog\": {\n \"message\": \"Micro-aree valutate più volte! Non è possibile inviare il bollettino valanghe.\",\n \"accept\": \"Ok\"\n },\n \"checkBulletinsErrorDialog\": {\n \"message\": \"Errore verficando il bollettino valanghe!\",\n \"accept\": \"Ok\"\n },\n \"previewErrorDialog\": {\n \"message\": \"L'anteprima non può essere caricata!\",\n \"accept\": \"Ok\"\n },\n \"checkBulletinsDialog\": {\n \"message\": \"Controllare bollettino valanghe\",\n \"missingDangerRating\": \"Grado di pericolo non definito\",\n \"missingRegion\": \"Micro-aree non valutate\",\n \"missingAvActivityHighlights\": \"Manca titolo situazione di pericolo\",\n \"missingAvActivityComment\": \"Manca valutazione pericolo valanghe\",\n \"missingSnowpackStructureHighlights\": \"Manca il titolo della descrizione manto nevoso\",\n \"missingSnowpackStructureComment\": \"Manca la descrizione del manto nevoso\",\n \"pendingSuggestions\": \"Proposta non confermata\",\n \"incompleteTranslation\": \"Traduzione incompleta\",\n \"ok\": \"(tutto va bene)\",\n \"accept\": \"Ok\"\n },\n \"publishAllDialog\": {\n \"message\": \"Vuoi pubblicare tutte le meteo-nivo zone?\",\n \"accept\": \"Sí\",\n \"reject\": \"No\"\n }\n }\n },\n \"training\": {\n \"training\": \"Training\",\n \"timestamp\": \"Momento del training\"\n },\n \"admin\": {\n \"loadingStatistics\": \"Creazione CSV ...\",\n \"server-configuration\": {\n \"title\": \"dServer\",\n \"button\": {\n \"create\": \"Crea server\",\n \"save\": \"Salva\"\n },\n \"table\": {\n \"name\": \"Nome\",\n \"username\": \"Nome utente\",\n \"password\": \"Password\",\n \"publishAt5PM\": \"Pubblica alle 17:00\",\n \"publishAt8AM\": \"Publica alle 08:00\",\n \"pdfDirectory\": \"Cartella per PDF\",\n \"htmlDirectory\": \"Cartella per HTML\",\n \"serverImagesUrl\": \"Path alle immagini sul server\",\n \"dangerLevelElevationDependency\": \"Elevation dependency of danger level\",\n \"mapsPath\": \"Path alle mappe\",\n \"mediaPath\": \"Path ai file media\",\n \"mapProductionUrl\": \"URL per la produzione di mappe\",\n \"apiUrl\": \"API URL\"\n },\n \"success\": \"Configurazione salvata con successo\",\n \"error\": \"Non é stato possibile salvare le configurazione\"\n },\n \"region-configuration\": {\n \"title\": \"Regione\",\n \"button\": {\n \"create\": \"Crea regione\",\n \"save\": \"Salva\"\n },\n \"table\": {\n \"general\": {\n \"title\": \"In generale\",\n \"id\": \"ID\",\n \"microRegions\": \"Numero micro-zone\",\n \"subRegions\": \"Sottoregioni\",\n \"superRegions\": \"Sovraregioni\",\n \"neighborRegions\": \"Regioni confinanti\"\n },\n \"publication\": {\n \"title\": \"Pubblicazione\",\n \"publishBulletins\": \"Publica bollettino valanghe\",\n \"publishBlogs\": \"Publica i post blog\",\n \"createCaamlV5\": \"Crea CAAML v5\",\n \"createCaamlV6\": \"Crea CAAML v6\",\n \"createJson\": \"Crea JSON\",\n \"createMaps\": \"Crea mappe\",\n \"createPdf\": \"Crea PDF\",\n \"sendEmails\": \"Invia email\",\n \"createSimpleHtml\": \"Crea HTML semplici\",\n \"sendTelegramMessages\": \"Invia messaggi via Telegram\",\n \"sendPushNotifications\": \"Invia notifiche push\",\n \"pdfColor\": \"PDF a colori\",\n \"emailColor\": \"Email a colori\",\n \"pdfMapYAmPm\": \"Y per mappa PDF (am/pm)\",\n \"pdfMapYFd\": \"Y per mappa PDF (fd)\",\n \"pdfMapWidthAmPm\": \"Larghezza mappa per PDF (am/pm)\",\n \"pdfMapWidthFd\": \"Larghezza mappa per PDF (fd)\",\n \"pdfMapHeight\": \"Altezza mappa per PDF\",\n \"pdfFooterLogo\": \"Logo per piè di pagina PDF\",\n \"pdfFooterLogoColorPath\": \"Logo per piè di pagina PDF (a colori)\",\n \"pdfFooterLogoBwPath\": \"Logo per piè di pagina PDF (bianco/nero)\",\n \"mapXmax\": \"Mappa X massimo\",\n \"mapXmin\": \"Mappa X minimo\",\n \"mapYmax\": \"Mappa Y massimo\",\n \"mapYmin\": \"Mappa Y minimo\",\n \"simpleHtmlTemplateName\": \"Template HTML semplice\",\n \"geoDataDirectory\": \"Cartella geodati\",\n \"mapLogoColorPath\": \"Logo per mappa (a colori)\",\n \"mapLogoBwPath\": \"Logo per mappa (bianco/nero)\",\n \"mapLogoPosition\": \"Posizione del logo nella mappa\",\n \"mapCenterLat\": \"Posizione centrale della mappa (lat)\",\n \"mapCenterLng\": \"Posizione centrale della mappa (long)\",\n \"imageColorbarColorPath\": \"Barra colori (a colori)\",\n \"imageColorbarBwPath\": \"Barra colori (bianco/nero)\"\n },\n \"components\": {\n \"title\": \"Componenti\",\n \"enableDangerSources\": \"Attiva fonti di pericolo\",\n \"enableObservations\": \"Attiva osservazioni\",\n \"enableModelling\": \"Attiva modellazione\",\n \"enableWeatherbox\": \"Attiva box meteo\"\n },\n \"configuration\": {\n \"title\": \"Configurazione\",\n \"showMatrix\": \"Mostra matrice\",\n \"enableMediaFile\": \"Attiva file media\",\n \"enableStrategicMindset\": \"Attiva mindset strategico\",\n \"enableStressLevel\": \"Attiva livello di stress\",\n \"enableAvalancheProblemCornices\": \"Attivare problema tipico valanghivo CORNICI\",\n \"enableAvalancheProblemNoDistinctAvalancheProblem\": \"Attiva problema tipico valanghivo NESSUN PROBLEMA VALANGHIVO EVIDENTE\"\n }\n },\n \"success\": \"Configurazione salvata con successo\",\n \"error\": \"Non é stato possibile salvare la configurazione\"\n },\n \"users\": {\n \"title\": \"Utenti\",\n \"button\": {\n \"create\": \"Crea utente\"\n },\n \"tooltip\": {\n \"edit\": \"Modifica utente\",\n \"changePassword\": \"Cambia password\",\n \"delete\": \"Cancella utente\"\n },\n \"table\": {\n \"name\": \"Nome\",\n \"email\": \"Email\",\n \"organization\": \"Organizzazione\",\n \"regions\": \"Meteo-nivo zone\",\n \"roles\": \"Ruoli\"\n },\n \"deleteUserModalDialog\": {\n \"message\": \"Voi cancellare questo utente?\",\n \"accept\": \"Sì\",\n \"reject\": \"No\"\n },\n \"deleteUser\": {\n \"success\": \"Utente cancellato\",\n \"error\": \"L'utente non può essere cancellato\"\n },\n \"createUser\": {\n \"success\": \"Utente creato\",\n \"error\": \"L'utente non può essere creato\"\n },\n \"updateUser\": {\n \"success\": \"Utente aggiornato\",\n \"error\": \"L'utente non può essere aggiornato\"\n }\n },\n \"createUser\": {\n \"table\": {\n \"image\": \"Immagine\",\n \"name\": \"Nome\",\n \"email\": \"Email\",\n \"organization\": \"Organizazzione\",\n \"password\": \"Password\",\n \"password2\": \"Ripeti la password\",\n \"roles\": \"Ruoli\",\n \"regions\": \"Regioni\"\n },\n \"error\": {\n \"name\": {\n \"required\": \"Inserire un nome\"\n },\n \"email\": {\n \"required\": \"Inserire un indirizzo email\",\n \"invalid\": \"L'indirizzo Email non è valido\"\n },\n \"password\": {\n \"required\": \"Inserisci una password\",\n \"length\": \"La password deve essere di almeno 8 caratteri\",\n \"mismatch\": \"Le password non corrispondono\"\n }\n },\n \"button\": {\n \"create\": \"Crea utente\",\n \"update\": \"Aggiorna utente\",\n \"cancel\": \"Cancella\"\n }\n },\n \"observations\": {\n \"table\": \"Tabella\",\n \"map\": \"Mappa\",\n \"gallery\": \"Galleria\",\n \"filters\": \"Filtri\",\n \"title\": \"Osservazioni\",\n \"newObservation\": \"Nuova osservazione\",\n \"exportObservations\": \"Esporta osservazioni\",\n \"toggleFilterBar\": \"Visualizza/nascondi barra dei filtri\",\n \"button\": {\n \"submit\": \"Scarica\"\n },\n \"label\": {\n \"dateRange\": \"Periodo\",\n \"observer\": \"Osservatore\"\n },\n \"selectRegion\": {\n \"placeholder\": \"Meteo-nivo zona\",\n \"selectionLabel\": \"{0} meteo-nivo zona/e selezionata/e\"\n },\n \"selectSources\": {\n \"placeholder\": \"origine dati\",\n \"selectionLabel\": \"{0} origine/i selezionato/i\"\n },\n\n \"charts\": {\n \"charts\": \"Diagrammi\",\n \"nan\": \"Senza specificazione\",\n \"classify\": \"Classifica\",\n \"label\": \"Denominazione\",\n \"invert\": \"Invert\",\n \"reset\": \"Reset\",\n \"aspect\": {\n \"caption\": \"Esposizione\"\n },\n \"elevation\": {\n \"caption\": \"Quota\"\n },\n \"stability\": {\n \"caption\": \"Stabilità\"\n },\n \"observationType\": {\n \"caption\": \"Tipo di osservazione\"\n },\n \"importantObservation\": {\n \"caption\": \"Importante\"\n },\n \"avalancheProblem\": {\n \"caption\": \"Problema valanghivo\"\n },\n \"dangerPattern\": {\n \"caption\": \"Situazione tipo\"\n },\n \"days\": {\n \"caption\": \"Giorno\"\n }\n }\n },\n \"blog\": {\n \"title\": \"Blog\",\n \"language\": {\n \"title\": \"Lingua\",\n \"de\": \"DE\",\n \"it\": \"IT\",\n \"en\": \"EN\"\n },\n \"all\": {\n \"tooltip\": \"Invia email, Telegram e Push\",\n \"success\": \"{{prefix}}Email, Telegram e Push inviati con successo!\",\n \"error\": \"{{prefix}}Non è stato possibile inviare email, Telegram e Push!\"\n },\n \"email\": {\n \"tooltip\": \"Invia email\",\n \"success\": \"{{prefix}}Email inviato con successo!\",\n \"error\": \"{{prefix}}Non è stato possibile inviare email!\"\n },\n \"telegram\": {\n \"tooltip\": \"Pubblicazione via canale Telegram\",\n \"success\": \"{{prefix}}Telegram inviato con successo\",\n \"error\": \"{{prefix}}Non è stato possibile inviare i messaggi Telegram!\"\n },\n \"push\": {\n \"tooltip\": \"Invia tramite notifiche push\",\n \"success\": \"{{prefix}}Push inviato con successo\",\n \"error\": \"{{prefix}}Non è stato possibile inviare notifiche Push\"\n }\n }\n },\n \"settings\": {\n \"title\": \"Impostazioni\",\n \"changePassword\": {\n \"title\": \"Cambia password\",\n \"oldPassword\": {\n \"label\": \"Password attuale\",\n \"placeholder\": \"Password attuale\"\n },\n \"newPassword1\": {\n \"label\": \"Nuova password\",\n \"placeholder\": \"Nuova password\"\n },\n \"newPassword2\": {\n \"label\": \"Nuova password (ripetere)\",\n \"placeholder\": \"Nuova password\"\n },\n \"submit\": \"Cambia password\",\n \"passwordChanged\": \"Password modificata con sucesso\",\n \"passwordChangeError\": \"Non é stato possibile cambiare la password\",\n \"passwordIncorrect\": \"Password attuale non corretta\",\n \"error\": {\n \"oldPassword\": {\n \"required\": \"Inserire password attuale\"\n },\n \"newPassword\": {\n \"required\": \"Inserire nuova password\",\n \"mismatch\": \"Le password non corrispondono\"\n }\n }\n },\n \"display\": {\n \"title\": \"Mostra\",\n \"table\": {\n \"showCaaml\": \"Mostra CAAML\",\n \"showJson\": \"Mostra JSON\"\n }\n }\n },\n \"statistics\": {\n \"title\": \"Statistiche\",\n \"button\": {\n \"submit\": \"Scarica\"\n },\n \"label\": {\n \"dateRange\": \"Periodo\",\n \"extended\": \"Esteso\",\n \"duplicates\": \"Doppioni\"\n }\n },\n\n \"dangerRating\": {\n \"noRating\": \"senza valutazione\",\n \"low\": \"debole\",\n \"moderate\": \"moderato\",\n \"considerable\": \"marcato\",\n \"high\": \"forte\",\n \"veryHigh\": \"molto forte\"\n },\n \"avalancheProblem\": {\n \"newSnow\": \"Neve fresca\",\n \"new_snow\": \"Neve fresca\",\n \"windSlab\": \"Lastroni da vento\",\n \"wind_slab\": \"Lastroni da vento\",\n \"persistentWeakLayers\": \"Strati deboli persistenti\",\n \"persistent_weak_layers\": \"Strati deboli persistenti\",\n \"wetSnow\": \"Neve bagnata\",\n \"wet_snow\": \"Neve bagnata\",\n \"glidingSnow\": \"Valanghe di slittamento\",\n \"gliding_snow\": \"Valanghe di slittamento\",\n \"cornices\": \"Cornici\",\n \"noDistinctAvalancheProblem\": \"Nessun problema valanghivo evidente\",\n \"no_distinct_avalanche_problem\": \"Nessun problema valanghivo evidente\",\n \"favourableSituation\": \"Situazione favorevole\",\n \"favourable_situation\": \"Situazione favorevole\"\n },\n \"dangerPattern\": {\n \"dp1\": \"st.1: strato debole persistente basale\",\n \"dp2\": \"st.2: neve di slittamento\",\n \"dp3\": \"st.3: pioggia su neve\",\n \"dp4\": \"st.4: freddo su caldo / caldo su freddo\",\n \"dp5\": \"st.5: neve dopo un lungo periodo di freddo\",\n \"dp6\": \"st.6: neve a debole coesione e vento\",\n \"dp7\": \"st.7: passaggio da poca a molta neve\",\n \"dp8\": \"st.8: brina di superficie sepolta\",\n \"dp9\": \"st.9: neve pallottolare sepolta\",\n \"dp10\": \"st.10: situazione primaverile\"\n },\n \"strategicMindset\": {\n \"title\": \"Mondset strategico\",\n \"assessment\": \"Elevata incertezza\",\n \"stepping_out\": \"Miglioramento\",\n \"status_quo\": \"Status quo\",\n \"stepping_back\": \"Decelerazione\",\n \"entrenchment\": \"Persistente instabile\",\n \"free_ride\": \"Favorevole\",\n \"high_alert\": \"Massima allerta\",\n \"spring_diurnal\": \"Situazione primaverile\"\n },\n \"observationType\": {\n \"DrySnowfallLevel\": \"Dry snowfall level\",\n \"TimeSeries\": \"Serie cronologica\",\n \"Incident\": \"Incidente\",\n \"Profile\": \"Profilo stratigrafico\",\n \"Closure\": \"Chiusura\",\n \"Blasting\": \"Brillamento\",\n \"Avalanche\": \"valanga\",\n \"Evaluation\": \"Valutazione\",\n \"SimpleObservation\": \"Osservazione semplice\",\n \"Webcam\": \"Webcam\"\n },\n \"importantObservation\": {\n \"ForBlog\": \"Per il blog\",\n \"SurfaceHoar\": \"Brina di superficie\",\n \"Graupel\": \"Neve pallottolare\",\n \"StabilityTest\": \"Test di stabilità\",\n \"IceFormation\": \"Formazione di ghiaccio\",\n \"VeryLightNewSnow\": \"Neve fresca leggerissima\"\n },\n \"elevationTolerance\": {\n \"exact\": \"exact\",\n \"50m\": \"±50m\",\n \"100m\": \"±100m\",\n \"200\": \"±200m\"\n },\n \"elevationPeriod\": {\n \"duringPrecipitationEvent\": \"Dry snowfall boundary for the entire precipitation event\",\n \"observationPeriod\": \"Dry snowfall boundary at the time of observation\"\n },\n \"aspect\": {\n \"N\": \"N\",\n \"NE\": \"NE\",\n \"E\": \"E\",\n \"SE\": \"SE\",\n \"S\": \"S\",\n \"SW\": \"SO\",\n \"W\": \"O\",\n \"NW\": \"NO\"\n },\n \"role\": {\n \"SUPERADMIN\": \"Super Amministratore\",\n \"ADMIN\": \"Amministratore\",\n \"FORECASTER\": \"Previsore\",\n \"FOREMAN\": \"Caposquadra\",\n \"OBSERVER\": \"Osservatore\"\n },\n \"tendency\": {\n \"decreasing\": \" Pericolo valanghe in diminuizione\",\n \"steady\": \" Pericolo valanghe stabile\",\n \"increasing\": \" Pericolo valanghe in aumento\"\n },\n \"snowpackStability\": {\n \"unknown\": \"sconosciuto\",\n \"good\": \"buona\",\n \"fair\": \"discreta\",\n \"poor\": \"scarsa\",\n \"very_poor\": \"molto scarsa\"\n },\n \"frequency\": {\n \"none\": \"pochissimi\",\n \"few\": \"pochi\",\n \"some\": \"alcuni\",\n \"many\": \"molti\"\n },\n \"avalancheSize\": {\n \"small\": \"piccola\",\n \"medium\": \"media\",\n \"large\": \"grande\",\n \"very_large\": \"molto grande\",\n \"extreme\": \"estremamente grande\"\n },\n \"complexity\": {\n \"easy\": \"Facile\",\n \"challenging\": \"Impegnativo\",\n \"complex\": \"Complesso\"\n },\n \"glidingSnowActivity\": {\n \"low\": \"debole\",\n \"medium\": \"media\",\n \"high\": \"forte\"\n },\n \"wetness\": {\n \"dry\": \"asciutta\",\n \"moist\": \"umida\",\n \"wet\": \"bagnata\"\n },\n \"characteristic\": {\n \"low\": \"debole\",\n \"medium\": \"media\",\n \"high\": \"forte\",\n \"very_high\": \"molto forte\"\n },\n \"thickness\": {\n \"thin\": \"sottile\",\n \"thick\": \"spesso\"\n },\n \"snowpackPosition\": {\n \"upper\": \"superiore\",\n \"middle\": \"centrale\",\n \"lower\": \"inferiore\",\n \"ground\": \"suolo\"\n },\n \"weakLayerCrust\": {\n \"no\": \"no\",\n \"partly\": \"partly\",\n \"yes\": \"si\"\n },\n \"creationProcess\": {\n \"radiation_recrystallization\": \"radiazione\",\n \"diurnal_recrystallization\": \"diurno\",\n \"melt_layer_recrystallization\": \"crosta da fusione\",\n \"surface_hoar_formation\": \"surface hoar\"\n },\n \"recognizability\": {\n \"very_easy\": \"molto facile\",\n \"easy\": \"facile\",\n \"hard\": \"duro\",\n \"very_hard\": \"molto duro\"\n },\n \"distribution\": {\n \"isolated\": \"isolato\",\n \"specific\": \"determinato\",\n \"widespread\": \"diffuso\"\n },\n \"probability\": {\n \"likely\": \"probabile\",\n \"possible\": \"possibile\",\n \"unlikely\": \"poco probabile\"\n },\n \"detailedDaytime\": {\n \"evening\": \"sera\",\n \"first_night_half\": \"prima metà della notte\",\n \"second_night_half\": \"seconda metà della notte\",\n \"morning\": \"primo mattino\",\n \"forenoon\": \"mattina\",\n \"afternoon\": \"pomeriggio\"\n },\n \"slopeGradient\": {\n \"moderately_steep\": \"moderatamente ripido\",\n \"steep\": \"ripido\",\n \"very_steep\": \"molto ripido\",\n \"extremely_steep\": \"estremamente ripido\"\n },\n \"handHardness\": {\n \"fist\": \"F\",\n \"four_fingers\": \"4F\",\n \"one_finger\": \"1F\",\n \"pencil\": \"P\",\n \"knife\": \"K\",\n \"ice\": \"I\"\n },\n \"hardnessTendency\": {\n \"decreasing\": \"al di sotto più morbido\",\n \"steady\": \"uniforme\",\n \"increasing\": \"al di sopra più morbido\"\n },\n \"terrainType\": {\n \"gullies\": \"canaloni\",\n \"bowls\": \"conche\",\n \"pass_areas\": \"zone ai passi\",\n \"ridge_lines\": \"alle creste\",\n \"adjacent_to_ridge_lines\": \"adjacent to ridge lines\",\n \"distant_from_ridge_lines\": \"distant from ridge lines\",\n \"slope_discontinuities\": \"slope discontinuities\",\n \"convex_terrain\": \"convex terrain\",\n \"concave_terrain\": \"concave terrain\",\n \"steep_terrain\": \"steep terrain\",\n \"very_steep_terrain\": \"very steep terrain\",\n \"open_terrain\": \"open terrain\",\n \"forest\": \"forest\"\n },\n \"dangerSign\": {\n \"shooting_cracks\": \"crepe\",\n \"whumpfing\": \"rumori \\\"whumpf\\\"\",\n \"fresh_avalanches\": \"fresh avalanches\"\n },\n \"changeRegionDialog\": {\n \"message\": \"Vuoi cambiare la meteo-nivo zona?\",\n \"accept\": \"Sì\",\n \"reject\": \"No\"\n },\n \"zamg\": {\n \"table\": \"Tabella\",\n \"map\": \"Mappa\",\n \"region\": \"Meteo-nivo zona\",\n \"newSnow\": \"Neve fresca\"\n },\n \"snowpack\": {\n \"plotType\": {\n \"LWC_stratigraphy\": \"Neve bagnata: contenuto in acqua\",\n \"wet_snow_instability\": \"Neve bagnata: Instabilità neve bagnata\",\n \"Sk38_stratigraphy\": \"strati deboli persistenti: Indice stabilità SK38\",\n \"stratigraphy\": \"strati deboli persistenti: stratigrafia\"\n },\n \"aspect\": {\n \"flat\": \"piano\",\n \"north\": \"Versante nord\",\n \"south\": \"Versante sud\"\n },\n \"meteo\": {\n \"new_snow_plot_3day\": \"Neve fresca (3gg)\",\n \"new_snow_plot_7day\": \"Neve fresca (7g)\",\n \"new_snow_plot_1month\": \"Neve fresca (31g)\",\n \"new_snow_plot_season\": \"Neve fresca (stagione)\",\n \"new_snow_plot_forecast\": \"Neve fresca (previsione)\",\n \"wet_snow_plot_3day\": \"Neve bagnata (3g)\",\n \"wet_snow_plot_7day\": \"Neve bagnata (7g)\",\n \"wet_snow_plot_1month\": \"Neve bagnata (31g)\",\n \"wet_snow_plot_season\": \"Neve bagnata (stagione)\",\n \"wet_snow_plot_forecast\": \"Neve bagnata (previsione)\",\n \"HS_table_24h\": \"Tabella altezza neve (1g)\",\n \"HS_table_72h\": \"Tabella altezza neve (3g)\",\n \"HS_table_season\": \"Tabella altezza neve (stagione)\",\n \"HS_table_forecast\": \"Tabella altezza neve (previsione)\",\n \"TA_table_24h\": \"Tabella temperatura (1g)\",\n \"TA_table_72h\": \"Tabella temperatura (3ore)\",\n \"TA_table_season\": \"Tabella temperatura (stagione)\"\n }\n },\n \"grainShape\": {\n \"PP\": {\n \"code\": \"PP\",\n \"class\": \"Neve fresca\"\n },\n \"PPgp\": {\n \"code\": \"PPgp\",\n \"class\": \"Neve pallottolare\"\n },\n \"DF\": {\n \"code\": \"DF\",\n \"class\": \"Cristalli feltrati\"\n },\n \"RG\": {\n \"code\": \"RG\",\n \"class\": \"Grani arrotondati\"\n },\n \"FC\": {\n \"code\": \"FC\",\n \"class\": \"Cristalli sfaccettati\"\n },\n \"DH\": {\n \"code\": \"DH\",\n \"class\": \"Brina di profondità\"\n },\n \"SH\": {\n \"code\": \"SH\",\n \"class\": \"Brina di superficie\"\n },\n \"MF\": {\n \"code\": \"MF\",\n \"class\": \"Forme da fusione\"\n },\n \"MFcr\": {\n \"code\": \"MFcr\",\n \"class\": \"Crosta da fusione e rigelo\"\n },\n \"IF\": {\n \"code\": \"IF\",\n \"class\": \"Formazioni di ghiaccio\"\n }\n },\n \"button\": {\n \"yes\": \"si\",\n \"no\": \"no\"\n },\n \"observations\": {\n \"allowEdit\": \"Modifica osservazione esterna\",\n \"allowEditTooltip\": \"Questo impedisce la sovrascrittura di {{ value }}\",\n \"editIconTooltip\": \"Osservazione modificata - non viene aggiornato {{ value }}\",\n \"aspect\": \"Esposizione\",\n \"authorName\": \"Nome dell'autore\",\n \"avalancheLength\": \"Lunghezza della valanga\",\n \"avalancheProblem\": \"Problema valanghivo\",\n \"avalancheSize\": \"Dimensione della valanga\",\n \"avalancheType\": \"Tipologia della valanga\",\n \"avalancheWidth\": \"Larghezza della valanga\",\n \"search\": \"Cerca\",\n \"count\": \"# osservazioni\",\n \"elevationTolerance\": \"Accuracy of elevation data\",\n \"elevationPeriod\": \"Elevation time period\",\n \"layers\": {\n \"observers\": \"Osservatori\",\n \"weatherStations\": \"Stazioni nivometeorologiche automatiche\",\n \"webcams\": \"Webcam\",\n \"observations\": \"Osservazioni\"\n },\n \"weatherStations\": {\n \"tooltips\": {\n \"drySnowfallLevel\": \"Dry snowfall level\",\n \"globalRadiation\": \"Radiazione globale\",\n \"newSnow\": \"Neve fresca\",\n \"snowLine\": \"Limite delle nevicate\",\n \"snowHeight\": \"altezza neve\",\n \"snowDifference\": \"Snow difference\",\n \"airTemperature\": \"Temperatura dell'aria\",\n \"airTemperatureMax\": \"Temperatura dell'aria max.\",\n \"airTemperatureMin\": \"Temperatura dell'aria min.\",\n \"surfaceTemperature\": \"Temperatura superficiale\",\n \"surfaceHoar\": \"Formazione potenziale di brina di superficie\",\n \"surfaceHoarCalc\": \"Formazione potenziale di brina di superficie (Lehning et. al.)\",\n \"dewPoint\": \"Temperatura di rugiada\",\n \"relativeHumidity\": \"Umidità relativa\",\n \"windDirection\": \"Direzione del vento\",\n \"windSpeed\": \"Velocità del vento\",\n \"windGust\": \"Raffica\"\n }\n },\n \"button\": {\n \"add\": \"Aggiungi osservazione\",\n \"save\": \"Salva l'osservazione\",\n \"delete\": \"Cancella l'osservazione\",\n \"deleteConfirm\": \"Cancella l'osservazione?\",\n \"discard\": \"Scarta\",\n \"copyDate\": \"Copia data evento\"\n },\n \"comment\": \"Commento\",\n \"content\": \"Contenuto\",\n \"dangerRating\": \"Grado pericolo valanghe\",\n \"elevation\": \"Quota\",\n \"elevationRange\": \"Fascia altitudinale\",\n \"elevationLowerBound\": \"Limite inferiore quota\",\n \"elevationUpperBound\": \"Limite superiore quota\",\n \"eventDate\": \"Data dell'evento\",\n \"eventType\": \"Tipologia dell'evento\",\n \"eventTypes\": {\n \"IMPORTANT\": \"Evento importante\",\n \"NEIGHBOR_REGION\": \"Regione confinante\",\n \"NORMAL\": \"Evento normale\",\n \"PERSON_DEAD\": \"Evento con persone coinvolte (vittime)\",\n \"PERSON_INJURED\": \"Evento con persone coinvolte (feriti)\",\n \"PERSON_NO\": \"Evento senza coinvolgimento persone\",\n \"PERSON_UNINJURED\": \"Evento che coinvolge persone (non ferite)\",\n \"PERSON_UNKNOWN\": \"Evento (sconosciuto)\",\n \"TRAFFIC\": \"Traffico\"\n },\n \"externalURL\": \"URL esterna (es. al database delle foto)\",\n \"fractureDepth\": \"Spessore del lastrone\",\n \"hasCoordinates\": \"Contiene coordinate\",\n \"incline\": \"Pendenza\",\n \"latitude\": \"Latitudine\",\n \"locationName\": \"Località\",\n \"longitude\": \"Longitudine\",\n \"observationType\": \"Tipo di osservazione\",\n \"personInvolvement\": \"Coinvolgimento di persone\",\n \"reportDate\": \"Data del report\",\n \"showTable\": \"Tabella\",\n \"withoutCoordinates\": \"Osservazioni senza coordinate:\",\n \"sidebar\": {\n \"filter\": {\n \"title\": \"Filtro\"\n },\n \"legend\": {\n \"title\": \"Leggenda\"\n },\n \"sources\": {\n \"title\": \"Fonti dei dati\"\n },\n \"views\": {\n \"title\": \"Views\"\n }\n }\n },\n \"personInvolvement\": {\n \"Dead\": \"Evento con persone coinvolte (vittime)\",\n \"Injured\": \"Evento con persone coinvolte (feriti)\",\n \"No\": \"Evento senza coinvolgimento persone\",\n \"Uninjured\": \"Evento con coinvolgimento di persone (non ferite)\",\n \"Unknown\": \"Evento (sconosciuto)\"\n },\n \"units\": {\n \"cm\": \"cm\",\n \"mm\": \"mm\",\n \"m\": \"m\"\n },\n \"qfa\": {\n \"day\": \"Giorno\",\n \"time\": \"Ora\",\n \"back\": \" Indietro\",\n \"parameters\": {\n \"DUST\": \"polvere sahariana\",\n \"N\": \"nuvolosità totale in /8\",\n \"Nh\": \"nuvolosità alta in /8\",\n \"Nm\": \"nuvolosità media in /8\",\n \"Nl\": \"nuvolosità bassa in /8\",\n \"N-CU\": \"copertura con nubi cumuliforme in /8\",\n \"AUSL.T\": \"temperatura trigger\",\n \"SHW-IX\": \"Indice Showalter\",\n \"WX -CUF\": \"tempo significativo: NIL (nulla), RASH (pioggia), TS (temporale)\",\n \"RR\": \"precipitazioni totali [mm]\",\n \"RR-str\": \"precipitazioni stratiformi\",\n \"CONV\": \"precipitazioni convettive [mm]\",\n \"SN\": \"precipitazioni sotto forma di neve [mm]\",\n \"SN--RA\": \"limite delle nevicate [m]\",\n \"QAO \": \"{{value}} hPa eq. vento medio, direzione e forza del vento, [°] e [m/s]\",\n \"QAN\": \"vento medio al suolo, direzione e forza, [°] e [m/s]\",\n \"QANmax\": \"vento max. (raffiche) al suolo [m/s]\",\n \"T \": \"{{value}} hPa eq. temperatura [°C]\",\n \"T m\": \"temperatura a {{value}}m [°C]\",\n \"T 2m\": \"temperatura a 2m [°C]\",\n \"Tk 2m\": \"temperatura a 2m [°K]\",\n \"T GND\": \"temperatura al suolo\",\n \"Max-ADI\": \"temperatura massima di miscelazione [°C]\",\n \"Min Max\": \"temperatura min./max. nelle ultime 24h\",\n \"FROST\": \"limite degli zero gradi [m]\",\n \"W cm\": \"500 hPa eq. vento verticale [cm/s]\",\n \"W --\": \"700 hPa eq. vento verticale [cm/s]\",\n \"W s\": \"{{value}} hPa eq. vento verticale [cm/s]\",\n \"H \": \"{{value}} hPa quota geopotenziale [m]\",\n \"RF \": \"{{value}} hPa eq. umidità relativa [%]\"\n }\n }\n}\n","{\n \"daytime\": {\n \"earlier\": \"AM\",\n \"later\": \"PM\"\n },\n \"login\": {\n \"title\": \"Iniciar session\",\n \"text\": \"Iniciar session ath tòn compde\",\n \"button\": \"Iniciar session\",\n \"stressLevel\": \"Stress Level\",\n \"errorDialog\": {\n \"message\": \"Nòm d'usatgèr o contrasenya incorrècta!\",\n \"accept\": \"D'acòrd\"\n },\n \"placeholder\": {\n \"username\": \"Se te platz, introdusís eth tòn nòm d'usatgèr\",\n \"password\": \"Se te platz, introdusís era tua contrasenya\"\n }\n },\n \"sidebar\": {\n \"bulletins\": \"Avalanche.report\",\n \"dangerSources\": \"Danger Sources\",\n \"observations\": \"Observacions\",\n \"qfa\": \"QFA\",\n \"modelling\": \"Modelitzacion\",\n \"modellingForecast\": \"Prediccion\",\n \"modellingZamg\": \"Modèl multiple ZAMG\",\n \"modellingZamgECMWF\": \"ZAMG ECMWF-EPS\",\n \"modellingZamgCLAEF\": \"ZAMG CLAEF-EPS\",\n \"modellingZamgMeteogram\": \"meteograma GeoSphere\",\n \"modellingSnowpack\": \"Modèl SNOWPACK\",\n \"modellingSnowpackMeteo\": \"Modèl meteo SNOWPACK\",\n \"weatherbox\": \"Weatherbox\",\n \"awsome\": \"AWSOME\",\n \"snowpack\": \"SNOWPACK\",\n \"geosphere\": \"GeoSphere\"\n },\n \"menu\": {\n \"logout\": \"Barrar session\",\n \"language\": \"Lengua\",\n \"en\": \"Anglés\",\n \"de\": \"Alemand\",\n \"fr\": \"Francés\",\n \"it\": \"Italian\",\n \"es\": \"Castelhan\",\n \"ca\": \"Catalan\",\n \"oc\": \"Aranès\",\n \"fullscreen\": \"Pantalha complèta\",\n \"settings\": \"Configuracion\",\n \"statistics\": \"Estadístiques\",\n \"admin\": \"Administrador\",\n \"region\": \"Region\",\n \"education\": \"Educacion\"\n },\n \"matrix\": {\n \"label\": {\n \"snowpackStability\": \"Estabilitat deth celh de nhèu\",\n \"frequency\": \"Frecuéncia\",\n \"avalancheSize\": \"Mida de lauet\",\n \"dangerRating\": \"Grad de perilh\",\n \"override\": \"(modifique eth grad de perilh)\",\n \"matrix\": \"Mairitz\",\n \"referToFairStability\": \"Referir-se a una estabilitat regular\",\n \"referToPoorStability\": \"Referir-se a una pobre estabilitat\",\n \"dangerLevel1\": \"Grad de perilh 1 (Fèble)\"\n }\n },\n \"dangerSources\": {\n \"status\": {\n \"missing\": \"absent\",\n \"available\": \"available\",\n \"forecast\": \"forecast\",\n \"analysis\": \"analysis\",\n \"loading\": \"Loading danger sources ...\",\n \"saveError\": \"Danger source could not be saved!\",\n \"loadDangerSourcesError\": \"Danger sources could not be loaded!\",\n \"loadVariantsError\": \"Danger source variants could not be loaded!\"\n },\n \"variantStatus\": {\n \"active\": \"active\",\n \"dormant\": \"dormant\",\n \"inactive\": \"inactive\"\n },\n \"tooltip\": {\n \"read\": \"Read danger sources\",\n \"edit\": \"Edit danger sources\"\n },\n \"table\": {\n \"loadMore\": \"Load {{count}} more days\",\n \"title\": {\n \"forecast\": \"Prediccion\",\n \"analysis\": \"Analysis\"\n }\n },\n \"create\": {\n \"variantStatus\": \"Status\",\n \"variantEditable\": \"This variant can be edited.\",\n \"variantNotEditable\": \"This variant can not be edited.\",\n \"noVariantsForSelectedDay\": \"No variants defined for this date.\",\n \"tooltip\": {\n \"editDangerSource\": \"Edit danger source\",\n \"loadVariants\": \"Load variants from the day before\",\n \"edit\": \"Editar micro-regions\",\n \"copy\": \"Copy variant\",\n \"delete\": \"Delete variant\",\n \"compare\": \"Compare variant\",\n \"forecast\": \"Compare with forecast\"\n },\n \"createDangerSource\": \"Create danger source\",\n \"createVariant\": \"Create new variant\",\n \"noDangerSources\": \"No danger sources\",\n \"title\": {\n \"avalanche\": \"Lauet\",\n \"matrix\": \"Mairitz\",\n \"characteristics\": \"Caracteristiques\",\n \"comment\": \"Comentari\"\n },\n \"label\": {\n \"glidingSnowActivity\": \"Gliding snow activity\",\n \"snowHeight\": \"Snow height\",\n \"snowHeightAverage\": \"Average snow height\",\n \"zeroDegreeIsotherm\": \"0°C isotherm\",\n \"looseSnowMoisture\": \"Loose snow moisture\",\n \"looseSnowGrainShape\": \"Loose snow grain shape\",\n \"slabGrainShape\": \"Slab grain shape\",\n \"slabThickness\": \"Slab thickness\",\n \"slabHandHardness\": \"Slab hand hardness\",\n \"slabHardnessProfile\": \"Slab hardness\",\n \"slabEnergyTransferPotential\": \"Slab energy transfer potential\",\n \"slabDistribution\": \"Slab distribution\",\n \"weakLayerGrainShape\": \"Weak layer grain shape\",\n \"weakLayerGrainSize\": \"Weak layer grain size\",\n \"weakLayerPersistent\": \"Weak layer persistent\",\n \"weakLayerThickness\": \"Weak layer thickness\",\n \"weakLayerStrength\": \"Weak layer strength\",\n \"weakLayerWet\": \"Weak layer wet\",\n \"weakLayerCrustAbove\": \"Weak layer crust above\",\n \"weakLayerCrustBelow\": \"Weak layer crust below\",\n \"weakLayerPosition\": \"Weak layer position\",\n \"weakLayerCreation\": \"Weak layer creation\",\n \"weakLayerDistribution\": \"Weak layer distribution\",\n \"dangerSpotRecognizability\": \"Danger spot recognizability\",\n \"remoteTriggering\": \"Remote triggering\",\n \"hasDaytimeDependency\": \"Dependéncia ora deth dia\",\n \"dangerIncreaseWithElevation\": \"Danger increase with elevation\",\n \"runoutIntoGreen\": \"Runout into green\",\n \"highestDangerAspect\": \"Highest danger aspect\",\n \"dangerPeak\": \"Danger peak\",\n \"slopeGradient\": \"Grad d'inclinacion\",\n \"naturalRelease\": \"Natural release\",\n \"terrainTypes\": \"Terrain types\",\n \"dangerSigns\": \"Danger signs\",\n \"aspects\": \"Orientacions\"\n },\n \"editVariantDialog\": {\n \"save\": \"Sauvar\",\n \"cancel\": \"Anullar\"\n },\n \"deleteVariantDialog\": {\n \"message\": \"Do you want to delete this variant?\",\n \"accept\": \"Òc\",\n \"reject\": \"Non\"\n },\n \"noRegionDialog\": {\n \"message\": \"At least one micro-region has to be yours.\",\n \"accept\": \"D'acòrd\"\n },\n \"discardDialog\": {\n \"message\": \"Vòs escartar es cambiaments?\",\n \"accept\": \"Òc\",\n \"reject\": \"Non\"\n },\n \"saveErrorDialog\": {\n \"message\": \"There was an error saving the danger sources!\",\n \"accept\": \"D'acòrd\"\n },\n \"loadDialog\": {\n \"message\": \"Do you want to load all danger source variants from the day before?\",\n \"accept\": \"Òc\",\n \"reject\": \"Non\"\n }\n }\n },\n \"avalancheType\": {\n \"title\": \"Tipe de lauet\",\n \"label\": {\n \"slab\": \"SLAB\",\n \"loose\": \"LOOSE\",\n \"glide\": \"GLIDE\"\n },\n \"tooltip\": {\n \"slab\": \"Slab avalanche\",\n \"loose\": \"Loose snow avalanche\",\n \"glide\": \"Glide snow avalanche\"\n }\n },\n \"elevation\": {\n \"title\": \"Nautada\",\n \"high\": \"Enjós\",\n \"low\": \"Dessús\",\n \"treeline\": \"Limit deth bòsc\"\n },\n \"bulletins\": {\n \"title\": \"Avalanche.report\",\n \"tooltip\": {\n \"edit\": \"Edit bulletin\",\n \"read\": \"Read bulletin\",\n \"copy\": \"Copiar bulletin\",\n \"paste\": \"Colar bulletin\",\n \"cancel\": \"Cancelar copia\",\n \"update\": \"Editar\",\n \"submit\": \"Enviar\",\n \"submitUpdate\": \"Enviar actualizacion\",\n \"publishChange\": \"Publicar ara (sense messatges)\",\n \"publishUpdate\": \"Publicar ara\",\n \"caaml\": \"Mostrar CAAML\",\n \"json\": \"Mostrar JSON\",\n \"create\": \"Crear bulletin\",\n \"preview\": \"Vista previa deth bulletin (PDF)\",\n \"check\": \"Verificar bulletin\",\n \"info\": \"Mostrar er estat de publicacion\",\n \"loadSuggestionFromDangerSources\": \"Load suggestion\",\n \"deleteAllWarningRegions\": \"Delete all warning regions\",\n \"publishAll\": \"Publicar totes es regions\",\n \"mediaFile\": \"Cargar un fichèr multimèdia\"\n },\n \"status\": {\n \"submittedInfo\": \"Serà publicat tàs 5PM\",\n \"resubmittedInfo\": \"Serà publicat tàs 8AM\",\n \"publishedInfo\": \"A estat publicat\",\n \"noPublicationInfo\": \"NON serà publicat automaticaments\",\n \"loadingPreview\": \"Creant ua vista prèvia de PDF...\",\n \"loading\": \"En tot cargar eth bulletin ...\",\n \"loadMoreBulletins\": \"Load {{count}} more bulletins\",\n \"publishing\": \"Bulletin publicant-se\",\n \"submitting\": \"Bulletin enviant-se\",\n \"saveError\": \"Bulletin could not be saved!\",\n \"loadBulletinsError\": \"Bulletins could not be loaded!\"\n },\n \"create\": {\n \"tooltip\": {\n \"edit\": \"Editar micro-regions\",\n \"copy\": \"Copiar region\",\n \"delete\": \"Esborrar region\",\n \"compare\": \"Compare region\",\n \"undo\": \"Undo last change in region\",\n \"redo\": \"Redo change in region\",\n \"createRegion\": \"Crear region\",\n \"cancel\": \"Anullar\",\n \"acceptSuggestion\": \"Acceptar regions suggerides\",\n \"rejectSuggestion\": \"Refusar regions suggerides\",\n \"saveChanges\": \"Sauvar cambiaments\",\n \"discardChanges\": \"Escartar cambiaments\",\n \"incompleteAvalancheProblem\": \"Problèma de lauegi incomplèt\",\n \"saveBulletin\": \"Sauvar bulletin\",\n \"discardBulletin\": \"Escartar cambiaments deth bulletin\",\n \"loadBulletin\": \"Cargar bulletin deth dia anterior\",\n \"uploadJsonBulletin\": \"Cargar eth bulletin en format JSON\",\n \"downloadJsonBulletin\": \"Descargar eth bulletin en format JSON\",\n \"daytimeDependency\": \"Dependéncia ora deth dia\",\n \"treeline\": \"Limit deth bòsc\",\n \"tendency\": {\n \"decreasing\": \"Perilh de lauegi diminuís\",\n \"steady\": \"Perilh de lauegi seguís parièr\",\n \"increasing\": \"El perill d’allaus aumente\",\n \"danger\": \"Perilh de lauegi\"\n },\n \"textcat\": {\n \"edit\": \"Editar\",\n \"copy\": \"Copiar\",\n \"paste\": \"Colar\",\n \"example\": \"Cargar tèxte exemple\",\n \"delete\": \"Esborrar\"\n },\n \"moveUpAvalancheProblem\": \"Eth problèma de lauegi se mostrarà ath bulletin\",\n \"moveDownAvalancheProblem\": \"Botjar eth problèma de lauegi cap enjós\",\n \"dangerRatingDirectionUp\": \"Cap ensús\",\n \"dangerRatingDirectionDown\": \"Cap enjós\"\n },\n \"save\": \"Sauvar\",\n \"discard\": \"Escartar\",\n \"back\": \"Endarrere\",\n \"createAggregatedRegion\": \"Naua region\",\n \"pasteAggregatedRegion\": \"Enganchar era region\",\n \"pendingSuggestions\": \"Suggeriments\",\n \"rejectSuggestion\": \"Rebutjar\",\n \"acceptSuggestion\": \"Acceptar\",\n \"cancelCopyBulletin\": \" Cancelar\",\n \"createAvalancheProblem\": \"Nau problèma\",\n \"ownRegions\": \"Regions pròprias\",\n \"foreignRegions\": \"Regions estrangères\",\n \"externalRegions\": \"Regions extèrnes\",\n \"mapSelectRegion\": \"Seleccionar regions ath mapa\",\n \"statusHeader\": \"Estat deth bulletin\",\n \"suggestions\": \"Suggeriments\",\n \"noBulletinsForSelectedDay\": \"Non s'a pas definit cap de region per aguesta data.\",\n \"autosave\": \"Sauvat automaticaments\",\n \"regionEditable\": \"Aguesta region pòt editar-se.\",\n \"regionNotEditable\": \"Aguesta region non pòt pas editar-se.\",\n \"regionLocked\": \"Aguesta region ei bloquejada.\",\n \"changeDangerRatingElevation\": \"Extendre eth perilh de lauegi\",\n \"mapTop\": \"Mapa dessús\",\n \"mapLeft\": \"Mapa en costat\",\n \"showNotes\": \"Mostrar nòtes\",\n \"hideNotes\": \"Amagar nòtes\",\n \"incompleteAvalancheProblem\": \"Incomplete\",\n \"label\": {\n \"importantObservations\": \"Important observations\",\n \"avalancheProblems\": \"Problèma de lauegi\",\n \"aspects\": \"Orientacions\",\n \"highlights\": \"Alèrte especiau\",\n \"avActivityHighlights\": \"Titular dera situacion de lauegi\",\n \"avActivityComment\": \"Descripcion deth perilh de lauegi\",\n \"snowpackStructureComment\": \"Descripcion deth celh de nhèu\",\n \"dangerPatterns\": \"Patrons de perilh\",\n \"tendencyComment\": \"Descripcion de tendéncia\",\n \"notes\": \"Nòtes\"\n },\n \"copyRegion\": {\n \"label\": \"Copiar era region d'alèrta a un aute bulletin\",\n \"select\": \"Enganchar a ...\",\n \"currentBulletin\": \"Aguest bulletin\"\n },\n \"title\": {\n \"avalancheProblem\": \"Problèmes de lauegi\",\n \"dangerDescription\": \"Descripcion deth perilh de lauegi\",\n \"forenoon\": \"Maitin\",\n \"afternoon\": \"Tarde\",\n \"snowpackStructure\": \"Estructura deth celh de nhèu\",\n \"tendency\": \"Tendéncia\",\n \"showTranslations\": \"Mostrar revirades\",\n \"hideTranslations\": \"Amagar revirades\"\n },\n \"placeholder\": {\n \"notes\": \"Escriu ací ...\"\n },\n \"pmDialog\": {\n \"noIFrameSupport\": \"Eth tòn navigador non ei compatible damb IFrames.\"\n },\n \"discardDialog\": {\n \"message\": \"Vòs escartar es cambiaments?\",\n \"accept\": \"Òc\",\n \"reject\": \"Non\"\n },\n \"deleteAggregatedRegionDialog\": {\n \"message\": \"Vòs esborrar aquesta region?\",\n \"accept\": \"Òc\",\n \"reject\": \"Non\"\n },\n \"noRegionDialog\": {\n \"message\": \"At least one micro-region has to be yours.\",\n \"accept\": \"D'acòrd\"\n },\n \"loadDialog\": {\n \"message\": \"Vòs cargar es bulletins deth dia anterior?\",\n \"accept\": \"Òc\",\n \"reject\": \"Non\"\n },\n \"deleteAllWarningRegionsDialog\": {\n \"message\": \"Do you want to delete all warning regions?\",\n \"accept\": \"Òc\",\n \"reject\": \"Non\"\n },\n \"loadAutoSaveDialog\": {\n \"message\": \"Vòs cargar es bulletins sauvadi automaticaments?\",\n \"accept\": \"Òc\",\n \"reject\": \"Non\"\n },\n \"saveErrorDialog\": {\n \"message\": \"S'a produsit un error en sauvar es bulletins!\",\n \"accept\": \"D'acòrd\"\n },\n \"changeErrorDialog\": {\n \"message\": \"S'a produsit un error en cambiar es bulletins!\",\n \"accept\": \"D'acòrd\"\n },\n \"loadingErrorDialog\": {\n \"message\": \"S'a produsit un error en cargar es bulletins!\",\n \"accept\": \"D'acòrd\"\n },\n \"loadingJsonFileErrorDialog\": {\n \"message\": \"S'a produsit un error en cargar es bulletins dempús deth fichèr JSON!\",\n \"accept\": \"D'acòrd\"\n },\n \"avalancheProblemErrorDialog\": {\n \"message\": \"Manque eth problèma de lauegi, orientacions, estabilitat deth celh de nhèu, frequéncia e/o era mesura de lauet per aumens un problèma de lauegi\",\n \"accept\": \"D'acòrd\"\n },\n \"loadAvActivityCommentExampleTextDialog\": {\n \"message\": \"Entà quina situacion vòs cargar un tèxte d'exemple?\",\n \"newSnow\": \"Nhèu recenta\",\n \"windSlab\": \"Plaques de vent\",\n \"persistentWeakLayers\": \"Coches fèbles persistentes\",\n \"wetSnow\": \"Nhèu umida\",\n \"glidingSnow\": \"Esguitlaments basaus\",\n \"favourableSituation\": \"Situacion favorabla\",\n \"cancel\": \"Anullar\"\n },\n \"removeDaytimeDependencyDialog\": {\n \"message\": \"Which avalanche problems do you want to keep?\",\n \"cancel\": \"Anullar\"\n },\n \"strategicMindsetDialog\": {\n \"title\": \"Strategic Mindsets\",\n \"introduction\": \"The \\\"Strategic Mindsets\\\" are intended to express our mental attitude with regard to the avalanche situation and its development in the corresponding warning region. It should not be derived directly from the hazard assessment, but rather understood and used as an intuitive impression of the overall situation. The \\\"Strategic Mindsets\\\" are therefore primarily a communication tool. Using the mindsets and associated definitions, we forecasters can quickly and efficiently exchange information about the development of the hazard situation and find a common language for communication.\",\n \"description\": {\n \"title\": \"Description:\",\n \"text\": {\n \"assessment\": \"There is great uncertainty in the hazard assessment due to insufficient information from the field.\",\n \"stepping_out\": \"Decreasing tendency of the hazard situation (also within a danger level).\",\n \"status_quo\": \"Same hazardous situation. No significant change compared to the previous day.\",\n \"stepping_back\": \"Increasing tendency of the hazard situation (also within a danger level).\",\n \"entrenchment\": \"Almost constant, tense hazardous situation. The main danger comes from (a) persistent weak layer(s) susceptible to interference.\",\n \"free_ride\": \"Low avalanche danger with generally stable snow cover. Only small avalanches are possible in extremely steep terrain. \",\n \"high_alert\": \"Exceptional situation with high or very high avalanche danger. Spontaneous avalanches of very large or extreme magnitude are possible\",\n \"spring_diurnal\": \"Wet snow avalanches during the course of the day, which are subject to a clear diurnal cycle, are decisive for the risk assessment.\"\n }\n },\n \"communication\": {\n \"title\": \"Communication:\",\n \"text\": {\n \"assessment\": \"Avalanche situation must be checked locally. Restraint is recommended.\",\n \"stepping_out\": \"Gradual decrease in danger. However, caution is still required and the improving situation should be assessed locally before entering riskier terrain. \",\n \"status_quo\": \"Hazardous situation is unchanged. Feedback from observers helps to better outline the hazardous situation. More favourable terrain should be communicated with emphasis. \",\n \"stepping_back\": \"Clear communication of the increase in avalanche danger - even within a danger level. Information on the causes supports comprehensibility in communication. \",\n \"entrenchment\": \"Caution and restraint are required. Situation hardly changes. If possible, provide as precise information as possible on distribution and possibility to trigger. Increased communication of observations that reveal the situation and trigger restraint.\",\n \"free_ride\": \"Little text. Emphasise the generally favourable overall situation and potentially isolated hazard areas\",\n \"high_alert\": \"Communication across all channels. The focus is no longer on winter sports. Danger even in areas that are not usually at risk of avalanches.\",\n \"spring_diurnal\": \"Favourable situation in the morning, increasing during the day. Assessment should be made locally by observing the softening of the melt-freeze crust and the increasing soaking of the snow cover.\"\n }\n },\n \"examples\": {\n \"title\": \"Examples:\",\n \"text\": {\n \"assessment\": \"Start of the season.\",\n \"stepping_out\": \"Cooling leads to a decrease in the risk of wet snow avalanches after a warm and humid weather phase.\",\n \"status_quo\": \"Consistent wind-slab problem with cold temperatures, loose snow and wind.\",\n \"stepping_back\": \"Abundant fresh snowfall leads to an increase in the danger situation.\",\n \"entrenchment\": \"Critical persistent weak layers problem with potential for dangerously large avalanches. The situation is only stabilising very slowly and requires a great deal of restraint.\",\n \"free_ride\": \"Low avalanche danger, no persistent weak layers, all terrain has already been groomed.\",\n \"high_alert\": \"Danger level 4 or higher due to large amounts of fresh snow and/or problematic, persistent weak layers. \",\n \"spring_diurnal\": \"Spring situation with dry high-pressure weather and moderate temperatures with otherwise mostly stable old snow cover.\"\n }\n },\n \"strategicMindset\": {\n \"assessment\": \"High Uncertainty\",\n \"stepping_out\": \"Improving\",\n \"status_quo\": \"Status Quo\",\n \"stepping_back\": \"Deteriorating\",\n \"entrenchment\": \"Persistent Unstable\",\n \"free_ride\": \"Favorable\",\n \"high_alert\": \"High Alert\",\n \"spring_diurnal\": \"Spring Diurnal\"\n }\n },\n \"decisionTree\": {\n \"filepath\": \"./assets/img/decision_tree-en.svg\",\n \"feedbackURL\": \"https://admin.avalanche.report/umfrage-entscheidungsbaum/en/\",\n \"decisionTree\": \"Arbre de decisions\",\n \"feedback\": \"Comentaris\",\n \"save\": \"Sauvar\",\n \"discard\": \"Escartar\"\n }\n },\n \"table\": {\n \"title\": {\n \"date\": \"Data\",\n \"status\": {\n \"AT-02\": \"Carinthia\",\n \"AT-03\": \"Baixa Àustria\",\n \"AT-04\": \"Alta Àustria\",\n \"AT-05\": \"Salzburg\",\n \"AT-06\": \"Styria\",\n \"AT-07\": \"Tiròl\",\n \"AT-08\": \"Vorarlberg\",\n \"CH\": \"Soïssa\",\n \"DE-BY\": \"Bavaria\",\n \"GEOSPHERE\": \"GEOSPHERE\",\n \"IT-32-TN\": \"Trentin\",\n \"IT-32-BZ\": \"Sud-Tiròl\",\n \"ES-CT-L\": \"Aran\"\n }\n },\n \"status\": {\n \"missing\": \"absent\",\n \"draft\": \"borrolhon\",\n \"submitted\": \"enviat\",\n \"published\": \"publicat\",\n \"updated\": \"actualizat\",\n \"resubmitted\": \"re-enviat\",\n \"republished\": \"re-publicat\"\n },\n \"publishBulletinsDialog\": {\n \"message\": \"Vòs publicar eth bulletin?\",\n \"missingDangerRating\": \"Grad de perilh non establit\",\n \"missingRegion\": \"Regions sense grad de perilh\",\n \"duplicateRegion\": \"Regions avalorades diuèrsi viatges\",\n \"missingAvActivityHighlights\": \"Manque eth titular dera situacion de lauegi\",\n \"missingAvActivityComment\": \"Manque era descripcion deth perilh de lauegi\",\n \"missingSnowpackStructureHighlights\": \"Manque eth titular dera estructura deth celh de nhèu\",\n \"missingSnowpackStructureComment\": \"Manque era descripcion deth celh de nhèu\",\n \"pendingSuggestions\": \"Suggeriments pendenti\",\n \"incompleteTranslation\": \"Revirada incomplèta\",\n \"accept\": \"Òc\",\n \"reject\": \"Non\"\n },\n \"publicationStatusDialog\": {\n \"headline\": \"Estat dera publicacion\",\n \"publishedBy\": \"Publicat per:\",\n \"publishedAt\": \"Publicat a les:\",\n \"validFor\": \"Valid per:\",\n \"title\": {\n \"prod\": \"Causes serioses\",\n \"test\": \"Test system\",\n \"task\": \"Prètzhèt\",\n \"language\": {\n \"all\": \"TOTI\",\n \"de\": \"DE\",\n \"it\": \"IT\",\n \"en\": \"EN\"\n }\n },\n\n \"email\": {\n \"label\": \"Emails\",\n \"tooltip\": \"Enviar Emails\",\n \"success\": \"{{prefix}}Corrèus electronics enviadi corrèctaments!\",\n \"error\": \"{{prefix}}Non s'an pogut enviar es corrèus electronics!\"\n },\n \"telegram\": {\n \"label\": \"Messatges de Telegram\",\n \"tooltip\": \"Enviar messatges de Telegram\",\n \"success\": \"{{prefix}}Messatges de Telegram enviadi corrèctaments!\",\n \"error\": \"{{prefix}}Non s'an pogut enviar es messatges de Telegram!\"\n },\n \"push\": {\n \"label\": \"Notificacions Push\",\n \"tooltip\": \"Enviar notificacions Push\",\n \"success\": \"{{prefix}}Notificacions push enviades correctament!\",\n \"error\": \"{{prefix}}Non s'an pogut enviar es notificacions push!\"\n },\n \"accept\": \"d'acòrd\"\n },\n \"mediaFileDialog\": {\n \"headline\": \"Fichèr multimèdia\",\n \"important\": \"IMPORTANT\",\n \"missingFile\": \"Non s'a pas seleccionat cap fichèr!\",\n \"uploadError\": \"Era carga a mancat!\",\n \"accept\": \"Enviar\",\n \"reject\": \"Anullar\"\n },\n \"publishBulletinsErrorDialog\": {\n \"message\": \"S'a produsit un error en publicar bulletins!\",\n \"accept\": \"d'acòrd\"\n },\n \"submitBulletinsDialog\": {\n \"message\": \"Vòs enviar eth bulletin?\",\n \"missingDangerRating\": \"Grad de perilh non establit\",\n \"missingRegion\": \"Regions sense grad de perilh\",\n \"missingAvActivityHighlights\": \"Manque eth titular dera situacion de lauegi\",\n \"missingAvActivityComment\": \"Manque era descripcion deth perilh de lauegi\",\n \"missingSnowpackStructureHighlights\": \"Manque eth titular dera estructura deth celh de nhèu\",\n \"missingSnowpackStructureComment\": \"Manque era descripcion deth celh de nhèu\",\n \"pendingSuggestions\": \"Suggeriments pendenti\",\n \"accept\": \"Òc\",\n \"reject\": \"Non\"\n },\n \"submitBulletinsErrorDialog\": {\n \"message\": \"S'ha produït un error en enviar butlletins!\",\n \"accept\": \"d'acòrd\"\n },\n \"submitBulletinsDuplicateRegionDialog\": {\n \"message\": \"Regions avalorades diuèrsi còps! Non se pòt enviar eth bulletin.\",\n \"accept\": \"d'acòrd\"\n },\n \"checkBulletinsErrorDialog\": {\n \"message\": \"S'a produsit un error en verificar es bulletins!\",\n \"accept\": \"d'acòrd\"\n },\n \"previewErrorDialog\": {\n \"message\": \"Non s'a pogut cargar era vista prèvia!\",\n \"accept\": \"D'acòrd\"\n },\n \"checkBulletinsDialog\": {\n \"message\": \"Verificar eth bulletin\",\n \"missingDangerRating\": \"Grad de perilh non establit\",\n \"missingRegion\": \"Regions sense grad de perilh\",\n \"missingAvActivityHighlights\": \"Manque eth titular dera situacion de lauegi\",\n \"missingAvActivityComment\": \"Manque era descripcion deth perilh de lauegi\",\n \"missingSnowpackStructureHighlights\": \"Manque eth titular dera estructura deth celh de nhèu\",\n \"missingSnowpackStructureComment\": \"Manque era descripcion deth celh de nhèu\",\n \"pendingSuggestions\": \"Suggeriments pendenti\",\n \"incompleteTranslation\": \"Revirada incomplèta\",\n \"ok\": \"(tot corrècte)\",\n \"accept\": \"D'acòrd\"\n },\n \"publishAllDialog\": {\n \"message\": \"Vòs publicar totes es regions?\",\n \"accept\": \"Òc\",\n \"reject\": \"Non\"\n }\n }\n },\n \"training\": {\n \"training\": \"Training\",\n \"timestamp\": \"Training timestamp\"\n },\n \"admin\": {\n \"loadingStatistics\": \"Creant eth CSV ...\",\n \"server-configuration\": {\n \"title\": \"Servidor\",\n \"button\": {\n \"create\": \"Crear servidor\",\n \"save\": \"Sauvar\"\n },\n \"table\": {\n \"name\": \"Nòm\",\n \"username\": \"Nòm d'usatgèr\",\n \"password\": \"Password\",\n \"publishAt5PM\": \"Publicar as 5 PM\",\n \"publishAt8AM\": \"Publicar as 8 AM\",\n \"pdfDirectory\": \"Directòri entà PDF\",\n \"htmlDirectory\": \"Directòri entà HTML\",\n \"serverImagesUrl\": \"Rota as imatges deth servidor\",\n \"dangerLevelElevationDependency\": \"Elevation dependency of danger level\",\n \"mapsPath\": \"Rota as mapes\",\n \"mediaPath\": \"Rota des fichèrs multimèdia\",\n \"mapProductionUrl\": \"URL entara produccion de mapes\",\n \"apiUrl\": \"API URL\"\n },\n \"success\": \"Configuracion sauvada corrèctaments\",\n \"error\": \"Non s'a pogut sauvar era configuracion\"\n },\n \"region-configuration\": {\n \"title\": \"Region\",\n \"button\": {\n \"create\": \"Crear region\",\n \"save\": \"Sauvar\"\n },\n \"table\": {\n \"general\": {\n \"title\": \"General\",\n \"id\": \"ID\",\n \"microRegions\": \"Nombre de micro-regions\",\n \"subRegions\": \"Sub-regions\",\n \"superRegions\": \"Super-regions\",\n \"neighborRegions\": \"Regions vesines\"\n },\n \"publication\": {\n \"title\": \"Publication\",\n \"publishBulletins\": \"Publicar era prediccion de lauegi\",\n \"publishBlogs\": \"Publicar entrades de blòg\",\n \"createCaamlV5\": \"Crear CAAML v5\",\n \"createCaamlV6\": \"Crear CAAML v6\",\n \"createJson\": \"Crear JSON\",\n \"createMaps\": \"Crear mapes\",\n \"createPdf\": \"Crear PDF\",\n \"sendEmails\": \"Corrèus electronics enviadi\",\n \"createSimpleHtml\": \"Crear HTML simple\",\n \"sendTelegramMessages\": \"Enviar messatges de Telegram\",\n \"sendPushNotifications\": \"Enviar notificacions push\",\n \"pdfColor\": \"PDF color\",\n \"emailColor\": \"Email color\",\n \"pdfMapYAmPm\": \"Y entà mapa PDF (am/pm)\",\n \"pdfMapYFd\": \"Y entà mapa PDF (fd)\",\n \"pdfMapWidthAmPm\": \"Amplada de mapa entà PDF (am/pm)\",\n \"pdfMapWidthFd\": \"Amplada de map entà PDF (fd)\",\n \"pdfMapHeight\": \"Nautada de mapa entà PDF\",\n \"pdfFooterLogo\": \"Logotip entath pè de pagina de PDF\",\n \"pdfFooterLogoColorPath\": \"Logotip entath pè de pagina de PDF (color)\",\n \"pdfFooterLogoBwPath\": \"Logotip entath pè de pagina de PDF (bw)\",\n \"mapXmax\": \"X deth mapa màxim\",\n \"mapXmin\": \"X deth mapa minim\",\n \"mapYmax\": \"Y deth mapa màxim\",\n \"mapYmin\": \"Y deth mapa mínim\",\n \"simpleHtmlTemplateName\": \"Plantilha HTML simpla\",\n \"geoDataDirectory\": \"Directòri de geodonades\",\n \"mapLogoColorPath\": \"Logotip entath mapa (color)\",\n \"mapLogoBwPath\": \"Logotip entath mapa (bw)\",\n \"mapLogoPosition\": \"Posicion deth logotip entath mapa\",\n \"mapCenterLat\": \"Centrar posicion deth mapa (latitud)\",\n \"mapCenterLng\": \"Centrar posicion deth mapa (longitud)\",\n \"imageColorbarColorPath\": \"Barra de colors (color)\",\n \"imageColorbarBwPath\": \"Barra de colors (bw)\"\n },\n \"components\": {\n \"title\": \"Components\",\n \"enableDangerSources\": \"Enable danger sources\",\n \"enableObservations\": \"Enable observations\",\n \"enableModelling\": \"Enable modelling\",\n \"enableWeatherbox\": \"Enable weather box\"\n },\n \"configuration\": {\n \"title\": \"Configuration\",\n \"showMatrix\": \"Mostrar era mairitz\",\n \"enableMediaFile\": \"Activar eth fichèr multimèdia\",\n \"enableStrategicMindset\": \"Enable strategic mindset\",\n \"enableStressLevel\": \"Enable stress level\",\n \"enableAvalancheProblemCornices\": \"Abilitar eth problèma de lauegi CORNISES\",\n \"enableAvalancheProblemNoDistinctAvalancheProblem\": \"Abilitar eth problèma de lauegi CAP PROBLÈMA DE LAUEGI EVIDENT\"\n }\n },\n \"success\": \"Configuracion sauvada corrèctaments\",\n \"error\": \"Non s'a pogut sauvar era configuracion\"\n },\n \"users\": {\n \"title\": \"Usuaris\",\n \"button\": {\n \"create\": \" Crear usatgèr\"\n },\n \"tooltip\": {\n \"edit\": \"Editar usuari\",\n \"changePassword\": \"Cambiar contrasenya\",\n \"delete\": \"Eliminar usuari\"\n },\n \"table\": {\n \"name\": \"Nòm\",\n \"email\": \"Corrèu electronic\",\n \"organization\": \"Organizacion\",\n \"regions\": \"Regions\",\n \"roles\": \"Ròtles\"\n },\n \"deleteUserModalDialog\": {\n \"message\": \"Voletz eliminar er usatgèr?\",\n \"accept\": \"Òc\",\n \"reject\": \"Non\"\n },\n \"deleteUser\": {\n \"success\": \"Usatgèr eliminat\",\n \"error\": \"Er usatgèr non a pogut èster eliminat\"\n },\n \"createUser\": {\n \"success\": \"Usatgèr creat\",\n \"error\": \"Non s'a pogut crear er usatgèr\"\n },\n \"updateUser\": {\n \"success\": \"Usatgèr actualizat\",\n \"error\": \"Er usatgèr non s'a pogut actualizar\"\n }\n },\n \"createUser\": {\n \"table\": {\n \"image\": \"Image\",\n \"name\": \"Nòm\",\n \"email\": \"Corrèu electronic\",\n \"organization\": \"Organizacion\",\n \"password\": \"Password\",\n \"password2\": \"Repetir password\",\n \"roles\": \"Ròtles\",\n \"regions\": \"Regions\"\n },\n \"error\": {\n \"name\": {\n \"required\": \"Introduir un nòm\"\n },\n \"email\": {\n \"required\": \"Introduir ua adreça de corrèu electronic\",\n \"invalid\": \"Era adreça electronica non ei valida\"\n },\n \"password\": {\n \"required\": \"Introduir ua contrasenha\",\n \"length\": \"Era contrasenha a d'auer aumens 8 caracters\",\n \"mismatch\": \"Es contrasenhes non coïncidissen\"\n }\n },\n \"button\": {\n \"create\": \"Crear usuari\",\n \"update\": \"Actualizar usatgèr\",\n \"cancel\": \"Anullar\"\n }\n },\n \"observations\": {\n \"table\": \"Taula\",\n \"map\": \"Mapa\",\n \"gallery\": \"Gallery\",\n \"filters\": \"Filtres\",\n \"title\": \"Observacions\",\n \"newObservation\": \"New observation\",\n \"exportObservations\": \"Export observations\",\n \"toggleFilterBar\": \"Show/hide filter bar\",\n \"button\": {\n \"submit\": \"Descargar\"\n },\n \"label\": {\n \"dateRange\": \"Periòde\",\n \"observer\": \"Observador\"\n },\n \"selectRegion\": {\n \"placeholder\": \"Region\",\n \"selectionLabel\": \"{0} region(s) selected\"\n },\n \"selectSources\": {\n \"placeholder\": \"Hònts\",\n \"selectionLabel\": \"{0} source(s) selected\"\n },\n\n \"charts\": {\n \"charts\": \"Grafiques\",\n \"nan\": \"Sense especificacion\",\n \"classify\": \"Classificar\",\n \"label\": \"Etiqueta\",\n \"invert\": \"Invertir\",\n \"reset\": \"Restablir\",\n \"aspect\": {\n \"caption\": \"Orientacion\"\n },\n \"elevation\": {\n \"caption\": \"Nautada\"\n },\n \"stability\": {\n \"caption\": \"Estabilitat\"\n },\n \"observationType\": {\n \"caption\": \"Tipe d'observacions\"\n },\n \"importantObservation\": {\n \"caption\": \"Important\"\n },\n \"avalancheProblem\": {\n \"caption\": \"Problèma de lauegi\"\n },\n \"dangerPattern\": {\n \"caption\": \"Patron de perilh\"\n },\n \"days\": {\n \"caption\": \"Dia\"\n }\n }\n },\n \"blog\": {\n \"title\": \"Blòg\",\n \"language\": {\n \"title\": \"Lengua\",\n \"de\": \"DE\",\n \"it\": \"IT\",\n \"en\": \"EN\"\n },\n \"all\": {\n \"tooltip\": \"Enviar corrèus electronics, Telegram e Push\",\n \"success\": \"{{prefix}}Corrèus electronics, Telegram e Push enviadi corrèctaments!\",\n \"error\": \"{{prefix}}Non s'an pogut enviar es corrèus electronics, Telegram e Push!\"\n },\n \"email\": {\n \"tooltip\": \"Enviar corrèus electronics\",\n \"success\": \"{{prefix}}Corrèus electronics enviadi corrèctaments!\",\n \"error\": \"{{prefix}}Non s'an pogut enviar es corrèus electronics!\"\n },\n \"telegram\": {\n \"tooltip\": \"Enviat per canau de Telegram\",\n \"success\": \"{{prefix}}Telegram enviat corrèctaments!\",\n \"error\": \"{{prefix}}Non s'a pogut enviar eth Telegram!\"\n },\n \"push\": {\n \"tooltip\": \"Enviar per Notificacions Push\",\n \"success\": \"{{prefix}}Push enviat corrèctaments!\",\n \"error\": \"{{prefix}}Non s'a pogut enviar eth Push!\"\n }\n }\n },\n \"settings\": {\n \"title\": \"Configuracion\",\n \"changePassword\": {\n \"title\": \"Cambiar contrasenya\",\n \"oldPassword\": {\n \"label\": \"Contrasenya actuau\",\n \"placeholder\": \"Contrasenya actuau\"\n },\n \"newPassword1\": {\n \"label\": \"Naua contrasenya\",\n \"placeholder\": \"Naua contrasenya\"\n },\n \"newPassword2\": {\n \"label\": \"Contrasenha naua (repetir)\",\n \"placeholder\": \"Naua contrasenya\"\n },\n \"submit\": \"Cambiar contrasenya\",\n \"passwordChanged\": \"Contrasenya cambiada corrèctaments\",\n \"passwordChangeError\": \"Non s'a pogut cambiar era contrasenya\",\n \"passwordIncorrect\": \"Era contrasenha actuau ei incorrècta\",\n \"error\": {\n \"oldPassword\": {\n \"required\": \"Se te platz, entre era tua contrasenya actuau\"\n },\n \"newPassword\": {\n \"required\": \"Se te platz, entre ua naua contrasenya\",\n \"mismatch\": \"Es contrasenhes non coïncidissen\"\n }\n }\n },\n \"display\": {\n \"title\": \"Visualizacion\",\n \"table\": {\n \"showCaaml\": \"Mostrar CAAML\",\n \"showJson\": \"Mostrar JSON\"\n }\n }\n },\n \"statistics\": {\n \"title\": \"Estadístiques\",\n \"button\": {\n \"submit\": \"Descargar\"\n },\n \"label\": {\n \"dateRange\": \"Periòde\",\n \"extended\": \"Estenuda\",\n \"duplicates\": \"Duplicats\"\n }\n },\n\n \"dangerRating\": {\n \"noRating\": \"Sense grad de perilh\",\n \"low\": \"fèble\",\n \"moderate\": \"moderat\",\n \"considerable\": \"mercat\",\n \"high\": \"fòrt\",\n \"veryHigh\": \"molt fòrt\"\n },\n \"avalancheProblem\": {\n \"newSnow\": \"Nhèu recenta\",\n \"new_snow\": \"Nhèu recenta\",\n \"windSlab\": \"Plaques de vent\",\n \"wind_slab\": \"Plaques de vent\",\n \"persistentWeakLayers\": \"Coches fèbles persistentes\",\n \"persistent_weak_layers\": \"Coches febles persistentes\",\n \"wetSnow\": \"Nhèu umida\",\n \"wet_snow\": \"Nhèu umida\",\n \"glidingSnow\": \"Esguitlaments basaus\",\n \"gliding_snow\": \"Esguitlaments basaus\",\n \"cornices\": \"Cornises\",\n \"noDistinctAvalancheProblem\": \"No distinct avalanche problem\",\n \"no_distinct_avalanche_problem\": \"No distinct avalanche problem\",\n \"favourableSituation\": \"Situacion favorabla\",\n \"favourable_situation\": \"Situacion favorabla\"\n },\n \"dangerPattern\": {\n \"dp1\": \"pp.1: capa fèbla persistenta e prigonda\",\n \"dp2\": \"pp.2: litsades basaus\",\n \"dp3\": \"pp.3: ploja\",\n \"dp4\": \"pp.4: heired dempús de caud / caud dempús de heired\",\n \"dp5\": \"pp.5: nheuades dempús d’un long periòde de heired\",\n \"dp6\": \"pp.6: nhèu heireda, sense coesion e vent\",\n \"dp7\": \"dp.7: shallow snow next to deep snow\",\n \"dp8\": \"pp.8: geladiua de superfícia enterrada\",\n \"dp9\": \"pp.9: graupel enterrat\",\n \"dp10\": \"pp.10: scenari de primauera\"\n },\n \"strategicMindset\": {\n \"title\": \"Strategic Mindset\",\n \"assessment\": \"High Uncertainty\",\n \"stepping_out\": \"Improving\",\n \"status_quo\": \"Status Quo\",\n \"stepping_back\": \"Deteriorating\",\n \"entrenchment\": \"Persistent Unstable\",\n \"free_ride\": \"Favorable\",\n \"high_alert\": \"High Alert\",\n \"spring_diurnal\": \"Spring Diurnal\"\n },\n \"observationType\": {\n \"DrySnowfallLevel\": \"Dry snowfall level\",\n \"TimeSeries\": \"Series temporaus\",\n \"Incident\": \"Incident\",\n \"Profile\": \"Perfil de nhèu\",\n \"Closure\": \"Barrament\",\n \"Blasting\": \"Voladura\",\n \"Avalanche\": \"Lauet\",\n \"Evaluation\": \"Avaloracion\",\n \"SimpleObservation\": \"Observacion simple\",\n \"Webcam\": \"Webcam\"\n },\n \"importantObservation\": {\n \"ForBlog\": \"For blog\",\n \"SurfaceHoar\": \"Gibra de superfícia\",\n \"Graupel\": \"Nhèu redona\",\n \"StabilityTest\": \"Test d'estabilitat\",\n \"IceFormation\": \"Formacion de gèu\",\n \"VeryLightNewSnow\": \"Nhèu recenta molt leugèra\"\n },\n \"elevationTolerance\": {\n \"exact\": \"exact\",\n \"50m\": \"±50m\",\n \"100m\": \"±100m\",\n \"200\": \"±200m\"\n },\n \"elevationPeriod\": {\n \"duringPrecipitationEvent\": \"Dry snowfall boundary for the entire precipitation event\",\n \"observationPeriod\": \"Dry snowfall boundary at the time of observation\"\n },\n \"aspect\": {\n \"N\": \"N\",\n \"NE\": \"NE\",\n \"E\": \"E\",\n \"SE\": \"SE\",\n \"S\": \"S\",\n \"SW\": \"SW\",\n \"W\": \"W\",\n \"NW\": \"NW\"\n },\n \"role\": {\n \"SUPERADMIN\": \"Super Administrator\",\n \"ADMIN\": \"Administrador\",\n \"FORECASTER\": \"Predictor\",\n \"FOREMAN\": \"Cap\",\n \"OBSERVER\": \"Observador\"\n },\n \"tendency\": {\n \"decreasing\": \"Perilh de lauegi diminuís\",\n \"steady\": \"Perilh de lauegi seguís parièr\",\n \"increasing\": \"El perill d’allaus aumente\"\n },\n \"snowpackStability\": {\n \"unknown\": \"desconeishut\",\n \"good\": \"bona\",\n \"fair\": \"regular\",\n \"poor\": \"praube\",\n \"very_poor\": \"molt praube\"\n },\n \"frequency\": {\n \"none\": \"(quasi) cap\",\n \"few\": \"ues pòques\",\n \"some\": \"beres ues\",\n \"many\": \"moltes\"\n },\n \"avalancheSize\": {\n \"small\": \"petit\",\n \"medium\": \"mejan\",\n \"large\": \"gran\",\n \"very_large\": \"molt gran\",\n \"extreme\": \"extremadament gran\"\n },\n \"complexity\": {\n \"easy\": \"Facil\",\n \"challenging\": \"Exigent\",\n \"complex\": \"Complèxe\"\n },\n \"glidingSnowActivity\": {\n \"low\": \"fèble\",\n \"medium\": \"mejan\",\n \"high\": \"fòrt\"\n },\n \"wetness\": {\n \"dry\": \"dry\",\n \"moist\": \"moist\",\n \"wet\": \"wet\"\n },\n \"characteristic\": {\n \"low\": \"fèble\",\n \"medium\": \"mejan\",\n \"high\": \"fòrt\",\n \"very_high\": \"molt fòrt\"\n },\n \"thickness\": {\n \"thin\": \"thin\",\n \"thick\": \"thick\"\n },\n \"snowpackPosition\": {\n \"upper\": \"upper\",\n \"middle\": \"middle\",\n \"lower\": \"lower\",\n \"ground\": \"ground\"\n },\n \"weakLayerCrust\": {\n \"no\": \"no\",\n \"partly\": \"partly\",\n \"yes\": \"yes\"\n },\n \"creationProcess\": {\n \"radiation_recrystallization\": \"radiacion\",\n \"diurnal_recrystallization\": \"diurnal\",\n \"melt_layer_recrystallization\": \"melt layer\",\n \"surface_hoar_formation\": \"surface hoar\"\n },\n \"recognizability\": {\n \"very_easy\": \"very easy\",\n \"easy\": \"easy\",\n \"hard\": \"hard\",\n \"very_hard\": \"very hard\"\n },\n \"distribution\": {\n \"isolated\": \"isolated\",\n \"specific\": \"specific\",\n \"widespread\": \"widespread\"\n },\n \"probability\": {\n \"likely\": \"likely\",\n \"possible\": \"possible\",\n \"unlikely\": \"unlikely\"\n },\n \"detailedDaytime\": {\n \"evening\": \"evening\",\n \"first_night_half\": \"first night half\",\n \"second_night_half\": \"second night half\",\n \"morning\": \"morning\",\n \"forenoon\": \"forenoon\",\n \"afternoon\": \"afternoon\"\n },\n \"slopeGradient\": {\n \"moderately_steep\": \"moderately steep\",\n \"steep\": \"steep\",\n \"very_steep\": \"very steep\",\n \"extremely_steep\": \"extremely steep\"\n },\n \"handHardness\": {\n \"fist\": \"F\",\n \"four_fingers\": \"4F\",\n \"one_finger\": \"1F\",\n \"pencil\": \"P\",\n \"knife\": \"K\",\n \"ice\": \"I\"\n },\n \"hardnessTendency\": {\n \"decreasing\": \"softer below\",\n \"steady\": \"uniform\",\n \"increasing\": \"softer above\"\n },\n \"terrainType\": {\n \"gullies\": \"gullies\",\n \"bowls\": \"bowls\",\n \"pass_areas\": \"pass areas\",\n \"ridge_lines\": \"ridge lines\",\n \"adjacent_to_ridge_lines\": \"adjacent to ridge lines\",\n \"distant_from_ridge_lines\": \"distant from ridge lines\",\n \"slope_discontinuities\": \"slope discontinuities\",\n \"convex_terrain\": \"convex terrain\",\n \"concave_terrain\": \"concave terrain\",\n \"steep_terrain\": \"steep terrain\",\n \"very_steep_terrain\": \"very steep terrain\",\n \"open_terrain\": \"open terrain\",\n \"forest\": \"forest\"\n },\n \"dangerSign\": {\n \"shooting_cracks\": \"shooting cracks\",\n \"whumpfing\": \"whumpfing\",\n \"fresh_avalanches\": \"fresh avalanches\"\n },\n \"changeRegionDialog\": {\n \"message\": \"Vòs cambiar de region?\",\n \"accept\": \"Òc\",\n \"reject\": \"Non\"\n },\n \"zamg\": {\n \"table\": \"Taula\",\n \"map\": \"Mapa\",\n \"region\": \"Region\",\n \"newSnow\": \"Nhèu recenta\"\n },\n \"snowpack\": {\n \"plotType\": {\n \"LWC_stratigraphy\": \"nhèu umida: contengut d'aigua liquida\",\n \"wet_snow_instability\": \"nhèu umida: inestabilitat dera nhèu umida\",\n \"Sk38_stratigraphy\": \"coches fèbles persistentes: indèx estabilitat SK38\",\n \"stratigraphy\": \"coches fèbles persistentes: estratigrafia dera nhèu\"\n },\n \"aspect\": {\n \"flat\": \"plan\",\n \"north\": \"nòrd\",\n \"south\": \"sud\"\n },\n \"meteo\": {\n \"new_snow_plot_3day\": \"nhèu recènta (3d)\",\n \"new_snow_plot_7day\": \"nhèu recènta (7d)\",\n \"new_snow_plot_1month\": \"nhèu recènta (31d)\",\n \"new_snow_plot_season\": \"nhèu recènta (sason)\",\n \"new_snow_plot_forecast\": \"nhèu recènta (prediccion)\",\n \"wet_snow_plot_3day\": \"nhèu umida (3d)\",\n \"wet_snow_plot_7day\": \"nhèu umida (7d)\",\n \"wet_snow_plot_1month\": \"nhèu umida (31d)\",\n \"wet_snow_plot_season\": \"nhèu umida (sason)\",\n \"wet_snow_plot_forecast\": \"nhèu umida (prediccion)\",\n \"HS_table_24h\": \"taula nautada de nhèu (1d)\",\n \"HS_table_72h\": \"taula nautada de nhèu (3d)\",\n \"HS_table_season\": \"taula nautada de nhèu (sason)\",\n \"HS_table_forecast\": \"taula nautada de nhèu (prevision)\",\n \"TA_table_24h\": \"taula temperatura (1d)\",\n \"TA_table_72h\": \"taula temperatura (3d)\",\n \"TA_table_season\": \"taula temperatura (sason)\"\n }\n },\n \"grainShape\": {\n \"PP\": {\n \"code\": \"PP\",\n \"class\": \"Precipitation Particles\"\n },\n \"PPgp\": {\n \"code\": \"PPgp\",\n \"class\": \"Nhèu redona\"\n },\n \"DF\": {\n \"code\": \"DF\",\n \"class\": \"Decomposing and Fragmented precipitation particles\"\n },\n \"RG\": {\n \"code\": \"RG\",\n \"class\": \"Rounded Grains\"\n },\n \"FC\": {\n \"code\": \"FC\",\n \"class\": \"Faceted Crystals\"\n },\n \"DH\": {\n \"code\": \"DH\",\n \"class\": \"Depth Hoar\"\n },\n \"SH\": {\n \"code\": \"SH\",\n \"class\": \"Surface Hoar\"\n },\n \"MF\": {\n \"code\": \"MF\",\n \"class\": \"Melt Forms\"\n },\n \"MFcr\": {\n \"code\": \"MFcr\",\n \"class\": \"Melt-freeze crust\"\n },\n \"IF\": {\n \"code\": \"IF\",\n \"class\": \"Ice Formations\"\n }\n },\n \"button\": {\n \"yes\": \"yes\",\n \"no\": \"no\"\n },\n \"observations\": {\n \"allowEdit\": \"Edit external observation\",\n \"allowEditTooltip\": \"This will prevent overwrites from {{ value }}\",\n \"editIconTooltip\": \"Edited observation - receives no updates from {{ value }}\",\n \"aspect\": \"Orientacion\",\n \"authorName\": \"Nom de l'autor\",\n \"avalancheLength\": \"Longitud de lauet\",\n \"avalancheProblem\": \"Problèma de lauegi\",\n \"avalancheSize\": \"Mida de lauet\",\n \"avalancheType\": \"Tipe de lauet\",\n \"avalancheWidth\": \"Amplada de lauet\",\n \"search\": \"Cercar\",\n \"count\": \"# observacions:\",\n \"elevationTolerance\": \"Accuracy of elevation data\",\n \"elevationPeriod\": \"Elevation time period\",\n \"layers\": {\n \"observers\": \"Observers\",\n \"weatherStations\": \"Weather stations\",\n \"webcams\": \"Webcams\",\n \"observations\": \"Observacions\"\n },\n \"weatherStations\": {\n \"tooltips\": {\n \"drySnowfallLevel\": \"Dry snowfall level\",\n \"globalRadiation\": \"Global radiation\",\n \"newSnow\": \"Nhèu recenta\",\n \"snowLine\": \"Limit de nhèu\",\n \"snowHeight\": \"Snow height\",\n \"snowDifference\": \"Snow difference\",\n \"airTemperature\": \"Air temperature\",\n \"airTemperatureMax\": \"Air temperature Max\",\n \"airTemperatureMin\": \"Air temperature Min\",\n \"surfaceTemperature\": \"Surface temperature\",\n \"surfaceHoar\": \"Potential surface hoar formation\",\n \"surfaceHoarCalc\": \"Potential surface hoar formation (Lehning et. al.)\",\n \"dewPoint\": \"Dew point temperature\",\n \"relativeHumidity\": \"Relative humidity\",\n \"windDirection\": \"Wind direction\",\n \"windSpeed\": \"Wind speed\",\n \"windGust\": \"Wind gust\"\n }\n },\n \"button\": {\n \"add\": \"íger observacion\",\n \"save\": \"Sauvar observacion\",\n \"delete\": \"Eliminar observacion\",\n \"deleteConfirm\": \"Eliminar observacion?\",\n \"discard\": \"Escartar\",\n \"copyDate\": \"Copy event date\"\n },\n \"comment\": \"Comentari\",\n \"content\": \"Contengut\",\n \"dangerRating\": \"Grad de perilh\",\n \"elevation\": \"Nautada\",\n \"elevationRange\": \"Elevation range\",\n \"elevationLowerBound\": \"Elevation lower bound\",\n \"elevationUpperBound\": \"Elevation upper bound\",\n \"eventDate\": \"Data d'eveniment\",\n \"eventType\": \"Tipe d'eveniment\",\n \"eventTypes\": {\n \"IMPORTANT\": \"Eveniment important\",\n \"NEIGHBOR_REGION\": \"Region vesia\",\n \"NORMAL\": \"Eveniment normau\",\n \"PERSON_DEAD\": \"Eveniment damb persones implicades (mòrtes)\",\n \"PERSON_INJURED\": \"Eveniment damb persones implicades (herides)\",\n \"PERSON_NO\": \"Eveniment sense persones implicades\",\n \"PERSON_UNINJURED\": \"Eveniment damb persones implicades (il·leses)\",\n \"PERSON_UNKNOWN\": \"Eveniment (desconeishut)\",\n \"TRAFFIC\": \"Transit\"\n },\n \"externalURL\": \"External URL (e.g. to photo database)\",\n \"fractureDepth\": \"Prigondor de cicatritz\",\n \"hasCoordinates\": \"A coordenades\",\n \"incline\": \"Inclinacion\",\n \"latitude\": \"Latitud\",\n \"locationName\": \"Localitat\",\n \"longitude\": \"Longitud\",\n \"observationType\": \"Observation type\",\n \"personInvolvement\": \"Person involvement\",\n \"reportDate\": \"Data der infòrme\",\n \"showTable\": \"Taula\",\n \"withoutCoordinates\": \"Observacions sense coordenades:\",\n \"sidebar\": {\n \"filter\": {\n \"title\": \"Filtrar\"\n },\n \"legend\": {\n \"title\": \"Legenda\"\n },\n \"sources\": {\n \"title\": \"Hònts de donades\"\n },\n \"views\": {\n \"title\": \"Vistes\"\n }\n }\n },\n \"personInvolvement\": {\n \"Dead\": \"Eveniment damb persones implicades (mòrtes)\",\n \"Injured\": \"Eveniment damb persones implicades (herides)\",\n \"No\": \"Eveniment sense persones implicades\",\n \"Uninjured\": \"Eveniment damb persones implicades (il·leses)\",\n \"Unknown\": \"Eveniment (desconeishut)\"\n },\n \"units\": {\n \"cm\": \"cm\",\n \"mm\": \"mm\",\n \"m\": \"m\"\n },\n \"qfa\": {\n \"day\": \"Dia\",\n \"time\": \"Òra\",\n \"back\": \"Endarrere\",\n \"parameters\": {\n \"DUST\": \"povàs saharià\",\n \"N\": \"cobertura de bromes totau en /8\",\n \"Nh\": \"cobertura de bromes nautes en /8\",\n \"Nm\": \"cobertura de bromes mejanes en /8\",\n \"Nl\": \"cobertura de bromes baishes en /8\",\n \"N-CU\": \"cobertura de bromes cumulus en /8\",\n \"AUSL.T\": \"temperatura desencadenant\",\n \"SHW-IX\": \"Índex Showalter\",\n \"WX -CUF\": \"temps significatiu: NIL (cap), RASH (ploja), TS (tempèsta)\",\n \"RR\": \"precipitacion totau [mm]\",\n \"RR-str\": \"precipitacion estratiforme\",\n \"CONV\": \"precipitacion convectiua [mm]\",\n \"SN\": \"precipitacion en forma de nhèu [mm]\",\n \"SN--RA\": \"límit dera nhèu [m]\",\n \"QAO \": \"{{value}} hPa eq. vent mejan, direccion e velocitat, [°] e [m/s]\",\n \"QAN\": \"vent mejan en tèrra, direccion e velocitat, [°] e [m/s]\",\n \"QANmax\": \"vet màx. (bohades) en tèrra [m/s]\",\n \"T \": \"{{value}} hPa eq. temperatura [°C]\",\n \"T m\": \"temperatura a {{value}}m [°C]\",\n \"T 2m\": \"temperatura a 2m [°C]\",\n \"Tk 2m\": \"temperatura a 2m [°K]\",\n \"T GND\": \"temperatura en tèrra\",\n \"Max-ADI\": \"temperatura maximala de barreja [°C]\",\n \"Min Max\": \"mín./màx. temperatura enes darrères 24ores\",\n \"FROST\": \"nautada isozèro [m]\",\n \"W cm\": \"500 hPa eq. vent verticau [cm/s]\",\n \"W --\": \"700 hPa eq. vent verticau [cm/s]\",\n \"W s\": \"{{value}} hPa eq. vent verticau [cm/s]\",\n \"H \": \"{{value}} hPa nautada geopotenciau [m]\",\n \"RF \": \"{{value}} hPa eq. umiditat relatiua [%]\"\n }\n }\n}\n","import { Component, inject } from \"@angular/core\";\nimport { RouterOutlet } from \"@angular/router\";\nimport { TranslateService } from \"@ngx-translate/core\";\nimport ca from \"../assets/i18n/ca.json\";\nimport de from \"../assets/i18n/de.json\";\nimport en from \"../assets/i18n/en.json\";\nimport es from \"../assets/i18n/es.json\";\nimport fr from \"../assets/i18n/fr.json\";\nimport it from \"../assets/i18n/it.json\";\nimport oc from \"../assets/i18n/oc.json\";\nimport { environment } from \"../environments/environment\";\nimport { LocalStorageService } from \"./providers/local-storage-service/local-storage.service\";\n\n@Component({\n // eslint-disable-next-line\n selector: \"body\",\n template: \"\",\n standalone: true,\n imports: [RouterOutlet],\n})\nexport class AppComponent {\n private translateService = inject(TranslateService);\n private localStorageService = inject(LocalStorageService);\n\n constructor() {\n // lang\n this.translateService.addLangs([\"de\", \"it\", \"en\", \"fr\", \"es\", \"ca\", \"oc\"]);\n this.translateService.setTranslation(\"de\", de);\n this.translateService.setTranslation(\"it\", it);\n this.translateService.setTranslation(\"en\", en);\n this.translateService.setTranslation(\"fr\", fr);\n this.translateService.setTranslation(\"es\", es);\n this.translateService.setTranslation(\"ca\", ca);\n this.translateService.setTranslation(\"oc\", oc);\n // this language will be used as a fallback when a translation isn't found in the current language\n this.translateService.setDefaultLang(\"en\");\n // the lang to use, if the lang isn't available, it will use the current loader to get them\n const lang = this.localStorageService.getLanguage() || navigator.language.split(\"-\")[0];\n this.localStorageService.setLanguage(lang);\n\n document.getElementById(\"appFavicon\").setAttribute(\"href\", `${environment.faviconPath}`);\n }\n}\n","import { HttpInterceptorFn } from \"@angular/common/http\";\nimport { inject } from \"@angular/core\";\nimport { AuthenticationService } from \"./authentication.service\";\nimport { ConstantsService } from \"../constants-service/constants.service\";\n\n/**\n * Add Authorization header to requests towards server URL if the user is logged in.\n */\nexport const httpHeaders: HttpInterceptorFn = (req, next) => {\n const authenticationService = inject(AuthenticationService);\n const constantsService = inject(ConstantsService);\n\n const setHeaders: Record = {};\n if (!req.headers.has(\"Accept\")) {\n setHeaders[\"Accept\"] = \"application/json\";\n }\n if (req.method === \"POST\" || req.method === \"PUT\") {\n if (req.body instanceof FormData) {\n // `Content-Type: multipart/form-data; boundary=...` is added automatically\n } else if (!req.headers.has(\"Content-Type\")) {\n setHeaders[\"Content-Type\"] = \"application/json\";\n }\n }\n if (authenticationService.isUserLoggedIn() && req.url.startsWith(constantsService.getServerUrl())) {\n setHeaders[\"Authorization\"] = \"Bearer \" + authenticationService.currentAuthor?.accessToken;\n if (!window.location.origin.includes(\"localhost\")) {\n setHeaders[\"X-Client-Version\"] = constantsService.release;\n }\n }\n req = req.clone({ setHeaders });\n return next(req);\n};\n","import { Injectable } from \"@angular/core\";\nimport * as Rx from \"rxjs\";\n\n@Injectable()\nexport class WsRegionService {\n private subject: Rx.Subject;\n\n public connect(url): Rx.Subject {\n if (!this.subject) {\n this.subject = this.create(url);\n console.debug(\"Successfully connected: \" + url);\n }\n return this.subject;\n }\n\n private create(url): Rx.Subject {\n const ws = new WebSocket(url);\n\n const observable = Rx.Observable.create((obs: Rx.Observer) => {\n ws.onmessage = obs.next.bind(obs);\n ws.onerror = obs.error.bind(obs);\n ws.onclose = obs.complete.bind(obs);\n return ws.close.bind(ws);\n });\n const observer = {\n next: (data: object) => {\n if (ws.readyState === WebSocket.OPEN) {\n ws.send(JSON.stringify(data));\n }\n },\n };\n return Rx.Subject.create(observer, observable);\n }\n\n public disconnect() {\n this.subject.unsubscribe();\n }\n}\n","import { Component, TemplateRef, viewChild, inject } from \"@angular/core\";\nimport { TranslateService, TranslateModule } from \"@ngx-translate/core\";\nimport { AuthenticationService } from \"../providers/authentication-service/authentication.service\";\nimport { BulletinsService } from \"../providers/bulletins-service/bulletins.service\";\nimport { RegionsService } from \"../providers/regions-service/regions.service\";\nimport { RegionConfiguration } from \"../providers/configuration-service/configuration.service\";\nimport { ConstantsService } from \"../providers/constants-service/constants.service\";\nimport { LocalStorageService } from \"../providers/local-storage-service/local-storage.service\";\nimport { Router, RouterLinkActive, RouterLink, RouterOutlet } from \"@angular/router\";\nimport { BsModalService } from \"ngx-bootstrap/modal\";\nimport { BsModalRef } from \"ngx-bootstrap/modal\";\nimport { environment } from \"../../environments/environment\";\nimport { DomSanitizer } from \"@angular/platform-browser\";\nimport { NgIf, NgFor } from \"@angular/common\";\nimport { BsDropdownModule } from \"ngx-bootstrap/dropdown\";\nimport { NgxMousetrapDirective } from \"../shared/mousetrap-directive\";\n\n@Component({\n selector: \"app-dashboard\",\n templateUrl: \"./full-layout.component.html\",\n standalone: true,\n imports: [\n NgIf,\n RouterLinkActive,\n RouterLink,\n BsDropdownModule,\n NgFor,\n RouterOutlet,\n TranslateModule,\n NgxMousetrapDirective,\n ],\n})\nexport class FullLayoutComponent {\n translateService = inject(TranslateService);\n authenticationService = inject(AuthenticationService);\n bulletinsService = inject(BulletinsService);\n regionsService = inject(RegionsService);\n constantsService = inject(ConstantsService);\n router = inject(Router);\n localStorageService = inject(LocalStorageService);\n private modalService = inject(BsModalService);\n private sanitizer = inject(DomSanitizer);\n\n public isSidebarOpen = false;\n\n public tmpRegion: RegionConfiguration;\n\n public changeRegionModalRef: BsModalRef;\n readonly changeRegionTemplate = viewChild>(\"changeRegionTemplate\");\n\n public config = {\n animated: false,\n keyboard: true,\n class: \"modal-sm\",\n };\n\n get environment() {\n return environment;\n }\n\n get isNavbarShown(): boolean {\n return this.authenticationService.isUserLoggedIn() || !this.router.url.startsWith(\"/modelling\");\n }\n\n getStyle() {\n const color = this.localStorageService.isTrainingEnabled ? \"#a6d96a\" : environment.headerBgColor;\n const style = `background-color: ${color}`;\n return this.sanitizer.bypassSecurityTrustStyle(style);\n }\n\n toggleSidebar() {\n this.isSidebarOpen = !this.isSidebarOpen;\n }\n\n public logout() {\n this.authenticationService.logout();\n }\n\n changeRegion(region: RegionConfiguration) {\n if (!this.authenticationService.getActiveRegionId().startsWith(region.id)) {\n if (this.router.url.startsWith(\"/bulletins/\") && this.bulletinsService.getIsEditable()) {\n this.tmpRegion = region;\n this.openChangeRegionModal(this.changeRegionTemplate());\n } else {\n this.change(region);\n }\n }\n }\n\n openChangeRegionModal(template: TemplateRef) {\n this.changeRegionModalRef = this.modalService.show(template, this.config);\n }\n\n changeRegionModalConfirm(): void {\n this.changeRegionModalRef.hide();\n this.change(this.tmpRegion);\n this.tmpRegion = undefined;\n }\n\n changeRegionModalDecline(): void {\n this.changeRegionModalRef.hide();\n }\n\n focusMap() {\n const mapElement = document.getElementById(\"map\") ?? document.getElementById(\"observationsMap\");\n if (mapElement) {\n mapElement.focus();\n }\n }\n\n private change(region: RegionConfiguration) {\n this.authenticationService.setActiveRegion(region);\n this.bulletinsService.loadStatus();\n if (\n (this.router.url.startsWith(\"/modelling/zamg-wbt\") && !region.enableWeatherbox) ||\n (this.router.url.startsWith(\"/modelling/geosphere\") && !region.enableModelling) ||\n (this.router.url.startsWith(\"/observations\") && !region.enableObservations)\n ) {\n this.router.navigate([\"/bulletins\"]);\n }\n }\n}\n","\n\n\n\n\n\n
\n \n
\n \n
\n
\n\n\n
\n

{{ \"changeRegionDialog.message\" | translate }}

\n
\n
\n \n \n
\n
\n","import { Component } from \"@angular/core\";\nimport { RouterOutlet } from \"@angular/router\";\n\n@Component({\n selector: \"app-dashboard\",\n template: \"\",\n standalone: true,\n imports: [RouterOutlet],\n})\nexport class SimpleLayoutComponent {}\n","import { Routes } from \"@angular/router\";\nimport { AuthGuard } from \"./guards/auth.guard\";\nimport { FullLayoutComponent } from \"./layouts/full-layout.component\";\nimport { SimpleLayoutComponent } from \"./layouts/simple-layout.component\";\n\nexport default [\n {\n path: \"\",\n redirectTo: \"bulletins\",\n pathMatch: \"full\",\n },\n {\n path: \"bulletins\",\n component: FullLayoutComponent,\n canActivate: [AuthGuard],\n runGuardsAndResolvers: \"always\",\n loadChildren: () => import(\"./bulletins/routes\"),\n },\n {\n path: \"danger-sources\",\n component: FullLayoutComponent,\n canActivate: [AuthGuard],\n runGuardsAndResolvers: \"always\",\n loadChildren: () => import(\"./danger-sources/routes\"),\n },\n {\n path: \"observations\",\n component: FullLayoutComponent,\n canActivate: [AuthGuard],\n loadChildren: () => import(\"./observations/routes\"),\n },\n {\n path: \"admin\",\n component: FullLayoutComponent,\n canActivate: [AuthGuard],\n loadChildren: () => import(\"./admin/routes\"),\n },\n {\n path: \"education\",\n component: FullLayoutComponent,\n canActivate: [AuthGuard],\n loadChildren: () => import(\"./education/routes\"),\n },\n {\n path: \"modelling\",\n component: FullLayoutComponent,\n canActivate: [], // no authentication (partially)\n loadChildren: () => import(\"./modelling/routes\"),\n },\n {\n path: \"statistics\",\n component: FullLayoutComponent,\n canActivate: [AuthGuard],\n loadChildren: () => import(\"./statistics/routes\"),\n },\n {\n path: \"settings\",\n component: FullLayoutComponent,\n canActivate: [AuthGuard],\n loadChildren: () => import(\"./settings/routes\"),\n },\n {\n path: \"pages\",\n component: SimpleLayoutComponent,\n data: {\n title: \"Pages\",\n },\n children: [\n {\n path: \"\",\n loadChildren: () => import(\"./pages/routes\"),\n },\n ],\n },\n] satisfies Routes;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nexport * from './lib/export/core.js';","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\n/* global Reflect, Promise */\n\nvar extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return extendStatics(d, b);\n};\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\nexport var __assign = function () {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n}\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length,\n r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,\n d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\nexport function __param(paramIndex, decorator) {\n return function (target, key) {\n decorator(target, key, paramIndex);\n };\n}\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) {\n return value instanceof P ? value : new P(function (resolve) {\n resolve(value);\n });\n }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e) {\n reject(e);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\nexport function __generator(thisArg, body) {\n var _ = {\n label: 0,\n sent: function () {\n if (t[0] & 1) throw t[1];\n return t[1];\n },\n trys: [],\n ops: []\n },\n f,\n y,\n t,\n g;\n return g = {\n next: verb(0),\n \"throw\": verb(1),\n \"return\": verb(2)\n }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function () {\n return this;\n }), g;\n function verb(n) {\n return function (v) {\n return step([n, v]);\n };\n }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0:\n case 1:\n t = op;\n break;\n case 4:\n _.label++;\n return {\n value: op[1],\n done: false\n };\n case 5:\n _.label++;\n y = op[1];\n op = [0];\n continue;\n case 7:\n op = _.ops.pop();\n _.trys.pop();\n continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _ = 0;\n continue;\n }\n if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {\n _.label = op[1];\n break;\n }\n if (op[0] === 6 && _.label < t[1]) {\n _.label = t[1];\n t = op;\n break;\n }\n if (t && _.label < t[2]) {\n _.label = t[2];\n _.ops.push(op);\n break;\n }\n if (t[2]) _.ops.pop();\n _.trys.pop();\n continue;\n }\n op = body.call(thisArg, _);\n } catch (e) {\n op = [6, e];\n y = 0;\n } finally {\n f = t = 0;\n }\n if (op[0] & 5) throw op[1];\n return {\n value: op[0] ? op[1] : void 0,\n done: true\n };\n }\n}\nexport var __createBinding = Object.create ? function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, {\n enumerable: true,\n get: function () {\n return m[k];\n }\n });\n} : function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n};\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator,\n m = s && o[s],\n i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return {\n value: o && o[i++],\n done: !o\n };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o),\n r,\n ar = [],\n e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n } catch (error) {\n e = {\n error: error\n };\n } finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n } finally {\n if (e) throw e.error;\n }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j];\n return r;\n}\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || from);\n}\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []),\n i,\n q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () {\n return this;\n }, i;\n function verb(n) {\n if (g[n]) i[n] = function (v) {\n return new Promise(function (a, b) {\n q.push([n, v, a, b]) > 1 || resume(n, v);\n });\n };\n }\n function resume(n, v) {\n try {\n step(g[n](v));\n } catch (e) {\n settle(q[0][3], e);\n }\n }\n function step(r) {\n r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);\n }\n function fulfill(value) {\n resume(\"next\", value);\n }\n function reject(value) {\n resume(\"throw\", value);\n }\n function settle(f, v) {\n if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);\n }\n}\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) {\n throw e;\n }), verb(\"return\"), i[Symbol.iterator] = function () {\n return this;\n }, i;\n function verb(n, f) {\n i[n] = o[n] ? function (v) {\n return (p = !p) ? {\n value: __await(o[n](v)),\n done: n === \"return\"\n } : f ? f(v) : v;\n } : f;\n }\n}\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator],\n i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () {\n return this;\n }, i);\n function verb(n) {\n i[n] = o[n] && function (v) {\n return new Promise(function (resolve, reject) {\n v = o[n](v), settle(resolve, reject, v.done, v.value);\n });\n };\n }\n function settle(resolve, reject, d, v) {\n Promise.resolve(v).then(function (v) {\n resolve({\n value: v,\n done: d\n });\n }, reject);\n }\n}\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) {\n Object.defineProperty(cooked, \"raw\", {\n value: raw\n });\n } else {\n cooked.raw = raw;\n }\n return cooked;\n}\n;\nvar __setModuleDefault = Object.create ? function (o, v) {\n Object.defineProperty(o, \"default\", {\n enumerable: true,\n value: v\n });\n} : function (o, v) {\n o[\"default\"] = v;\n};\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\nexport function __importDefault(mod) {\n return mod && mod.__esModule ? mod : {\n default: mod\n };\n}\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;\n}","/*!\n* ZRender, a high performance 2d drawing library.\n*\n* Copyright (c) 2013, Baidu Inc.\n* All rights reserved.\n*\n* LICENSE\n* https://github.com/ecomfe/zrender/blob/master/LICENSE.txt\n*/\nimport env from './core/env.js';\nimport * as zrUtil from './core/util.js';\nimport Handler from './Handler.js';\nimport Storage from './Storage.js';\nimport Animation, { getTime } from './animation/Animation.js';\nimport HandlerProxy from './dom/HandlerProxy.js';\nimport { lum } from './tool/color.js';\nimport { DARK_MODE_THRESHOLD } from './config.js';\nimport Group from './graphic/Group.js';\nvar painterCtors = {};\nvar instances = {};\nfunction delInstance(id) {\n delete instances[id];\n}\nfunction isDarkMode(backgroundColor) {\n if (!backgroundColor) {\n return false;\n }\n if (typeof backgroundColor === 'string') {\n return lum(backgroundColor, 1) < DARK_MODE_THRESHOLD;\n } else if (backgroundColor.colorStops) {\n var colorStops = backgroundColor.colorStops;\n var totalLum = 0;\n var len = colorStops.length;\n for (var i = 0; i < len; i++) {\n totalLum += lum(colorStops[i].color, 1);\n }\n totalLum /= len;\n return totalLum < DARK_MODE_THRESHOLD;\n }\n return false;\n}\nvar ZRender = function () {\n function ZRender(id, dom, opts) {\n var _this = this;\n this._sleepAfterStill = 10;\n this._stillFrameAccum = 0;\n this._needsRefresh = true;\n this._needsRefreshHover = true;\n this._darkMode = false;\n opts = opts || {};\n this.dom = dom;\n this.id = id;\n var storage = new Storage();\n var rendererType = opts.renderer || 'canvas';\n if (!painterCtors[rendererType]) {\n rendererType = zrUtil.keys(painterCtors)[0];\n }\n if (process.env.NODE_ENV !== 'production') {\n if (!painterCtors[rendererType]) {\n throw new Error(\"Renderer '\" + rendererType + \"' is not imported. Please import it first.\");\n }\n }\n opts.useDirtyRect = opts.useDirtyRect == null ? false : opts.useDirtyRect;\n var painter = new painterCtors[rendererType](dom, storage, opts, id);\n var ssrMode = opts.ssr || painter.ssrOnly;\n this.storage = storage;\n this.painter = painter;\n var handlerProxy = !env.node && !env.worker && !ssrMode ? new HandlerProxy(painter.getViewportRoot(), painter.root) : null;\n var useCoarsePointer = opts.useCoarsePointer;\n var usePointerSize = useCoarsePointer == null || useCoarsePointer === 'auto' ? env.touchEventsSupported : !!useCoarsePointer;\n var defaultPointerSize = 44;\n var pointerSize;\n if (usePointerSize) {\n pointerSize = zrUtil.retrieve2(opts.pointerSize, defaultPointerSize);\n }\n this.handler = new Handler(storage, painter, handlerProxy, painter.root, pointerSize);\n this.animation = new Animation({\n stage: {\n update: ssrMode ? null : function () {\n return _this._flush(true);\n }\n }\n });\n if (!ssrMode) {\n this.animation.start();\n }\n }\n ZRender.prototype.add = function (el) {\n if (this._disposed || !el) {\n return;\n }\n this.storage.addRoot(el);\n el.addSelfToZr(this);\n this.refresh();\n };\n ZRender.prototype.remove = function (el) {\n if (this._disposed || !el) {\n return;\n }\n this.storage.delRoot(el);\n el.removeSelfFromZr(this);\n this.refresh();\n };\n ZRender.prototype.configLayer = function (zLevel, config) {\n if (this._disposed) {\n return;\n }\n if (this.painter.configLayer) {\n this.painter.configLayer(zLevel, config);\n }\n this.refresh();\n };\n ZRender.prototype.setBackgroundColor = function (backgroundColor) {\n if (this._disposed) {\n return;\n }\n if (this.painter.setBackgroundColor) {\n this.painter.setBackgroundColor(backgroundColor);\n }\n this.refresh();\n this._backgroundColor = backgroundColor;\n this._darkMode = isDarkMode(backgroundColor);\n };\n ZRender.prototype.getBackgroundColor = function () {\n return this._backgroundColor;\n };\n ZRender.prototype.setDarkMode = function (darkMode) {\n this._darkMode = darkMode;\n };\n ZRender.prototype.isDarkMode = function () {\n return this._darkMode;\n };\n ZRender.prototype.refreshImmediately = function (fromInside) {\n if (this._disposed) {\n return;\n }\n if (!fromInside) {\n this.animation.update(true);\n }\n this._needsRefresh = false;\n this.painter.refresh();\n this._needsRefresh = false;\n };\n ZRender.prototype.refresh = function () {\n if (this._disposed) {\n return;\n }\n this._needsRefresh = true;\n this.animation.start();\n };\n ZRender.prototype.flush = function () {\n if (this._disposed) {\n return;\n }\n this._flush(false);\n };\n ZRender.prototype._flush = function (fromInside) {\n var triggerRendered;\n var start = getTime();\n if (this._needsRefresh) {\n triggerRendered = true;\n this.refreshImmediately(fromInside);\n }\n if (this._needsRefreshHover) {\n triggerRendered = true;\n this.refreshHoverImmediately();\n }\n var end = getTime();\n if (triggerRendered) {\n this._stillFrameAccum = 0;\n this.trigger('rendered', {\n elapsedTime: end - start\n });\n } else if (this._sleepAfterStill > 0) {\n this._stillFrameAccum++;\n if (this._stillFrameAccum > this._sleepAfterStill) {\n this.animation.stop();\n }\n }\n };\n ZRender.prototype.setSleepAfterStill = function (stillFramesCount) {\n this._sleepAfterStill = stillFramesCount;\n };\n ZRender.prototype.wakeUp = function () {\n if (this._disposed) {\n return;\n }\n this.animation.start();\n this._stillFrameAccum = 0;\n };\n ZRender.prototype.refreshHover = function () {\n this._needsRefreshHover = true;\n };\n ZRender.prototype.refreshHoverImmediately = function () {\n if (this._disposed) {\n return;\n }\n this._needsRefreshHover = false;\n if (this.painter.refreshHover && this.painter.getType() === 'canvas') {\n this.painter.refreshHover();\n }\n };\n ZRender.prototype.resize = function (opts) {\n if (this._disposed) {\n return;\n }\n opts = opts || {};\n this.painter.resize(opts.width, opts.height);\n this.handler.resize();\n };\n ZRender.prototype.clearAnimation = function () {\n if (this._disposed) {\n return;\n }\n this.animation.clear();\n };\n ZRender.prototype.getWidth = function () {\n if (this._disposed) {\n return;\n }\n return this.painter.getWidth();\n };\n ZRender.prototype.getHeight = function () {\n if (this._disposed) {\n return;\n }\n return this.painter.getHeight();\n };\n ZRender.prototype.setCursorStyle = function (cursorStyle) {\n if (this._disposed) {\n return;\n }\n this.handler.setCursorStyle(cursorStyle);\n };\n ZRender.prototype.findHover = function (x, y) {\n if (this._disposed) {\n return;\n }\n return this.handler.findHover(x, y);\n };\n ZRender.prototype.on = function (eventName, eventHandler, context) {\n if (!this._disposed) {\n this.handler.on(eventName, eventHandler, context);\n }\n return this;\n };\n ZRender.prototype.off = function (eventName, eventHandler) {\n if (this._disposed) {\n return;\n }\n this.handler.off(eventName, eventHandler);\n };\n ZRender.prototype.trigger = function (eventName, event) {\n if (this._disposed) {\n return;\n }\n this.handler.trigger(eventName, event);\n };\n ZRender.prototype.clear = function () {\n if (this._disposed) {\n return;\n }\n var roots = this.storage.getRoots();\n for (var i = 0; i < roots.length; i++) {\n if (roots[i] instanceof Group) {\n roots[i].removeSelfFromZr(this);\n }\n }\n this.storage.delAllRoots();\n this.painter.clear();\n };\n ZRender.prototype.dispose = function () {\n if (this._disposed) {\n return;\n }\n this.animation.stop();\n this.clear();\n this.storage.dispose();\n this.painter.dispose();\n this.handler.dispose();\n this.animation = this.storage = this.painter = this.handler = null;\n this._disposed = true;\n delInstance(this.id);\n };\n return ZRender;\n}();\nexport function init(dom, opts) {\n var zr = new ZRender(zrUtil.guid(), dom, opts);\n instances[zr.id] = zr;\n return zr;\n}\nexport function dispose(zr) {\n zr.dispose();\n}\nexport function disposeAll() {\n for (var key in instances) {\n if (instances.hasOwnProperty(key)) {\n instances[key].dispose();\n }\n }\n instances = {};\n}\nexport function getInstance(id) {\n return instances[id];\n}\nexport function registerPainter(name, Ctor) {\n painterCtors[name] = Ctor;\n}\nvar ssrDataGetter;\nexport function getElementSSRData(el) {\n if (typeof ssrDataGetter === 'function') {\n return ssrDataGetter(el);\n }\n}\nexport function registerSSRDataGetter(getter) {\n ssrDataGetter = getter;\n}\nexport var version = '5.6.0';\n;","var Browser = function () {\n function Browser() {\n this.firefox = false;\n this.ie = false;\n this.edge = false;\n this.newEdge = false;\n this.weChat = false;\n }\n return Browser;\n}();\nvar Env = function () {\n function Env() {\n this.browser = new Browser();\n this.node = false;\n this.wxa = false;\n this.worker = false;\n this.svgSupported = false;\n this.touchEventsSupported = false;\n this.pointerEventsSupported = false;\n this.domSupported = false;\n this.transformSupported = false;\n this.transform3dSupported = false;\n this.hasGlobalWindow = typeof window !== 'undefined';\n }\n return Env;\n}();\nvar env = new Env();\nif (typeof wx === 'object' && typeof wx.getSystemInfoSync === 'function') {\n env.wxa = true;\n env.touchEventsSupported = true;\n} else if (typeof document === 'undefined' && typeof self !== 'undefined') {\n env.worker = true;\n} else if (typeof navigator === 'undefined' || navigator.userAgent.indexOf('Node.js') === 0) {\n env.node = true;\n env.svgSupported = true;\n} else {\n detect(navigator.userAgent, env);\n}\nfunction detect(ua, env) {\n var browser = env.browser;\n var firefox = ua.match(/Firefox\\/([\\d.]+)/);\n var ie = ua.match(/MSIE\\s([\\d.]+)/) || ua.match(/Trident\\/.+?rv:(([\\d.]+))/);\n var edge = ua.match(/Edge?\\/([\\d.]+)/);\n var weChat = /micromessenger/i.test(ua);\n if (firefox) {\n browser.firefox = true;\n browser.version = firefox[1];\n }\n if (ie) {\n browser.ie = true;\n browser.version = ie[1];\n }\n if (edge) {\n browser.edge = true;\n browser.version = edge[1];\n browser.newEdge = +edge[1].split('.')[0] > 18;\n }\n if (weChat) {\n browser.weChat = true;\n }\n env.svgSupported = typeof SVGRect !== 'undefined';\n env.touchEventsSupported = 'ontouchstart' in window && !browser.ie && !browser.edge;\n env.pointerEventsSupported = 'onpointerdown' in window && (browser.edge || browser.ie && +browser.version >= 11);\n env.domSupported = typeof document !== 'undefined';\n var style = document.documentElement.style;\n env.transform3dSupported = (browser.ie && 'transition' in style || browser.edge || 'WebKitCSSMatrix' in window && 'm11' in new WebKitCSSMatrix() || 'MozPerspective' in style) && !('OTransition' in style);\n env.transformSupported = env.transform3dSupported || browser.ie && +browser.version >= 9;\n}\nexport default env;","import { platformApi } from './platform.js';\nvar BUILTIN_OBJECT = reduce(['Function', 'RegExp', 'Date', 'Error', 'CanvasGradient', 'CanvasPattern', 'Image', 'Canvas'], function (obj, val) {\n obj['[object ' + val + ']'] = true;\n return obj;\n}, {});\nvar TYPED_ARRAY = reduce(['Int8', 'Uint8', 'Uint8Clamped', 'Int16', 'Uint16', 'Int32', 'Uint32', 'Float32', 'Float64'], function (obj, val) {\n obj['[object ' + val + 'Array]'] = true;\n return obj;\n}, {});\nvar objToString = Object.prototype.toString;\nvar arrayProto = Array.prototype;\nvar nativeForEach = arrayProto.forEach;\nvar nativeFilter = arrayProto.filter;\nvar nativeSlice = arrayProto.slice;\nvar nativeMap = arrayProto.map;\nvar ctorFunction = function () {}.constructor;\nvar protoFunction = ctorFunction ? ctorFunction.prototype : null;\nvar protoKey = '__proto__';\nvar idStart = 0x0907;\nexport function guid() {\n return idStart++;\n}\nexport function logError() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (typeof console !== 'undefined') {\n console.error.apply(console, args);\n }\n}\nexport function clone(source) {\n if (source == null || typeof source !== 'object') {\n return source;\n }\n var result = source;\n var typeStr = objToString.call(source);\n if (typeStr === '[object Array]') {\n if (!isPrimitive(source)) {\n result = [];\n for (var i = 0, len = source.length; i < len; i++) {\n result[i] = clone(source[i]);\n }\n }\n } else if (TYPED_ARRAY[typeStr]) {\n if (!isPrimitive(source)) {\n var Ctor = source.constructor;\n if (Ctor.from) {\n result = Ctor.from(source);\n } else {\n result = new Ctor(source.length);\n for (var i = 0, len = source.length; i < len; i++) {\n result[i] = source[i];\n }\n }\n }\n } else if (!BUILTIN_OBJECT[typeStr] && !isPrimitive(source) && !isDom(source)) {\n result = {};\n for (var key in source) {\n if (source.hasOwnProperty(key) && key !== protoKey) {\n result[key] = clone(source[key]);\n }\n }\n }\n return result;\n}\nexport function merge(target, source, overwrite) {\n if (!isObject(source) || !isObject(target)) {\n return overwrite ? clone(source) : target;\n }\n for (var key in source) {\n if (source.hasOwnProperty(key) && key !== protoKey) {\n var targetProp = target[key];\n var sourceProp = source[key];\n if (isObject(sourceProp) && isObject(targetProp) && !isArray(sourceProp) && !isArray(targetProp) && !isDom(sourceProp) && !isDom(targetProp) && !isBuiltInObject(sourceProp) && !isBuiltInObject(targetProp) && !isPrimitive(sourceProp) && !isPrimitive(targetProp)) {\n merge(targetProp, sourceProp, overwrite);\n } else if (overwrite || !(key in target)) {\n target[key] = clone(source[key]);\n }\n }\n }\n return target;\n}\nexport function mergeAll(targetAndSources, overwrite) {\n var result = targetAndSources[0];\n for (var i = 1, len = targetAndSources.length; i < len; i++) {\n result = merge(result, targetAndSources[i], overwrite);\n }\n return result;\n}\nexport function extend(target, source) {\n if (Object.assign) {\n Object.assign(target, source);\n } else {\n for (var key in source) {\n if (source.hasOwnProperty(key) && key !== protoKey) {\n target[key] = source[key];\n }\n }\n }\n return target;\n}\nexport function defaults(target, source, overlay) {\n var keysArr = keys(source);\n for (var i = 0; i < keysArr.length; i++) {\n var key = keysArr[i];\n if (overlay ? source[key] != null : target[key] == null) {\n target[key] = source[key];\n }\n }\n return target;\n}\nexport var createCanvas = platformApi.createCanvas;\nexport function indexOf(array, value) {\n if (array) {\n if (array.indexOf) {\n return array.indexOf(value);\n }\n for (var i = 0, len = array.length; i < len; i++) {\n if (array[i] === value) {\n return i;\n }\n }\n }\n return -1;\n}\nexport function inherits(clazz, baseClazz) {\n var clazzPrototype = clazz.prototype;\n function F() {}\n F.prototype = baseClazz.prototype;\n clazz.prototype = new F();\n for (var prop in clazzPrototype) {\n if (clazzPrototype.hasOwnProperty(prop)) {\n clazz.prototype[prop] = clazzPrototype[prop];\n }\n }\n clazz.prototype.constructor = clazz;\n clazz.superClass = baseClazz;\n}\nexport function mixin(target, source, override) {\n target = 'prototype' in target ? target.prototype : target;\n source = 'prototype' in source ? source.prototype : source;\n if (Object.getOwnPropertyNames) {\n var keyList = Object.getOwnPropertyNames(source);\n for (var i = 0; i < keyList.length; i++) {\n var key = keyList[i];\n if (key !== 'constructor') {\n if (override ? source[key] != null : target[key] == null) {\n target[key] = source[key];\n }\n }\n }\n } else {\n defaults(target, source, override);\n }\n}\nexport function isArrayLike(data) {\n if (!data) {\n return false;\n }\n if (typeof data === 'string') {\n return false;\n }\n return typeof data.length === 'number';\n}\nexport function each(arr, cb, context) {\n if (!(arr && cb)) {\n return;\n }\n if (arr.forEach && arr.forEach === nativeForEach) {\n arr.forEach(cb, context);\n } else if (arr.length === +arr.length) {\n for (var i = 0, len = arr.length; i < len; i++) {\n cb.call(context, arr[i], i, arr);\n }\n } else {\n for (var key in arr) {\n if (arr.hasOwnProperty(key)) {\n cb.call(context, arr[key], key, arr);\n }\n }\n }\n}\nexport function map(arr, cb, context) {\n if (!arr) {\n return [];\n }\n if (!cb) {\n return slice(arr);\n }\n if (arr.map && arr.map === nativeMap) {\n return arr.map(cb, context);\n } else {\n var result = [];\n for (var i = 0, len = arr.length; i < len; i++) {\n result.push(cb.call(context, arr[i], i, arr));\n }\n return result;\n }\n}\nexport function reduce(arr, cb, memo, context) {\n if (!(arr && cb)) {\n return;\n }\n for (var i = 0, len = arr.length; i < len; i++) {\n memo = cb.call(context, memo, arr[i], i, arr);\n }\n return memo;\n}\nexport function filter(arr, cb, context) {\n if (!arr) {\n return [];\n }\n if (!cb) {\n return slice(arr);\n }\n if (arr.filter && arr.filter === nativeFilter) {\n return arr.filter(cb, context);\n } else {\n var result = [];\n for (var i = 0, len = arr.length; i < len; i++) {\n if (cb.call(context, arr[i], i, arr)) {\n result.push(arr[i]);\n }\n }\n return result;\n }\n}\nexport function find(arr, cb, context) {\n if (!(arr && cb)) {\n return;\n }\n for (var i = 0, len = arr.length; i < len; i++) {\n if (cb.call(context, arr[i], i, arr)) {\n return arr[i];\n }\n }\n}\nexport function keys(obj) {\n if (!obj) {\n return [];\n }\n if (Object.keys) {\n return Object.keys(obj);\n }\n var keyList = [];\n for (var key in obj) {\n if (obj.hasOwnProperty(key)) {\n keyList.push(key);\n }\n }\n return keyList;\n}\nfunction bindPolyfill(func, context) {\n var args = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n args[_i - 2] = arguments[_i];\n }\n return function () {\n return func.apply(context, args.concat(nativeSlice.call(arguments)));\n };\n}\nexport var bind = protoFunction && isFunction(protoFunction.bind) ? protoFunction.call.bind(protoFunction.bind) : bindPolyfill;\nfunction curry(func) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n return function () {\n return func.apply(this, args.concat(nativeSlice.call(arguments)));\n };\n}\nexport { curry };\nexport function isArray(value) {\n if (Array.isArray) {\n return Array.isArray(value);\n }\n return objToString.call(value) === '[object Array]';\n}\nexport function isFunction(value) {\n return typeof value === 'function';\n}\nexport function isString(value) {\n return typeof value === 'string';\n}\nexport function isStringSafe(value) {\n return objToString.call(value) === '[object String]';\n}\nexport function isNumber(value) {\n return typeof value === 'number';\n}\nexport function isObject(value) {\n var type = typeof value;\n return type === 'function' || !!value && type === 'object';\n}\nexport function isBuiltInObject(value) {\n return !!BUILTIN_OBJECT[objToString.call(value)];\n}\nexport function isTypedArray(value) {\n return !!TYPED_ARRAY[objToString.call(value)];\n}\nexport function isDom(value) {\n return typeof value === 'object' && typeof value.nodeType === 'number' && typeof value.ownerDocument === 'object';\n}\nexport function isGradientObject(value) {\n return value.colorStops != null;\n}\nexport function isImagePatternObject(value) {\n return value.image != null;\n}\nexport function isRegExp(value) {\n return objToString.call(value) === '[object RegExp]';\n}\nexport function eqNaN(value) {\n return value !== value;\n}\nexport function retrieve() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n for (var i = 0, len = args.length; i < len; i++) {\n if (args[i] != null) {\n return args[i];\n }\n }\n}\nexport function retrieve2(value0, value1) {\n return value0 != null ? value0 : value1;\n}\nexport function retrieve3(value0, value1, value2) {\n return value0 != null ? value0 : value1 != null ? value1 : value2;\n}\nexport function slice(arr) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n return nativeSlice.apply(arr, args);\n}\nexport function normalizeCssArray(val) {\n if (typeof val === 'number') {\n return [val, val, val, val];\n }\n var len = val.length;\n if (len === 2) {\n return [val[0], val[1], val[0], val[1]];\n } else if (len === 3) {\n return [val[0], val[1], val[2], val[1]];\n }\n return val;\n}\nexport function assert(condition, message) {\n if (!condition) {\n throw new Error(message);\n }\n}\nexport function trim(str) {\n if (str == null) {\n return null;\n } else if (typeof str.trim === 'function') {\n return str.trim();\n } else {\n return str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n }\n}\nvar primitiveKey = '__ec_primitive__';\nexport function setAsPrimitive(obj) {\n obj[primitiveKey] = true;\n}\nexport function isPrimitive(obj) {\n return obj[primitiveKey];\n}\nvar MapPolyfill = function () {\n function MapPolyfill() {\n this.data = {};\n }\n MapPolyfill.prototype[\"delete\"] = function (key) {\n var existed = this.has(key);\n if (existed) {\n delete this.data[key];\n }\n return existed;\n };\n MapPolyfill.prototype.has = function (key) {\n return this.data.hasOwnProperty(key);\n };\n MapPolyfill.prototype.get = function (key) {\n return this.data[key];\n };\n MapPolyfill.prototype.set = function (key, value) {\n this.data[key] = value;\n return this;\n };\n MapPolyfill.prototype.keys = function () {\n return keys(this.data);\n };\n MapPolyfill.prototype.forEach = function (callback) {\n var data = this.data;\n for (var key in data) {\n if (data.hasOwnProperty(key)) {\n callback(data[key], key);\n }\n }\n };\n return MapPolyfill;\n}();\nvar isNativeMapSupported = typeof Map === 'function';\nfunction maybeNativeMap() {\n return isNativeMapSupported ? new Map() : new MapPolyfill();\n}\nvar HashMap = function () {\n function HashMap(obj) {\n var isArr = isArray(obj);\n this.data = maybeNativeMap();\n var thisMap = this;\n obj instanceof HashMap ? obj.each(visit) : obj && each(obj, visit);\n function visit(value, key) {\n isArr ? thisMap.set(value, key) : thisMap.set(key, value);\n }\n }\n HashMap.prototype.hasKey = function (key) {\n return this.data.has(key);\n };\n HashMap.prototype.get = function (key) {\n return this.data.get(key);\n };\n HashMap.prototype.set = function (key, value) {\n this.data.set(key, value);\n return value;\n };\n HashMap.prototype.each = function (cb, context) {\n this.data.forEach(function (value, key) {\n cb.call(context, value, key);\n });\n };\n HashMap.prototype.keys = function () {\n var keys = this.data.keys();\n return isNativeMapSupported ? Array.from(keys) : keys;\n };\n HashMap.prototype.removeKey = function (key) {\n this.data[\"delete\"](key);\n };\n return HashMap;\n}();\nexport { HashMap };\nexport function createHashMap(obj) {\n return new HashMap(obj);\n}\nexport function concatArray(a, b) {\n var newArray = new a.constructor(a.length + b.length);\n for (var i = 0; i < a.length; i++) {\n newArray[i] = a[i];\n }\n var offset = a.length;\n for (var i = 0; i < b.length; i++) {\n newArray[i + offset] = b[i];\n }\n return newArray;\n}\nexport function createObject(proto, properties) {\n var obj;\n if (Object.create) {\n obj = Object.create(proto);\n } else {\n var StyleCtor = function () {};\n StyleCtor.prototype = proto;\n obj = new StyleCtor();\n }\n if (properties) {\n extend(obj, properties);\n }\n return obj;\n}\nexport function disableUserSelect(dom) {\n var domStyle = dom.style;\n domStyle.webkitUserSelect = 'none';\n domStyle.userSelect = 'none';\n domStyle.webkitTapHighlightColor = 'rgba(0,0,0,0)';\n domStyle['-webkit-touch-callout'] = 'none';\n}\nexport function hasOwn(own, prop) {\n return own.hasOwnProperty(prop);\n}\nexport function noop() {}\nexport var RADIAN_TO_DEGREE = 180 / Math.PI;","export var DEFAULT_FONT_SIZE = 12;\nexport var DEFAULT_FONT_FAMILY = 'sans-serif';\nexport var DEFAULT_FONT = DEFAULT_FONT_SIZE + \"px \" + DEFAULT_FONT_FAMILY;\nvar OFFSET = 20;\nvar SCALE = 100;\nvar defaultWidthMapStr = \"007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\\\\\WQb\\\\0FWLg\\\\bWb\\\\WQ\\\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\\\FFF5.5N\";\nfunction getTextWidthMap(mapStr) {\n var map = {};\n if (typeof JSON === 'undefined') {\n return map;\n }\n for (var i = 0; i < mapStr.length; i++) {\n var char = String.fromCharCode(i + 32);\n var size = (mapStr.charCodeAt(i) - OFFSET) / SCALE;\n map[char] = size;\n }\n return map;\n}\nexport var DEFAULT_TEXT_WIDTH_MAP = getTextWidthMap(defaultWidthMapStr);\nexport var platformApi = {\n createCanvas: function () {\n return typeof document !== 'undefined' && document.createElement('canvas');\n },\n measureText: function () {\n var _ctx;\n var _cachedFont;\n return function (text, font) {\n if (!_ctx) {\n var canvas = platformApi.createCanvas();\n _ctx = canvas && canvas.getContext('2d');\n }\n if (_ctx) {\n if (_cachedFont !== font) {\n _cachedFont = _ctx.font = font || DEFAULT_FONT;\n }\n return _ctx.measureText(text);\n } else {\n text = text || '';\n font = font || DEFAULT_FONT;\n var res = /((?:\\d+)?\\.?\\d*)px/.exec(font);\n var fontSize = res && +res[1] || DEFAULT_FONT_SIZE;\n var width = 0;\n if (font.indexOf('mono') >= 0) {\n width = fontSize * text.length;\n } else {\n for (var i = 0; i < text.length; i++) {\n var preCalcWidth = DEFAULT_TEXT_WIDTH_MAP[text[i]];\n width += preCalcWidth == null ? fontSize : preCalcWidth * fontSize;\n }\n }\n return {\n width: width\n };\n }\n };\n }(),\n loadImage: function (src, onload, onerror) {\n var image = new Image();\n image.onload = onload;\n image.onerror = onerror;\n image.src = src;\n return image;\n }\n};\nexport function setPlatformAPI(newPlatformApis) {\n for (var key in platformApi) {\n if (newPlatformApis[key]) {\n platformApi[key] = newPlatformApis[key];\n }\n }\n}","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\n/* global Reflect, Promise */\n\nvar extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return extendStatics(d, b);\n};\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\nexport var __assign = function () {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n}\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length,\n r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,\n d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\nexport function __param(paramIndex, decorator) {\n return function (target, key) {\n decorator(target, key, paramIndex);\n };\n}\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) {\n return value instanceof P ? value : new P(function (resolve) {\n resolve(value);\n });\n }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e) {\n reject(e);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\nexport function __generator(thisArg, body) {\n var _ = {\n label: 0,\n sent: function () {\n if (t[0] & 1) throw t[1];\n return t[1];\n },\n trys: [],\n ops: []\n },\n f,\n y,\n t,\n g;\n return g = {\n next: verb(0),\n \"throw\": verb(1),\n \"return\": verb(2)\n }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function () {\n return this;\n }), g;\n function verb(n) {\n return function (v) {\n return step([n, v]);\n };\n }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0:\n case 1:\n t = op;\n break;\n case 4:\n _.label++;\n return {\n value: op[1],\n done: false\n };\n case 5:\n _.label++;\n y = op[1];\n op = [0];\n continue;\n case 7:\n op = _.ops.pop();\n _.trys.pop();\n continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _ = 0;\n continue;\n }\n if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {\n _.label = op[1];\n break;\n }\n if (op[0] === 6 && _.label < t[1]) {\n _.label = t[1];\n t = op;\n break;\n }\n if (t && _.label < t[2]) {\n _.label = t[2];\n _.ops.push(op);\n break;\n }\n if (t[2]) _.ops.pop();\n _.trys.pop();\n continue;\n }\n op = body.call(thisArg, _);\n } catch (e) {\n op = [6, e];\n y = 0;\n } finally {\n f = t = 0;\n }\n if (op[0] & 5) throw op[1];\n return {\n value: op[0] ? op[1] : void 0,\n done: true\n };\n }\n}\nexport var __createBinding = Object.create ? function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, {\n enumerable: true,\n get: function () {\n return m[k];\n }\n });\n} : function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n};\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator,\n m = s && o[s],\n i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return {\n value: o && o[i++],\n done: !o\n };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o),\n r,\n ar = [],\n e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n } catch (error) {\n e = {\n error: error\n };\n } finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n } finally {\n if (e) throw e.error;\n }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j];\n return r;\n}\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || from);\n}\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []),\n i,\n q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () {\n return this;\n }, i;\n function verb(n) {\n if (g[n]) i[n] = function (v) {\n return new Promise(function (a, b) {\n q.push([n, v, a, b]) > 1 || resume(n, v);\n });\n };\n }\n function resume(n, v) {\n try {\n step(g[n](v));\n } catch (e) {\n settle(q[0][3], e);\n }\n }\n function step(r) {\n r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);\n }\n function fulfill(value) {\n resume(\"next\", value);\n }\n function reject(value) {\n resume(\"throw\", value);\n }\n function settle(f, v) {\n if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);\n }\n}\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) {\n throw e;\n }), verb(\"return\"), i[Symbol.iterator] = function () {\n return this;\n }, i;\n function verb(n, f) {\n i[n] = o[n] ? function (v) {\n return (p = !p) ? {\n value: __await(o[n](v)),\n done: n === \"return\"\n } : f ? f(v) : v;\n } : f;\n }\n}\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator],\n i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () {\n return this;\n }, i);\n function verb(n) {\n i[n] = o[n] && function (v) {\n return new Promise(function (resolve, reject) {\n v = o[n](v), settle(resolve, reject, v.done, v.value);\n });\n };\n }\n function settle(resolve, reject, d, v) {\n Promise.resolve(v).then(function (v) {\n resolve({\n value: v,\n done: d\n });\n }, reject);\n }\n}\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) {\n Object.defineProperty(cooked, \"raw\", {\n value: raw\n });\n } else {\n cooked.raw = raw;\n }\n return cooked;\n}\n;\nvar __setModuleDefault = Object.create ? function (o, v) {\n Object.defineProperty(o, \"default\", {\n enumerable: true,\n value: v\n });\n} : function (o, v) {\n o[\"default\"] = v;\n};\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\nexport function __importDefault(mod) {\n return mod && mod.__esModule ? mod : {\n default: mod\n };\n}\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;\n}","export function create(x, y) {\n if (x == null) {\n x = 0;\n }\n if (y == null) {\n y = 0;\n }\n return [x, y];\n}\nexport function copy(out, v) {\n out[0] = v[0];\n out[1] = v[1];\n return out;\n}\nexport function clone(v) {\n return [v[0], v[1]];\n}\nexport function set(out, a, b) {\n out[0] = a;\n out[1] = b;\n return out;\n}\nexport function add(out, v1, v2) {\n out[0] = v1[0] + v2[0];\n out[1] = v1[1] + v2[1];\n return out;\n}\nexport function scaleAndAdd(out, v1, v2, a) {\n out[0] = v1[0] + v2[0] * a;\n out[1] = v1[1] + v2[1] * a;\n return out;\n}\nexport function sub(out, v1, v2) {\n out[0] = v1[0] - v2[0];\n out[1] = v1[1] - v2[1];\n return out;\n}\nexport function len(v) {\n return Math.sqrt(lenSquare(v));\n}\nexport var length = len;\nexport function lenSquare(v) {\n return v[0] * v[0] + v[1] * v[1];\n}\nexport var lengthSquare = lenSquare;\nexport function mul(out, v1, v2) {\n out[0] = v1[0] * v2[0];\n out[1] = v1[1] * v2[1];\n return out;\n}\nexport function div(out, v1, v2) {\n out[0] = v1[0] / v2[0];\n out[1] = v1[1] / v2[1];\n return out;\n}\nexport function dot(v1, v2) {\n return v1[0] * v2[0] + v1[1] * v2[1];\n}\nexport function scale(out, v, s) {\n out[0] = v[0] * s;\n out[1] = v[1] * s;\n return out;\n}\nexport function normalize(out, v) {\n var d = len(v);\n if (d === 0) {\n out[0] = 0;\n out[1] = 0;\n } else {\n out[0] = v[0] / d;\n out[1] = v[1] / d;\n }\n return out;\n}\nexport function distance(v1, v2) {\n return Math.sqrt((v1[0] - v2[0]) * (v1[0] - v2[0]) + (v1[1] - v2[1]) * (v1[1] - v2[1]));\n}\nexport var dist = distance;\nexport function distanceSquare(v1, v2) {\n return (v1[0] - v2[0]) * (v1[0] - v2[0]) + (v1[1] - v2[1]) * (v1[1] - v2[1]);\n}\nexport var distSquare = distanceSquare;\nexport function negate(out, v) {\n out[0] = -v[0];\n out[1] = -v[1];\n return out;\n}\nexport function lerp(out, v1, v2, t) {\n out[0] = v1[0] + t * (v2[0] - v1[0]);\n out[1] = v1[1] + t * (v2[1] - v1[1]);\n return out;\n}\nexport function applyTransform(out, v, m) {\n var x = v[0];\n var y = v[1];\n out[0] = m[0] * x + m[2] * y + m[4];\n out[1] = m[1] * x + m[3] * y + m[5];\n return out;\n}\nexport function min(out, v1, v2) {\n out[0] = Math.min(v1[0], v2[0]);\n out[1] = Math.min(v1[1], v2[1]);\n return out;\n}\nexport function max(out, v1, v2) {\n out[0] = Math.max(v1[0], v2[0]);\n out[1] = Math.max(v1[1], v2[1]);\n return out;\n}","var Param = function () {\n function Param(target, e) {\n this.target = target;\n this.topTarget = e && e.topTarget;\n }\n return Param;\n}();\nvar Draggable = function () {\n function Draggable(handler) {\n this.handler = handler;\n handler.on('mousedown', this._dragStart, this);\n handler.on('mousemove', this._drag, this);\n handler.on('mouseup', this._dragEnd, this);\n }\n Draggable.prototype._dragStart = function (e) {\n var draggingTarget = e.target;\n while (draggingTarget && !draggingTarget.draggable) {\n draggingTarget = draggingTarget.parent || draggingTarget.__hostTarget;\n }\n if (draggingTarget) {\n this._draggingTarget = draggingTarget;\n draggingTarget.dragging = true;\n this._x = e.offsetX;\n this._y = e.offsetY;\n this.handler.dispatchToElement(new Param(draggingTarget, e), 'dragstart', e.event);\n }\n };\n Draggable.prototype._drag = function (e) {\n var draggingTarget = this._draggingTarget;\n if (draggingTarget) {\n var x = e.offsetX;\n var y = e.offsetY;\n var dx = x - this._x;\n var dy = y - this._y;\n this._x = x;\n this._y = y;\n draggingTarget.drift(dx, dy, e);\n this.handler.dispatchToElement(new Param(draggingTarget, e), 'drag', e.event);\n var dropTarget = this.handler.findHover(x, y, draggingTarget).target;\n var lastDropTarget = this._dropTarget;\n this._dropTarget = dropTarget;\n if (draggingTarget !== dropTarget) {\n if (lastDropTarget && dropTarget !== lastDropTarget) {\n this.handler.dispatchToElement(new Param(lastDropTarget, e), 'dragleave', e.event);\n }\n if (dropTarget && dropTarget !== lastDropTarget) {\n this.handler.dispatchToElement(new Param(dropTarget, e), 'dragenter', e.event);\n }\n }\n }\n };\n Draggable.prototype._dragEnd = function (e) {\n var draggingTarget = this._draggingTarget;\n if (draggingTarget) {\n draggingTarget.dragging = false;\n }\n this.handler.dispatchToElement(new Param(draggingTarget, e), 'dragend', e.event);\n if (this._dropTarget) {\n this.handler.dispatchToElement(new Param(this._dropTarget, e), 'drop', e.event);\n }\n this._draggingTarget = null;\n this._dropTarget = null;\n };\n return Draggable;\n}();\nexport default Draggable;","var Eventful = function () {\n function Eventful(eventProcessors) {\n if (eventProcessors) {\n this._$eventProcessor = eventProcessors;\n }\n }\n Eventful.prototype.on = function (event, query, handler, context) {\n if (!this._$handlers) {\n this._$handlers = {};\n }\n var _h = this._$handlers;\n if (typeof query === 'function') {\n context = handler;\n handler = query;\n query = null;\n }\n if (!handler || !event) {\n return this;\n }\n var eventProcessor = this._$eventProcessor;\n if (query != null && eventProcessor && eventProcessor.normalizeQuery) {\n query = eventProcessor.normalizeQuery(query);\n }\n if (!_h[event]) {\n _h[event] = [];\n }\n for (var i = 0; i < _h[event].length; i++) {\n if (_h[event][i].h === handler) {\n return this;\n }\n }\n var wrap = {\n h: handler,\n query: query,\n ctx: context || this,\n callAtLast: handler.zrEventfulCallAtLast\n };\n var lastIndex = _h[event].length - 1;\n var lastWrap = _h[event][lastIndex];\n lastWrap && lastWrap.callAtLast ? _h[event].splice(lastIndex, 0, wrap) : _h[event].push(wrap);\n return this;\n };\n Eventful.prototype.isSilent = function (eventName) {\n var _h = this._$handlers;\n return !_h || !_h[eventName] || !_h[eventName].length;\n };\n Eventful.prototype.off = function (eventType, handler) {\n var _h = this._$handlers;\n if (!_h) {\n return this;\n }\n if (!eventType) {\n this._$handlers = {};\n return this;\n }\n if (handler) {\n if (_h[eventType]) {\n var newList = [];\n for (var i = 0, l = _h[eventType].length; i < l; i++) {\n if (_h[eventType][i].h !== handler) {\n newList.push(_h[eventType][i]);\n }\n }\n _h[eventType] = newList;\n }\n if (_h[eventType] && _h[eventType].length === 0) {\n delete _h[eventType];\n }\n } else {\n delete _h[eventType];\n }\n return this;\n };\n Eventful.prototype.trigger = function (eventType) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n if (!this._$handlers) {\n return this;\n }\n var _h = this._$handlers[eventType];\n var eventProcessor = this._$eventProcessor;\n if (_h) {\n var argLen = args.length;\n var len = _h.length;\n for (var i = 0; i < len; i++) {\n var hItem = _h[i];\n if (eventProcessor && eventProcessor.filter && hItem.query != null && !eventProcessor.filter(eventType, hItem.query)) {\n continue;\n }\n switch (argLen) {\n case 0:\n hItem.h.call(hItem.ctx);\n break;\n case 1:\n hItem.h.call(hItem.ctx, args[0]);\n break;\n case 2:\n hItem.h.call(hItem.ctx, args[0], args[1]);\n break;\n default:\n hItem.h.apply(hItem.ctx, args);\n break;\n }\n }\n }\n eventProcessor && eventProcessor.afterTrigger && eventProcessor.afterTrigger(eventType);\n return this;\n };\n Eventful.prototype.triggerWithContext = function (type) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n if (!this._$handlers) {\n return this;\n }\n var _h = this._$handlers[type];\n var eventProcessor = this._$eventProcessor;\n if (_h) {\n var argLen = args.length;\n var ctx = args[argLen - 1];\n var len = _h.length;\n for (var i = 0; i < len; i++) {\n var hItem = _h[i];\n if (eventProcessor && eventProcessor.filter && hItem.query != null && !eventProcessor.filter(type, hItem.query)) {\n continue;\n }\n switch (argLen) {\n case 0:\n hItem.h.call(ctx);\n break;\n case 1:\n hItem.h.call(ctx, args[0]);\n break;\n case 2:\n hItem.h.call(ctx, args[0], args[1]);\n break;\n default:\n hItem.h.apply(ctx, args.slice(1, argLen - 1));\n break;\n }\n }\n }\n eventProcessor && eventProcessor.afterTrigger && eventProcessor.afterTrigger(type);\n return this;\n };\n return Eventful;\n}();\nexport default Eventful;","var LN2 = Math.log(2);\nfunction determinant(rows, rank, rowStart, rowMask, colMask, detCache) {\n var cacheKey = rowMask + '-' + colMask;\n var fullRank = rows.length;\n if (detCache.hasOwnProperty(cacheKey)) {\n return detCache[cacheKey];\n }\n if (rank === 1) {\n var colStart = Math.round(Math.log((1 << fullRank) - 1 & ~colMask) / LN2);\n return rows[rowStart][colStart];\n }\n var subRowMask = rowMask | 1 << rowStart;\n var subRowStart = rowStart + 1;\n while (rowMask & 1 << subRowStart) {\n subRowStart++;\n }\n var sum = 0;\n for (var j = 0, colLocalIdx = 0; j < fullRank; j++) {\n var colTag = 1 << j;\n if (!(colTag & colMask)) {\n sum += (colLocalIdx % 2 ? -1 : 1) * rows[rowStart][j] * determinant(rows, rank - 1, subRowStart, subRowMask, colMask | colTag, detCache);\n colLocalIdx++;\n }\n }\n detCache[cacheKey] = sum;\n return sum;\n}\nexport function buildTransformer(src, dest) {\n var mA = [[src[0], src[1], 1, 0, 0, 0, -dest[0] * src[0], -dest[0] * src[1]], [0, 0, 0, src[0], src[1], 1, -dest[1] * src[0], -dest[1] * src[1]], [src[2], src[3], 1, 0, 0, 0, -dest[2] * src[2], -dest[2] * src[3]], [0, 0, 0, src[2], src[3], 1, -dest[3] * src[2], -dest[3] * src[3]], [src[4], src[5], 1, 0, 0, 0, -dest[4] * src[4], -dest[4] * src[5]], [0, 0, 0, src[4], src[5], 1, -dest[5] * src[4], -dest[5] * src[5]], [src[6], src[7], 1, 0, 0, 0, -dest[6] * src[6], -dest[6] * src[7]], [0, 0, 0, src[6], src[7], 1, -dest[7] * src[6], -dest[7] * src[7]]];\n var detCache = {};\n var det = determinant(mA, 8, 0, 0, 0, detCache);\n if (det === 0) {\n return;\n }\n var vh = [];\n for (var i = 0; i < 8; i++) {\n for (var j = 0; j < 8; j++) {\n vh[j] == null && (vh[j] = 0);\n vh[j] += ((i + j) % 2 ? -1 : 1) * determinant(mA, 7, i === 0 ? 1 : 0, 1 << i, 1 << j, detCache) / det * dest[i];\n }\n }\n return function (out, srcPointX, srcPointY) {\n var pk = srcPointX * vh[6] + srcPointY * vh[7] + 1;\n out[0] = (srcPointX * vh[0] + srcPointY * vh[1] + vh[2]) / pk;\n out[1] = (srcPointX * vh[3] + srcPointY * vh[4] + vh[5]) / pk;\n };\n}","import env from './env.js';\nimport { buildTransformer } from './fourPointsTransform.js';\nvar EVENT_SAVED_PROP = '___zrEVENTSAVED';\nvar _calcOut = [];\nexport function transformLocalCoord(out, elFrom, elTarget, inX, inY) {\n return transformCoordWithViewport(_calcOut, elFrom, inX, inY, true) && transformCoordWithViewport(out, elTarget, _calcOut[0], _calcOut[1]);\n}\nexport function transformCoordWithViewport(out, el, inX, inY, inverse) {\n if (el.getBoundingClientRect && env.domSupported && !isCanvasEl(el)) {\n var saved = el[EVENT_SAVED_PROP] || (el[EVENT_SAVED_PROP] = {});\n var markers = prepareCoordMarkers(el, saved);\n var transformer = preparePointerTransformer(markers, saved, inverse);\n if (transformer) {\n transformer(out, inX, inY);\n return true;\n }\n }\n return false;\n}\nfunction prepareCoordMarkers(el, saved) {\n var markers = saved.markers;\n if (markers) {\n return markers;\n }\n markers = saved.markers = [];\n var propLR = ['left', 'right'];\n var propTB = ['top', 'bottom'];\n for (var i = 0; i < 4; i++) {\n var marker = document.createElement('div');\n var stl = marker.style;\n var idxLR = i % 2;\n var idxTB = (i >> 1) % 2;\n stl.cssText = ['position: absolute', 'visibility: hidden', 'padding: 0', 'margin: 0', 'border-width: 0', 'user-select: none', 'width:0', 'height:0', propLR[idxLR] + ':0', propTB[idxTB] + ':0', propLR[1 - idxLR] + ':auto', propTB[1 - idxTB] + ':auto', ''].join('!important;');\n el.appendChild(marker);\n markers.push(marker);\n }\n return markers;\n}\nfunction preparePointerTransformer(markers, saved, inverse) {\n var transformerName = inverse ? 'invTrans' : 'trans';\n var transformer = saved[transformerName];\n var oldSrcCoords = saved.srcCoords;\n var srcCoords = [];\n var destCoords = [];\n var oldCoordTheSame = true;\n for (var i = 0; i < 4; i++) {\n var rect = markers[i].getBoundingClientRect();\n var ii = 2 * i;\n var x = rect.left;\n var y = rect.top;\n srcCoords.push(x, y);\n oldCoordTheSame = oldCoordTheSame && oldSrcCoords && x === oldSrcCoords[ii] && y === oldSrcCoords[ii + 1];\n destCoords.push(markers[i].offsetLeft, markers[i].offsetTop);\n }\n return oldCoordTheSame && transformer ? transformer : (saved.srcCoords = srcCoords, saved[transformerName] = inverse ? buildTransformer(destCoords, srcCoords) : buildTransformer(srcCoords, destCoords));\n}\nexport function isCanvasEl(el) {\n return el.nodeName.toUpperCase() === 'CANVAS';\n}\nvar replaceReg = /([&<>\"'])/g;\nvar replaceMap = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n '\\'': '''\n};\nexport function encodeHTML(source) {\n return source == null ? '' : (source + '').replace(replaceReg, function (str, c) {\n return replaceMap[c];\n });\n}","import Eventful from './Eventful.js';\nimport env from './env.js';\nimport { isCanvasEl, transformCoordWithViewport } from './dom.js';\nvar MOUSE_EVENT_REG = /^(?:mouse|pointer|contextmenu|drag|drop)|click/;\nvar _calcOut = [];\nvar firefoxNotSupportOffsetXY = env.browser.firefox && +env.browser.version.split('.')[0] < 39;\nexport function clientToLocal(el, e, out, calculate) {\n out = out || {};\n if (calculate) {\n calculateZrXY(el, e, out);\n } else if (firefoxNotSupportOffsetXY && e.layerX != null && e.layerX !== e.offsetX) {\n out.zrX = e.layerX;\n out.zrY = e.layerY;\n } else if (e.offsetX != null) {\n out.zrX = e.offsetX;\n out.zrY = e.offsetY;\n } else {\n calculateZrXY(el, e, out);\n }\n return out;\n}\nfunction calculateZrXY(el, e, out) {\n if (env.domSupported && el.getBoundingClientRect) {\n var ex = e.clientX;\n var ey = e.clientY;\n if (isCanvasEl(el)) {\n var box = el.getBoundingClientRect();\n out.zrX = ex - box.left;\n out.zrY = ey - box.top;\n return;\n } else {\n if (transformCoordWithViewport(_calcOut, el, ex, ey)) {\n out.zrX = _calcOut[0];\n out.zrY = _calcOut[1];\n return;\n }\n }\n }\n out.zrX = out.zrY = 0;\n}\nexport function getNativeEvent(e) {\n return e || window.event;\n}\nexport function normalizeEvent(el, e, calculate) {\n e = getNativeEvent(e);\n if (e.zrX != null) {\n return e;\n }\n var eventType = e.type;\n var isTouch = eventType && eventType.indexOf('touch') >= 0;\n if (!isTouch) {\n clientToLocal(el, e, e, calculate);\n var wheelDelta = getWheelDeltaMayPolyfill(e);\n e.zrDelta = wheelDelta ? wheelDelta / 120 : -(e.detail || 0) / 3;\n } else {\n var touch = eventType !== 'touchend' ? e.targetTouches[0] : e.changedTouches[0];\n touch && clientToLocal(el, touch, e, calculate);\n }\n var button = e.button;\n if (e.which == null && button !== undefined && MOUSE_EVENT_REG.test(e.type)) {\n e.which = button & 1 ? 1 : button & 2 ? 3 : button & 4 ? 2 : 0;\n }\n return e;\n}\nfunction getWheelDeltaMayPolyfill(e) {\n var rawWheelDelta = e.wheelDelta;\n if (rawWheelDelta) {\n return rawWheelDelta;\n }\n var deltaX = e.deltaX;\n var deltaY = e.deltaY;\n if (deltaX == null || deltaY == null) {\n return rawWheelDelta;\n }\n var delta = deltaY !== 0 ? Math.abs(deltaY) : Math.abs(deltaX);\n var sign = deltaY > 0 ? -1 : deltaY < 0 ? 1 : deltaX > 0 ? -1 : 1;\n return 3 * delta * sign;\n}\nexport function addEventListener(el, name, handler, opt) {\n el.addEventListener(name, handler, opt);\n}\nexport function removeEventListener(el, name, handler, opt) {\n el.removeEventListener(name, handler, opt);\n}\nexport var stop = function (e) {\n e.preventDefault();\n e.stopPropagation();\n e.cancelBubble = true;\n};\nexport function isMiddleOrRightButtonOnMouseUpDown(e) {\n return e.which === 2 || e.which === 3;\n}\nexport { Eventful as Dispatcher };","import * as eventUtil from './event.js';\nvar GestureMgr = function () {\n function GestureMgr() {\n this._track = [];\n }\n GestureMgr.prototype.recognize = function (event, target, root) {\n this._doTrack(event, target, root);\n return this._recognize(event);\n };\n GestureMgr.prototype.clear = function () {\n this._track.length = 0;\n return this;\n };\n GestureMgr.prototype._doTrack = function (event, target, root) {\n var touches = event.touches;\n if (!touches) {\n return;\n }\n var trackItem = {\n points: [],\n touches: [],\n target: target,\n event: event\n };\n for (var i = 0, len = touches.length; i < len; i++) {\n var touch = touches[i];\n var pos = eventUtil.clientToLocal(root, touch, {});\n trackItem.points.push([pos.zrX, pos.zrY]);\n trackItem.touches.push(touch);\n }\n this._track.push(trackItem);\n };\n GestureMgr.prototype._recognize = function (event) {\n for (var eventName in recognizers) {\n if (recognizers.hasOwnProperty(eventName)) {\n var gestureInfo = recognizers[eventName](this._track, event);\n if (gestureInfo) {\n return gestureInfo;\n }\n }\n }\n };\n return GestureMgr;\n}();\nexport { GestureMgr };\nfunction dist(pointPair) {\n var dx = pointPair[1][0] - pointPair[0][0];\n var dy = pointPair[1][1] - pointPair[0][1];\n return Math.sqrt(dx * dx + dy * dy);\n}\nfunction center(pointPair) {\n return [(pointPair[0][0] + pointPair[1][0]) / 2, (pointPair[0][1] + pointPair[1][1]) / 2];\n}\nvar recognizers = {\n pinch: function (tracks, event) {\n var trackLen = tracks.length;\n if (!trackLen) {\n return;\n }\n var pinchEnd = (tracks[trackLen - 1] || {}).points;\n var pinchPre = (tracks[trackLen - 2] || {}).points || pinchEnd;\n if (pinchPre && pinchPre.length > 1 && pinchEnd && pinchEnd.length > 1) {\n var pinchScale = dist(pinchEnd) / dist(pinchPre);\n !isFinite(pinchScale) && (pinchScale = 1);\n event.pinchScale = pinchScale;\n var pinchCenter = center(pinchEnd);\n event.pinchX = pinchCenter[0];\n event.pinchY = pinchCenter[1];\n return {\n type: 'pinch',\n target: tracks[0].target,\n event: event\n };\n }\n }\n};","export function create() {\n return [1, 0, 0, 1, 0, 0];\n}\nexport function identity(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n out[4] = 0;\n out[5] = 0;\n return out;\n}\nexport function copy(out, m) {\n out[0] = m[0];\n out[1] = m[1];\n out[2] = m[2];\n out[3] = m[3];\n out[4] = m[4];\n out[5] = m[5];\n return out;\n}\nexport function mul(out, m1, m2) {\n var out0 = m1[0] * m2[0] + m1[2] * m2[1];\n var out1 = m1[1] * m2[0] + m1[3] * m2[1];\n var out2 = m1[0] * m2[2] + m1[2] * m2[3];\n var out3 = m1[1] * m2[2] + m1[3] * m2[3];\n var out4 = m1[0] * m2[4] + m1[2] * m2[5] + m1[4];\n var out5 = m1[1] * m2[4] + m1[3] * m2[5] + m1[5];\n out[0] = out0;\n out[1] = out1;\n out[2] = out2;\n out[3] = out3;\n out[4] = out4;\n out[5] = out5;\n return out;\n}\nexport function translate(out, a, v) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4] + v[0];\n out[5] = a[5] + v[1];\n return out;\n}\nexport function rotate(out, a, rad, pivot) {\n if (pivot === void 0) {\n pivot = [0, 0];\n }\n var aa = a[0];\n var ac = a[2];\n var atx = a[4];\n var ab = a[1];\n var ad = a[3];\n var aty = a[5];\n var st = Math.sin(rad);\n var ct = Math.cos(rad);\n out[0] = aa * ct + ab * st;\n out[1] = -aa * st + ab * ct;\n out[2] = ac * ct + ad * st;\n out[3] = -ac * st + ct * ad;\n out[4] = ct * (atx - pivot[0]) + st * (aty - pivot[1]) + pivot[0];\n out[5] = ct * (aty - pivot[1]) - st * (atx - pivot[0]) + pivot[1];\n return out;\n}\nexport function scale(out, a, v) {\n var vx = v[0];\n var vy = v[1];\n out[0] = a[0] * vx;\n out[1] = a[1] * vy;\n out[2] = a[2] * vx;\n out[3] = a[3] * vy;\n out[4] = a[4] * vx;\n out[5] = a[5] * vy;\n return out;\n}\nexport function invert(out, a) {\n var aa = a[0];\n var ac = a[2];\n var atx = a[4];\n var ab = a[1];\n var ad = a[3];\n var aty = a[5];\n var det = aa * ad - ab * ac;\n if (!det) {\n return null;\n }\n det = 1.0 / det;\n out[0] = ad * det;\n out[1] = -ab * det;\n out[2] = -ac * det;\n out[3] = aa * det;\n out[4] = (ac * aty - ad * atx) * det;\n out[5] = (ab * atx - aa * aty) * det;\n return out;\n}\nexport function clone(a) {\n var b = create();\n copy(b, a);\n return b;\n}","var Point = function () {\n function Point(x, y) {\n this.x = x || 0;\n this.y = y || 0;\n }\n Point.prototype.copy = function (other) {\n this.x = other.x;\n this.y = other.y;\n return this;\n };\n Point.prototype.clone = function () {\n return new Point(this.x, this.y);\n };\n Point.prototype.set = function (x, y) {\n this.x = x;\n this.y = y;\n return this;\n };\n Point.prototype.equal = function (other) {\n return other.x === this.x && other.y === this.y;\n };\n Point.prototype.add = function (other) {\n this.x += other.x;\n this.y += other.y;\n return this;\n };\n Point.prototype.scale = function (scalar) {\n this.x *= scalar;\n this.y *= scalar;\n };\n Point.prototype.scaleAndAdd = function (other, scalar) {\n this.x += other.x * scalar;\n this.y += other.y * scalar;\n };\n Point.prototype.sub = function (other) {\n this.x -= other.x;\n this.y -= other.y;\n return this;\n };\n Point.prototype.dot = function (other) {\n return this.x * other.x + this.y * other.y;\n };\n Point.prototype.len = function () {\n return Math.sqrt(this.x * this.x + this.y * this.y);\n };\n Point.prototype.lenSquare = function () {\n return this.x * this.x + this.y * this.y;\n };\n Point.prototype.normalize = function () {\n var len = this.len();\n this.x /= len;\n this.y /= len;\n return this;\n };\n Point.prototype.distance = function (other) {\n var dx = this.x - other.x;\n var dy = this.y - other.y;\n return Math.sqrt(dx * dx + dy * dy);\n };\n Point.prototype.distanceSquare = function (other) {\n var dx = this.x - other.x;\n var dy = this.y - other.y;\n return dx * dx + dy * dy;\n };\n Point.prototype.negate = function () {\n this.x = -this.x;\n this.y = -this.y;\n return this;\n };\n Point.prototype.transform = function (m) {\n if (!m) {\n return;\n }\n var x = this.x;\n var y = this.y;\n this.x = m[0] * x + m[2] * y + m[4];\n this.y = m[1] * x + m[3] * y + m[5];\n return this;\n };\n Point.prototype.toArray = function (out) {\n out[0] = this.x;\n out[1] = this.y;\n return out;\n };\n Point.prototype.fromArray = function (input) {\n this.x = input[0];\n this.y = input[1];\n };\n Point.set = function (p, x, y) {\n p.x = x;\n p.y = y;\n };\n Point.copy = function (p, p2) {\n p.x = p2.x;\n p.y = p2.y;\n };\n Point.len = function (p) {\n return Math.sqrt(p.x * p.x + p.y * p.y);\n };\n Point.lenSquare = function (p) {\n return p.x * p.x + p.y * p.y;\n };\n Point.dot = function (p0, p1) {\n return p0.x * p1.x + p0.y * p1.y;\n };\n Point.add = function (out, p0, p1) {\n out.x = p0.x + p1.x;\n out.y = p0.y + p1.y;\n };\n Point.sub = function (out, p0, p1) {\n out.x = p0.x - p1.x;\n out.y = p0.y - p1.y;\n };\n Point.scale = function (out, p0, scalar) {\n out.x = p0.x * scalar;\n out.y = p0.y * scalar;\n };\n Point.scaleAndAdd = function (out, p0, p1, scalar) {\n out.x = p0.x + p1.x * scalar;\n out.y = p0.y + p1.y * scalar;\n };\n Point.lerp = function (out, p0, p1, t) {\n var onet = 1 - t;\n out.x = onet * p0.x + t * p1.x;\n out.y = onet * p0.y + t * p1.y;\n };\n return Point;\n}();\nexport default Point;","import * as matrix from './matrix.js';\nimport Point from './Point.js';\nvar mathMin = Math.min;\nvar mathMax = Math.max;\nvar lt = new Point();\nvar rb = new Point();\nvar lb = new Point();\nvar rt = new Point();\nvar minTv = new Point();\nvar maxTv = new Point();\nvar BoundingRect = function () {\n function BoundingRect(x, y, width, height) {\n if (width < 0) {\n x = x + width;\n width = -width;\n }\n if (height < 0) {\n y = y + height;\n height = -height;\n }\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n }\n BoundingRect.prototype.union = function (other) {\n var x = mathMin(other.x, this.x);\n var y = mathMin(other.y, this.y);\n if (isFinite(this.x) && isFinite(this.width)) {\n this.width = mathMax(other.x + other.width, this.x + this.width) - x;\n } else {\n this.width = other.width;\n }\n if (isFinite(this.y) && isFinite(this.height)) {\n this.height = mathMax(other.y + other.height, this.y + this.height) - y;\n } else {\n this.height = other.height;\n }\n this.x = x;\n this.y = y;\n };\n BoundingRect.prototype.applyTransform = function (m) {\n BoundingRect.applyTransform(this, this, m);\n };\n BoundingRect.prototype.calculateTransform = function (b) {\n var a = this;\n var sx = b.width / a.width;\n var sy = b.height / a.height;\n var m = matrix.create();\n matrix.translate(m, m, [-a.x, -a.y]);\n matrix.scale(m, m, [sx, sy]);\n matrix.translate(m, m, [b.x, b.y]);\n return m;\n };\n BoundingRect.prototype.intersect = function (b, mtv) {\n if (!b) {\n return false;\n }\n if (!(b instanceof BoundingRect)) {\n b = BoundingRect.create(b);\n }\n var a = this;\n var ax0 = a.x;\n var ax1 = a.x + a.width;\n var ay0 = a.y;\n var ay1 = a.y + a.height;\n var bx0 = b.x;\n var bx1 = b.x + b.width;\n var by0 = b.y;\n var by1 = b.y + b.height;\n var overlap = !(ax1 < bx0 || bx1 < ax0 || ay1 < by0 || by1 < ay0);\n if (mtv) {\n var dMin = Infinity;\n var dMax = 0;\n var d0 = Math.abs(ax1 - bx0);\n var d1 = Math.abs(bx1 - ax0);\n var d2 = Math.abs(ay1 - by0);\n var d3 = Math.abs(by1 - ay0);\n var dx = Math.min(d0, d1);\n var dy = Math.min(d2, d3);\n if (ax1 < bx0 || bx1 < ax0) {\n if (dx > dMax) {\n dMax = dx;\n if (d0 < d1) {\n Point.set(maxTv, -d0, 0);\n } else {\n Point.set(maxTv, d1, 0);\n }\n }\n } else {\n if (dx < dMin) {\n dMin = dx;\n if (d0 < d1) {\n Point.set(minTv, d0, 0);\n } else {\n Point.set(minTv, -d1, 0);\n }\n }\n }\n if (ay1 < by0 || by1 < ay0) {\n if (dy > dMax) {\n dMax = dy;\n if (d2 < d3) {\n Point.set(maxTv, 0, -d2);\n } else {\n Point.set(maxTv, 0, d3);\n }\n }\n } else {\n if (dx < dMin) {\n dMin = dx;\n if (d2 < d3) {\n Point.set(minTv, 0, d2);\n } else {\n Point.set(minTv, 0, -d3);\n }\n }\n }\n }\n if (mtv) {\n Point.copy(mtv, overlap ? minTv : maxTv);\n }\n return overlap;\n };\n BoundingRect.prototype.contain = function (x, y) {\n var rect = this;\n return x >= rect.x && x <= rect.x + rect.width && y >= rect.y && y <= rect.y + rect.height;\n };\n BoundingRect.prototype.clone = function () {\n return new BoundingRect(this.x, this.y, this.width, this.height);\n };\n BoundingRect.prototype.copy = function (other) {\n BoundingRect.copy(this, other);\n };\n BoundingRect.prototype.plain = function () {\n return {\n x: this.x,\n y: this.y,\n width: this.width,\n height: this.height\n };\n };\n BoundingRect.prototype.isFinite = function () {\n return isFinite(this.x) && isFinite(this.y) && isFinite(this.width) && isFinite(this.height);\n };\n BoundingRect.prototype.isZero = function () {\n return this.width === 0 || this.height === 0;\n };\n BoundingRect.create = function (rect) {\n return new BoundingRect(rect.x, rect.y, rect.width, rect.height);\n };\n BoundingRect.copy = function (target, source) {\n target.x = source.x;\n target.y = source.y;\n target.width = source.width;\n target.height = source.height;\n };\n BoundingRect.applyTransform = function (target, source, m) {\n if (!m) {\n if (target !== source) {\n BoundingRect.copy(target, source);\n }\n return;\n }\n if (m[1] < 1e-5 && m[1] > -1e-5 && m[2] < 1e-5 && m[2] > -1e-5) {\n var sx = m[0];\n var sy = m[3];\n var tx = m[4];\n var ty = m[5];\n target.x = source.x * sx + tx;\n target.y = source.y * sy + ty;\n target.width = source.width * sx;\n target.height = source.height * sy;\n if (target.width < 0) {\n target.x += target.width;\n target.width = -target.width;\n }\n if (target.height < 0) {\n target.y += target.height;\n target.height = -target.height;\n }\n return;\n }\n lt.x = lb.x = source.x;\n lt.y = rt.y = source.y;\n rb.x = rt.x = source.x + source.width;\n rb.y = lb.y = source.y + source.height;\n lt.transform(m);\n rt.transform(m);\n rb.transform(m);\n lb.transform(m);\n target.x = mathMin(lt.x, rb.x, lb.x, rt.x);\n target.y = mathMin(lt.y, rb.y, lb.y, rt.y);\n var maxX = mathMax(lt.x, rb.x, lb.x, rt.x);\n var maxY = mathMax(lt.y, rb.y, lb.y, rt.y);\n target.width = maxX - target.x;\n target.height = maxY - target.y;\n };\n return BoundingRect;\n}();\nexport default BoundingRect;","import { __extends } from \"tslib\";\nimport * as util from './core/util.js';\nimport * as vec2 from './core/vector.js';\nimport Draggable from './mixin/Draggable.js';\nimport Eventful from './core/Eventful.js';\nimport * as eventTool from './core/event.js';\nimport { GestureMgr } from './core/GestureMgr.js';\nimport BoundingRect from './core/BoundingRect.js';\nvar SILENT = 'silent';\nfunction makeEventPacket(eveType, targetInfo, event) {\n return {\n type: eveType,\n event: event,\n target: targetInfo.target,\n topTarget: targetInfo.topTarget,\n cancelBubble: false,\n offsetX: event.zrX,\n offsetY: event.zrY,\n gestureEvent: event.gestureEvent,\n pinchX: event.pinchX,\n pinchY: event.pinchY,\n pinchScale: event.pinchScale,\n wheelDelta: event.zrDelta,\n zrByTouch: event.zrByTouch,\n which: event.which,\n stop: stopEvent\n };\n}\nfunction stopEvent() {\n eventTool.stop(this.event);\n}\nvar EmptyProxy = function (_super) {\n __extends(EmptyProxy, _super);\n function EmptyProxy() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.handler = null;\n return _this;\n }\n EmptyProxy.prototype.dispose = function () {};\n EmptyProxy.prototype.setCursor = function () {};\n return EmptyProxy;\n}(Eventful);\nvar HoveredResult = function () {\n function HoveredResult(x, y) {\n this.x = x;\n this.y = y;\n }\n return HoveredResult;\n}();\nvar handlerNames = ['click', 'dblclick', 'mousewheel', 'mouseout', 'mouseup', 'mousedown', 'mousemove', 'contextmenu'];\nvar tmpRect = new BoundingRect(0, 0, 0, 0);\nvar Handler = function (_super) {\n __extends(Handler, _super);\n function Handler(storage, painter, proxy, painterRoot, pointerSize) {\n var _this = _super.call(this) || this;\n _this._hovered = new HoveredResult(0, 0);\n _this.storage = storage;\n _this.painter = painter;\n _this.painterRoot = painterRoot;\n _this._pointerSize = pointerSize;\n proxy = proxy || new EmptyProxy();\n _this.proxy = null;\n _this.setHandlerProxy(proxy);\n _this._draggingMgr = new Draggable(_this);\n return _this;\n }\n Handler.prototype.setHandlerProxy = function (proxy) {\n if (this.proxy) {\n this.proxy.dispose();\n }\n if (proxy) {\n util.each(handlerNames, function (name) {\n proxy.on && proxy.on(name, this[name], this);\n }, this);\n proxy.handler = this;\n }\n this.proxy = proxy;\n };\n Handler.prototype.mousemove = function (event) {\n var x = event.zrX;\n var y = event.zrY;\n var isOutside = isOutsideBoundary(this, x, y);\n var lastHovered = this._hovered;\n var lastHoveredTarget = lastHovered.target;\n if (lastHoveredTarget && !lastHoveredTarget.__zr) {\n lastHovered = this.findHover(lastHovered.x, lastHovered.y);\n lastHoveredTarget = lastHovered.target;\n }\n var hovered = this._hovered = isOutside ? new HoveredResult(x, y) : this.findHover(x, y);\n var hoveredTarget = hovered.target;\n var proxy = this.proxy;\n proxy.setCursor && proxy.setCursor(hoveredTarget ? hoveredTarget.cursor : 'default');\n if (lastHoveredTarget && hoveredTarget !== lastHoveredTarget) {\n this.dispatchToElement(lastHovered, 'mouseout', event);\n }\n this.dispatchToElement(hovered, 'mousemove', event);\n if (hoveredTarget && hoveredTarget !== lastHoveredTarget) {\n this.dispatchToElement(hovered, 'mouseover', event);\n }\n };\n Handler.prototype.mouseout = function (event) {\n var eventControl = event.zrEventControl;\n if (eventControl !== 'only_globalout') {\n this.dispatchToElement(this._hovered, 'mouseout', event);\n }\n if (eventControl !== 'no_globalout') {\n this.trigger('globalout', {\n type: 'globalout',\n event: event\n });\n }\n };\n Handler.prototype.resize = function () {\n this._hovered = new HoveredResult(0, 0);\n };\n Handler.prototype.dispatch = function (eventName, eventArgs) {\n var handler = this[eventName];\n handler && handler.call(this, eventArgs);\n };\n Handler.prototype.dispose = function () {\n this.proxy.dispose();\n this.storage = null;\n this.proxy = null;\n this.painter = null;\n };\n Handler.prototype.setCursorStyle = function (cursorStyle) {\n var proxy = this.proxy;\n proxy.setCursor && proxy.setCursor(cursorStyle);\n };\n Handler.prototype.dispatchToElement = function (targetInfo, eventName, event) {\n targetInfo = targetInfo || {};\n var el = targetInfo.target;\n if (el && el.silent) {\n return;\n }\n var eventKey = 'on' + eventName;\n var eventPacket = makeEventPacket(eventName, targetInfo, event);\n while (el) {\n el[eventKey] && (eventPacket.cancelBubble = !!el[eventKey].call(el, eventPacket));\n el.trigger(eventName, eventPacket);\n el = el.__hostTarget ? el.__hostTarget : el.parent;\n if (eventPacket.cancelBubble) {\n break;\n }\n }\n if (!eventPacket.cancelBubble) {\n this.trigger(eventName, eventPacket);\n if (this.painter && this.painter.eachOtherLayer) {\n this.painter.eachOtherLayer(function (layer) {\n if (typeof layer[eventKey] === 'function') {\n layer[eventKey].call(layer, eventPacket);\n }\n if (layer.trigger) {\n layer.trigger(eventName, eventPacket);\n }\n });\n }\n }\n };\n Handler.prototype.findHover = function (x, y, exclude) {\n var list = this.storage.getDisplayList();\n var out = new HoveredResult(x, y);\n setHoverTarget(list, out, x, y, exclude);\n if (this._pointerSize && !out.target) {\n var candidates = [];\n var pointerSize = this._pointerSize;\n var targetSizeHalf = pointerSize / 2;\n var pointerRect = new BoundingRect(x - targetSizeHalf, y - targetSizeHalf, pointerSize, pointerSize);\n for (var i = list.length - 1; i >= 0; i--) {\n var el = list[i];\n if (el !== exclude && !el.ignore && !el.ignoreCoarsePointer && (!el.parent || !el.parent.ignoreCoarsePointer)) {\n tmpRect.copy(el.getBoundingRect());\n if (el.transform) {\n tmpRect.applyTransform(el.transform);\n }\n if (tmpRect.intersect(pointerRect)) {\n candidates.push(el);\n }\n }\n }\n if (candidates.length) {\n var rStep = 4;\n var thetaStep = Math.PI / 12;\n var PI2 = Math.PI * 2;\n for (var r = 0; r < targetSizeHalf; r += rStep) {\n for (var theta = 0; theta < PI2; theta += thetaStep) {\n var x1 = x + r * Math.cos(theta);\n var y1 = y + r * Math.sin(theta);\n setHoverTarget(candidates, out, x1, y1, exclude);\n if (out.target) {\n return out;\n }\n }\n }\n }\n }\n return out;\n };\n Handler.prototype.processGesture = function (event, stage) {\n if (!this._gestureMgr) {\n this._gestureMgr = new GestureMgr();\n }\n var gestureMgr = this._gestureMgr;\n stage === 'start' && gestureMgr.clear();\n var gestureInfo = gestureMgr.recognize(event, this.findHover(event.zrX, event.zrY, null).target, this.proxy.dom);\n stage === 'end' && gestureMgr.clear();\n if (gestureInfo) {\n var type = gestureInfo.type;\n event.gestureEvent = type;\n var res = new HoveredResult();\n res.target = gestureInfo.target;\n this.dispatchToElement(res, type, gestureInfo.event);\n }\n };\n return Handler;\n}(Eventful);\nutil.each(['click', 'mousedown', 'mouseup', 'mousewheel', 'dblclick', 'contextmenu'], function (name) {\n Handler.prototype[name] = function (event) {\n var x = event.zrX;\n var y = event.zrY;\n var isOutside = isOutsideBoundary(this, x, y);\n var hovered;\n var hoveredTarget;\n if (name !== 'mouseup' || !isOutside) {\n hovered = this.findHover(x, y);\n hoveredTarget = hovered.target;\n }\n if (name === 'mousedown') {\n this._downEl = hoveredTarget;\n this._downPoint = [event.zrX, event.zrY];\n this._upEl = hoveredTarget;\n } else if (name === 'mouseup') {\n this._upEl = hoveredTarget;\n } else if (name === 'click') {\n if (this._downEl !== this._upEl || !this._downPoint || vec2.dist(this._downPoint, [event.zrX, event.zrY]) > 4) {\n return;\n }\n this._downPoint = null;\n }\n this.dispatchToElement(hovered, name, event);\n };\n});\nfunction isHover(displayable, x, y) {\n if (displayable[displayable.rectHover ? 'rectContain' : 'contain'](x, y)) {\n var el = displayable;\n var isSilent = void 0;\n var ignoreClip = false;\n while (el) {\n if (el.ignoreClip) {\n ignoreClip = true;\n }\n if (!ignoreClip) {\n var clipPath = el.getClipPath();\n if (clipPath && !clipPath.contain(x, y)) {\n return false;\n }\n }\n if (el.silent) {\n isSilent = true;\n }\n var hostEl = el.__hostTarget;\n el = hostEl ? hostEl : el.parent;\n }\n return isSilent ? SILENT : true;\n }\n return false;\n}\nfunction setHoverTarget(list, out, x, y, exclude) {\n for (var i = list.length - 1; i >= 0; i--) {\n var el = list[i];\n var hoverCheckResult = void 0;\n if (el !== exclude && !el.ignore && (hoverCheckResult = isHover(el, x, y))) {\n !out.topTarget && (out.topTarget = el);\n if (hoverCheckResult !== SILENT) {\n out.target = el;\n break;\n }\n }\n }\n}\nfunction isOutsideBoundary(handlerInstance, x, y) {\n var painter = handlerInstance.painter;\n return x < 0 || x > painter.getWidth() || y < 0 || y > painter.getHeight();\n}\nexport default Handler;","var DEFAULT_MIN_MERGE = 32;\nvar DEFAULT_MIN_GALLOPING = 7;\nfunction minRunLength(n) {\n var r = 0;\n while (n >= DEFAULT_MIN_MERGE) {\n r |= n & 1;\n n >>= 1;\n }\n return n + r;\n}\nfunction makeAscendingRun(array, lo, hi, compare) {\n var runHi = lo + 1;\n if (runHi === hi) {\n return 1;\n }\n if (compare(array[runHi++], array[lo]) < 0) {\n while (runHi < hi && compare(array[runHi], array[runHi - 1]) < 0) {\n runHi++;\n }\n reverseRun(array, lo, runHi);\n } else {\n while (runHi < hi && compare(array[runHi], array[runHi - 1]) >= 0) {\n runHi++;\n }\n }\n return runHi - lo;\n}\nfunction reverseRun(array, lo, hi) {\n hi--;\n while (lo < hi) {\n var t = array[lo];\n array[lo++] = array[hi];\n array[hi--] = t;\n }\n}\nfunction binaryInsertionSort(array, lo, hi, start, compare) {\n if (start === lo) {\n start++;\n }\n for (; start < hi; start++) {\n var pivot = array[start];\n var left = lo;\n var right = start;\n var mid;\n while (left < right) {\n mid = left + right >>> 1;\n if (compare(pivot, array[mid]) < 0) {\n right = mid;\n } else {\n left = mid + 1;\n }\n }\n var n = start - left;\n switch (n) {\n case 3:\n array[left + 3] = array[left + 2];\n case 2:\n array[left + 2] = array[left + 1];\n case 1:\n array[left + 1] = array[left];\n break;\n default:\n while (n > 0) {\n array[left + n] = array[left + n - 1];\n n--;\n }\n }\n array[left] = pivot;\n }\n}\nfunction gallopLeft(value, array, start, length, hint, compare) {\n var lastOffset = 0;\n var maxOffset = 0;\n var offset = 1;\n if (compare(value, array[start + hint]) > 0) {\n maxOffset = length - hint;\n while (offset < maxOffset && compare(value, array[start + hint + offset]) > 0) {\n lastOffset = offset;\n offset = (offset << 1) + 1;\n if (offset <= 0) {\n offset = maxOffset;\n }\n }\n if (offset > maxOffset) {\n offset = maxOffset;\n }\n lastOffset += hint;\n offset += hint;\n } else {\n maxOffset = hint + 1;\n while (offset < maxOffset && compare(value, array[start + hint - offset]) <= 0) {\n lastOffset = offset;\n offset = (offset << 1) + 1;\n if (offset <= 0) {\n offset = maxOffset;\n }\n }\n if (offset > maxOffset) {\n offset = maxOffset;\n }\n var tmp = lastOffset;\n lastOffset = hint - offset;\n offset = hint - tmp;\n }\n lastOffset++;\n while (lastOffset < offset) {\n var m = lastOffset + (offset - lastOffset >>> 1);\n if (compare(value, array[start + m]) > 0) {\n lastOffset = m + 1;\n } else {\n offset = m;\n }\n }\n return offset;\n}\nfunction gallopRight(value, array, start, length, hint, compare) {\n var lastOffset = 0;\n var maxOffset = 0;\n var offset = 1;\n if (compare(value, array[start + hint]) < 0) {\n maxOffset = hint + 1;\n while (offset < maxOffset && compare(value, array[start + hint - offset]) < 0) {\n lastOffset = offset;\n offset = (offset << 1) + 1;\n if (offset <= 0) {\n offset = maxOffset;\n }\n }\n if (offset > maxOffset) {\n offset = maxOffset;\n }\n var tmp = lastOffset;\n lastOffset = hint - offset;\n offset = hint - tmp;\n } else {\n maxOffset = length - hint;\n while (offset < maxOffset && compare(value, array[start + hint + offset]) >= 0) {\n lastOffset = offset;\n offset = (offset << 1) + 1;\n if (offset <= 0) {\n offset = maxOffset;\n }\n }\n if (offset > maxOffset) {\n offset = maxOffset;\n }\n lastOffset += hint;\n offset += hint;\n }\n lastOffset++;\n while (lastOffset < offset) {\n var m = lastOffset + (offset - lastOffset >>> 1);\n if (compare(value, array[start + m]) < 0) {\n offset = m;\n } else {\n lastOffset = m + 1;\n }\n }\n return offset;\n}\nfunction TimSort(array, compare) {\n var minGallop = DEFAULT_MIN_GALLOPING;\n var runStart;\n var runLength;\n var stackSize = 0;\n var tmp = [];\n runStart = [];\n runLength = [];\n function pushRun(_runStart, _runLength) {\n runStart[stackSize] = _runStart;\n runLength[stackSize] = _runLength;\n stackSize += 1;\n }\n function mergeRuns() {\n while (stackSize > 1) {\n var n = stackSize - 2;\n if (n >= 1 && runLength[n - 1] <= runLength[n] + runLength[n + 1] || n >= 2 && runLength[n - 2] <= runLength[n] + runLength[n - 1]) {\n if (runLength[n - 1] < runLength[n + 1]) {\n n--;\n }\n } else if (runLength[n] > runLength[n + 1]) {\n break;\n }\n mergeAt(n);\n }\n }\n function forceMergeRuns() {\n while (stackSize > 1) {\n var n = stackSize - 2;\n if (n > 0 && runLength[n - 1] < runLength[n + 1]) {\n n--;\n }\n mergeAt(n);\n }\n }\n function mergeAt(i) {\n var start1 = runStart[i];\n var length1 = runLength[i];\n var start2 = runStart[i + 1];\n var length2 = runLength[i + 1];\n runLength[i] = length1 + length2;\n if (i === stackSize - 3) {\n runStart[i + 1] = runStart[i + 2];\n runLength[i + 1] = runLength[i + 2];\n }\n stackSize--;\n var k = gallopRight(array[start2], array, start1, length1, 0, compare);\n start1 += k;\n length1 -= k;\n if (length1 === 0) {\n return;\n }\n length2 = gallopLeft(array[start1 + length1 - 1], array, start2, length2, length2 - 1, compare);\n if (length2 === 0) {\n return;\n }\n if (length1 <= length2) {\n mergeLow(start1, length1, start2, length2);\n } else {\n mergeHigh(start1, length1, start2, length2);\n }\n }\n function mergeLow(start1, length1, start2, length2) {\n var i = 0;\n for (i = 0; i < length1; i++) {\n tmp[i] = array[start1 + i];\n }\n var cursor1 = 0;\n var cursor2 = start2;\n var dest = start1;\n array[dest++] = array[cursor2++];\n if (--length2 === 0) {\n for (i = 0; i < length1; i++) {\n array[dest + i] = tmp[cursor1 + i];\n }\n return;\n }\n if (length1 === 1) {\n for (i = 0; i < length2; i++) {\n array[dest + i] = array[cursor2 + i];\n }\n array[dest + length2] = tmp[cursor1];\n return;\n }\n var _minGallop = minGallop;\n var count1;\n var count2;\n var exit;\n while (1) {\n count1 = 0;\n count2 = 0;\n exit = false;\n do {\n if (compare(array[cursor2], tmp[cursor1]) < 0) {\n array[dest++] = array[cursor2++];\n count2++;\n count1 = 0;\n if (--length2 === 0) {\n exit = true;\n break;\n }\n } else {\n array[dest++] = tmp[cursor1++];\n count1++;\n count2 = 0;\n if (--length1 === 1) {\n exit = true;\n break;\n }\n }\n } while ((count1 | count2) < _minGallop);\n if (exit) {\n break;\n }\n do {\n count1 = gallopRight(array[cursor2], tmp, cursor1, length1, 0, compare);\n if (count1 !== 0) {\n for (i = 0; i < count1; i++) {\n array[dest + i] = tmp[cursor1 + i];\n }\n dest += count1;\n cursor1 += count1;\n length1 -= count1;\n if (length1 <= 1) {\n exit = true;\n break;\n }\n }\n array[dest++] = array[cursor2++];\n if (--length2 === 0) {\n exit = true;\n break;\n }\n count2 = gallopLeft(tmp[cursor1], array, cursor2, length2, 0, compare);\n if (count2 !== 0) {\n for (i = 0; i < count2; i++) {\n array[dest + i] = array[cursor2 + i];\n }\n dest += count2;\n cursor2 += count2;\n length2 -= count2;\n if (length2 === 0) {\n exit = true;\n break;\n }\n }\n array[dest++] = tmp[cursor1++];\n if (--length1 === 1) {\n exit = true;\n break;\n }\n _minGallop--;\n } while (count1 >= DEFAULT_MIN_GALLOPING || count2 >= DEFAULT_MIN_GALLOPING);\n if (exit) {\n break;\n }\n if (_minGallop < 0) {\n _minGallop = 0;\n }\n _minGallop += 2;\n }\n minGallop = _minGallop;\n minGallop < 1 && (minGallop = 1);\n if (length1 === 1) {\n for (i = 0; i < length2; i++) {\n array[dest + i] = array[cursor2 + i];\n }\n array[dest + length2] = tmp[cursor1];\n } else if (length1 === 0) {\n throw new Error();\n } else {\n for (i = 0; i < length1; i++) {\n array[dest + i] = tmp[cursor1 + i];\n }\n }\n }\n function mergeHigh(start1, length1, start2, length2) {\n var i = 0;\n for (i = 0; i < length2; i++) {\n tmp[i] = array[start2 + i];\n }\n var cursor1 = start1 + length1 - 1;\n var cursor2 = length2 - 1;\n var dest = start2 + length2 - 1;\n var customCursor = 0;\n var customDest = 0;\n array[dest--] = array[cursor1--];\n if (--length1 === 0) {\n customCursor = dest - (length2 - 1);\n for (i = 0; i < length2; i++) {\n array[customCursor + i] = tmp[i];\n }\n return;\n }\n if (length2 === 1) {\n dest -= length1;\n cursor1 -= length1;\n customDest = dest + 1;\n customCursor = cursor1 + 1;\n for (i = length1 - 1; i >= 0; i--) {\n array[customDest + i] = array[customCursor + i];\n }\n array[dest] = tmp[cursor2];\n return;\n }\n var _minGallop = minGallop;\n while (true) {\n var count1 = 0;\n var count2 = 0;\n var exit = false;\n do {\n if (compare(tmp[cursor2], array[cursor1]) < 0) {\n array[dest--] = array[cursor1--];\n count1++;\n count2 = 0;\n if (--length1 === 0) {\n exit = true;\n break;\n }\n } else {\n array[dest--] = tmp[cursor2--];\n count2++;\n count1 = 0;\n if (--length2 === 1) {\n exit = true;\n break;\n }\n }\n } while ((count1 | count2) < _minGallop);\n if (exit) {\n break;\n }\n do {\n count1 = length1 - gallopRight(tmp[cursor2], array, start1, length1, length1 - 1, compare);\n if (count1 !== 0) {\n dest -= count1;\n cursor1 -= count1;\n length1 -= count1;\n customDest = dest + 1;\n customCursor = cursor1 + 1;\n for (i = count1 - 1; i >= 0; i--) {\n array[customDest + i] = array[customCursor + i];\n }\n if (length1 === 0) {\n exit = true;\n break;\n }\n }\n array[dest--] = tmp[cursor2--];\n if (--length2 === 1) {\n exit = true;\n break;\n }\n count2 = length2 - gallopLeft(array[cursor1], tmp, 0, length2, length2 - 1, compare);\n if (count2 !== 0) {\n dest -= count2;\n cursor2 -= count2;\n length2 -= count2;\n customDest = dest + 1;\n customCursor = cursor2 + 1;\n for (i = 0; i < count2; i++) {\n array[customDest + i] = tmp[customCursor + i];\n }\n if (length2 <= 1) {\n exit = true;\n break;\n }\n }\n array[dest--] = array[cursor1--];\n if (--length1 === 0) {\n exit = true;\n break;\n }\n _minGallop--;\n } while (count1 >= DEFAULT_MIN_GALLOPING || count2 >= DEFAULT_MIN_GALLOPING);\n if (exit) {\n break;\n }\n if (_minGallop < 0) {\n _minGallop = 0;\n }\n _minGallop += 2;\n }\n minGallop = _minGallop;\n if (minGallop < 1) {\n minGallop = 1;\n }\n if (length2 === 1) {\n dest -= length1;\n cursor1 -= length1;\n customDest = dest + 1;\n customCursor = cursor1 + 1;\n for (i = length1 - 1; i >= 0; i--) {\n array[customDest + i] = array[customCursor + i];\n }\n array[dest] = tmp[cursor2];\n } else if (length2 === 0) {\n throw new Error();\n } else {\n customCursor = dest - (length2 - 1);\n for (i = 0; i < length2; i++) {\n array[customCursor + i] = tmp[i];\n }\n }\n }\n return {\n mergeRuns: mergeRuns,\n forceMergeRuns: forceMergeRuns,\n pushRun: pushRun\n };\n}\nexport default function sort(array, compare, lo, hi) {\n if (!lo) {\n lo = 0;\n }\n if (!hi) {\n hi = array.length;\n }\n var remaining = hi - lo;\n if (remaining < 2) {\n return;\n }\n var runLength = 0;\n if (remaining < DEFAULT_MIN_MERGE) {\n runLength = makeAscendingRun(array, lo, hi, compare);\n binaryInsertionSort(array, lo, hi, lo + runLength, compare);\n return;\n }\n var ts = TimSort(array, compare);\n var minRun = minRunLength(remaining);\n do {\n runLength = makeAscendingRun(array, lo, hi, compare);\n if (runLength < minRun) {\n var force = remaining;\n if (force > minRun) {\n force = minRun;\n }\n binaryInsertionSort(array, lo, lo + force, lo + runLength, compare);\n runLength = force;\n }\n ts.pushRun(lo, runLength);\n ts.mergeRuns();\n remaining -= runLength;\n lo += runLength;\n } while (remaining !== 0);\n ts.forceMergeRuns();\n}","export var REDRAW_BIT = 1;\nexport var STYLE_CHANGED_BIT = 2;\nexport var SHAPE_CHANGED_BIT = 4;","import * as util from './core/util.js';\nimport timsort from './core/timsort.js';\nimport { REDRAW_BIT } from './graphic/constants.js';\nvar invalidZErrorLogged = false;\nfunction logInvalidZError() {\n if (invalidZErrorLogged) {\n return;\n }\n invalidZErrorLogged = true;\n console.warn('z / z2 / zlevel of displayable is invalid, which may cause unexpected errors');\n}\nfunction shapeCompareFunc(a, b) {\n if (a.zlevel === b.zlevel) {\n if (a.z === b.z) {\n return a.z2 - b.z2;\n }\n return a.z - b.z;\n }\n return a.zlevel - b.zlevel;\n}\nvar Storage = function () {\n function Storage() {\n this._roots = [];\n this._displayList = [];\n this._displayListLen = 0;\n this.displayableSortFunc = shapeCompareFunc;\n }\n Storage.prototype.traverse = function (cb, context) {\n for (var i = 0; i < this._roots.length; i++) {\n this._roots[i].traverse(cb, context);\n }\n };\n Storage.prototype.getDisplayList = function (update, includeIgnore) {\n includeIgnore = includeIgnore || false;\n var displayList = this._displayList;\n if (update || !displayList.length) {\n this.updateDisplayList(includeIgnore);\n }\n return displayList;\n };\n Storage.prototype.updateDisplayList = function (includeIgnore) {\n this._displayListLen = 0;\n var roots = this._roots;\n var displayList = this._displayList;\n for (var i = 0, len = roots.length; i < len; i++) {\n this._updateAndAddDisplayable(roots[i], null, includeIgnore);\n }\n displayList.length = this._displayListLen;\n timsort(displayList, shapeCompareFunc);\n };\n Storage.prototype._updateAndAddDisplayable = function (el, clipPaths, includeIgnore) {\n if (el.ignore && !includeIgnore) {\n return;\n }\n el.beforeUpdate();\n el.update();\n el.afterUpdate();\n var userSetClipPath = el.getClipPath();\n if (el.ignoreClip) {\n clipPaths = null;\n } else if (userSetClipPath) {\n if (clipPaths) {\n clipPaths = clipPaths.slice();\n } else {\n clipPaths = [];\n }\n var currentClipPath = userSetClipPath;\n var parentClipPath = el;\n while (currentClipPath) {\n currentClipPath.parent = parentClipPath;\n currentClipPath.updateTransform();\n clipPaths.push(currentClipPath);\n parentClipPath = currentClipPath;\n currentClipPath = currentClipPath.getClipPath();\n }\n }\n if (el.childrenRef) {\n var children = el.childrenRef();\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n if (el.__dirty) {\n child.__dirty |= REDRAW_BIT;\n }\n this._updateAndAddDisplayable(child, clipPaths, includeIgnore);\n }\n el.__dirty = 0;\n } else {\n var disp = el;\n if (clipPaths && clipPaths.length) {\n disp.__clipPaths = clipPaths;\n } else if (disp.__clipPaths && disp.__clipPaths.length > 0) {\n disp.__clipPaths = [];\n }\n if (isNaN(disp.z)) {\n logInvalidZError();\n disp.z = 0;\n }\n if (isNaN(disp.z2)) {\n logInvalidZError();\n disp.z2 = 0;\n }\n if (isNaN(disp.zlevel)) {\n logInvalidZError();\n disp.zlevel = 0;\n }\n this._displayList[this._displayListLen++] = disp;\n }\n var decalEl = el.getDecalElement && el.getDecalElement();\n if (decalEl) {\n this._updateAndAddDisplayable(decalEl, clipPaths, includeIgnore);\n }\n var textGuide = el.getTextGuideLine();\n if (textGuide) {\n this._updateAndAddDisplayable(textGuide, clipPaths, includeIgnore);\n }\n var textEl = el.getTextContent();\n if (textEl) {\n this._updateAndAddDisplayable(textEl, clipPaths, includeIgnore);\n }\n };\n Storage.prototype.addRoot = function (el) {\n if (el.__zr && el.__zr.storage === this) {\n return;\n }\n this._roots.push(el);\n };\n Storage.prototype.delRoot = function (el) {\n if (el instanceof Array) {\n for (var i = 0, l = el.length; i < l; i++) {\n this.delRoot(el[i]);\n }\n return;\n }\n var idx = util.indexOf(this._roots, el);\n if (idx >= 0) {\n this._roots.splice(idx, 1);\n }\n };\n Storage.prototype.delAllRoots = function () {\n this._roots = [];\n this._displayList = [];\n this._displayListLen = 0;\n return;\n };\n Storage.prototype.getRoots = function () {\n return this._roots;\n };\n Storage.prototype.dispose = function () {\n this._displayList = null;\n this._roots = null;\n };\n return Storage;\n}();\nexport default Storage;","import env from '../core/env.js';\nvar requestAnimationFrame;\nrequestAnimationFrame = env.hasGlobalWindow && (window.requestAnimationFrame && window.requestAnimationFrame.bind(window) || window.msRequestAnimationFrame && window.msRequestAnimationFrame.bind(window) || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame) || function (func) {\n return setTimeout(func, 16);\n};\nexport default requestAnimationFrame;","var easingFuncs = {\n linear: function (k) {\n return k;\n },\n quadraticIn: function (k) {\n return k * k;\n },\n quadraticOut: function (k) {\n return k * (2 - k);\n },\n quadraticInOut: function (k) {\n if ((k *= 2) < 1) {\n return 0.5 * k * k;\n }\n return -0.5 * (--k * (k - 2) - 1);\n },\n cubicIn: function (k) {\n return k * k * k;\n },\n cubicOut: function (k) {\n return --k * k * k + 1;\n },\n cubicInOut: function (k) {\n if ((k *= 2) < 1) {\n return 0.5 * k * k * k;\n }\n return 0.5 * ((k -= 2) * k * k + 2);\n },\n quarticIn: function (k) {\n return k * k * k * k;\n },\n quarticOut: function (k) {\n return 1 - --k * k * k * k;\n },\n quarticInOut: function (k) {\n if ((k *= 2) < 1) {\n return 0.5 * k * k * k * k;\n }\n return -0.5 * ((k -= 2) * k * k * k - 2);\n },\n quinticIn: function (k) {\n return k * k * k * k * k;\n },\n quinticOut: function (k) {\n return --k * k * k * k * k + 1;\n },\n quinticInOut: function (k) {\n if ((k *= 2) < 1) {\n return 0.5 * k * k * k * k * k;\n }\n return 0.5 * ((k -= 2) * k * k * k * k + 2);\n },\n sinusoidalIn: function (k) {\n return 1 - Math.cos(k * Math.PI / 2);\n },\n sinusoidalOut: function (k) {\n return Math.sin(k * Math.PI / 2);\n },\n sinusoidalInOut: function (k) {\n return 0.5 * (1 - Math.cos(Math.PI * k));\n },\n exponentialIn: function (k) {\n return k === 0 ? 0 : Math.pow(1024, k - 1);\n },\n exponentialOut: function (k) {\n return k === 1 ? 1 : 1 - Math.pow(2, -10 * k);\n },\n exponentialInOut: function (k) {\n if (k === 0) {\n return 0;\n }\n if (k === 1) {\n return 1;\n }\n if ((k *= 2) < 1) {\n return 0.5 * Math.pow(1024, k - 1);\n }\n return 0.5 * (-Math.pow(2, -10 * (k - 1)) + 2);\n },\n circularIn: function (k) {\n return 1 - Math.sqrt(1 - k * k);\n },\n circularOut: function (k) {\n return Math.sqrt(1 - --k * k);\n },\n circularInOut: function (k) {\n if ((k *= 2) < 1) {\n return -0.5 * (Math.sqrt(1 - k * k) - 1);\n }\n return 0.5 * (Math.sqrt(1 - (k -= 2) * k) + 1);\n },\n elasticIn: function (k) {\n var s;\n var a = 0.1;\n var p = 0.4;\n if (k === 0) {\n return 0;\n }\n if (k === 1) {\n return 1;\n }\n if (!a || a < 1) {\n a = 1;\n s = p / 4;\n } else {\n s = p * Math.asin(1 / a) / (2 * Math.PI);\n }\n return -(a * Math.pow(2, 10 * (k -= 1)) * Math.sin((k - s) * (2 * Math.PI) / p));\n },\n elasticOut: function (k) {\n var s;\n var a = 0.1;\n var p = 0.4;\n if (k === 0) {\n return 0;\n }\n if (k === 1) {\n return 1;\n }\n if (!a || a < 1) {\n a = 1;\n s = p / 4;\n } else {\n s = p * Math.asin(1 / a) / (2 * Math.PI);\n }\n return a * Math.pow(2, -10 * k) * Math.sin((k - s) * (2 * Math.PI) / p) + 1;\n },\n elasticInOut: function (k) {\n var s;\n var a = 0.1;\n var p = 0.4;\n if (k === 0) {\n return 0;\n }\n if (k === 1) {\n return 1;\n }\n if (!a || a < 1) {\n a = 1;\n s = p / 4;\n } else {\n s = p * Math.asin(1 / a) / (2 * Math.PI);\n }\n if ((k *= 2) < 1) {\n return -0.5 * (a * Math.pow(2, 10 * (k -= 1)) * Math.sin((k - s) * (2 * Math.PI) / p));\n }\n return a * Math.pow(2, -10 * (k -= 1)) * Math.sin((k - s) * (2 * Math.PI) / p) * 0.5 + 1;\n },\n backIn: function (k) {\n var s = 1.70158;\n return k * k * ((s + 1) * k - s);\n },\n backOut: function (k) {\n var s = 1.70158;\n return --k * k * ((s + 1) * k + s) + 1;\n },\n backInOut: function (k) {\n var s = 1.70158 * 1.525;\n if ((k *= 2) < 1) {\n return 0.5 * (k * k * ((s + 1) * k - s));\n }\n return 0.5 * ((k -= 2) * k * ((s + 1) * k + s) + 2);\n },\n bounceIn: function (k) {\n return 1 - easingFuncs.bounceOut(1 - k);\n },\n bounceOut: function (k) {\n if (k < 1 / 2.75) {\n return 7.5625 * k * k;\n } else if (k < 2 / 2.75) {\n return 7.5625 * (k -= 1.5 / 2.75) * k + 0.75;\n } else if (k < 2.5 / 2.75) {\n return 7.5625 * (k -= 2.25 / 2.75) * k + 0.9375;\n } else {\n return 7.5625 * (k -= 2.625 / 2.75) * k + 0.984375;\n }\n },\n bounceInOut: function (k) {\n if (k < 0.5) {\n return easingFuncs.bounceIn(k * 2) * 0.5;\n }\n return easingFuncs.bounceOut(k * 2 - 1) * 0.5 + 0.5;\n }\n};\nexport default easingFuncs;","import { create as v2Create, distSquare as v2DistSquare } from './vector.js';\nvar mathPow = Math.pow;\nvar mathSqrt = Math.sqrt;\nvar EPSILON = 1e-8;\nvar EPSILON_NUMERIC = 1e-4;\nvar THREE_SQRT = mathSqrt(3);\nvar ONE_THIRD = 1 / 3;\nvar _v0 = v2Create();\nvar _v1 = v2Create();\nvar _v2 = v2Create();\nfunction isAroundZero(val) {\n return val > -EPSILON && val < EPSILON;\n}\nfunction isNotAroundZero(val) {\n return val > EPSILON || val < -EPSILON;\n}\nexport function cubicAt(p0, p1, p2, p3, t) {\n var onet = 1 - t;\n return onet * onet * (onet * p0 + 3 * t * p1) + t * t * (t * p3 + 3 * onet * p2);\n}\nexport function cubicDerivativeAt(p0, p1, p2, p3, t) {\n var onet = 1 - t;\n return 3 * (((p1 - p0) * onet + 2 * (p2 - p1) * t) * onet + (p3 - p2) * t * t);\n}\nexport function cubicRootAt(p0, p1, p2, p3, val, roots) {\n var a = p3 + 3 * (p1 - p2) - p0;\n var b = 3 * (p2 - p1 * 2 + p0);\n var c = 3 * (p1 - p0);\n var d = p0 - val;\n var A = b * b - 3 * a * c;\n var B = b * c - 9 * a * d;\n var C = c * c - 3 * b * d;\n var n = 0;\n if (isAroundZero(A) && isAroundZero(B)) {\n if (isAroundZero(b)) {\n roots[0] = 0;\n } else {\n var t1 = -c / b;\n if (t1 >= 0 && t1 <= 1) {\n roots[n++] = t1;\n }\n }\n } else {\n var disc = B * B - 4 * A * C;\n if (isAroundZero(disc)) {\n var K = B / A;\n var t1 = -b / a + K;\n var t2 = -K / 2;\n if (t1 >= 0 && t1 <= 1) {\n roots[n++] = t1;\n }\n if (t2 >= 0 && t2 <= 1) {\n roots[n++] = t2;\n }\n } else if (disc > 0) {\n var discSqrt = mathSqrt(disc);\n var Y1 = A * b + 1.5 * a * (-B + discSqrt);\n var Y2 = A * b + 1.5 * a * (-B - discSqrt);\n if (Y1 < 0) {\n Y1 = -mathPow(-Y1, ONE_THIRD);\n } else {\n Y1 = mathPow(Y1, ONE_THIRD);\n }\n if (Y2 < 0) {\n Y2 = -mathPow(-Y2, ONE_THIRD);\n } else {\n Y2 = mathPow(Y2, ONE_THIRD);\n }\n var t1 = (-b - (Y1 + Y2)) / (3 * a);\n if (t1 >= 0 && t1 <= 1) {\n roots[n++] = t1;\n }\n } else {\n var T = (2 * A * b - 3 * a * B) / (2 * mathSqrt(A * A * A));\n var theta = Math.acos(T) / 3;\n var ASqrt = mathSqrt(A);\n var tmp = Math.cos(theta);\n var t1 = (-b - 2 * ASqrt * tmp) / (3 * a);\n var t2 = (-b + ASqrt * (tmp + THREE_SQRT * Math.sin(theta))) / (3 * a);\n var t3 = (-b + ASqrt * (tmp - THREE_SQRT * Math.sin(theta))) / (3 * a);\n if (t1 >= 0 && t1 <= 1) {\n roots[n++] = t1;\n }\n if (t2 >= 0 && t2 <= 1) {\n roots[n++] = t2;\n }\n if (t3 >= 0 && t3 <= 1) {\n roots[n++] = t3;\n }\n }\n }\n return n;\n}\nexport function cubicExtrema(p0, p1, p2, p3, extrema) {\n var b = 6 * p2 - 12 * p1 + 6 * p0;\n var a = 9 * p1 + 3 * p3 - 3 * p0 - 9 * p2;\n var c = 3 * p1 - 3 * p0;\n var n = 0;\n if (isAroundZero(a)) {\n if (isNotAroundZero(b)) {\n var t1 = -c / b;\n if (t1 >= 0 && t1 <= 1) {\n extrema[n++] = t1;\n }\n }\n } else {\n var disc = b * b - 4 * a * c;\n if (isAroundZero(disc)) {\n extrema[0] = -b / (2 * a);\n } else if (disc > 0) {\n var discSqrt = mathSqrt(disc);\n var t1 = (-b + discSqrt) / (2 * a);\n var t2 = (-b - discSqrt) / (2 * a);\n if (t1 >= 0 && t1 <= 1) {\n extrema[n++] = t1;\n }\n if (t2 >= 0 && t2 <= 1) {\n extrema[n++] = t2;\n }\n }\n }\n return n;\n}\nexport function cubicSubdivide(p0, p1, p2, p3, t, out) {\n var p01 = (p1 - p0) * t + p0;\n var p12 = (p2 - p1) * t + p1;\n var p23 = (p3 - p2) * t + p2;\n var p012 = (p12 - p01) * t + p01;\n var p123 = (p23 - p12) * t + p12;\n var p0123 = (p123 - p012) * t + p012;\n out[0] = p0;\n out[1] = p01;\n out[2] = p012;\n out[3] = p0123;\n out[4] = p0123;\n out[5] = p123;\n out[6] = p23;\n out[7] = p3;\n}\nexport function cubicProjectPoint(x0, y0, x1, y1, x2, y2, x3, y3, x, y, out) {\n var t;\n var interval = 0.005;\n var d = Infinity;\n var prev;\n var next;\n var d1;\n var d2;\n _v0[0] = x;\n _v0[1] = y;\n for (var _t = 0; _t < 1; _t += 0.05) {\n _v1[0] = cubicAt(x0, x1, x2, x3, _t);\n _v1[1] = cubicAt(y0, y1, y2, y3, _t);\n d1 = v2DistSquare(_v0, _v1);\n if (d1 < d) {\n t = _t;\n d = d1;\n }\n }\n d = Infinity;\n for (var i = 0; i < 32; i++) {\n if (interval < EPSILON_NUMERIC) {\n break;\n }\n prev = t - interval;\n next = t + interval;\n _v1[0] = cubicAt(x0, x1, x2, x3, prev);\n _v1[1] = cubicAt(y0, y1, y2, y3, prev);\n d1 = v2DistSquare(_v1, _v0);\n if (prev >= 0 && d1 < d) {\n t = prev;\n d = d1;\n } else {\n _v2[0] = cubicAt(x0, x1, x2, x3, next);\n _v2[1] = cubicAt(y0, y1, y2, y3, next);\n d2 = v2DistSquare(_v2, _v0);\n if (next <= 1 && d2 < d) {\n t = next;\n d = d2;\n } else {\n interval *= 0.5;\n }\n }\n }\n if (out) {\n out[0] = cubicAt(x0, x1, x2, x3, t);\n out[1] = cubicAt(y0, y1, y2, y3, t);\n }\n return mathSqrt(d);\n}\nexport function cubicLength(x0, y0, x1, y1, x2, y2, x3, y3, iteration) {\n var px = x0;\n var py = y0;\n var d = 0;\n var step = 1 / iteration;\n for (var i = 1; i <= iteration; i++) {\n var t = i * step;\n var x = cubicAt(x0, x1, x2, x3, t);\n var y = cubicAt(y0, y1, y2, y3, t);\n var dx = x - px;\n var dy = y - py;\n d += Math.sqrt(dx * dx + dy * dy);\n px = x;\n py = y;\n }\n return d;\n}\nexport function quadraticAt(p0, p1, p2, t) {\n var onet = 1 - t;\n return onet * (onet * p0 + 2 * t * p1) + t * t * p2;\n}\nexport function quadraticDerivativeAt(p0, p1, p2, t) {\n return 2 * ((1 - t) * (p1 - p0) + t * (p2 - p1));\n}\nexport function quadraticRootAt(p0, p1, p2, val, roots) {\n var a = p0 - 2 * p1 + p2;\n var b = 2 * (p1 - p0);\n var c = p0 - val;\n var n = 0;\n if (isAroundZero(a)) {\n if (isNotAroundZero(b)) {\n var t1 = -c / b;\n if (t1 >= 0 && t1 <= 1) {\n roots[n++] = t1;\n }\n }\n } else {\n var disc = b * b - 4 * a * c;\n if (isAroundZero(disc)) {\n var t1 = -b / (2 * a);\n if (t1 >= 0 && t1 <= 1) {\n roots[n++] = t1;\n }\n } else if (disc > 0) {\n var discSqrt = mathSqrt(disc);\n var t1 = (-b + discSqrt) / (2 * a);\n var t2 = (-b - discSqrt) / (2 * a);\n if (t1 >= 0 && t1 <= 1) {\n roots[n++] = t1;\n }\n if (t2 >= 0 && t2 <= 1) {\n roots[n++] = t2;\n }\n }\n }\n return n;\n}\nexport function quadraticExtremum(p0, p1, p2) {\n var divider = p0 + p2 - 2 * p1;\n if (divider === 0) {\n return 0.5;\n } else {\n return (p0 - p1) / divider;\n }\n}\nexport function quadraticSubdivide(p0, p1, p2, t, out) {\n var p01 = (p1 - p0) * t + p0;\n var p12 = (p2 - p1) * t + p1;\n var p012 = (p12 - p01) * t + p01;\n out[0] = p0;\n out[1] = p01;\n out[2] = p012;\n out[3] = p012;\n out[4] = p12;\n out[5] = p2;\n}\nexport function quadraticProjectPoint(x0, y0, x1, y1, x2, y2, x, y, out) {\n var t;\n var interval = 0.005;\n var d = Infinity;\n _v0[0] = x;\n _v0[1] = y;\n for (var _t = 0; _t < 1; _t += 0.05) {\n _v1[0] = quadraticAt(x0, x1, x2, _t);\n _v1[1] = quadraticAt(y0, y1, y2, _t);\n var d1 = v2DistSquare(_v0, _v1);\n if (d1 < d) {\n t = _t;\n d = d1;\n }\n }\n d = Infinity;\n for (var i = 0; i < 32; i++) {\n if (interval < EPSILON_NUMERIC) {\n break;\n }\n var prev = t - interval;\n var next = t + interval;\n _v1[0] = quadraticAt(x0, x1, x2, prev);\n _v1[1] = quadraticAt(y0, y1, y2, prev);\n var d1 = v2DistSquare(_v1, _v0);\n if (prev >= 0 && d1 < d) {\n t = prev;\n d = d1;\n } else {\n _v2[0] = quadraticAt(x0, x1, x2, next);\n _v2[1] = quadraticAt(y0, y1, y2, next);\n var d2 = v2DistSquare(_v2, _v0);\n if (next <= 1 && d2 < d) {\n t = next;\n d = d2;\n } else {\n interval *= 0.5;\n }\n }\n }\n if (out) {\n out[0] = quadraticAt(x0, x1, x2, t);\n out[1] = quadraticAt(y0, y1, y2, t);\n }\n return mathSqrt(d);\n}\nexport function quadraticLength(x0, y0, x1, y1, x2, y2, iteration) {\n var px = x0;\n var py = y0;\n var d = 0;\n var step = 1 / iteration;\n for (var i = 1; i <= iteration; i++) {\n var t = i * step;\n var x = quadraticAt(x0, x1, x2, t);\n var y = quadraticAt(y0, y1, y2, t);\n var dx = x - px;\n var dy = y - py;\n d += Math.sqrt(dx * dx + dy * dy);\n px = x;\n py = y;\n }\n return d;\n}","import { cubicAt, cubicRootAt } from '../core/curve.js';\nimport { trim } from '../core/util.js';\nvar regexp = /cubic-bezier\\(([0-9,\\.e ]+)\\)/;\nexport function createCubicEasingFunc(cubicEasingStr) {\n var cubic = cubicEasingStr && regexp.exec(cubicEasingStr);\n if (cubic) {\n var points = cubic[1].split(',');\n var a_1 = +trim(points[0]);\n var b_1 = +trim(points[1]);\n var c_1 = +trim(points[2]);\n var d_1 = +trim(points[3]);\n if (isNaN(a_1 + b_1 + c_1 + d_1)) {\n return;\n }\n var roots_1 = [];\n return function (p) {\n return p <= 0 ? 0 : p >= 1 ? 1 : cubicRootAt(0, a_1, c_1, 1, p, roots_1) && cubicAt(0, b_1, d_1, 1, roots_1[0]);\n };\n }\n}","import easingFuncs from './easing.js';\nimport { isFunction, noop } from '../core/util.js';\nimport { createCubicEasingFunc } from './cubicEasing.js';\nvar Clip = function () {\n function Clip(opts) {\n this._inited = false;\n this._startTime = 0;\n this._pausedTime = 0;\n this._paused = false;\n this._life = opts.life || 1000;\n this._delay = opts.delay || 0;\n this.loop = opts.loop || false;\n this.onframe = opts.onframe || noop;\n this.ondestroy = opts.ondestroy || noop;\n this.onrestart = opts.onrestart || noop;\n opts.easing && this.setEasing(opts.easing);\n }\n Clip.prototype.step = function (globalTime, deltaTime) {\n if (!this._inited) {\n this._startTime = globalTime + this._delay;\n this._inited = true;\n }\n if (this._paused) {\n this._pausedTime += deltaTime;\n return;\n }\n var life = this._life;\n var elapsedTime = globalTime - this._startTime - this._pausedTime;\n var percent = elapsedTime / life;\n if (percent < 0) {\n percent = 0;\n }\n percent = Math.min(percent, 1);\n var easingFunc = this.easingFunc;\n var schedule = easingFunc ? easingFunc(percent) : percent;\n this.onframe(schedule);\n if (percent === 1) {\n if (this.loop) {\n var remainder = elapsedTime % life;\n this._startTime = globalTime - remainder;\n this._pausedTime = 0;\n this.onrestart();\n } else {\n return true;\n }\n }\n return false;\n };\n Clip.prototype.pause = function () {\n this._paused = true;\n };\n Clip.prototype.resume = function () {\n this._paused = false;\n };\n Clip.prototype.setEasing = function (easing) {\n this.easing = easing;\n this.easingFunc = isFunction(easing) ? easing : easingFuncs[easing] || createCubicEasingFunc(easing);\n };\n return Clip;\n}();\nexport default Clip;","import LRU from '../core/LRU.js';\nimport { extend, isGradientObject, isString, map } from '../core/util.js';\nvar kCSSColorTable = {\n 'transparent': [0, 0, 0, 0],\n 'aliceblue': [240, 248, 255, 1],\n 'antiquewhite': [250, 235, 215, 1],\n 'aqua': [0, 255, 255, 1],\n 'aquamarine': [127, 255, 212, 1],\n 'azure': [240, 255, 255, 1],\n 'beige': [245, 245, 220, 1],\n 'bisque': [255, 228, 196, 1],\n 'black': [0, 0, 0, 1],\n 'blanchedalmond': [255, 235, 205, 1],\n 'blue': [0, 0, 255, 1],\n 'blueviolet': [138, 43, 226, 1],\n 'brown': [165, 42, 42, 1],\n 'burlywood': [222, 184, 135, 1],\n 'cadetblue': [95, 158, 160, 1],\n 'chartreuse': [127, 255, 0, 1],\n 'chocolate': [210, 105, 30, 1],\n 'coral': [255, 127, 80, 1],\n 'cornflowerblue': [100, 149, 237, 1],\n 'cornsilk': [255, 248, 220, 1],\n 'crimson': [220, 20, 60, 1],\n 'cyan': [0, 255, 255, 1],\n 'darkblue': [0, 0, 139, 1],\n 'darkcyan': [0, 139, 139, 1],\n 'darkgoldenrod': [184, 134, 11, 1],\n 'darkgray': [169, 169, 169, 1],\n 'darkgreen': [0, 100, 0, 1],\n 'darkgrey': [169, 169, 169, 1],\n 'darkkhaki': [189, 183, 107, 1],\n 'darkmagenta': [139, 0, 139, 1],\n 'darkolivegreen': [85, 107, 47, 1],\n 'darkorange': [255, 140, 0, 1],\n 'darkorchid': [153, 50, 204, 1],\n 'darkred': [139, 0, 0, 1],\n 'darksalmon': [233, 150, 122, 1],\n 'darkseagreen': [143, 188, 143, 1],\n 'darkslateblue': [72, 61, 139, 1],\n 'darkslategray': [47, 79, 79, 1],\n 'darkslategrey': [47, 79, 79, 1],\n 'darkturquoise': [0, 206, 209, 1],\n 'darkviolet': [148, 0, 211, 1],\n 'deeppink': [255, 20, 147, 1],\n 'deepskyblue': [0, 191, 255, 1],\n 'dimgray': [105, 105, 105, 1],\n 'dimgrey': [105, 105, 105, 1],\n 'dodgerblue': [30, 144, 255, 1],\n 'firebrick': [178, 34, 34, 1],\n 'floralwhite': [255, 250, 240, 1],\n 'forestgreen': [34, 139, 34, 1],\n 'fuchsia': [255, 0, 255, 1],\n 'gainsboro': [220, 220, 220, 1],\n 'ghostwhite': [248, 248, 255, 1],\n 'gold': [255, 215, 0, 1],\n 'goldenrod': [218, 165, 32, 1],\n 'gray': [128, 128, 128, 1],\n 'green': [0, 128, 0, 1],\n 'greenyellow': [173, 255, 47, 1],\n 'grey': [128, 128, 128, 1],\n 'honeydew': [240, 255, 240, 1],\n 'hotpink': [255, 105, 180, 1],\n 'indianred': [205, 92, 92, 1],\n 'indigo': [75, 0, 130, 1],\n 'ivory': [255, 255, 240, 1],\n 'khaki': [240, 230, 140, 1],\n 'lavender': [230, 230, 250, 1],\n 'lavenderblush': [255, 240, 245, 1],\n 'lawngreen': [124, 252, 0, 1],\n 'lemonchiffon': [255, 250, 205, 1],\n 'lightblue': [173, 216, 230, 1],\n 'lightcoral': [240, 128, 128, 1],\n 'lightcyan': [224, 255, 255, 1],\n 'lightgoldenrodyellow': [250, 250, 210, 1],\n 'lightgray': [211, 211, 211, 1],\n 'lightgreen': [144, 238, 144, 1],\n 'lightgrey': [211, 211, 211, 1],\n 'lightpink': [255, 182, 193, 1],\n 'lightsalmon': [255, 160, 122, 1],\n 'lightseagreen': [32, 178, 170, 1],\n 'lightskyblue': [135, 206, 250, 1],\n 'lightslategray': [119, 136, 153, 1],\n 'lightslategrey': [119, 136, 153, 1],\n 'lightsteelblue': [176, 196, 222, 1],\n 'lightyellow': [255, 255, 224, 1],\n 'lime': [0, 255, 0, 1],\n 'limegreen': [50, 205, 50, 1],\n 'linen': [250, 240, 230, 1],\n 'magenta': [255, 0, 255, 1],\n 'maroon': [128, 0, 0, 1],\n 'mediumaquamarine': [102, 205, 170, 1],\n 'mediumblue': [0, 0, 205, 1],\n 'mediumorchid': [186, 85, 211, 1],\n 'mediumpurple': [147, 112, 219, 1],\n 'mediumseagreen': [60, 179, 113, 1],\n 'mediumslateblue': [123, 104, 238, 1],\n 'mediumspringgreen': [0, 250, 154, 1],\n 'mediumturquoise': [72, 209, 204, 1],\n 'mediumvioletred': [199, 21, 133, 1],\n 'midnightblue': [25, 25, 112, 1],\n 'mintcream': [245, 255, 250, 1],\n 'mistyrose': [255, 228, 225, 1],\n 'moccasin': [255, 228, 181, 1],\n 'navajowhite': [255, 222, 173, 1],\n 'navy': [0, 0, 128, 1],\n 'oldlace': [253, 245, 230, 1],\n 'olive': [128, 128, 0, 1],\n 'olivedrab': [107, 142, 35, 1],\n 'orange': [255, 165, 0, 1],\n 'orangered': [255, 69, 0, 1],\n 'orchid': [218, 112, 214, 1],\n 'palegoldenrod': [238, 232, 170, 1],\n 'palegreen': [152, 251, 152, 1],\n 'paleturquoise': [175, 238, 238, 1],\n 'palevioletred': [219, 112, 147, 1],\n 'papayawhip': [255, 239, 213, 1],\n 'peachpuff': [255, 218, 185, 1],\n 'peru': [205, 133, 63, 1],\n 'pink': [255, 192, 203, 1],\n 'plum': [221, 160, 221, 1],\n 'powderblue': [176, 224, 230, 1],\n 'purple': [128, 0, 128, 1],\n 'red': [255, 0, 0, 1],\n 'rosybrown': [188, 143, 143, 1],\n 'royalblue': [65, 105, 225, 1],\n 'saddlebrown': [139, 69, 19, 1],\n 'salmon': [250, 128, 114, 1],\n 'sandybrown': [244, 164, 96, 1],\n 'seagreen': [46, 139, 87, 1],\n 'seashell': [255, 245, 238, 1],\n 'sienna': [160, 82, 45, 1],\n 'silver': [192, 192, 192, 1],\n 'skyblue': [135, 206, 235, 1],\n 'slateblue': [106, 90, 205, 1],\n 'slategray': [112, 128, 144, 1],\n 'slategrey': [112, 128, 144, 1],\n 'snow': [255, 250, 250, 1],\n 'springgreen': [0, 255, 127, 1],\n 'steelblue': [70, 130, 180, 1],\n 'tan': [210, 180, 140, 1],\n 'teal': [0, 128, 128, 1],\n 'thistle': [216, 191, 216, 1],\n 'tomato': [255, 99, 71, 1],\n 'turquoise': [64, 224, 208, 1],\n 'violet': [238, 130, 238, 1],\n 'wheat': [245, 222, 179, 1],\n 'white': [255, 255, 255, 1],\n 'whitesmoke': [245, 245, 245, 1],\n 'yellow': [255, 255, 0, 1],\n 'yellowgreen': [154, 205, 50, 1]\n};\nfunction clampCssByte(i) {\n i = Math.round(i);\n return i < 0 ? 0 : i > 255 ? 255 : i;\n}\nfunction clampCssAngle(i) {\n i = Math.round(i);\n return i < 0 ? 0 : i > 360 ? 360 : i;\n}\nfunction clampCssFloat(f) {\n return f < 0 ? 0 : f > 1 ? 1 : f;\n}\nfunction parseCssInt(val) {\n var str = val;\n if (str.length && str.charAt(str.length - 1) === '%') {\n return clampCssByte(parseFloat(str) / 100 * 255);\n }\n return clampCssByte(parseInt(str, 10));\n}\nfunction parseCssFloat(val) {\n var str = val;\n if (str.length && str.charAt(str.length - 1) === '%') {\n return clampCssFloat(parseFloat(str) / 100);\n }\n return clampCssFloat(parseFloat(str));\n}\nfunction cssHueToRgb(m1, m2, h) {\n if (h < 0) {\n h += 1;\n } else if (h > 1) {\n h -= 1;\n }\n if (h * 6 < 1) {\n return m1 + (m2 - m1) * h * 6;\n }\n if (h * 2 < 1) {\n return m2;\n }\n if (h * 3 < 2) {\n return m1 + (m2 - m1) * (2 / 3 - h) * 6;\n }\n return m1;\n}\nfunction lerpNumber(a, b, p) {\n return a + (b - a) * p;\n}\nfunction setRgba(out, r, g, b, a) {\n out[0] = r;\n out[1] = g;\n out[2] = b;\n out[3] = a;\n return out;\n}\nfunction copyRgba(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n}\nvar colorCache = new LRU(20);\nvar lastRemovedArr = null;\nfunction putToCache(colorStr, rgbaArr) {\n if (lastRemovedArr) {\n copyRgba(lastRemovedArr, rgbaArr);\n }\n lastRemovedArr = colorCache.put(colorStr, lastRemovedArr || rgbaArr.slice());\n}\nexport function parse(colorStr, rgbaArr) {\n if (!colorStr) {\n return;\n }\n rgbaArr = rgbaArr || [];\n var cached = colorCache.get(colorStr);\n if (cached) {\n return copyRgba(rgbaArr, cached);\n }\n colorStr = colorStr + '';\n var str = colorStr.replace(/ /g, '').toLowerCase();\n if (str in kCSSColorTable) {\n copyRgba(rgbaArr, kCSSColorTable[str]);\n putToCache(colorStr, rgbaArr);\n return rgbaArr;\n }\n var strLen = str.length;\n if (str.charAt(0) === '#') {\n if (strLen === 4 || strLen === 5) {\n var iv = parseInt(str.slice(1, 4), 16);\n if (!(iv >= 0 && iv <= 0xfff)) {\n setRgba(rgbaArr, 0, 0, 0, 1);\n return;\n }\n setRgba(rgbaArr, (iv & 0xf00) >> 4 | (iv & 0xf00) >> 8, iv & 0xf0 | (iv & 0xf0) >> 4, iv & 0xf | (iv & 0xf) << 4, strLen === 5 ? parseInt(str.slice(4), 16) / 0xf : 1);\n putToCache(colorStr, rgbaArr);\n return rgbaArr;\n } else if (strLen === 7 || strLen === 9) {\n var iv = parseInt(str.slice(1, 7), 16);\n if (!(iv >= 0 && iv <= 0xffffff)) {\n setRgba(rgbaArr, 0, 0, 0, 1);\n return;\n }\n setRgba(rgbaArr, (iv & 0xff0000) >> 16, (iv & 0xff00) >> 8, iv & 0xff, strLen === 9 ? parseInt(str.slice(7), 16) / 0xff : 1);\n putToCache(colorStr, rgbaArr);\n return rgbaArr;\n }\n return;\n }\n var op = str.indexOf('(');\n var ep = str.indexOf(')');\n if (op !== -1 && ep + 1 === strLen) {\n var fname = str.substr(0, op);\n var params = str.substr(op + 1, ep - (op + 1)).split(',');\n var alpha = 1;\n switch (fname) {\n case 'rgba':\n if (params.length !== 4) {\n return params.length === 3 ? setRgba(rgbaArr, +params[0], +params[1], +params[2], 1) : setRgba(rgbaArr, 0, 0, 0, 1);\n }\n alpha = parseCssFloat(params.pop());\n case 'rgb':\n if (params.length >= 3) {\n setRgba(rgbaArr, parseCssInt(params[0]), parseCssInt(params[1]), parseCssInt(params[2]), params.length === 3 ? alpha : parseCssFloat(params[3]));\n putToCache(colorStr, rgbaArr);\n return rgbaArr;\n } else {\n setRgba(rgbaArr, 0, 0, 0, 1);\n return;\n }\n case 'hsla':\n if (params.length !== 4) {\n setRgba(rgbaArr, 0, 0, 0, 1);\n return;\n }\n params[3] = parseCssFloat(params[3]);\n hsla2rgba(params, rgbaArr);\n putToCache(colorStr, rgbaArr);\n return rgbaArr;\n case 'hsl':\n if (params.length !== 3) {\n setRgba(rgbaArr, 0, 0, 0, 1);\n return;\n }\n hsla2rgba(params, rgbaArr);\n putToCache(colorStr, rgbaArr);\n return rgbaArr;\n default:\n return;\n }\n }\n setRgba(rgbaArr, 0, 0, 0, 1);\n return;\n}\nfunction hsla2rgba(hsla, rgba) {\n var h = (parseFloat(hsla[0]) % 360 + 360) % 360 / 360;\n var s = parseCssFloat(hsla[1]);\n var l = parseCssFloat(hsla[2]);\n var m2 = l <= 0.5 ? l * (s + 1) : l + s - l * s;\n var m1 = l * 2 - m2;\n rgba = rgba || [];\n setRgba(rgba, clampCssByte(cssHueToRgb(m1, m2, h + 1 / 3) * 255), clampCssByte(cssHueToRgb(m1, m2, h) * 255), clampCssByte(cssHueToRgb(m1, m2, h - 1 / 3) * 255), 1);\n if (hsla.length === 4) {\n rgba[3] = hsla[3];\n }\n return rgba;\n}\nfunction rgba2hsla(rgba) {\n if (!rgba) {\n return;\n }\n var R = rgba[0] / 255;\n var G = rgba[1] / 255;\n var B = rgba[2] / 255;\n var vMin = Math.min(R, G, B);\n var vMax = Math.max(R, G, B);\n var delta = vMax - vMin;\n var L = (vMax + vMin) / 2;\n var H;\n var S;\n if (delta === 0) {\n H = 0;\n S = 0;\n } else {\n if (L < 0.5) {\n S = delta / (vMax + vMin);\n } else {\n S = delta / (2 - vMax - vMin);\n }\n var deltaR = ((vMax - R) / 6 + delta / 2) / delta;\n var deltaG = ((vMax - G) / 6 + delta / 2) / delta;\n var deltaB = ((vMax - B) / 6 + delta / 2) / delta;\n if (R === vMax) {\n H = deltaB - deltaG;\n } else if (G === vMax) {\n H = 1 / 3 + deltaR - deltaB;\n } else if (B === vMax) {\n H = 2 / 3 + deltaG - deltaR;\n }\n if (H < 0) {\n H += 1;\n }\n if (H > 1) {\n H -= 1;\n }\n }\n var hsla = [H * 360, S, L];\n if (rgba[3] != null) {\n hsla.push(rgba[3]);\n }\n return hsla;\n}\nexport function lift(color, level) {\n var colorArr = parse(color);\n if (colorArr) {\n for (var i = 0; i < 3; i++) {\n if (level < 0) {\n colorArr[i] = colorArr[i] * (1 - level) | 0;\n } else {\n colorArr[i] = (255 - colorArr[i]) * level + colorArr[i] | 0;\n }\n if (colorArr[i] > 255) {\n colorArr[i] = 255;\n } else if (colorArr[i] < 0) {\n colorArr[i] = 0;\n }\n }\n return stringify(colorArr, colorArr.length === 4 ? 'rgba' : 'rgb');\n }\n}\nexport function toHex(color) {\n var colorArr = parse(color);\n if (colorArr) {\n return ((1 << 24) + (colorArr[0] << 16) + (colorArr[1] << 8) + +colorArr[2]).toString(16).slice(1);\n }\n}\nexport function fastLerp(normalizedValue, colors, out) {\n if (!(colors && colors.length) || !(normalizedValue >= 0 && normalizedValue <= 1)) {\n return;\n }\n out = out || [];\n var value = normalizedValue * (colors.length - 1);\n var leftIndex = Math.floor(value);\n var rightIndex = Math.ceil(value);\n var leftColor = colors[leftIndex];\n var rightColor = colors[rightIndex];\n var dv = value - leftIndex;\n out[0] = clampCssByte(lerpNumber(leftColor[0], rightColor[0], dv));\n out[1] = clampCssByte(lerpNumber(leftColor[1], rightColor[1], dv));\n out[2] = clampCssByte(lerpNumber(leftColor[2], rightColor[2], dv));\n out[3] = clampCssFloat(lerpNumber(leftColor[3], rightColor[3], dv));\n return out;\n}\nexport var fastMapToColor = fastLerp;\nexport function lerp(normalizedValue, colors, fullOutput) {\n if (!(colors && colors.length) || !(normalizedValue >= 0 && normalizedValue <= 1)) {\n return;\n }\n var value = normalizedValue * (colors.length - 1);\n var leftIndex = Math.floor(value);\n var rightIndex = Math.ceil(value);\n var leftColor = parse(colors[leftIndex]);\n var rightColor = parse(colors[rightIndex]);\n var dv = value - leftIndex;\n var color = stringify([clampCssByte(lerpNumber(leftColor[0], rightColor[0], dv)), clampCssByte(lerpNumber(leftColor[1], rightColor[1], dv)), clampCssByte(lerpNumber(leftColor[2], rightColor[2], dv)), clampCssFloat(lerpNumber(leftColor[3], rightColor[3], dv))], 'rgba');\n return fullOutput ? {\n color: color,\n leftIndex: leftIndex,\n rightIndex: rightIndex,\n value: value\n } : color;\n}\nexport var mapToColor = lerp;\nexport function modifyHSL(color, h, s, l) {\n var colorArr = parse(color);\n if (color) {\n colorArr = rgba2hsla(colorArr);\n h != null && (colorArr[0] = clampCssAngle(h));\n s != null && (colorArr[1] = parseCssFloat(s));\n l != null && (colorArr[2] = parseCssFloat(l));\n return stringify(hsla2rgba(colorArr), 'rgba');\n }\n}\nexport function modifyAlpha(color, alpha) {\n var colorArr = parse(color);\n if (colorArr && alpha != null) {\n colorArr[3] = clampCssFloat(alpha);\n return stringify(colorArr, 'rgba');\n }\n}\nexport function stringify(arrColor, type) {\n if (!arrColor || !arrColor.length) {\n return;\n }\n var colorStr = arrColor[0] + ',' + arrColor[1] + ',' + arrColor[2];\n if (type === 'rgba' || type === 'hsva' || type === 'hsla') {\n colorStr += ',' + arrColor[3];\n }\n return type + '(' + colorStr + ')';\n}\nexport function lum(color, backgroundLum) {\n var arr = parse(color);\n return arr ? (0.299 * arr[0] + 0.587 * arr[1] + 0.114 * arr[2]) * arr[3] / 255 + (1 - arr[3]) * backgroundLum : 0;\n}\nexport function random() {\n return stringify([Math.round(Math.random() * 255), Math.round(Math.random() * 255), Math.round(Math.random() * 255)], 'rgb');\n}\nvar liftedColorCache = new LRU(100);\nexport function liftColor(color) {\n if (isString(color)) {\n var liftedColor = liftedColorCache.get(color);\n if (!liftedColor) {\n liftedColor = lift(color, -0.1);\n liftedColorCache.put(color, liftedColor);\n }\n return liftedColor;\n } else if (isGradientObject(color)) {\n var ret = extend({}, color);\n ret.colorStops = map(color.colorStops, function (stop) {\n return {\n offset: stop.offset,\n color: lift(stop.color, -0.1)\n };\n });\n return ret;\n }\n return color;\n}","var Entry = function () {\n function Entry(val) {\n this.value = val;\n }\n return Entry;\n}();\nexport { Entry };\nvar LinkedList = function () {\n function LinkedList() {\n this._len = 0;\n }\n LinkedList.prototype.insert = function (val) {\n var entry = new Entry(val);\n this.insertEntry(entry);\n return entry;\n };\n LinkedList.prototype.insertEntry = function (entry) {\n if (!this.head) {\n this.head = this.tail = entry;\n } else {\n this.tail.next = entry;\n entry.prev = this.tail;\n entry.next = null;\n this.tail = entry;\n }\n this._len++;\n };\n LinkedList.prototype.remove = function (entry) {\n var prev = entry.prev;\n var next = entry.next;\n if (prev) {\n prev.next = next;\n } else {\n this.head = next;\n }\n if (next) {\n next.prev = prev;\n } else {\n this.tail = prev;\n }\n entry.next = entry.prev = null;\n this._len--;\n };\n LinkedList.prototype.len = function () {\n return this._len;\n };\n LinkedList.prototype.clear = function () {\n this.head = this.tail = null;\n this._len = 0;\n };\n return LinkedList;\n}();\nexport { LinkedList };\nvar LRU = function () {\n function LRU(maxSize) {\n this._list = new LinkedList();\n this._maxSize = 10;\n this._map = {};\n this._maxSize = maxSize;\n }\n LRU.prototype.put = function (key, value) {\n var list = this._list;\n var map = this._map;\n var removed = null;\n if (map[key] == null) {\n var len = list.len();\n var entry = this._lastRemovedEntry;\n if (len >= this._maxSize && len > 0) {\n var leastUsedEntry = list.head;\n list.remove(leastUsedEntry);\n delete map[leastUsedEntry.key];\n removed = leastUsedEntry.value;\n this._lastRemovedEntry = leastUsedEntry;\n }\n if (entry) {\n entry.value = value;\n } else {\n entry = new Entry(value);\n }\n entry.key = key;\n list.insertEntry(entry);\n map[key] = entry;\n }\n return removed;\n };\n LRU.prototype.get = function (key) {\n var entry = this._map[key];\n var list = this._list;\n if (entry != null) {\n if (entry !== list.tail) {\n list.remove(entry);\n list.insertEntry(entry);\n }\n return entry.value;\n }\n };\n LRU.prototype.clear = function () {\n this._list.clear();\n this._map = {};\n };\n LRU.prototype.len = function () {\n return this._list.len();\n };\n return LRU;\n}();\nexport default LRU;","import { RADIAN_TO_DEGREE, retrieve2, logError, isFunction } from '../core/util.js';\nimport { parse } from '../tool/color.js';\nimport env from '../core/env.js';\nvar mathRound = Math.round;\nexport function normalizeColor(color) {\n var opacity;\n if (!color || color === 'transparent') {\n color = 'none';\n } else if (typeof color === 'string' && color.indexOf('rgba') > -1) {\n var arr = parse(color);\n if (arr) {\n color = 'rgb(' + arr[0] + ',' + arr[1] + ',' + arr[2] + ')';\n opacity = arr[3];\n }\n }\n return {\n color: color,\n opacity: opacity == null ? 1 : opacity\n };\n}\nvar EPSILON = 1e-4;\nexport function isAroundZero(transform) {\n return transform < EPSILON && transform > -EPSILON;\n}\nexport function round3(transform) {\n return mathRound(transform * 1e3) / 1e3;\n}\nexport function round4(transform) {\n return mathRound(transform * 1e4) / 1e4;\n}\nexport function round1(transform) {\n return mathRound(transform * 10) / 10;\n}\nexport function getMatrixStr(m) {\n return 'matrix(' + round3(m[0]) + ',' + round3(m[1]) + ',' + round3(m[2]) + ',' + round3(m[3]) + ',' + round4(m[4]) + ',' + round4(m[5]) + ')';\n}\nexport var TEXT_ALIGN_TO_ANCHOR = {\n left: 'start',\n right: 'end',\n center: 'middle',\n middle: 'middle'\n};\nexport function adjustTextY(y, lineHeight, textBaseline) {\n if (textBaseline === 'top') {\n y += lineHeight / 2;\n } else if (textBaseline === 'bottom') {\n y -= lineHeight / 2;\n }\n return y;\n}\nexport function hasShadow(style) {\n return style && (style.shadowBlur || style.shadowOffsetX || style.shadowOffsetY);\n}\nexport function getShadowKey(displayable) {\n var style = displayable.style;\n var globalScale = displayable.getGlobalScale();\n return [style.shadowColor, (style.shadowBlur || 0).toFixed(2), (style.shadowOffsetX || 0).toFixed(2), (style.shadowOffsetY || 0).toFixed(2), globalScale[0], globalScale[1]].join(',');\n}\nexport function getClipPathsKey(clipPaths) {\n var key = [];\n if (clipPaths) {\n for (var i = 0; i < clipPaths.length; i++) {\n var clipPath = clipPaths[i];\n key.push(clipPath.id);\n }\n }\n return key.join(',');\n}\nexport function isImagePattern(val) {\n return val && !!val.image;\n}\nexport function isSVGPattern(val) {\n return val && !!val.svgElement;\n}\nexport function isPattern(val) {\n return isImagePattern(val) || isSVGPattern(val);\n}\nexport function isLinearGradient(val) {\n return val.type === 'linear';\n}\nexport function isRadialGradient(val) {\n return val.type === 'radial';\n}\nexport function isGradient(val) {\n return val && (val.type === 'linear' || val.type === 'radial');\n}\nexport function getIdURL(id) {\n return \"url(#\" + id + \")\";\n}\nexport function getPathPrecision(el) {\n var scale = el.getGlobalScale();\n var size = Math.max(scale[0], scale[1]);\n return Math.max(Math.ceil(Math.log(size) / Math.log(10)), 1);\n}\nexport function getSRTTransformString(transform) {\n var x = transform.x || 0;\n var y = transform.y || 0;\n var rotation = (transform.rotation || 0) * RADIAN_TO_DEGREE;\n var scaleX = retrieve2(transform.scaleX, 1);\n var scaleY = retrieve2(transform.scaleY, 1);\n var skewX = transform.skewX || 0;\n var skewY = transform.skewY || 0;\n var res = [];\n if (x || y) {\n res.push(\"translate(\" + x + \"px,\" + y + \"px)\");\n }\n if (rotation) {\n res.push(\"rotate(\" + rotation + \")\");\n }\n if (scaleX !== 1 || scaleY !== 1) {\n res.push(\"scale(\" + scaleX + \",\" + scaleY + \")\");\n }\n if (skewX || skewY) {\n res.push(\"skew(\" + mathRound(skewX * RADIAN_TO_DEGREE) + \"deg, \" + mathRound(skewY * RADIAN_TO_DEGREE) + \"deg)\");\n }\n return res.join(' ');\n}\nexport var encodeBase64 = function () {\n if (env.hasGlobalWindow && isFunction(window.btoa)) {\n return function (str) {\n return window.btoa(unescape(encodeURIComponent(str)));\n };\n }\n if (typeof Buffer !== 'undefined') {\n return function (str) {\n return Buffer.from(str).toString('base64');\n };\n }\n return function (str) {\n if (process.env.NODE_ENV !== 'production') {\n logError('Base64 isn\\'t natively supported in the current environment.');\n }\n return null;\n };\n}();","import Clip from './Clip.js';\nimport * as color from '../tool/color.js';\nimport { eqNaN, extend, isArrayLike, isFunction, isGradientObject, isNumber, isString, keys, logError, map } from '../core/util.js';\nimport easingFuncs from './easing.js';\nimport { createCubicEasingFunc } from './cubicEasing.js';\nimport { isLinearGradient, isRadialGradient } from '../svg/helper.js';\n;\nvar arraySlice = Array.prototype.slice;\nfunction interpolateNumber(p0, p1, percent) {\n return (p1 - p0) * percent + p0;\n}\nfunction interpolate1DArray(out, p0, p1, percent) {\n var len = p0.length;\n for (var i = 0; i < len; i++) {\n out[i] = interpolateNumber(p0[i], p1[i], percent);\n }\n return out;\n}\nfunction interpolate2DArray(out, p0, p1, percent) {\n var len = p0.length;\n var len2 = len && p0[0].length;\n for (var i = 0; i < len; i++) {\n if (!out[i]) {\n out[i] = [];\n }\n for (var j = 0; j < len2; j++) {\n out[i][j] = interpolateNumber(p0[i][j], p1[i][j], percent);\n }\n }\n return out;\n}\nfunction add1DArray(out, p0, p1, sign) {\n var len = p0.length;\n for (var i = 0; i < len; i++) {\n out[i] = p0[i] + p1[i] * sign;\n }\n return out;\n}\nfunction add2DArray(out, p0, p1, sign) {\n var len = p0.length;\n var len2 = len && p0[0].length;\n for (var i = 0; i < len; i++) {\n if (!out[i]) {\n out[i] = [];\n }\n for (var j = 0; j < len2; j++) {\n out[i][j] = p0[i][j] + p1[i][j] * sign;\n }\n }\n return out;\n}\nfunction fillColorStops(val0, val1) {\n var len0 = val0.length;\n var len1 = val1.length;\n var shorterArr = len0 > len1 ? val1 : val0;\n var shorterLen = Math.min(len0, len1);\n var last = shorterArr[shorterLen - 1] || {\n color: [0, 0, 0, 0],\n offset: 0\n };\n for (var i = shorterLen; i < Math.max(len0, len1); i++) {\n shorterArr.push({\n offset: last.offset,\n color: last.color.slice()\n });\n }\n}\nfunction fillArray(val0, val1, arrDim) {\n var arr0 = val0;\n var arr1 = val1;\n if (!arr0.push || !arr1.push) {\n return;\n }\n var arr0Len = arr0.length;\n var arr1Len = arr1.length;\n if (arr0Len !== arr1Len) {\n var isPreviousLarger = arr0Len > arr1Len;\n if (isPreviousLarger) {\n arr0.length = arr1Len;\n } else {\n for (var i = arr0Len; i < arr1Len; i++) {\n arr0.push(arrDim === 1 ? arr1[i] : arraySlice.call(arr1[i]));\n }\n }\n }\n var len2 = arr0[0] && arr0[0].length;\n for (var i = 0; i < arr0.length; i++) {\n if (arrDim === 1) {\n if (isNaN(arr0[i])) {\n arr0[i] = arr1[i];\n }\n } else {\n for (var j = 0; j < len2; j++) {\n if (isNaN(arr0[i][j])) {\n arr0[i][j] = arr1[i][j];\n }\n }\n }\n }\n}\nexport function cloneValue(value) {\n if (isArrayLike(value)) {\n var len = value.length;\n if (isArrayLike(value[0])) {\n var ret = [];\n for (var i = 0; i < len; i++) {\n ret.push(arraySlice.call(value[i]));\n }\n return ret;\n }\n return arraySlice.call(value);\n }\n return value;\n}\nfunction rgba2String(rgba) {\n rgba[0] = Math.floor(rgba[0]) || 0;\n rgba[1] = Math.floor(rgba[1]) || 0;\n rgba[2] = Math.floor(rgba[2]) || 0;\n rgba[3] = rgba[3] == null ? 1 : rgba[3];\n return 'rgba(' + rgba.join(',') + ')';\n}\nfunction guessArrayDim(value) {\n return isArrayLike(value && value[0]) ? 2 : 1;\n}\nvar VALUE_TYPE_NUMBER = 0;\nvar VALUE_TYPE_1D_ARRAY = 1;\nvar VALUE_TYPE_2D_ARRAY = 2;\nvar VALUE_TYPE_COLOR = 3;\nvar VALUE_TYPE_LINEAR_GRADIENT = 4;\nvar VALUE_TYPE_RADIAL_GRADIENT = 5;\nvar VALUE_TYPE_UNKOWN = 6;\nfunction isGradientValueType(valType) {\n return valType === VALUE_TYPE_LINEAR_GRADIENT || valType === VALUE_TYPE_RADIAL_GRADIENT;\n}\nfunction isArrayValueType(valType) {\n return valType === VALUE_TYPE_1D_ARRAY || valType === VALUE_TYPE_2D_ARRAY;\n}\nvar tmpRgba = [0, 0, 0, 0];\nvar Track = function () {\n function Track(propName) {\n this.keyframes = [];\n this.discrete = false;\n this._invalid = false;\n this._needsSort = false;\n this._lastFr = 0;\n this._lastFrP = 0;\n this.propName = propName;\n }\n Track.prototype.isFinished = function () {\n return this._finished;\n };\n Track.prototype.setFinished = function () {\n this._finished = true;\n if (this._additiveTrack) {\n this._additiveTrack.setFinished();\n }\n };\n Track.prototype.needsAnimate = function () {\n return this.keyframes.length >= 1;\n };\n Track.prototype.getAdditiveTrack = function () {\n return this._additiveTrack;\n };\n Track.prototype.addKeyframe = function (time, rawValue, easing) {\n this._needsSort = true;\n var keyframes = this.keyframes;\n var len = keyframes.length;\n var discrete = false;\n var valType = VALUE_TYPE_UNKOWN;\n var value = rawValue;\n if (isArrayLike(rawValue)) {\n var arrayDim = guessArrayDim(rawValue);\n valType = arrayDim;\n if (arrayDim === 1 && !isNumber(rawValue[0]) || arrayDim === 2 && !isNumber(rawValue[0][0])) {\n discrete = true;\n }\n } else {\n if (isNumber(rawValue) && !eqNaN(rawValue)) {\n valType = VALUE_TYPE_NUMBER;\n } else if (isString(rawValue)) {\n if (!isNaN(+rawValue)) {\n valType = VALUE_TYPE_NUMBER;\n } else {\n var colorArray = color.parse(rawValue);\n if (colorArray) {\n value = colorArray;\n valType = VALUE_TYPE_COLOR;\n }\n }\n } else if (isGradientObject(rawValue)) {\n var parsedGradient = extend({}, value);\n parsedGradient.colorStops = map(rawValue.colorStops, function (colorStop) {\n return {\n offset: colorStop.offset,\n color: color.parse(colorStop.color)\n };\n });\n if (isLinearGradient(rawValue)) {\n valType = VALUE_TYPE_LINEAR_GRADIENT;\n } else if (isRadialGradient(rawValue)) {\n valType = VALUE_TYPE_RADIAL_GRADIENT;\n }\n value = parsedGradient;\n }\n }\n if (len === 0) {\n this.valType = valType;\n } else if (valType !== this.valType || valType === VALUE_TYPE_UNKOWN) {\n discrete = true;\n }\n this.discrete = this.discrete || discrete;\n var kf = {\n time: time,\n value: value,\n rawValue: rawValue,\n percent: 0\n };\n if (easing) {\n kf.easing = easing;\n kf.easingFunc = isFunction(easing) ? easing : easingFuncs[easing] || createCubicEasingFunc(easing);\n }\n keyframes.push(kf);\n return kf;\n };\n Track.prototype.prepare = function (maxTime, additiveTrack) {\n var kfs = this.keyframes;\n if (this._needsSort) {\n kfs.sort(function (a, b) {\n return a.time - b.time;\n });\n }\n var valType = this.valType;\n var kfsLen = kfs.length;\n var lastKf = kfs[kfsLen - 1];\n var isDiscrete = this.discrete;\n var isArr = isArrayValueType(valType);\n var isGradient = isGradientValueType(valType);\n for (var i = 0; i < kfsLen; i++) {\n var kf = kfs[i];\n var value = kf.value;\n var lastValue = lastKf.value;\n kf.percent = kf.time / maxTime;\n if (!isDiscrete) {\n if (isArr && i !== kfsLen - 1) {\n fillArray(value, lastValue, valType);\n } else if (isGradient) {\n fillColorStops(value.colorStops, lastValue.colorStops);\n }\n }\n }\n if (!isDiscrete && valType !== VALUE_TYPE_RADIAL_GRADIENT && additiveTrack && this.needsAnimate() && additiveTrack.needsAnimate() && valType === additiveTrack.valType && !additiveTrack._finished) {\n this._additiveTrack = additiveTrack;\n var startValue = kfs[0].value;\n for (var i = 0; i < kfsLen; i++) {\n if (valType === VALUE_TYPE_NUMBER) {\n kfs[i].additiveValue = kfs[i].value - startValue;\n } else if (valType === VALUE_TYPE_COLOR) {\n kfs[i].additiveValue = add1DArray([], kfs[i].value, startValue, -1);\n } else if (isArrayValueType(valType)) {\n kfs[i].additiveValue = valType === VALUE_TYPE_1D_ARRAY ? add1DArray([], kfs[i].value, startValue, -1) : add2DArray([], kfs[i].value, startValue, -1);\n }\n }\n }\n };\n Track.prototype.step = function (target, percent) {\n if (this._finished) {\n return;\n }\n if (this._additiveTrack && this._additiveTrack._finished) {\n this._additiveTrack = null;\n }\n var isAdditive = this._additiveTrack != null;\n var valueKey = isAdditive ? 'additiveValue' : 'value';\n var valType = this.valType;\n var keyframes = this.keyframes;\n var kfsNum = keyframes.length;\n var propName = this.propName;\n var isValueColor = valType === VALUE_TYPE_COLOR;\n var frameIdx;\n var lastFrame = this._lastFr;\n var mathMin = Math.min;\n var frame;\n var nextFrame;\n if (kfsNum === 1) {\n frame = nextFrame = keyframes[0];\n } else {\n if (percent < 0) {\n frameIdx = 0;\n } else if (percent < this._lastFrP) {\n var start = mathMin(lastFrame + 1, kfsNum - 1);\n for (frameIdx = start; frameIdx >= 0; frameIdx--) {\n if (keyframes[frameIdx].percent <= percent) {\n break;\n }\n }\n frameIdx = mathMin(frameIdx, kfsNum - 2);\n } else {\n for (frameIdx = lastFrame; frameIdx < kfsNum; frameIdx++) {\n if (keyframes[frameIdx].percent > percent) {\n break;\n }\n }\n frameIdx = mathMin(frameIdx - 1, kfsNum - 2);\n }\n nextFrame = keyframes[frameIdx + 1];\n frame = keyframes[frameIdx];\n }\n if (!(frame && nextFrame)) {\n return;\n }\n this._lastFr = frameIdx;\n this._lastFrP = percent;\n var interval = nextFrame.percent - frame.percent;\n var w = interval === 0 ? 1 : mathMin((percent - frame.percent) / interval, 1);\n if (nextFrame.easingFunc) {\n w = nextFrame.easingFunc(w);\n }\n var targetArr = isAdditive ? this._additiveValue : isValueColor ? tmpRgba : target[propName];\n if ((isArrayValueType(valType) || isValueColor) && !targetArr) {\n targetArr = this._additiveValue = [];\n }\n if (this.discrete) {\n target[propName] = w < 1 ? frame.rawValue : nextFrame.rawValue;\n } else if (isArrayValueType(valType)) {\n valType === VALUE_TYPE_1D_ARRAY ? interpolate1DArray(targetArr, frame[valueKey], nextFrame[valueKey], w) : interpolate2DArray(targetArr, frame[valueKey], nextFrame[valueKey], w);\n } else if (isGradientValueType(valType)) {\n var val = frame[valueKey];\n var nextVal_1 = nextFrame[valueKey];\n var isLinearGradient_1 = valType === VALUE_TYPE_LINEAR_GRADIENT;\n target[propName] = {\n type: isLinearGradient_1 ? 'linear' : 'radial',\n x: interpolateNumber(val.x, nextVal_1.x, w),\n y: interpolateNumber(val.y, nextVal_1.y, w),\n colorStops: map(val.colorStops, function (colorStop, idx) {\n var nextColorStop = nextVal_1.colorStops[idx];\n return {\n offset: interpolateNumber(colorStop.offset, nextColorStop.offset, w),\n color: rgba2String(interpolate1DArray([], colorStop.color, nextColorStop.color, w))\n };\n }),\n global: nextVal_1.global\n };\n if (isLinearGradient_1) {\n target[propName].x2 = interpolateNumber(val.x2, nextVal_1.x2, w);\n target[propName].y2 = interpolateNumber(val.y2, nextVal_1.y2, w);\n } else {\n target[propName].r = interpolateNumber(val.r, nextVal_1.r, w);\n }\n } else if (isValueColor) {\n interpolate1DArray(targetArr, frame[valueKey], nextFrame[valueKey], w);\n if (!isAdditive) {\n target[propName] = rgba2String(targetArr);\n }\n } else {\n var value = interpolateNumber(frame[valueKey], nextFrame[valueKey], w);\n if (isAdditive) {\n this._additiveValue = value;\n } else {\n target[propName] = value;\n }\n }\n if (isAdditive) {\n this._addToTarget(target);\n }\n };\n Track.prototype._addToTarget = function (target) {\n var valType = this.valType;\n var propName = this.propName;\n var additiveValue = this._additiveValue;\n if (valType === VALUE_TYPE_NUMBER) {\n target[propName] = target[propName] + additiveValue;\n } else if (valType === VALUE_TYPE_COLOR) {\n color.parse(target[propName], tmpRgba);\n add1DArray(tmpRgba, tmpRgba, additiveValue, 1);\n target[propName] = rgba2String(tmpRgba);\n } else if (valType === VALUE_TYPE_1D_ARRAY) {\n add1DArray(target[propName], target[propName], additiveValue, 1);\n } else if (valType === VALUE_TYPE_2D_ARRAY) {\n add2DArray(target[propName], target[propName], additiveValue, 1);\n }\n };\n return Track;\n}();\nvar Animator = function () {\n function Animator(target, loop, allowDiscreteAnimation, additiveTo) {\n this._tracks = {};\n this._trackKeys = [];\n this._maxTime = 0;\n this._started = 0;\n this._clip = null;\n this._target = target;\n this._loop = loop;\n if (loop && additiveTo) {\n logError('Can\\' use additive animation on looped animation.');\n return;\n }\n this._additiveAnimators = additiveTo;\n this._allowDiscrete = allowDiscreteAnimation;\n }\n Animator.prototype.getMaxTime = function () {\n return this._maxTime;\n };\n Animator.prototype.getDelay = function () {\n return this._delay;\n };\n Animator.prototype.getLoop = function () {\n return this._loop;\n };\n Animator.prototype.getTarget = function () {\n return this._target;\n };\n Animator.prototype.changeTarget = function (target) {\n this._target = target;\n };\n Animator.prototype.when = function (time, props, easing) {\n return this.whenWithKeys(time, props, keys(props), easing);\n };\n Animator.prototype.whenWithKeys = function (time, props, propNames, easing) {\n var tracks = this._tracks;\n for (var i = 0; i < propNames.length; i++) {\n var propName = propNames[i];\n var track = tracks[propName];\n if (!track) {\n track = tracks[propName] = new Track(propName);\n var initialValue = void 0;\n var additiveTrack = this._getAdditiveTrack(propName);\n if (additiveTrack) {\n var addtiveTrackKfs = additiveTrack.keyframes;\n var lastFinalKf = addtiveTrackKfs[addtiveTrackKfs.length - 1];\n initialValue = lastFinalKf && lastFinalKf.value;\n if (additiveTrack.valType === VALUE_TYPE_COLOR && initialValue) {\n initialValue = rgba2String(initialValue);\n }\n } else {\n initialValue = this._target[propName];\n }\n if (initialValue == null) {\n continue;\n }\n if (time > 0) {\n track.addKeyframe(0, cloneValue(initialValue), easing);\n }\n this._trackKeys.push(propName);\n }\n track.addKeyframe(time, cloneValue(props[propName]), easing);\n }\n this._maxTime = Math.max(this._maxTime, time);\n return this;\n };\n Animator.prototype.pause = function () {\n this._clip.pause();\n this._paused = true;\n };\n Animator.prototype.resume = function () {\n this._clip.resume();\n this._paused = false;\n };\n Animator.prototype.isPaused = function () {\n return !!this._paused;\n };\n Animator.prototype.duration = function (duration) {\n this._maxTime = duration;\n this._force = true;\n return this;\n };\n Animator.prototype._doneCallback = function () {\n this._setTracksFinished();\n this._clip = null;\n var doneList = this._doneCbs;\n if (doneList) {\n var len = doneList.length;\n for (var i = 0; i < len; i++) {\n doneList[i].call(this);\n }\n }\n };\n Animator.prototype._abortedCallback = function () {\n this._setTracksFinished();\n var animation = this.animation;\n var abortedList = this._abortedCbs;\n if (animation) {\n animation.removeClip(this._clip);\n }\n this._clip = null;\n if (abortedList) {\n for (var i = 0; i < abortedList.length; i++) {\n abortedList[i].call(this);\n }\n }\n };\n Animator.prototype._setTracksFinished = function () {\n var tracks = this._tracks;\n var tracksKeys = this._trackKeys;\n for (var i = 0; i < tracksKeys.length; i++) {\n tracks[tracksKeys[i]].setFinished();\n }\n };\n Animator.prototype._getAdditiveTrack = function (trackName) {\n var additiveTrack;\n var additiveAnimators = this._additiveAnimators;\n if (additiveAnimators) {\n for (var i = 0; i < additiveAnimators.length; i++) {\n var track = additiveAnimators[i].getTrack(trackName);\n if (track) {\n additiveTrack = track;\n }\n }\n }\n return additiveTrack;\n };\n Animator.prototype.start = function (easing) {\n if (this._started > 0) {\n return;\n }\n this._started = 1;\n var self = this;\n var tracks = [];\n var maxTime = this._maxTime || 0;\n for (var i = 0; i < this._trackKeys.length; i++) {\n var propName = this._trackKeys[i];\n var track = this._tracks[propName];\n var additiveTrack = this._getAdditiveTrack(propName);\n var kfs = track.keyframes;\n var kfsNum = kfs.length;\n track.prepare(maxTime, additiveTrack);\n if (track.needsAnimate()) {\n if (!this._allowDiscrete && track.discrete) {\n var lastKf = kfs[kfsNum - 1];\n if (lastKf) {\n self._target[track.propName] = lastKf.rawValue;\n }\n track.setFinished();\n } else {\n tracks.push(track);\n }\n }\n }\n if (tracks.length || this._force) {\n var clip = new Clip({\n life: maxTime,\n loop: this._loop,\n delay: this._delay || 0,\n onframe: function (percent) {\n self._started = 2;\n var additiveAnimators = self._additiveAnimators;\n if (additiveAnimators) {\n var stillHasAdditiveAnimator = false;\n for (var i = 0; i < additiveAnimators.length; i++) {\n if (additiveAnimators[i]._clip) {\n stillHasAdditiveAnimator = true;\n break;\n }\n }\n if (!stillHasAdditiveAnimator) {\n self._additiveAnimators = null;\n }\n }\n for (var i = 0; i < tracks.length; i++) {\n tracks[i].step(self._target, percent);\n }\n var onframeList = self._onframeCbs;\n if (onframeList) {\n for (var i = 0; i < onframeList.length; i++) {\n onframeList[i](self._target, percent);\n }\n }\n },\n ondestroy: function () {\n self._doneCallback();\n }\n });\n this._clip = clip;\n if (this.animation) {\n this.animation.addClip(clip);\n }\n if (easing) {\n clip.setEasing(easing);\n }\n } else {\n this._doneCallback();\n }\n return this;\n };\n Animator.prototype.stop = function (forwardToLast) {\n if (!this._clip) {\n return;\n }\n var clip = this._clip;\n if (forwardToLast) {\n clip.onframe(1);\n }\n this._abortedCallback();\n };\n Animator.prototype.delay = function (time) {\n this._delay = time;\n return this;\n };\n Animator.prototype.during = function (cb) {\n if (cb) {\n if (!this._onframeCbs) {\n this._onframeCbs = [];\n }\n this._onframeCbs.push(cb);\n }\n return this;\n };\n Animator.prototype.done = function (cb) {\n if (cb) {\n if (!this._doneCbs) {\n this._doneCbs = [];\n }\n this._doneCbs.push(cb);\n }\n return this;\n };\n Animator.prototype.aborted = function (cb) {\n if (cb) {\n if (!this._abortedCbs) {\n this._abortedCbs = [];\n }\n this._abortedCbs.push(cb);\n }\n return this;\n };\n Animator.prototype.getClip = function () {\n return this._clip;\n };\n Animator.prototype.getTrack = function (propName) {\n return this._tracks[propName];\n };\n Animator.prototype.getTracks = function () {\n var _this = this;\n return map(this._trackKeys, function (key) {\n return _this._tracks[key];\n });\n };\n Animator.prototype.stopTracks = function (propNames, forwardToLast) {\n if (!propNames.length || !this._clip) {\n return true;\n }\n var tracks = this._tracks;\n var tracksKeys = this._trackKeys;\n for (var i = 0; i < propNames.length; i++) {\n var track = tracks[propNames[i]];\n if (track && !track.isFinished()) {\n if (forwardToLast) {\n track.step(this._target, 1);\n } else if (this._started === 1) {\n track.step(this._target, 0);\n }\n track.setFinished();\n }\n }\n var allAborted = true;\n for (var i = 0; i < tracksKeys.length; i++) {\n if (!tracks[tracksKeys[i]].isFinished()) {\n allAborted = false;\n break;\n }\n }\n if (allAborted) {\n this._abortedCallback();\n }\n return allAborted;\n };\n Animator.prototype.saveTo = function (target, trackKeys, firstOrLast) {\n if (!target) {\n return;\n }\n trackKeys = trackKeys || this._trackKeys;\n for (var i = 0; i < trackKeys.length; i++) {\n var propName = trackKeys[i];\n var track = this._tracks[propName];\n if (!track || track.isFinished()) {\n continue;\n }\n var kfs = track.keyframes;\n var kf = kfs[firstOrLast ? 0 : kfs.length - 1];\n if (kf) {\n target[propName] = cloneValue(kf.rawValue);\n }\n }\n };\n Animator.prototype.__changeFinalValue = function (finalProps, trackKeys) {\n trackKeys = trackKeys || keys(finalProps);\n for (var i = 0; i < trackKeys.length; i++) {\n var propName = trackKeys[i];\n var track = this._tracks[propName];\n if (!track) {\n continue;\n }\n var kfs = track.keyframes;\n if (kfs.length > 1) {\n var lastKf = kfs.pop();\n track.addKeyframe(lastKf.time, finalProps[propName]);\n track.prepare(this._maxTime, track.getAdditiveTrack());\n }\n }\n };\n return Animator;\n}();\nexport default Animator;","import { __extends } from \"tslib\";\nimport Eventful from '../core/Eventful.js';\nimport requestAnimationFrame from './requestAnimationFrame.js';\nimport Animator from './Animator.js';\nexport function getTime() {\n return new Date().getTime();\n}\nvar Animation = function (_super) {\n __extends(Animation, _super);\n function Animation(opts) {\n var _this = _super.call(this) || this;\n _this._running = false;\n _this._time = 0;\n _this._pausedTime = 0;\n _this._pauseStart = 0;\n _this._paused = false;\n opts = opts || {};\n _this.stage = opts.stage || {};\n return _this;\n }\n Animation.prototype.addClip = function (clip) {\n if (clip.animation) {\n this.removeClip(clip);\n }\n if (!this._head) {\n this._head = this._tail = clip;\n } else {\n this._tail.next = clip;\n clip.prev = this._tail;\n clip.next = null;\n this._tail = clip;\n }\n clip.animation = this;\n };\n Animation.prototype.addAnimator = function (animator) {\n animator.animation = this;\n var clip = animator.getClip();\n if (clip) {\n this.addClip(clip);\n }\n };\n Animation.prototype.removeClip = function (clip) {\n if (!clip.animation) {\n return;\n }\n var prev = clip.prev;\n var next = clip.next;\n if (prev) {\n prev.next = next;\n } else {\n this._head = next;\n }\n if (next) {\n next.prev = prev;\n } else {\n this._tail = prev;\n }\n clip.next = clip.prev = clip.animation = null;\n };\n Animation.prototype.removeAnimator = function (animator) {\n var clip = animator.getClip();\n if (clip) {\n this.removeClip(clip);\n }\n animator.animation = null;\n };\n Animation.prototype.update = function (notTriggerFrameAndStageUpdate) {\n var time = getTime() - this._pausedTime;\n var delta = time - this._time;\n var clip = this._head;\n while (clip) {\n var nextClip = clip.next;\n var finished = clip.step(time, delta);\n if (finished) {\n clip.ondestroy();\n this.removeClip(clip);\n clip = nextClip;\n } else {\n clip = nextClip;\n }\n }\n this._time = time;\n if (!notTriggerFrameAndStageUpdate) {\n this.trigger('frame', delta);\n this.stage.update && this.stage.update();\n }\n };\n Animation.prototype._startLoop = function () {\n var self = this;\n this._running = true;\n function step() {\n if (self._running) {\n requestAnimationFrame(step);\n !self._paused && self.update();\n }\n }\n requestAnimationFrame(step);\n };\n Animation.prototype.start = function () {\n if (this._running) {\n return;\n }\n this._time = getTime();\n this._pausedTime = 0;\n this._startLoop();\n };\n Animation.prototype.stop = function () {\n this._running = false;\n };\n Animation.prototype.pause = function () {\n if (!this._paused) {\n this._pauseStart = getTime();\n this._paused = true;\n }\n };\n Animation.prototype.resume = function () {\n if (this._paused) {\n this._pausedTime += getTime() - this._pauseStart;\n this._paused = false;\n }\n };\n Animation.prototype.clear = function () {\n var clip = this._head;\n while (clip) {\n var nextClip = clip.next;\n clip.prev = clip.next = clip.animation = null;\n clip = nextClip;\n }\n this._head = this._tail = null;\n };\n Animation.prototype.isFinished = function () {\n return this._head == null;\n };\n Animation.prototype.animate = function (target, options) {\n options = options || {};\n this.start();\n var animator = new Animator(target, options.loop);\n this.addAnimator(animator);\n return animator;\n };\n return Animation;\n}(Eventful);\nexport default Animation;","import { __extends } from \"tslib\";\nimport { addEventListener, removeEventListener, normalizeEvent, getNativeEvent } from '../core/event.js';\nimport * as zrUtil from '../core/util.js';\nimport Eventful from '../core/Eventful.js';\nimport env from '../core/env.js';\nvar TOUCH_CLICK_DELAY = 300;\nvar globalEventSupported = env.domSupported;\nvar localNativeListenerNames = function () {\n var mouseHandlerNames = ['click', 'dblclick', 'mousewheel', 'wheel', 'mouseout', 'mouseup', 'mousedown', 'mousemove', 'contextmenu'];\n var touchHandlerNames = ['touchstart', 'touchend', 'touchmove'];\n var pointerEventNameMap = {\n pointerdown: 1,\n pointerup: 1,\n pointermove: 1,\n pointerout: 1\n };\n var pointerHandlerNames = zrUtil.map(mouseHandlerNames, function (name) {\n var nm = name.replace('mouse', 'pointer');\n return pointerEventNameMap.hasOwnProperty(nm) ? nm : name;\n });\n return {\n mouse: mouseHandlerNames,\n touch: touchHandlerNames,\n pointer: pointerHandlerNames\n };\n}();\nvar globalNativeListenerNames = {\n mouse: ['mousemove', 'mouseup'],\n pointer: ['pointermove', 'pointerup']\n};\nvar wheelEventSupported = false;\nfunction isPointerFromTouch(event) {\n var pointerType = event.pointerType;\n return pointerType === 'pen' || pointerType === 'touch';\n}\nfunction setTouchTimer(scope) {\n scope.touching = true;\n if (scope.touchTimer != null) {\n clearTimeout(scope.touchTimer);\n scope.touchTimer = null;\n }\n scope.touchTimer = setTimeout(function () {\n scope.touching = false;\n scope.touchTimer = null;\n }, 700);\n}\nfunction markTouch(event) {\n event && (event.zrByTouch = true);\n}\nfunction normalizeGlobalEvent(instance, event) {\n return normalizeEvent(instance.dom, new FakeGlobalEvent(instance, event), true);\n}\nfunction isLocalEl(instance, el) {\n var elTmp = el;\n var isLocal = false;\n while (elTmp && elTmp.nodeType !== 9 && !(isLocal = elTmp.domBelongToZr || elTmp !== el && elTmp === instance.painterRoot)) {\n elTmp = elTmp.parentNode;\n }\n return isLocal;\n}\nvar FakeGlobalEvent = function () {\n function FakeGlobalEvent(instance, event) {\n this.stopPropagation = zrUtil.noop;\n this.stopImmediatePropagation = zrUtil.noop;\n this.preventDefault = zrUtil.noop;\n this.type = event.type;\n this.target = this.currentTarget = instance.dom;\n this.pointerType = event.pointerType;\n this.clientX = event.clientX;\n this.clientY = event.clientY;\n }\n return FakeGlobalEvent;\n}();\nvar localDOMHandlers = {\n mousedown: function (event) {\n event = normalizeEvent(this.dom, event);\n this.__mayPointerCapture = [event.zrX, event.zrY];\n this.trigger('mousedown', event);\n },\n mousemove: function (event) {\n event = normalizeEvent(this.dom, event);\n var downPoint = this.__mayPointerCapture;\n if (downPoint && (event.zrX !== downPoint[0] || event.zrY !== downPoint[1])) {\n this.__togglePointerCapture(true);\n }\n this.trigger('mousemove', event);\n },\n mouseup: function (event) {\n event = normalizeEvent(this.dom, event);\n this.__togglePointerCapture(false);\n this.trigger('mouseup', event);\n },\n mouseout: function (event) {\n event = normalizeEvent(this.dom, event);\n var element = event.toElement || event.relatedTarget;\n if (!isLocalEl(this, element)) {\n if (this.__pointerCapturing) {\n event.zrEventControl = 'no_globalout';\n }\n this.trigger('mouseout', event);\n }\n },\n wheel: function (event) {\n wheelEventSupported = true;\n event = normalizeEvent(this.dom, event);\n this.trigger('mousewheel', event);\n },\n mousewheel: function (event) {\n if (wheelEventSupported) {\n return;\n }\n event = normalizeEvent(this.dom, event);\n this.trigger('mousewheel', event);\n },\n touchstart: function (event) {\n event = normalizeEvent(this.dom, event);\n markTouch(event);\n this.__lastTouchMoment = new Date();\n this.handler.processGesture(event, 'start');\n localDOMHandlers.mousemove.call(this, event);\n localDOMHandlers.mousedown.call(this, event);\n },\n touchmove: function (event) {\n event = normalizeEvent(this.dom, event);\n markTouch(event);\n this.handler.processGesture(event, 'change');\n localDOMHandlers.mousemove.call(this, event);\n },\n touchend: function (event) {\n event = normalizeEvent(this.dom, event);\n markTouch(event);\n this.handler.processGesture(event, 'end');\n localDOMHandlers.mouseup.call(this, event);\n if (+new Date() - +this.__lastTouchMoment < TOUCH_CLICK_DELAY) {\n localDOMHandlers.click.call(this, event);\n }\n },\n pointerdown: function (event) {\n localDOMHandlers.mousedown.call(this, event);\n },\n pointermove: function (event) {\n if (!isPointerFromTouch(event)) {\n localDOMHandlers.mousemove.call(this, event);\n }\n },\n pointerup: function (event) {\n localDOMHandlers.mouseup.call(this, event);\n },\n pointerout: function (event) {\n if (!isPointerFromTouch(event)) {\n localDOMHandlers.mouseout.call(this, event);\n }\n }\n};\nzrUtil.each(['click', 'dblclick', 'contextmenu'], function (name) {\n localDOMHandlers[name] = function (event) {\n event = normalizeEvent(this.dom, event);\n this.trigger(name, event);\n };\n});\nvar globalDOMHandlers = {\n pointermove: function (event) {\n if (!isPointerFromTouch(event)) {\n globalDOMHandlers.mousemove.call(this, event);\n }\n },\n pointerup: function (event) {\n globalDOMHandlers.mouseup.call(this, event);\n },\n mousemove: function (event) {\n this.trigger('mousemove', event);\n },\n mouseup: function (event) {\n var pointerCaptureReleasing = this.__pointerCapturing;\n this.__togglePointerCapture(false);\n this.trigger('mouseup', event);\n if (pointerCaptureReleasing) {\n event.zrEventControl = 'only_globalout';\n this.trigger('mouseout', event);\n }\n }\n};\nfunction mountLocalDOMEventListeners(instance, scope) {\n var domHandlers = scope.domHandlers;\n if (env.pointerEventsSupported) {\n zrUtil.each(localNativeListenerNames.pointer, function (nativeEventName) {\n mountSingleDOMEventListener(scope, nativeEventName, function (event) {\n domHandlers[nativeEventName].call(instance, event);\n });\n });\n } else {\n if (env.touchEventsSupported) {\n zrUtil.each(localNativeListenerNames.touch, function (nativeEventName) {\n mountSingleDOMEventListener(scope, nativeEventName, function (event) {\n domHandlers[nativeEventName].call(instance, event);\n setTouchTimer(scope);\n });\n });\n }\n zrUtil.each(localNativeListenerNames.mouse, function (nativeEventName) {\n mountSingleDOMEventListener(scope, nativeEventName, function (event) {\n event = getNativeEvent(event);\n if (!scope.touching) {\n domHandlers[nativeEventName].call(instance, event);\n }\n });\n });\n }\n}\nfunction mountGlobalDOMEventListeners(instance, scope) {\n if (env.pointerEventsSupported) {\n zrUtil.each(globalNativeListenerNames.pointer, mount);\n } else if (!env.touchEventsSupported) {\n zrUtil.each(globalNativeListenerNames.mouse, mount);\n }\n function mount(nativeEventName) {\n function nativeEventListener(event) {\n event = getNativeEvent(event);\n if (!isLocalEl(instance, event.target)) {\n event = normalizeGlobalEvent(instance, event);\n scope.domHandlers[nativeEventName].call(instance, event);\n }\n }\n mountSingleDOMEventListener(scope, nativeEventName, nativeEventListener, {\n capture: true\n });\n }\n}\nfunction mountSingleDOMEventListener(scope, nativeEventName, listener, opt) {\n scope.mounted[nativeEventName] = listener;\n scope.listenerOpts[nativeEventName] = opt;\n addEventListener(scope.domTarget, nativeEventName, listener, opt);\n}\nfunction unmountDOMEventListeners(scope) {\n var mounted = scope.mounted;\n for (var nativeEventName in mounted) {\n if (mounted.hasOwnProperty(nativeEventName)) {\n removeEventListener(scope.domTarget, nativeEventName, mounted[nativeEventName], scope.listenerOpts[nativeEventName]);\n }\n }\n scope.mounted = {};\n}\nvar DOMHandlerScope = function () {\n function DOMHandlerScope(domTarget, domHandlers) {\n this.mounted = {};\n this.listenerOpts = {};\n this.touching = false;\n this.domTarget = domTarget;\n this.domHandlers = domHandlers;\n }\n return DOMHandlerScope;\n}();\nvar HandlerDomProxy = function (_super) {\n __extends(HandlerDomProxy, _super);\n function HandlerDomProxy(dom, painterRoot) {\n var _this = _super.call(this) || this;\n _this.__pointerCapturing = false;\n _this.dom = dom;\n _this.painterRoot = painterRoot;\n _this._localHandlerScope = new DOMHandlerScope(dom, localDOMHandlers);\n if (globalEventSupported) {\n _this._globalHandlerScope = new DOMHandlerScope(document, globalDOMHandlers);\n }\n mountLocalDOMEventListeners(_this, _this._localHandlerScope);\n return _this;\n }\n HandlerDomProxy.prototype.dispose = function () {\n unmountDOMEventListeners(this._localHandlerScope);\n if (globalEventSupported) {\n unmountDOMEventListeners(this._globalHandlerScope);\n }\n };\n HandlerDomProxy.prototype.setCursor = function (cursorStyle) {\n this.dom.style && (this.dom.style.cursor = cursorStyle || 'default');\n };\n HandlerDomProxy.prototype.__togglePointerCapture = function (isPointerCapturing) {\n this.__mayPointerCapture = null;\n if (globalEventSupported && +this.__pointerCapturing ^ +isPointerCapturing) {\n this.__pointerCapturing = isPointerCapturing;\n var globalHandlerScope = this._globalHandlerScope;\n isPointerCapturing ? mountGlobalDOMEventListeners(this, globalHandlerScope) : unmountDOMEventListeners(globalHandlerScope);\n }\n };\n return HandlerDomProxy;\n}(Eventful);\nexport default HandlerDomProxy;","import env from './core/env.js';\nvar dpr = 1;\nif (env.hasGlobalWindow) {\n dpr = Math.max(window.devicePixelRatio || window.screen && window.screen.deviceXDPI / window.screen.logicalXDPI || 1, 1);\n}\nexport var debugMode = 0;\nexport var devicePixelRatio = dpr;\nexport var DARK_MODE_THRESHOLD = 0.4;\nexport var DARK_LABEL_COLOR = '#333';\nexport var LIGHT_LABEL_COLOR = '#ccc';\nexport var LIGHTER_LABEL_COLOR = '#eee';","import * as matrix from './matrix.js';\nimport * as vector from './vector.js';\nvar mIdentity = matrix.identity;\nvar EPSILON = 5e-5;\nfunction isNotAroundZero(val) {\n return val > EPSILON || val < -EPSILON;\n}\nvar scaleTmp = [];\nvar tmpTransform = [];\nvar originTransform = matrix.create();\nvar abs = Math.abs;\nvar Transformable = function () {\n function Transformable() {}\n Transformable.prototype.getLocalTransform = function (m) {\n return Transformable.getLocalTransform(this, m);\n };\n Transformable.prototype.setPosition = function (arr) {\n this.x = arr[0];\n this.y = arr[1];\n };\n Transformable.prototype.setScale = function (arr) {\n this.scaleX = arr[0];\n this.scaleY = arr[1];\n };\n Transformable.prototype.setSkew = function (arr) {\n this.skewX = arr[0];\n this.skewY = arr[1];\n };\n Transformable.prototype.setOrigin = function (arr) {\n this.originX = arr[0];\n this.originY = arr[1];\n };\n Transformable.prototype.needLocalTransform = function () {\n return isNotAroundZero(this.rotation) || isNotAroundZero(this.x) || isNotAroundZero(this.y) || isNotAroundZero(this.scaleX - 1) || isNotAroundZero(this.scaleY - 1) || isNotAroundZero(this.skewX) || isNotAroundZero(this.skewY);\n };\n Transformable.prototype.updateTransform = function () {\n var parentTransform = this.parent && this.parent.transform;\n var needLocalTransform = this.needLocalTransform();\n var m = this.transform;\n if (!(needLocalTransform || parentTransform)) {\n if (m) {\n mIdentity(m);\n this.invTransform = null;\n }\n return;\n }\n m = m || matrix.create();\n if (needLocalTransform) {\n this.getLocalTransform(m);\n } else {\n mIdentity(m);\n }\n if (parentTransform) {\n if (needLocalTransform) {\n matrix.mul(m, parentTransform, m);\n } else {\n matrix.copy(m, parentTransform);\n }\n }\n this.transform = m;\n this._resolveGlobalScaleRatio(m);\n };\n Transformable.prototype._resolveGlobalScaleRatio = function (m) {\n var globalScaleRatio = this.globalScaleRatio;\n if (globalScaleRatio != null && globalScaleRatio !== 1) {\n this.getGlobalScale(scaleTmp);\n var relX = scaleTmp[0] < 0 ? -1 : 1;\n var relY = scaleTmp[1] < 0 ? -1 : 1;\n var sx = ((scaleTmp[0] - relX) * globalScaleRatio + relX) / scaleTmp[0] || 0;\n var sy = ((scaleTmp[1] - relY) * globalScaleRatio + relY) / scaleTmp[1] || 0;\n m[0] *= sx;\n m[1] *= sx;\n m[2] *= sy;\n m[3] *= sy;\n }\n this.invTransform = this.invTransform || matrix.create();\n matrix.invert(this.invTransform, m);\n };\n Transformable.prototype.getComputedTransform = function () {\n var transformNode = this;\n var ancestors = [];\n while (transformNode) {\n ancestors.push(transformNode);\n transformNode = transformNode.parent;\n }\n while (transformNode = ancestors.pop()) {\n transformNode.updateTransform();\n }\n return this.transform;\n };\n Transformable.prototype.setLocalTransform = function (m) {\n if (!m) {\n return;\n }\n var sx = m[0] * m[0] + m[1] * m[1];\n var sy = m[2] * m[2] + m[3] * m[3];\n var rotation = Math.atan2(m[1], m[0]);\n var shearX = Math.PI / 2 + rotation - Math.atan2(m[3], m[2]);\n sy = Math.sqrt(sy) * Math.cos(shearX);\n sx = Math.sqrt(sx);\n this.skewX = shearX;\n this.skewY = 0;\n this.rotation = -rotation;\n this.x = +m[4];\n this.y = +m[5];\n this.scaleX = sx;\n this.scaleY = sy;\n this.originX = 0;\n this.originY = 0;\n };\n Transformable.prototype.decomposeTransform = function () {\n if (!this.transform) {\n return;\n }\n var parent = this.parent;\n var m = this.transform;\n if (parent && parent.transform) {\n parent.invTransform = parent.invTransform || matrix.create();\n matrix.mul(tmpTransform, parent.invTransform, m);\n m = tmpTransform;\n }\n var ox = this.originX;\n var oy = this.originY;\n if (ox || oy) {\n originTransform[4] = ox;\n originTransform[5] = oy;\n matrix.mul(tmpTransform, m, originTransform);\n tmpTransform[4] -= ox;\n tmpTransform[5] -= oy;\n m = tmpTransform;\n }\n this.setLocalTransform(m);\n };\n Transformable.prototype.getGlobalScale = function (out) {\n var m = this.transform;\n out = out || [];\n if (!m) {\n out[0] = 1;\n out[1] = 1;\n return out;\n }\n out[0] = Math.sqrt(m[0] * m[0] + m[1] * m[1]);\n out[1] = Math.sqrt(m[2] * m[2] + m[3] * m[3]);\n if (m[0] < 0) {\n out[0] = -out[0];\n }\n if (m[3] < 0) {\n out[1] = -out[1];\n }\n return out;\n };\n Transformable.prototype.transformCoordToLocal = function (x, y) {\n var v2 = [x, y];\n var invTransform = this.invTransform;\n if (invTransform) {\n vector.applyTransform(v2, v2, invTransform);\n }\n return v2;\n };\n Transformable.prototype.transformCoordToGlobal = function (x, y) {\n var v2 = [x, y];\n var transform = this.transform;\n if (transform) {\n vector.applyTransform(v2, v2, transform);\n }\n return v2;\n };\n Transformable.prototype.getLineScale = function () {\n var m = this.transform;\n return m && abs(m[0] - 1) > 1e-10 && abs(m[3] - 1) > 1e-10 ? Math.sqrt(abs(m[0] * m[3] - m[2] * m[1])) : 1;\n };\n Transformable.prototype.copyTransform = function (source) {\n copyTransform(this, source);\n };\n Transformable.getLocalTransform = function (target, m) {\n m = m || [];\n var ox = target.originX || 0;\n var oy = target.originY || 0;\n var sx = target.scaleX;\n var sy = target.scaleY;\n var ax = target.anchorX;\n var ay = target.anchorY;\n var rotation = target.rotation || 0;\n var x = target.x;\n var y = target.y;\n var skewX = target.skewX ? Math.tan(target.skewX) : 0;\n var skewY = target.skewY ? Math.tan(-target.skewY) : 0;\n if (ox || oy || ax || ay) {\n var dx = ox + ax;\n var dy = oy + ay;\n m[4] = -dx * sx - skewX * dy * sy;\n m[5] = -dy * sy - skewY * dx * sx;\n } else {\n m[4] = m[5] = 0;\n }\n m[0] = sx;\n m[3] = sy;\n m[1] = skewY * sx;\n m[2] = skewX * sy;\n rotation && matrix.rotate(m, m, rotation);\n m[4] += ox + x;\n m[5] += oy + y;\n return m;\n };\n Transformable.initDefaultProps = function () {\n var proto = Transformable.prototype;\n proto.scaleX = proto.scaleY = proto.globalScaleRatio = 1;\n proto.x = proto.y = proto.originX = proto.originY = proto.skewX = proto.skewY = proto.rotation = proto.anchorX = proto.anchorY = 0;\n }();\n return Transformable;\n}();\n;\nexport var TRANSFORMABLE_PROPS = ['x', 'y', 'originX', 'originY', 'anchorX', 'anchorY', 'rotation', 'scaleX', 'scaleY', 'skewX', 'skewY'];\nexport function copyTransform(target, source) {\n for (var i = 0; i < TRANSFORMABLE_PROPS.length; i++) {\n var propName = TRANSFORMABLE_PROPS[i];\n target[propName] = source[propName];\n }\n}\nexport default Transformable;","import BoundingRect from '../core/BoundingRect.js';\nimport LRU from '../core/LRU.js';\nimport { DEFAULT_FONT, platformApi } from '../core/platform.js';\nvar textWidthCache = {};\nexport function getWidth(text, font) {\n font = font || DEFAULT_FONT;\n var cacheOfFont = textWidthCache[font];\n if (!cacheOfFont) {\n cacheOfFont = textWidthCache[font] = new LRU(500);\n }\n var width = cacheOfFont.get(text);\n if (width == null) {\n width = platformApi.measureText(text, font).width;\n cacheOfFont.put(text, width);\n }\n return width;\n}\nexport function innerGetBoundingRect(text, font, textAlign, textBaseline) {\n var width = getWidth(text, font);\n var height = getLineHeight(font);\n var x = adjustTextX(0, width, textAlign);\n var y = adjustTextY(0, height, textBaseline);\n var rect = new BoundingRect(x, y, width, height);\n return rect;\n}\nexport function getBoundingRect(text, font, textAlign, textBaseline) {\n var textLines = ((text || '') + '').split('\\n');\n var len = textLines.length;\n if (len === 1) {\n return innerGetBoundingRect(textLines[0], font, textAlign, textBaseline);\n } else {\n var uniondRect = new BoundingRect(0, 0, 0, 0);\n for (var i = 0; i < textLines.length; i++) {\n var rect = innerGetBoundingRect(textLines[i], font, textAlign, textBaseline);\n i === 0 ? uniondRect.copy(rect) : uniondRect.union(rect);\n }\n return uniondRect;\n }\n}\nexport function adjustTextX(x, width, textAlign) {\n if (textAlign === 'right') {\n x -= width;\n } else if (textAlign === 'center') {\n x -= width / 2;\n }\n return x;\n}\nexport function adjustTextY(y, height, verticalAlign) {\n if (verticalAlign === 'middle') {\n y -= height / 2;\n } else if (verticalAlign === 'bottom') {\n y -= height;\n }\n return y;\n}\nexport function getLineHeight(font) {\n return getWidth('国', font);\n}\nexport function measureText(text, font) {\n return platformApi.measureText(text, font);\n}\nexport function parsePercent(value, maxValue) {\n if (typeof value === 'string') {\n if (value.lastIndexOf('%') >= 0) {\n return parseFloat(value) / 100 * maxValue;\n }\n return parseFloat(value);\n }\n return value;\n}\nexport function calculateTextPosition(out, opts, rect) {\n var textPosition = opts.position || 'inside';\n var distance = opts.distance != null ? opts.distance : 5;\n var height = rect.height;\n var width = rect.width;\n var halfHeight = height / 2;\n var x = rect.x;\n var y = rect.y;\n var textAlign = 'left';\n var textVerticalAlign = 'top';\n if (textPosition instanceof Array) {\n x += parsePercent(textPosition[0], rect.width);\n y += parsePercent(textPosition[1], rect.height);\n textAlign = null;\n textVerticalAlign = null;\n } else {\n switch (textPosition) {\n case 'left':\n x -= distance;\n y += halfHeight;\n textAlign = 'right';\n textVerticalAlign = 'middle';\n break;\n case 'right':\n x += distance + width;\n y += halfHeight;\n textVerticalAlign = 'middle';\n break;\n case 'top':\n x += width / 2;\n y -= distance;\n textAlign = 'center';\n textVerticalAlign = 'bottom';\n break;\n case 'bottom':\n x += width / 2;\n y += height + distance;\n textAlign = 'center';\n break;\n case 'inside':\n x += width / 2;\n y += halfHeight;\n textAlign = 'center';\n textVerticalAlign = 'middle';\n break;\n case 'insideLeft':\n x += distance;\n y += halfHeight;\n textVerticalAlign = 'middle';\n break;\n case 'insideRight':\n x += width - distance;\n y += halfHeight;\n textAlign = 'right';\n textVerticalAlign = 'middle';\n break;\n case 'insideTop':\n x += width / 2;\n y += distance;\n textAlign = 'center';\n break;\n case 'insideBottom':\n x += width / 2;\n y += height - distance;\n textAlign = 'center';\n textVerticalAlign = 'bottom';\n break;\n case 'insideTopLeft':\n x += distance;\n y += distance;\n break;\n case 'insideTopRight':\n x += width - distance;\n y += distance;\n textAlign = 'right';\n break;\n case 'insideBottomLeft':\n x += distance;\n y += height - distance;\n textVerticalAlign = 'bottom';\n break;\n case 'insideBottomRight':\n x += width - distance;\n y += height - distance;\n textAlign = 'right';\n textVerticalAlign = 'bottom';\n break;\n }\n }\n out = out || {};\n out.x = x;\n out.y = y;\n out.align = textAlign;\n out.verticalAlign = textVerticalAlign;\n return out;\n}","import Transformable, { TRANSFORMABLE_PROPS } from './core/Transformable.js';\nimport Animator, { cloneValue } from './animation/Animator.js';\nimport BoundingRect from './core/BoundingRect.js';\nimport Eventful from './core/Eventful.js';\nimport { calculateTextPosition, parsePercent } from './contain/text.js';\nimport { guid, isObject, keys, extend, indexOf, logError, mixin, isArrayLike, isTypedArray, isGradientObject, filter, reduce } from './core/util.js';\nimport { LIGHT_LABEL_COLOR, DARK_LABEL_COLOR } from './config.js';\nimport { parse, stringify } from './tool/color.js';\nimport { REDRAW_BIT } from './graphic/constants.js';\nexport var PRESERVED_NORMAL_STATE = '__zr_normal__';\nvar PRIMARY_STATES_KEYS = TRANSFORMABLE_PROPS.concat(['ignore']);\nvar DEFAULT_ANIMATABLE_MAP = reduce(TRANSFORMABLE_PROPS, function (obj, key) {\n obj[key] = true;\n return obj;\n}, {\n ignore: false\n});\nvar tmpTextPosCalcRes = {};\nvar tmpBoundingRect = new BoundingRect(0, 0, 0, 0);\nvar Element = function () {\n function Element(props) {\n this.id = guid();\n this.animators = [];\n this.currentStates = [];\n this.states = {};\n this._init(props);\n }\n Element.prototype._init = function (props) {\n this.attr(props);\n };\n Element.prototype.drift = function (dx, dy, e) {\n switch (this.draggable) {\n case 'horizontal':\n dy = 0;\n break;\n case 'vertical':\n dx = 0;\n break;\n }\n var m = this.transform;\n if (!m) {\n m = this.transform = [1, 0, 0, 1, 0, 0];\n }\n m[4] += dx;\n m[5] += dy;\n this.decomposeTransform();\n this.markRedraw();\n };\n Element.prototype.beforeUpdate = function () {};\n Element.prototype.afterUpdate = function () {};\n Element.prototype.update = function () {\n this.updateTransform();\n if (this.__dirty) {\n this.updateInnerText();\n }\n };\n Element.prototype.updateInnerText = function (forceUpdate) {\n var textEl = this._textContent;\n if (textEl && (!textEl.ignore || forceUpdate)) {\n if (!this.textConfig) {\n this.textConfig = {};\n }\n var textConfig = this.textConfig;\n var isLocal = textConfig.local;\n var innerTransformable = textEl.innerTransformable;\n var textAlign = void 0;\n var textVerticalAlign = void 0;\n var textStyleChanged = false;\n innerTransformable.parent = isLocal ? this : null;\n var innerOrigin = false;\n innerTransformable.copyTransform(textEl);\n if (textConfig.position != null) {\n var layoutRect = tmpBoundingRect;\n if (textConfig.layoutRect) {\n layoutRect.copy(textConfig.layoutRect);\n } else {\n layoutRect.copy(this.getBoundingRect());\n }\n if (!isLocal) {\n layoutRect.applyTransform(this.transform);\n }\n if (this.calculateTextPosition) {\n this.calculateTextPosition(tmpTextPosCalcRes, textConfig, layoutRect);\n } else {\n calculateTextPosition(tmpTextPosCalcRes, textConfig, layoutRect);\n }\n innerTransformable.x = tmpTextPosCalcRes.x;\n innerTransformable.y = tmpTextPosCalcRes.y;\n textAlign = tmpTextPosCalcRes.align;\n textVerticalAlign = tmpTextPosCalcRes.verticalAlign;\n var textOrigin = textConfig.origin;\n if (textOrigin && textConfig.rotation != null) {\n var relOriginX = void 0;\n var relOriginY = void 0;\n if (textOrigin === 'center') {\n relOriginX = layoutRect.width * 0.5;\n relOriginY = layoutRect.height * 0.5;\n } else {\n relOriginX = parsePercent(textOrigin[0], layoutRect.width);\n relOriginY = parsePercent(textOrigin[1], layoutRect.height);\n }\n innerOrigin = true;\n innerTransformable.originX = -innerTransformable.x + relOriginX + (isLocal ? 0 : layoutRect.x);\n innerTransformable.originY = -innerTransformable.y + relOriginY + (isLocal ? 0 : layoutRect.y);\n }\n }\n if (textConfig.rotation != null) {\n innerTransformable.rotation = textConfig.rotation;\n }\n var textOffset = textConfig.offset;\n if (textOffset) {\n innerTransformable.x += textOffset[0];\n innerTransformable.y += textOffset[1];\n if (!innerOrigin) {\n innerTransformable.originX = -textOffset[0];\n innerTransformable.originY = -textOffset[1];\n }\n }\n var isInside = textConfig.inside == null ? typeof textConfig.position === 'string' && textConfig.position.indexOf('inside') >= 0 : textConfig.inside;\n var innerTextDefaultStyle = this._innerTextDefaultStyle || (this._innerTextDefaultStyle = {});\n var textFill = void 0;\n var textStroke = void 0;\n var autoStroke = void 0;\n if (isInside && this.canBeInsideText()) {\n textFill = textConfig.insideFill;\n textStroke = textConfig.insideStroke;\n if (textFill == null || textFill === 'auto') {\n textFill = this.getInsideTextFill();\n }\n if (textStroke == null || textStroke === 'auto') {\n textStroke = this.getInsideTextStroke(textFill);\n autoStroke = true;\n }\n } else {\n textFill = textConfig.outsideFill;\n textStroke = textConfig.outsideStroke;\n if (textFill == null || textFill === 'auto') {\n textFill = this.getOutsideFill();\n }\n if (textStroke == null || textStroke === 'auto') {\n textStroke = this.getOutsideStroke(textFill);\n autoStroke = true;\n }\n }\n textFill = textFill || '#000';\n if (textFill !== innerTextDefaultStyle.fill || textStroke !== innerTextDefaultStyle.stroke || autoStroke !== innerTextDefaultStyle.autoStroke || textAlign !== innerTextDefaultStyle.align || textVerticalAlign !== innerTextDefaultStyle.verticalAlign) {\n textStyleChanged = true;\n innerTextDefaultStyle.fill = textFill;\n innerTextDefaultStyle.stroke = textStroke;\n innerTextDefaultStyle.autoStroke = autoStroke;\n innerTextDefaultStyle.align = textAlign;\n innerTextDefaultStyle.verticalAlign = textVerticalAlign;\n textEl.setDefaultTextStyle(innerTextDefaultStyle);\n }\n textEl.__dirty |= REDRAW_BIT;\n if (textStyleChanged) {\n textEl.dirtyStyle(true);\n }\n }\n };\n Element.prototype.canBeInsideText = function () {\n return true;\n };\n Element.prototype.getInsideTextFill = function () {\n return '#fff';\n };\n Element.prototype.getInsideTextStroke = function (textFill) {\n return '#000';\n };\n Element.prototype.getOutsideFill = function () {\n return this.__zr && this.__zr.isDarkMode() ? LIGHT_LABEL_COLOR : DARK_LABEL_COLOR;\n };\n Element.prototype.getOutsideStroke = function (textFill) {\n var backgroundColor = this.__zr && this.__zr.getBackgroundColor();\n var colorArr = typeof backgroundColor === 'string' && parse(backgroundColor);\n if (!colorArr) {\n colorArr = [255, 255, 255, 1];\n }\n var alpha = colorArr[3];\n var isDark = this.__zr.isDarkMode();\n for (var i = 0; i < 3; i++) {\n colorArr[i] = colorArr[i] * alpha + (isDark ? 0 : 255) * (1 - alpha);\n }\n colorArr[3] = 1;\n return stringify(colorArr, 'rgba');\n };\n Element.prototype.traverse = function (cb, context) {};\n Element.prototype.attrKV = function (key, value) {\n if (key === 'textConfig') {\n this.setTextConfig(value);\n } else if (key === 'textContent') {\n this.setTextContent(value);\n } else if (key === 'clipPath') {\n this.setClipPath(value);\n } else if (key === 'extra') {\n this.extra = this.extra || {};\n extend(this.extra, value);\n } else {\n this[key] = value;\n }\n };\n Element.prototype.hide = function () {\n this.ignore = true;\n this.markRedraw();\n };\n Element.prototype.show = function () {\n this.ignore = false;\n this.markRedraw();\n };\n Element.prototype.attr = function (keyOrObj, value) {\n if (typeof keyOrObj === 'string') {\n this.attrKV(keyOrObj, value);\n } else if (isObject(keyOrObj)) {\n var obj = keyOrObj;\n var keysArr = keys(obj);\n for (var i = 0; i < keysArr.length; i++) {\n var key = keysArr[i];\n this.attrKV(key, keyOrObj[key]);\n }\n }\n this.markRedraw();\n return this;\n };\n Element.prototype.saveCurrentToNormalState = function (toState) {\n this._innerSaveToNormal(toState);\n var normalState = this._normalState;\n for (var i = 0; i < this.animators.length; i++) {\n var animator = this.animators[i];\n var fromStateTransition = animator.__fromStateTransition;\n if (animator.getLoop() || fromStateTransition && fromStateTransition !== PRESERVED_NORMAL_STATE) {\n continue;\n }\n var targetName = animator.targetName;\n var target = targetName ? normalState[targetName] : normalState;\n animator.saveTo(target);\n }\n };\n Element.prototype._innerSaveToNormal = function (toState) {\n var normalState = this._normalState;\n if (!normalState) {\n normalState = this._normalState = {};\n }\n if (toState.textConfig && !normalState.textConfig) {\n normalState.textConfig = this.textConfig;\n }\n this._savePrimaryToNormal(toState, normalState, PRIMARY_STATES_KEYS);\n };\n Element.prototype._savePrimaryToNormal = function (toState, normalState, primaryKeys) {\n for (var i = 0; i < primaryKeys.length; i++) {\n var key = primaryKeys[i];\n if (toState[key] != null && !(key in normalState)) {\n normalState[key] = this[key];\n }\n }\n };\n Element.prototype.hasState = function () {\n return this.currentStates.length > 0;\n };\n Element.prototype.getState = function (name) {\n return this.states[name];\n };\n Element.prototype.ensureState = function (name) {\n var states = this.states;\n if (!states[name]) {\n states[name] = {};\n }\n return states[name];\n };\n Element.prototype.clearStates = function (noAnimation) {\n this.useState(PRESERVED_NORMAL_STATE, false, noAnimation);\n };\n Element.prototype.useState = function (stateName, keepCurrentStates, noAnimation, forceUseHoverLayer) {\n var toNormalState = stateName === PRESERVED_NORMAL_STATE;\n var hasStates = this.hasState();\n if (!hasStates && toNormalState) {\n return;\n }\n var currentStates = this.currentStates;\n var animationCfg = this.stateTransition;\n if (indexOf(currentStates, stateName) >= 0 && (keepCurrentStates || currentStates.length === 1)) {\n return;\n }\n var state;\n if (this.stateProxy && !toNormalState) {\n state = this.stateProxy(stateName);\n }\n if (!state) {\n state = this.states && this.states[stateName];\n }\n if (!state && !toNormalState) {\n logError(\"State \" + stateName + \" not exists.\");\n return;\n }\n if (!toNormalState) {\n this.saveCurrentToNormalState(state);\n }\n var useHoverLayer = !!(state && state.hoverLayer || forceUseHoverLayer);\n if (useHoverLayer) {\n this._toggleHoverLayerFlag(true);\n }\n this._applyStateObj(stateName, state, this._normalState, keepCurrentStates, !noAnimation && !this.__inHover && animationCfg && animationCfg.duration > 0, animationCfg);\n var textContent = this._textContent;\n var textGuide = this._textGuide;\n if (textContent) {\n textContent.useState(stateName, keepCurrentStates, noAnimation, useHoverLayer);\n }\n if (textGuide) {\n textGuide.useState(stateName, keepCurrentStates, noAnimation, useHoverLayer);\n }\n if (toNormalState) {\n this.currentStates = [];\n this._normalState = {};\n } else {\n if (!keepCurrentStates) {\n this.currentStates = [stateName];\n } else {\n this.currentStates.push(stateName);\n }\n }\n this._updateAnimationTargets();\n this.markRedraw();\n if (!useHoverLayer && this.__inHover) {\n this._toggleHoverLayerFlag(false);\n this.__dirty &= ~REDRAW_BIT;\n }\n return state;\n };\n Element.prototype.useStates = function (states, noAnimation, forceUseHoverLayer) {\n if (!states.length) {\n this.clearStates();\n } else {\n var stateObjects = [];\n var currentStates = this.currentStates;\n var len = states.length;\n var notChange = len === currentStates.length;\n if (notChange) {\n for (var i = 0; i < len; i++) {\n if (states[i] !== currentStates[i]) {\n notChange = false;\n break;\n }\n }\n }\n if (notChange) {\n return;\n }\n for (var i = 0; i < len; i++) {\n var stateName = states[i];\n var stateObj = void 0;\n if (this.stateProxy) {\n stateObj = this.stateProxy(stateName, states);\n }\n if (!stateObj) {\n stateObj = this.states[stateName];\n }\n if (stateObj) {\n stateObjects.push(stateObj);\n }\n }\n var lastStateObj = stateObjects[len - 1];\n var useHoverLayer = !!(lastStateObj && lastStateObj.hoverLayer || forceUseHoverLayer);\n if (useHoverLayer) {\n this._toggleHoverLayerFlag(true);\n }\n var mergedState = this._mergeStates(stateObjects);\n var animationCfg = this.stateTransition;\n this.saveCurrentToNormalState(mergedState);\n this._applyStateObj(states.join(','), mergedState, this._normalState, false, !noAnimation && !this.__inHover && animationCfg && animationCfg.duration > 0, animationCfg);\n var textContent = this._textContent;\n var textGuide = this._textGuide;\n if (textContent) {\n textContent.useStates(states, noAnimation, useHoverLayer);\n }\n if (textGuide) {\n textGuide.useStates(states, noAnimation, useHoverLayer);\n }\n this._updateAnimationTargets();\n this.currentStates = states.slice();\n this.markRedraw();\n if (!useHoverLayer && this.__inHover) {\n this._toggleHoverLayerFlag(false);\n this.__dirty &= ~REDRAW_BIT;\n }\n }\n };\n Element.prototype.isSilent = function () {\n var isSilent = this.silent;\n var ancestor = this.parent;\n while (!isSilent && ancestor) {\n if (ancestor.silent) {\n isSilent = true;\n break;\n }\n ancestor = ancestor.parent;\n }\n return isSilent;\n };\n Element.prototype._updateAnimationTargets = function () {\n for (var i = 0; i < this.animators.length; i++) {\n var animator = this.animators[i];\n if (animator.targetName) {\n animator.changeTarget(this[animator.targetName]);\n }\n }\n };\n Element.prototype.removeState = function (state) {\n var idx = indexOf(this.currentStates, state);\n if (idx >= 0) {\n var currentStates = this.currentStates.slice();\n currentStates.splice(idx, 1);\n this.useStates(currentStates);\n }\n };\n Element.prototype.replaceState = function (oldState, newState, forceAdd) {\n var currentStates = this.currentStates.slice();\n var idx = indexOf(currentStates, oldState);\n var newStateExists = indexOf(currentStates, newState) >= 0;\n if (idx >= 0) {\n if (!newStateExists) {\n currentStates[idx] = newState;\n } else {\n currentStates.splice(idx, 1);\n }\n } else if (forceAdd && !newStateExists) {\n currentStates.push(newState);\n }\n this.useStates(currentStates);\n };\n Element.prototype.toggleState = function (state, enable) {\n if (enable) {\n this.useState(state, true);\n } else {\n this.removeState(state);\n }\n };\n Element.prototype._mergeStates = function (states) {\n var mergedState = {};\n var mergedTextConfig;\n for (var i = 0; i < states.length; i++) {\n var state = states[i];\n extend(mergedState, state);\n if (state.textConfig) {\n mergedTextConfig = mergedTextConfig || {};\n extend(mergedTextConfig, state.textConfig);\n }\n }\n if (mergedTextConfig) {\n mergedState.textConfig = mergedTextConfig;\n }\n return mergedState;\n };\n Element.prototype._applyStateObj = function (stateName, state, normalState, keepCurrentStates, transition, animationCfg) {\n var needsRestoreToNormal = !(state && keepCurrentStates);\n if (state && state.textConfig) {\n this.textConfig = extend({}, keepCurrentStates ? this.textConfig : normalState.textConfig);\n extend(this.textConfig, state.textConfig);\n } else if (needsRestoreToNormal) {\n if (normalState.textConfig) {\n this.textConfig = normalState.textConfig;\n }\n }\n var transitionTarget = {};\n var hasTransition = false;\n for (var i = 0; i < PRIMARY_STATES_KEYS.length; i++) {\n var key = PRIMARY_STATES_KEYS[i];\n var propNeedsTransition = transition && DEFAULT_ANIMATABLE_MAP[key];\n if (state && state[key] != null) {\n if (propNeedsTransition) {\n hasTransition = true;\n transitionTarget[key] = state[key];\n } else {\n this[key] = state[key];\n }\n } else if (needsRestoreToNormal) {\n if (normalState[key] != null) {\n if (propNeedsTransition) {\n hasTransition = true;\n transitionTarget[key] = normalState[key];\n } else {\n this[key] = normalState[key];\n }\n }\n }\n }\n if (!transition) {\n for (var i = 0; i < this.animators.length; i++) {\n var animator = this.animators[i];\n var targetName = animator.targetName;\n if (!animator.getLoop()) {\n animator.__changeFinalValue(targetName ? (state || normalState)[targetName] : state || normalState);\n }\n }\n }\n if (hasTransition) {\n this._transitionState(stateName, transitionTarget, animationCfg);\n }\n };\n Element.prototype._attachComponent = function (componentEl) {\n if (componentEl.__zr && !componentEl.__hostTarget) {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error('Text element has been added to zrender.');\n }\n return;\n }\n if (componentEl === this) {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error('Recursive component attachment.');\n }\n return;\n }\n var zr = this.__zr;\n if (zr) {\n componentEl.addSelfToZr(zr);\n }\n componentEl.__zr = zr;\n componentEl.__hostTarget = this;\n };\n Element.prototype._detachComponent = function (componentEl) {\n if (componentEl.__zr) {\n componentEl.removeSelfFromZr(componentEl.__zr);\n }\n componentEl.__zr = null;\n componentEl.__hostTarget = null;\n };\n Element.prototype.getClipPath = function () {\n return this._clipPath;\n };\n Element.prototype.setClipPath = function (clipPath) {\n if (this._clipPath && this._clipPath !== clipPath) {\n this.removeClipPath();\n }\n this._attachComponent(clipPath);\n this._clipPath = clipPath;\n this.markRedraw();\n };\n Element.prototype.removeClipPath = function () {\n var clipPath = this._clipPath;\n if (clipPath) {\n this._detachComponent(clipPath);\n this._clipPath = null;\n this.markRedraw();\n }\n };\n Element.prototype.getTextContent = function () {\n return this._textContent;\n };\n Element.prototype.setTextContent = function (textEl) {\n var previousTextContent = this._textContent;\n if (previousTextContent === textEl) {\n return;\n }\n if (previousTextContent && previousTextContent !== textEl) {\n this.removeTextContent();\n }\n if (process.env.NODE_ENV !== 'production') {\n if (textEl.__zr && !textEl.__hostTarget) {\n throw new Error('Text element has been added to zrender.');\n }\n }\n textEl.innerTransformable = new Transformable();\n this._attachComponent(textEl);\n this._textContent = textEl;\n this.markRedraw();\n };\n Element.prototype.setTextConfig = function (cfg) {\n if (!this.textConfig) {\n this.textConfig = {};\n }\n extend(this.textConfig, cfg);\n this.markRedraw();\n };\n Element.prototype.removeTextConfig = function () {\n this.textConfig = null;\n this.markRedraw();\n };\n Element.prototype.removeTextContent = function () {\n var textEl = this._textContent;\n if (textEl) {\n textEl.innerTransformable = null;\n this._detachComponent(textEl);\n this._textContent = null;\n this._innerTextDefaultStyle = null;\n this.markRedraw();\n }\n };\n Element.prototype.getTextGuideLine = function () {\n return this._textGuide;\n };\n Element.prototype.setTextGuideLine = function (guideLine) {\n if (this._textGuide && this._textGuide !== guideLine) {\n this.removeTextGuideLine();\n }\n this._attachComponent(guideLine);\n this._textGuide = guideLine;\n this.markRedraw();\n };\n Element.prototype.removeTextGuideLine = function () {\n var textGuide = this._textGuide;\n if (textGuide) {\n this._detachComponent(textGuide);\n this._textGuide = null;\n this.markRedraw();\n }\n };\n Element.prototype.markRedraw = function () {\n this.__dirty |= REDRAW_BIT;\n var zr = this.__zr;\n if (zr) {\n if (this.__inHover) {\n zr.refreshHover();\n } else {\n zr.refresh();\n }\n }\n if (this.__hostTarget) {\n this.__hostTarget.markRedraw();\n }\n };\n Element.prototype.dirty = function () {\n this.markRedraw();\n };\n Element.prototype._toggleHoverLayerFlag = function (inHover) {\n this.__inHover = inHover;\n var textContent = this._textContent;\n var textGuide = this._textGuide;\n if (textContent) {\n textContent.__inHover = inHover;\n }\n if (textGuide) {\n textGuide.__inHover = inHover;\n }\n };\n Element.prototype.addSelfToZr = function (zr) {\n if (this.__zr === zr) {\n return;\n }\n this.__zr = zr;\n var animators = this.animators;\n if (animators) {\n for (var i = 0; i < animators.length; i++) {\n zr.animation.addAnimator(animators[i]);\n }\n }\n if (this._clipPath) {\n this._clipPath.addSelfToZr(zr);\n }\n if (this._textContent) {\n this._textContent.addSelfToZr(zr);\n }\n if (this._textGuide) {\n this._textGuide.addSelfToZr(zr);\n }\n };\n Element.prototype.removeSelfFromZr = function (zr) {\n if (!this.__zr) {\n return;\n }\n this.__zr = null;\n var animators = this.animators;\n if (animators) {\n for (var i = 0; i < animators.length; i++) {\n zr.animation.removeAnimator(animators[i]);\n }\n }\n if (this._clipPath) {\n this._clipPath.removeSelfFromZr(zr);\n }\n if (this._textContent) {\n this._textContent.removeSelfFromZr(zr);\n }\n if (this._textGuide) {\n this._textGuide.removeSelfFromZr(zr);\n }\n };\n Element.prototype.animate = function (key, loop, allowDiscreteAnimation) {\n var target = key ? this[key] : this;\n if (process.env.NODE_ENV !== 'production') {\n if (!target) {\n logError('Property \"' + key + '\" is not existed in element ' + this.id);\n return;\n }\n }\n var animator = new Animator(target, loop, allowDiscreteAnimation);\n key && (animator.targetName = key);\n this.addAnimator(animator, key);\n return animator;\n };\n Element.prototype.addAnimator = function (animator, key) {\n var zr = this.__zr;\n var el = this;\n animator.during(function () {\n el.updateDuringAnimation(key);\n }).done(function () {\n var animators = el.animators;\n var idx = indexOf(animators, animator);\n if (idx >= 0) {\n animators.splice(idx, 1);\n }\n });\n this.animators.push(animator);\n if (zr) {\n zr.animation.addAnimator(animator);\n }\n zr && zr.wakeUp();\n };\n Element.prototype.updateDuringAnimation = function (key) {\n this.markRedraw();\n };\n Element.prototype.stopAnimation = function (scope, forwardToLast) {\n var animators = this.animators;\n var len = animators.length;\n var leftAnimators = [];\n for (var i = 0; i < len; i++) {\n var animator = animators[i];\n if (!scope || scope === animator.scope) {\n animator.stop(forwardToLast);\n } else {\n leftAnimators.push(animator);\n }\n }\n this.animators = leftAnimators;\n return this;\n };\n Element.prototype.animateTo = function (target, cfg, animationProps) {\n animateTo(this, target, cfg, animationProps);\n };\n Element.prototype.animateFrom = function (target, cfg, animationProps) {\n animateTo(this, target, cfg, animationProps, true);\n };\n Element.prototype._transitionState = function (stateName, target, cfg, animationProps) {\n var animators = animateTo(this, target, cfg, animationProps);\n for (var i = 0; i < animators.length; i++) {\n animators[i].__fromStateTransition = stateName;\n }\n };\n Element.prototype.getBoundingRect = function () {\n return null;\n };\n Element.prototype.getPaintRect = function () {\n return null;\n };\n Element.initDefaultProps = function () {\n var elProto = Element.prototype;\n elProto.type = 'element';\n elProto.name = '';\n elProto.ignore = elProto.silent = elProto.isGroup = elProto.draggable = elProto.dragging = elProto.ignoreClip = elProto.__inHover = false;\n elProto.__dirty = REDRAW_BIT;\n var logs = {};\n function logDeprecatedError(key, xKey, yKey) {\n if (!logs[key + xKey + yKey]) {\n console.warn(\"DEPRECATED: '\" + key + \"' has been deprecated. use '\" + xKey + \"', '\" + yKey + \"' instead\");\n logs[key + xKey + yKey] = true;\n }\n }\n function createLegacyProperty(key, privateKey, xKey, yKey) {\n Object.defineProperty(elProto, key, {\n get: function () {\n if (process.env.NODE_ENV !== 'production') {\n logDeprecatedError(key, xKey, yKey);\n }\n if (!this[privateKey]) {\n var pos = this[privateKey] = [];\n enhanceArray(this, pos);\n }\n return this[privateKey];\n },\n set: function (pos) {\n if (process.env.NODE_ENV !== 'production') {\n logDeprecatedError(key, xKey, yKey);\n }\n this[xKey] = pos[0];\n this[yKey] = pos[1];\n this[privateKey] = pos;\n enhanceArray(this, pos);\n }\n });\n function enhanceArray(self, pos) {\n Object.defineProperty(pos, 0, {\n get: function () {\n return self[xKey];\n },\n set: function (val) {\n self[xKey] = val;\n }\n });\n Object.defineProperty(pos, 1, {\n get: function () {\n return self[yKey];\n },\n set: function (val) {\n self[yKey] = val;\n }\n });\n }\n }\n if (Object.defineProperty) {\n createLegacyProperty('position', '_legacyPos', 'x', 'y');\n createLegacyProperty('scale', '_legacyScale', 'scaleX', 'scaleY');\n createLegacyProperty('origin', '_legacyOrigin', 'originX', 'originY');\n }\n }();\n return Element;\n}();\nmixin(Element, Eventful);\nmixin(Element, Transformable);\nfunction animateTo(animatable, target, cfg, animationProps, reverse) {\n cfg = cfg || {};\n var animators = [];\n animateToShallow(animatable, '', animatable, target, cfg, animationProps, animators, reverse);\n var finishCount = animators.length;\n var doneHappened = false;\n var cfgDone = cfg.done;\n var cfgAborted = cfg.aborted;\n var doneCb = function () {\n doneHappened = true;\n finishCount--;\n if (finishCount <= 0) {\n doneHappened ? cfgDone && cfgDone() : cfgAborted && cfgAborted();\n }\n };\n var abortedCb = function () {\n finishCount--;\n if (finishCount <= 0) {\n doneHappened ? cfgDone && cfgDone() : cfgAborted && cfgAborted();\n }\n };\n if (!finishCount) {\n cfgDone && cfgDone();\n }\n if (animators.length > 0 && cfg.during) {\n animators[0].during(function (target, percent) {\n cfg.during(percent);\n });\n }\n for (var i = 0; i < animators.length; i++) {\n var animator = animators[i];\n if (doneCb) {\n animator.done(doneCb);\n }\n if (abortedCb) {\n animator.aborted(abortedCb);\n }\n if (cfg.force) {\n animator.duration(cfg.duration);\n }\n animator.start(cfg.easing);\n }\n return animators;\n}\nfunction copyArrShallow(source, target, len) {\n for (var i = 0; i < len; i++) {\n source[i] = target[i];\n }\n}\nfunction is2DArray(value) {\n return isArrayLike(value[0]);\n}\nfunction copyValue(target, source, key) {\n if (isArrayLike(source[key])) {\n if (!isArrayLike(target[key])) {\n target[key] = [];\n }\n if (isTypedArray(source[key])) {\n var len = source[key].length;\n if (target[key].length !== len) {\n target[key] = new source[key].constructor(len);\n copyArrShallow(target[key], source[key], len);\n }\n } else {\n var sourceArr = source[key];\n var targetArr = target[key];\n var len0 = sourceArr.length;\n if (is2DArray(sourceArr)) {\n var len1 = sourceArr[0].length;\n for (var i = 0; i < len0; i++) {\n if (!targetArr[i]) {\n targetArr[i] = Array.prototype.slice.call(sourceArr[i]);\n } else {\n copyArrShallow(targetArr[i], sourceArr[i], len1);\n }\n }\n } else {\n copyArrShallow(targetArr, sourceArr, len0);\n }\n targetArr.length = sourceArr.length;\n }\n } else {\n target[key] = source[key];\n }\n}\nfunction isValueSame(val1, val2) {\n return val1 === val2 || isArrayLike(val1) && isArrayLike(val2) && is1DArraySame(val1, val2);\n}\nfunction is1DArraySame(arr0, arr1) {\n var len = arr0.length;\n if (len !== arr1.length) {\n return false;\n }\n for (var i = 0; i < len; i++) {\n if (arr0[i] !== arr1[i]) {\n return false;\n }\n }\n return true;\n}\nfunction animateToShallow(animatable, topKey, animateObj, target, cfg, animationProps, animators, reverse) {\n var targetKeys = keys(target);\n var duration = cfg.duration;\n var delay = cfg.delay;\n var additive = cfg.additive;\n var setToFinal = cfg.setToFinal;\n var animateAll = !isObject(animationProps);\n var existsAnimators = animatable.animators;\n var animationKeys = [];\n for (var k = 0; k < targetKeys.length; k++) {\n var innerKey = targetKeys[k];\n var targetVal = target[innerKey];\n if (targetVal != null && animateObj[innerKey] != null && (animateAll || animationProps[innerKey])) {\n if (isObject(targetVal) && !isArrayLike(targetVal) && !isGradientObject(targetVal)) {\n if (topKey) {\n if (!reverse) {\n animateObj[innerKey] = targetVal;\n animatable.updateDuringAnimation(topKey);\n }\n continue;\n }\n animateToShallow(animatable, innerKey, animateObj[innerKey], targetVal, cfg, animationProps && animationProps[innerKey], animators, reverse);\n } else {\n animationKeys.push(innerKey);\n }\n } else if (!reverse) {\n animateObj[innerKey] = targetVal;\n animatable.updateDuringAnimation(topKey);\n animationKeys.push(innerKey);\n }\n }\n var keyLen = animationKeys.length;\n if (!additive && keyLen) {\n for (var i = 0; i < existsAnimators.length; i++) {\n var animator = existsAnimators[i];\n if (animator.targetName === topKey) {\n var allAborted = animator.stopTracks(animationKeys);\n if (allAborted) {\n var idx = indexOf(existsAnimators, animator);\n existsAnimators.splice(idx, 1);\n }\n }\n }\n }\n if (!cfg.force) {\n animationKeys = filter(animationKeys, function (key) {\n return !isValueSame(target[key], animateObj[key]);\n });\n keyLen = animationKeys.length;\n }\n if (keyLen > 0 || cfg.force && !animators.length) {\n var revertedSource = void 0;\n var reversedTarget = void 0;\n var sourceClone = void 0;\n if (reverse) {\n reversedTarget = {};\n if (setToFinal) {\n revertedSource = {};\n }\n for (var i = 0; i < keyLen; i++) {\n var innerKey = animationKeys[i];\n reversedTarget[innerKey] = animateObj[innerKey];\n if (setToFinal) {\n revertedSource[innerKey] = target[innerKey];\n } else {\n animateObj[innerKey] = target[innerKey];\n }\n }\n } else if (setToFinal) {\n sourceClone = {};\n for (var i = 0; i < keyLen; i++) {\n var innerKey = animationKeys[i];\n sourceClone[innerKey] = cloneValue(animateObj[innerKey]);\n copyValue(animateObj, target, innerKey);\n }\n }\n var animator = new Animator(animateObj, false, false, additive ? filter(existsAnimators, function (animator) {\n return animator.targetName === topKey;\n }) : null);\n animator.targetName = topKey;\n if (cfg.scope) {\n animator.scope = cfg.scope;\n }\n if (setToFinal && revertedSource) {\n animator.whenWithKeys(0, revertedSource, animationKeys);\n }\n if (sourceClone) {\n animator.whenWithKeys(0, sourceClone, animationKeys);\n }\n animator.whenWithKeys(duration == null ? 500 : duration, reverse ? reversedTarget : target, animationKeys).delay(delay || 0);\n animatable.addAnimator(animator, topKey);\n animators.push(animator);\n }\n}\nexport default Element;","import { __extends } from \"tslib\";\nimport * as zrUtil from '../core/util.js';\nimport Element from '../Element.js';\nimport BoundingRect from '../core/BoundingRect.js';\nvar Group = function (_super) {\n __extends(Group, _super);\n function Group(opts) {\n var _this = _super.call(this) || this;\n _this.isGroup = true;\n _this._children = [];\n _this.attr(opts);\n return _this;\n }\n Group.prototype.childrenRef = function () {\n return this._children;\n };\n Group.prototype.children = function () {\n return this._children.slice();\n };\n Group.prototype.childAt = function (idx) {\n return this._children[idx];\n };\n Group.prototype.childOfName = function (name) {\n var children = this._children;\n for (var i = 0; i < children.length; i++) {\n if (children[i].name === name) {\n return children[i];\n }\n }\n };\n Group.prototype.childCount = function () {\n return this._children.length;\n };\n Group.prototype.add = function (child) {\n if (child) {\n if (child !== this && child.parent !== this) {\n this._children.push(child);\n this._doAdd(child);\n }\n if (process.env.NODE_ENV !== 'production') {\n if (child.__hostTarget) {\n throw 'This elemenet has been used as an attachment';\n }\n }\n }\n return this;\n };\n Group.prototype.addBefore = function (child, nextSibling) {\n if (child && child !== this && child.parent !== this && nextSibling && nextSibling.parent === this) {\n var children = this._children;\n var idx = children.indexOf(nextSibling);\n if (idx >= 0) {\n children.splice(idx, 0, child);\n this._doAdd(child);\n }\n }\n return this;\n };\n Group.prototype.replace = function (oldChild, newChild) {\n var idx = zrUtil.indexOf(this._children, oldChild);\n if (idx >= 0) {\n this.replaceAt(newChild, idx);\n }\n return this;\n };\n Group.prototype.replaceAt = function (child, index) {\n var children = this._children;\n var old = children[index];\n if (child && child !== this && child.parent !== this && child !== old) {\n children[index] = child;\n old.parent = null;\n var zr = this.__zr;\n if (zr) {\n old.removeSelfFromZr(zr);\n }\n this._doAdd(child);\n }\n return this;\n };\n Group.prototype._doAdd = function (child) {\n if (child.parent) {\n child.parent.remove(child);\n }\n child.parent = this;\n var zr = this.__zr;\n if (zr && zr !== child.__zr) {\n child.addSelfToZr(zr);\n }\n zr && zr.refresh();\n };\n Group.prototype.remove = function (child) {\n var zr = this.__zr;\n var children = this._children;\n var idx = zrUtil.indexOf(children, child);\n if (idx < 0) {\n return this;\n }\n children.splice(idx, 1);\n child.parent = null;\n if (zr) {\n child.removeSelfFromZr(zr);\n }\n zr && zr.refresh();\n return this;\n };\n Group.prototype.removeAll = function () {\n var children = this._children;\n var zr = this.__zr;\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n if (zr) {\n child.removeSelfFromZr(zr);\n }\n child.parent = null;\n }\n children.length = 0;\n return this;\n };\n Group.prototype.eachChild = function (cb, context) {\n var children = this._children;\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n cb.call(context, child, i);\n }\n return this;\n };\n Group.prototype.traverse = function (cb, context) {\n for (var i = 0; i < this._children.length; i++) {\n var child = this._children[i];\n var stopped = cb.call(context, child);\n if (child.isGroup && !stopped) {\n child.traverse(cb, context);\n }\n }\n return this;\n };\n Group.prototype.addSelfToZr = function (zr) {\n _super.prototype.addSelfToZr.call(this, zr);\n for (var i = 0; i < this._children.length; i++) {\n var child = this._children[i];\n child.addSelfToZr(zr);\n }\n };\n Group.prototype.removeSelfFromZr = function (zr) {\n _super.prototype.removeSelfFromZr.call(this, zr);\n for (var i = 0; i < this._children.length; i++) {\n var child = this._children[i];\n child.removeSelfFromZr(zr);\n }\n };\n Group.prototype.getBoundingRect = function (includeChildren) {\n var tmpRect = new BoundingRect(0, 0, 0, 0);\n var children = includeChildren || this._children;\n var tmpMat = [];\n var rect = null;\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n if (child.ignore || child.invisible) {\n continue;\n }\n var childRect = child.getBoundingRect();\n var transform = child.getLocalTransform(tmpMat);\n if (transform) {\n BoundingRect.applyTransform(tmpRect, childRect, transform);\n rect = rect || tmpRect.clone();\n rect.union(tmpRect);\n } else {\n rect = rect || childRect.clone();\n rect.union(childRect);\n }\n }\n return rect || tmpRect;\n };\n return Group;\n}(Element);\nGroup.prototype.type = 'group';\nexport default Group;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/*\n* A third-party license is embedded for some of the code in this file:\n* The method \"quantile\" was copied from \"d3.js\".\n* (See more details in the comment of the method below.)\n* The use of the source code of this file is also subject to the terms\n* and consitions of the license of \"d3.js\" (BSD-3Clause, see\n* ).\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nvar RADIAN_EPSILON = 1e-4;\n// Although chrome already enlarge this number to 100 for `toFixed`, but\n// we sill follow the spec for compatibility.\nvar ROUND_SUPPORTED_PRECISION_MAX = 20;\nfunction _trim(str) {\n return str.replace(/^\\s+|\\s+$/g, '');\n}\n/**\n * Linear mapping a value from domain to range\n * @param val\n * @param domain Domain extent domain[0] can be bigger than domain[1]\n * @param range Range extent range[0] can be bigger than range[1]\n * @param clamp Default to be false\n */\nexport function linearMap(val, domain, range, clamp) {\n var d0 = domain[0];\n var d1 = domain[1];\n var r0 = range[0];\n var r1 = range[1];\n var subDomain = d1 - d0;\n var subRange = r1 - r0;\n if (subDomain === 0) {\n return subRange === 0 ? r0 : (r0 + r1) / 2;\n }\n // Avoid accuracy problem in edge, such as\n // 146.39 - 62.83 === 83.55999999999999.\n // See echarts/test/ut/spec/util/number.js#linearMap#accuracyError\n // It is a little verbose for efficiency considering this method\n // is a hotspot.\n if (clamp) {\n if (subDomain > 0) {\n if (val <= d0) {\n return r0;\n } else if (val >= d1) {\n return r1;\n }\n } else {\n if (val >= d0) {\n return r0;\n } else if (val <= d1) {\n return r1;\n }\n }\n } else {\n if (val === d0) {\n return r0;\n }\n if (val === d1) {\n return r1;\n }\n }\n return (val - d0) / subDomain * subRange + r0;\n}\n/**\n * Convert a percent string to absolute number.\n * Returns NaN if percent is not a valid string or number\n */\nexport function parsePercent(percent, all) {\n switch (percent) {\n case 'center':\n case 'middle':\n percent = '50%';\n break;\n case 'left':\n case 'top':\n percent = '0%';\n break;\n case 'right':\n case 'bottom':\n percent = '100%';\n break;\n }\n if (zrUtil.isString(percent)) {\n if (_trim(percent).match(/%$/)) {\n return parseFloat(percent) / 100 * all;\n }\n return parseFloat(percent);\n }\n return percent == null ? NaN : +percent;\n}\nexport function round(x, precision, returnStr) {\n if (precision == null) {\n precision = 10;\n }\n // Avoid range error\n precision = Math.min(Math.max(0, precision), ROUND_SUPPORTED_PRECISION_MAX);\n // PENDING: 1.005.toFixed(2) is '1.00' rather than '1.01'\n x = (+x).toFixed(precision);\n return returnStr ? x : +x;\n}\n/**\n * Inplacd asc sort arr.\n * The input arr will be modified.\n */\nexport function asc(arr) {\n arr.sort(function (a, b) {\n return a - b;\n });\n return arr;\n}\n/**\n * Get precision.\n */\nexport function getPrecision(val) {\n val = +val;\n if (isNaN(val)) {\n return 0;\n }\n // It is much faster than methods converting number to string as follows\n // let tmp = val.toString();\n // return tmp.length - 1 - tmp.indexOf('.');\n // especially when precision is low\n // Notice:\n // (1) If the loop count is over about 20, it is slower than `getPrecisionSafe`.\n // (see https://jsbench.me/2vkpcekkvw/1)\n // (2) If the val is less than for example 1e-15, the result may be incorrect.\n // (see test/ut/spec/util/number.test.ts `getPrecision_equal_random`)\n if (val > 1e-14) {\n var e = 1;\n for (var i = 0; i < 15; i++, e *= 10) {\n if (Math.round(val * e) / e === val) {\n return i;\n }\n }\n }\n return getPrecisionSafe(val);\n}\n/**\n * Get precision with slow but safe method\n */\nexport function getPrecisionSafe(val) {\n // toLowerCase for: '3.4E-12'\n var str = val.toString().toLowerCase();\n // Consider scientific notation: '3.4e-12' '3.4e+12'\n var eIndex = str.indexOf('e');\n var exp = eIndex > 0 ? +str.slice(eIndex + 1) : 0;\n var significandPartLen = eIndex > 0 ? eIndex : str.length;\n var dotIndex = str.indexOf('.');\n var decimalPartLen = dotIndex < 0 ? 0 : significandPartLen - 1 - dotIndex;\n return Math.max(0, decimalPartLen - exp);\n}\n/**\n * Minimal dicernible data precisioin according to a single pixel.\n */\nexport function getPixelPrecision(dataExtent, pixelExtent) {\n var log = Math.log;\n var LN10 = Math.LN10;\n var dataQuantity = Math.floor(log(dataExtent[1] - dataExtent[0]) / LN10);\n var sizeQuantity = Math.round(log(Math.abs(pixelExtent[1] - pixelExtent[0])) / LN10);\n // toFixed() digits argument must be between 0 and 20.\n var precision = Math.min(Math.max(-dataQuantity + sizeQuantity, 0), 20);\n return !isFinite(precision) ? 20 : precision;\n}\n/**\n * Get a data of given precision, assuring the sum of percentages\n * in valueList is 1.\n * The largest remainder method is used.\n * https://en.wikipedia.org/wiki/Largest_remainder_method\n *\n * @param valueList a list of all data\n * @param idx index of the data to be processed in valueList\n * @param precision integer number showing digits of precision\n * @return percent ranging from 0 to 100\n */\nexport function getPercentWithPrecision(valueList, idx, precision) {\n if (!valueList[idx]) {\n return 0;\n }\n var seats = getPercentSeats(valueList, precision);\n return seats[idx] || 0;\n}\n/**\n * Get a data of given precision, assuring the sum of percentages\n * in valueList is 1.\n * The largest remainder method is used.\n * https://en.wikipedia.org/wiki/Largest_remainder_method\n *\n * @param valueList a list of all data\n * @param precision integer number showing digits of precision\n * @return {Array}\n */\nexport function getPercentSeats(valueList, precision) {\n var sum = zrUtil.reduce(valueList, function (acc, val) {\n return acc + (isNaN(val) ? 0 : val);\n }, 0);\n if (sum === 0) {\n return [];\n }\n var digits = Math.pow(10, precision);\n var votesPerQuota = zrUtil.map(valueList, function (val) {\n return (isNaN(val) ? 0 : val) / sum * digits * 100;\n });\n var targetSeats = digits * 100;\n var seats = zrUtil.map(votesPerQuota, function (votes) {\n // Assign automatic seats.\n return Math.floor(votes);\n });\n var currentSum = zrUtil.reduce(seats, function (acc, val) {\n return acc + val;\n }, 0);\n var remainder = zrUtil.map(votesPerQuota, function (votes, idx) {\n return votes - seats[idx];\n });\n // Has remainding votes.\n while (currentSum < targetSeats) {\n // Find next largest remainder.\n var max = Number.NEGATIVE_INFINITY;\n var maxId = null;\n for (var i = 0, len = remainder.length; i < len; ++i) {\n if (remainder[i] > max) {\n max = remainder[i];\n maxId = i;\n }\n }\n // Add a vote to max remainder.\n ++seats[maxId];\n remainder[maxId] = 0;\n ++currentSum;\n }\n return zrUtil.map(seats, function (seat) {\n return seat / digits;\n });\n}\n/**\n * Solve the floating point adding problem like 0.1 + 0.2 === 0.30000000000000004\n * See \n */\nexport function addSafe(val0, val1) {\n var maxPrecision = Math.max(getPrecision(val0), getPrecision(val1));\n // const multiplier = Math.pow(10, maxPrecision);\n // return (Math.round(val0 * multiplier) + Math.round(val1 * multiplier)) / multiplier;\n var sum = val0 + val1;\n // // PENDING: support more?\n return maxPrecision > ROUND_SUPPORTED_PRECISION_MAX ? sum : round(sum, maxPrecision);\n}\n// Number.MAX_SAFE_INTEGER, ie do not support.\nexport var MAX_SAFE_INTEGER = 9007199254740991;\n/**\n * To 0 - 2 * PI, considering negative radian.\n */\nexport function remRadian(radian) {\n var pi2 = Math.PI * 2;\n return (radian % pi2 + pi2) % pi2;\n}\n/**\n * @param {type} radian\n * @return {boolean}\n */\nexport function isRadianAroundZero(val) {\n return val > -RADIAN_EPSILON && val < RADIAN_EPSILON;\n}\n// eslint-disable-next-line\nvar TIME_REG = /^(?:(\\d{4})(?:[-\\/](\\d{1,2})(?:[-\\/](\\d{1,2})(?:[T ](\\d{1,2})(?::(\\d{1,2})(?::(\\d{1,2})(?:[.,](\\d+))?)?)?(Z|[\\+\\-]\\d\\d:?\\d\\d)?)?)?)?)?$/; // jshint ignore:line\n/**\n * @param value valid type: number | string | Date, otherwise return `new Date(NaN)`\n * These values can be accepted:\n * + An instance of Date, represent a time in its own time zone.\n * + Or string in a subset of ISO 8601, only including:\n * + only year, month, date: '2012-03', '2012-03-01', '2012-03-01 05', '2012-03-01 05:06',\n * + separated with T or space: '2012-03-01T12:22:33.123', '2012-03-01 12:22:33.123',\n * + time zone: '2012-03-01T12:22:33Z', '2012-03-01T12:22:33+8000', '2012-03-01T12:22:33-05:00',\n * all of which will be treated as local time if time zone is not specified\n * (see ).\n * + Or other string format, including (all of which will be treated as local time):\n * '2012', '2012-3-1', '2012/3/1', '2012/03/01',\n * '2009/6/12 2:00', '2009/6/12 2:05:08', '2009/6/12 2:05:08.123'\n * + a timestamp, which represent a time in UTC.\n * @return date Never be null/undefined. If invalid, return `new Date(NaN)`.\n */\nexport function parseDate(value) {\n if (value instanceof Date) {\n return value;\n } else if (zrUtil.isString(value)) {\n // Different browsers parse date in different way, so we parse it manually.\n // Some other issues:\n // new Date('1970-01-01') is UTC,\n // new Date('1970/01/01') and new Date('1970-1-01') is local.\n // See issue #3623\n var match = TIME_REG.exec(value);\n if (!match) {\n // return Invalid Date.\n return new Date(NaN);\n }\n // Use local time when no timezone offset is specified.\n if (!match[8]) {\n // match[n] can only be string or undefined.\n // But take care of '12' + 1 => '121'.\n return new Date(+match[1], +(match[2] || 1) - 1, +match[3] || 1, +match[4] || 0, +(match[5] || 0), +match[6] || 0, match[7] ? +match[7].substring(0, 3) : 0);\n }\n // Timezoneoffset of Javascript Date has considered DST (Daylight Saving Time,\n // https://tc39.github.io/ecma262/#sec-daylight-saving-time-adjustment).\n // For example, system timezone is set as \"Time Zone: America/Toronto\",\n // then these code will get different result:\n // `new Date(1478411999999).getTimezoneOffset(); // get 240`\n // `new Date(1478412000000).getTimezoneOffset(); // get 300`\n // So we should not use `new Date`, but use `Date.UTC`.\n else {\n var hour = +match[4] || 0;\n if (match[8].toUpperCase() !== 'Z') {\n hour -= +match[8].slice(0, 3);\n }\n return new Date(Date.UTC(+match[1], +(match[2] || 1) - 1, +match[3] || 1, hour, +(match[5] || 0), +match[6] || 0, match[7] ? +match[7].substring(0, 3) : 0));\n }\n } else if (value == null) {\n return new Date(NaN);\n }\n return new Date(Math.round(value));\n}\n/**\n * Quantity of a number. e.g. 0.1, 1, 10, 100\n *\n * @param val\n * @return\n */\nexport function quantity(val) {\n return Math.pow(10, quantityExponent(val));\n}\n/**\n * Exponent of the quantity of a number\n * e.g., 1234 equals to 1.234*10^3, so quantityExponent(1234) is 3\n *\n * @param val non-negative value\n * @return\n */\nexport function quantityExponent(val) {\n if (val === 0) {\n return 0;\n }\n var exp = Math.floor(Math.log(val) / Math.LN10);\n /**\n * exp is expected to be the rounded-down result of the base-10 log of val.\n * But due to the precision loss with Math.log(val), we need to restore it\n * using 10^exp to make sure we can get val back from exp. #11249\n */\n if (val / Math.pow(10, exp) >= 10) {\n exp++;\n }\n return exp;\n}\n/**\n * find a “nice” number approximately equal to x. Round the number if round = true,\n * take ceiling if round = false. The primary observation is that the “nicest”\n * numbers in decimal are 1, 2, and 5, and all power-of-ten multiples of these numbers.\n *\n * See \"Nice Numbers for Graph Labels\" of Graphic Gems.\n *\n * @param val Non-negative value.\n * @param round\n * @return Niced number\n */\nexport function nice(val, round) {\n var exponent = quantityExponent(val);\n var exp10 = Math.pow(10, exponent);\n var f = val / exp10; // 1 <= f < 10\n var nf;\n if (round) {\n if (f < 1.5) {\n nf = 1;\n } else if (f < 2.5) {\n nf = 2;\n } else if (f < 4) {\n nf = 3;\n } else if (f < 7) {\n nf = 5;\n } else {\n nf = 10;\n }\n } else {\n if (f < 1) {\n nf = 1;\n } else if (f < 2) {\n nf = 2;\n } else if (f < 3) {\n nf = 3;\n } else if (f < 5) {\n nf = 5;\n } else {\n nf = 10;\n }\n }\n val = nf * exp10;\n // Fix 3 * 0.1 === 0.30000000000000004 issue (see IEEE 754).\n // 20 is the uppper bound of toFixed.\n return exponent >= -20 ? +val.toFixed(exponent < 0 ? -exponent : 0) : val;\n}\n/**\n * This code was copied from \"d3.js\"\n * .\n * See the license statement at the head of this file.\n * @param ascArr\n */\nexport function quantile(ascArr, p) {\n var H = (ascArr.length - 1) * p + 1;\n var h = Math.floor(H);\n var v = +ascArr[h - 1];\n var e = H - h;\n return e ? v + e * (ascArr[h] - v) : v;\n}\n/**\n * Order intervals asc, and split them when overlap.\n * expect(numberUtil.reformIntervals([\n * {interval: [18, 62], close: [1, 1]},\n * {interval: [-Infinity, -70], close: [0, 0]},\n * {interval: [-70, -26], close: [1, 1]},\n * {interval: [-26, 18], close: [1, 1]},\n * {interval: [62, 150], close: [1, 1]},\n * {interval: [106, 150], close: [1, 1]},\n * {interval: [150, Infinity], close: [0, 0]}\n * ])).toEqual([\n * {interval: [-Infinity, -70], close: [0, 0]},\n * {interval: [-70, -26], close: [1, 1]},\n * {interval: [-26, 18], close: [0, 1]},\n * {interval: [18, 62], close: [0, 1]},\n * {interval: [62, 150], close: [0, 1]},\n * {interval: [150, Infinity], close: [0, 0]}\n * ]);\n * @param list, where `close` mean open or close\n * of the interval, and Infinity can be used.\n * @return The origin list, which has been reformed.\n */\nexport function reformIntervals(list) {\n list.sort(function (a, b) {\n return littleThan(a, b, 0) ? -1 : 1;\n });\n var curr = -Infinity;\n var currClose = 1;\n for (var i = 0; i < list.length;) {\n var interval = list[i].interval;\n var close_1 = list[i].close;\n for (var lg = 0; lg < 2; lg++) {\n if (interval[lg] <= curr) {\n interval[lg] = curr;\n close_1[lg] = !lg ? 1 - currClose : 1;\n }\n curr = interval[lg];\n currClose = close_1[lg];\n }\n if (interval[0] === interval[1] && close_1[0] * close_1[1] !== 1) {\n list.splice(i, 1);\n } else {\n i++;\n }\n }\n return list;\n function littleThan(a, b, lg) {\n return a.interval[lg] < b.interval[lg] || a.interval[lg] === b.interval[lg] && (a.close[lg] - b.close[lg] === (!lg ? 1 : -1) || !lg && littleThan(a, b, 1));\n }\n}\n/**\n * [Numeric is defined as]:\n * `parseFloat(val) == val`\n * For example:\n * numeric:\n * typeof number except NaN, '-123', '123', '2e3', '-2e3', '011', 'Infinity', Infinity,\n * and they rounded by white-spaces or line-terminal like ' -123 \\n ' (see es spec)\n * not-numeric:\n * null, undefined, [], {}, true, false, 'NaN', NaN, '123ab',\n * empty string, string with only white-spaces or line-terminal (see es spec),\n * 0x12, '0x12', '-0x12', 012, '012', '-012',\n * non-string, ...\n *\n * @test See full test cases in `test/ut/spec/util/number.js`.\n * @return Must be a typeof number. If not numeric, return NaN.\n */\nexport function numericToNumber(val) {\n var valFloat = parseFloat(val);\n return valFloat == val // eslint-disable-line eqeqeq\n && (valFloat !== 0 || !zrUtil.isString(val) || val.indexOf('x') <= 0) // For case ' 0x0 '.\n ? valFloat : NaN;\n}\n/**\n * Definition of \"numeric\": see `numericToNumber`.\n */\nexport function isNumeric(val) {\n return !isNaN(numericToNumber(val));\n}\n/**\n * Use random base to prevent users hard code depending on\n * this auto generated marker id.\n * @return An positive integer.\n */\nexport function getRandomIdBase() {\n return Math.round(Math.random() * 9);\n}\n/**\n * Get the greatest common divisor.\n *\n * @param {number} a one number\n * @param {number} b the other number\n */\nexport function getGreatestCommonDividor(a, b) {\n if (b === 0) {\n return a;\n }\n return getGreatestCommonDividor(b, a % b);\n}\n/**\n * Get the least common multiple.\n *\n * @param {number} a one number\n * @param {number} b the other number\n */\nexport function getLeastCommonMultiple(a, b) {\n if (a == null) {\n return b;\n }\n if (b == null) {\n return a;\n }\n return a * b / getGreatestCommonDividor(a, b);\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { map, isString, isFunction, eqNaN, isRegExp } from 'zrender/lib/core/util.js';\nvar ECHARTS_PREFIX = '[ECharts] ';\nvar storedLogs = {};\nvar hasConsole = typeof console !== 'undefined'\n// eslint-disable-next-line\n&& console.warn && console.log;\nfunction outputLog(type, str, onlyOnce) {\n if (hasConsole) {\n if (onlyOnce) {\n if (storedLogs[str]) {\n return;\n }\n storedLogs[str] = true;\n }\n // eslint-disable-next-line\n console[type](ECHARTS_PREFIX + str);\n }\n}\nexport function log(str, onlyOnce) {\n outputLog('log', str, onlyOnce);\n}\nexport function warn(str, onlyOnce) {\n outputLog('warn', str, onlyOnce);\n}\nexport function error(str, onlyOnce) {\n outputLog('error', str, onlyOnce);\n}\nexport function deprecateLog(str) {\n if (process.env.NODE_ENV !== 'production') {\n // Not display duplicate message.\n outputLog('warn', 'DEPRECATED: ' + str, true);\n }\n}\nexport function deprecateReplaceLog(oldOpt, newOpt, scope) {\n if (process.env.NODE_ENV !== 'production') {\n deprecateLog((scope ? \"[\" + scope + \"]\" : '') + (oldOpt + \" is deprecated, use \" + newOpt + \" instead.\"));\n }\n}\n/**\n * If in __DEV__ environment, get console printable message for users hint.\n * Parameters are separated by ' '.\n * @usage\n * makePrintable('This is an error on', someVar, someObj);\n *\n * @param hintInfo anything about the current execution context to hint users.\n * @throws Error\n */\nexport function makePrintable() {\n var hintInfo = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n hintInfo[_i] = arguments[_i];\n }\n var msg = '';\n if (process.env.NODE_ENV !== 'production') {\n // Fuzzy stringify for print.\n // This code only exist in dev environment.\n var makePrintableStringIfPossible_1 = function (val) {\n return val === void 0 ? 'undefined' : val === Infinity ? 'Infinity' : val === -Infinity ? '-Infinity' : eqNaN(val) ? 'NaN' : val instanceof Date ? 'Date(' + val.toISOString() + ')' : isFunction(val) ? 'function () { ... }' : isRegExp(val) ? val + '' : null;\n };\n msg = map(hintInfo, function (arg) {\n if (isString(arg)) {\n // Print without quotation mark for some statement.\n return arg;\n } else {\n var printableStr = makePrintableStringIfPossible_1(arg);\n if (printableStr != null) {\n return printableStr;\n } else if (typeof JSON !== 'undefined' && JSON.stringify) {\n try {\n return JSON.stringify(arg, function (n, val) {\n var printableStr = makePrintableStringIfPossible_1(val);\n return printableStr == null ? val : printableStr;\n });\n // In most cases the info object is small, so do not line break.\n } catch (err) {\n return '?';\n }\n } else {\n return '?';\n }\n }\n }).join(' ');\n }\n return msg;\n}\n/**\n * @throws Error\n */\nexport function throwError(msg) {\n throw new Error(msg);\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { each, isObject, isArray, createHashMap, map, assert, isString, indexOf, isStringSafe, isNumber } from 'zrender/lib/core/util.js';\nimport env from 'zrender/lib/core/env.js';\nimport { isNumeric, getRandomIdBase, getPrecision, round } from './number.js';\nimport { warn } from './log.js';\nfunction interpolateNumber(p0, p1, percent) {\n return (p1 - p0) * percent + p0;\n}\n/**\n * Make the name displayable. But we should\n * make sure it is not duplicated with user\n * specified name, so use '\\0';\n */\nvar DUMMY_COMPONENT_NAME_PREFIX = 'series\\0';\nvar INTERNAL_COMPONENT_ID_PREFIX = '\\0_ec_\\0';\n/**\n * If value is not array, then translate it to array.\n * @param {*} value\n * @return {Array} [value] or value\n */\nexport function normalizeToArray(value) {\n return value instanceof Array ? value : value == null ? [] : [value];\n}\n/**\n * Sync default option between normal and emphasis like `position` and `show`\n * In case some one will write code like\n * label: {\n * show: false,\n * position: 'outside',\n * fontSize: 18\n * },\n * emphasis: {\n * label: { show: true }\n * }\n */\nexport function defaultEmphasis(opt, key, subOpts) {\n // Caution: performance sensitive.\n if (opt) {\n opt[key] = opt[key] || {};\n opt.emphasis = opt.emphasis || {};\n opt.emphasis[key] = opt.emphasis[key] || {};\n // Default emphasis option from normal\n for (var i = 0, len = subOpts.length; i < len; i++) {\n var subOptName = subOpts[i];\n if (!opt.emphasis[key].hasOwnProperty(subOptName) && opt[key].hasOwnProperty(subOptName)) {\n opt.emphasis[key][subOptName] = opt[key][subOptName];\n }\n }\n }\n}\nexport var TEXT_STYLE_OPTIONS = ['fontStyle', 'fontWeight', 'fontSize', 'fontFamily', 'rich', 'tag', 'color', 'textBorderColor', 'textBorderWidth', 'width', 'height', 'lineHeight', 'align', 'verticalAlign', 'baseline', 'shadowColor', 'shadowBlur', 'shadowOffsetX', 'shadowOffsetY', 'textShadowColor', 'textShadowBlur', 'textShadowOffsetX', 'textShadowOffsetY', 'backgroundColor', 'borderColor', 'borderWidth', 'borderRadius', 'padding'];\n// modelUtil.LABEL_OPTIONS = modelUtil.TEXT_STYLE_OPTIONS.concat([\n// 'position', 'offset', 'rotate', 'origin', 'show', 'distance', 'formatter',\n// 'fontStyle', 'fontWeight', 'fontSize', 'fontFamily',\n// // FIXME: deprecated, check and remove it.\n// 'textStyle'\n// ]);\n/**\n * The method does not ensure performance.\n * data could be [12, 2323, {value: 223}, [1221, 23], {value: [2, 23]}]\n * This helper method retrieves value from data.\n */\nexport function getDataItemValue(dataItem) {\n return isObject(dataItem) && !isArray(dataItem) && !(dataItem instanceof Date) ? dataItem.value : dataItem;\n}\n/**\n * data could be [12, 2323, {value: 223}, [1221, 23], {value: [2, 23]}]\n * This helper method determine if dataItem has extra option besides value\n */\nexport function isDataItemOption(dataItem) {\n return isObject(dataItem) && !(dataItem instanceof Array);\n // // markLine data can be array\n // && !(dataItem[0] && isObject(dataItem[0]) && !(dataItem[0] instanceof Array));\n}\n;\n/**\n * Mapping to existings for merge.\n *\n * Mode \"normalMege\":\n * The mapping result (merge result) will keep the order of the existing\n * component, rather than the order of new option. Because we should ensure\n * some specified index reference (like xAxisIndex) keep work.\n * And in most cases, \"merge option\" is used to update partial option but not\n * be expected to change the order.\n *\n * Mode \"replaceMege\":\n * (1) Only the id mapped components will be merged.\n * (2) Other existing components (except internal components) will be removed.\n * (3) Other new options will be used to create new component.\n * (4) The index of the existing components will not be modified.\n * That means their might be \"hole\" after the removal.\n * The new components are created first at those available index.\n *\n * Mode \"replaceAll\":\n * This mode try to support that reproduce an echarts instance from another\n * echarts instance (via `getOption`) in some simple cases.\n * In this scenario, the `result` index are exactly the consistent with the `newCmptOptions`,\n * which ensures the component index referring (like `xAxisIndex: ?`) corrent. That is,\n * the \"hole\" in `newCmptOptions` will also be kept.\n * On the contrary, other modes try best to eliminate holes.\n * PENDING: This is an experimental mode yet.\n *\n * @return See the comment of .\n */\nexport function mappingToExists(existings, newCmptOptions, mode) {\n var isNormalMergeMode = mode === 'normalMerge';\n var isReplaceMergeMode = mode === 'replaceMerge';\n var isReplaceAllMode = mode === 'replaceAll';\n existings = existings || [];\n newCmptOptions = (newCmptOptions || []).slice();\n var existingIdIdxMap = createHashMap();\n // Validate id and name on user input option.\n each(newCmptOptions, function (cmptOption, index) {\n if (!isObject(cmptOption)) {\n newCmptOptions[index] = null;\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n // There is some legacy case that name is set as `false`.\n // But should work normally rather than throw error.\n if (cmptOption.id != null && !isValidIdOrName(cmptOption.id)) {\n warnInvalidateIdOrName(cmptOption.id);\n }\n if (cmptOption.name != null && !isValidIdOrName(cmptOption.name)) {\n warnInvalidateIdOrName(cmptOption.name);\n }\n }\n });\n var result = prepareResult(existings, existingIdIdxMap, mode);\n if (isNormalMergeMode || isReplaceMergeMode) {\n mappingById(result, existings, existingIdIdxMap, newCmptOptions);\n }\n if (isNormalMergeMode) {\n mappingByName(result, newCmptOptions);\n }\n if (isNormalMergeMode || isReplaceMergeMode) {\n mappingByIndex(result, newCmptOptions, isReplaceMergeMode);\n } else if (isReplaceAllMode) {\n mappingInReplaceAllMode(result, newCmptOptions);\n }\n makeIdAndName(result);\n // The array `result` MUST NOT contain elided items, otherwise the\n // forEach will omit those items and result in incorrect result.\n return result;\n}\nfunction prepareResult(existings, existingIdIdxMap, mode) {\n var result = [];\n if (mode === 'replaceAll') {\n return result;\n }\n // Do not use native `map` to in case that the array `existings`\n // contains elided items, which will be omitted.\n for (var index = 0; index < existings.length; index++) {\n var existing = existings[index];\n // Because of replaceMerge, `existing` may be null/undefined.\n if (existing && existing.id != null) {\n existingIdIdxMap.set(existing.id, index);\n }\n // For non-internal-componnets:\n // Mode \"normalMerge\": all existings kept.\n // Mode \"replaceMerge\": all existing removed unless mapped by id.\n // For internal-components:\n // go with \"replaceMerge\" approach in both mode.\n result.push({\n existing: mode === 'replaceMerge' || isComponentIdInternal(existing) ? null : existing,\n newOption: null,\n keyInfo: null,\n brandNew: null\n });\n }\n return result;\n}\nfunction mappingById(result, existings, existingIdIdxMap, newCmptOptions) {\n // Mapping by id if specified.\n each(newCmptOptions, function (cmptOption, index) {\n if (!cmptOption || cmptOption.id == null) {\n return;\n }\n var optionId = makeComparableKey(cmptOption.id);\n var existingIdx = existingIdIdxMap.get(optionId);\n if (existingIdx != null) {\n var resultItem = result[existingIdx];\n assert(!resultItem.newOption, 'Duplicated option on id \"' + optionId + '\".');\n resultItem.newOption = cmptOption;\n // In both mode, if id matched, new option will be merged to\n // the existings rather than creating new component model.\n resultItem.existing = existings[existingIdx];\n newCmptOptions[index] = null;\n }\n });\n}\nfunction mappingByName(result, newCmptOptions) {\n // Mapping by name if specified.\n each(newCmptOptions, function (cmptOption, index) {\n if (!cmptOption || cmptOption.name == null) {\n return;\n }\n for (var i = 0; i < result.length; i++) {\n var existing = result[i].existing;\n if (!result[i].newOption // Consider name: two map to one.\n // Can not match when both ids existing but different.\n && existing && (existing.id == null || cmptOption.id == null) && !isComponentIdInternal(cmptOption) && !isComponentIdInternal(existing) && keyExistAndEqual('name', existing, cmptOption)) {\n result[i].newOption = cmptOption;\n newCmptOptions[index] = null;\n return;\n }\n }\n });\n}\nfunction mappingByIndex(result, newCmptOptions, brandNew) {\n each(newCmptOptions, function (cmptOption) {\n if (!cmptOption) {\n return;\n }\n // Find the first place that not mapped by id and not internal component (consider the \"hole\").\n var resultItem;\n var nextIdx = 0;\n while (\n // Be `!resultItem` only when `nextIdx >= result.length`.\n (resultItem = result[nextIdx]\n // (1) Existing models that already have id should be able to mapped to. Because\n // after mapping performed, model will always be assigned with an id if user not given.\n // After that all models have id.\n // (2) If new option has id, it can only set to a hole or append to the last. It should\n // not be merged to the existings with different id. Because id should not be overwritten.\n // (3) Name can be overwritten, because axis use name as 'show label text'.\n ) && (resultItem.newOption || isComponentIdInternal(resultItem.existing) ||\n // In mode \"replaceMerge\", here no not-mapped-non-internal-existing.\n resultItem.existing && cmptOption.id != null && !keyExistAndEqual('id', cmptOption, resultItem.existing))) {\n nextIdx++;\n }\n if (resultItem) {\n resultItem.newOption = cmptOption;\n resultItem.brandNew = brandNew;\n } else {\n result.push({\n newOption: cmptOption,\n brandNew: brandNew,\n existing: null,\n keyInfo: null\n });\n }\n nextIdx++;\n });\n}\nfunction mappingInReplaceAllMode(result, newCmptOptions) {\n each(newCmptOptions, function (cmptOption) {\n // The feature \"reproduce\" requires \"hole\" will also reproduced\n // in case that component index referring are broken.\n result.push({\n newOption: cmptOption,\n brandNew: true,\n existing: null,\n keyInfo: null\n });\n });\n}\n/**\n * Make id and name for mapping result (result of mappingToExists)\n * into `keyInfo` field.\n */\nfunction makeIdAndName(mapResult) {\n // We use this id to hash component models and view instances\n // in echarts. id can be specified by user, or auto generated.\n // The id generation rule ensures new view instance are able\n // to mapped to old instance when setOption are called in\n // no-merge mode. So we generate model id by name and plus\n // type in view id.\n // name can be duplicated among components, which is convenient\n // to specify multi components (like series) by one name.\n // Ensure that each id is distinct.\n var idMap = createHashMap();\n each(mapResult, function (item) {\n var existing = item.existing;\n existing && idMap.set(existing.id, item);\n });\n each(mapResult, function (item) {\n var opt = item.newOption;\n // Force ensure id not duplicated.\n assert(!opt || opt.id == null || !idMap.get(opt.id) || idMap.get(opt.id) === item, 'id duplicates: ' + (opt && opt.id));\n opt && opt.id != null && idMap.set(opt.id, item);\n !item.keyInfo && (item.keyInfo = {});\n });\n // Make name and id.\n each(mapResult, function (item, index) {\n var existing = item.existing;\n var opt = item.newOption;\n var keyInfo = item.keyInfo;\n if (!isObject(opt)) {\n return;\n }\n // Name can be overwritten. Consider case: axis.name = '20km'.\n // But id generated by name will not be changed, which affect\n // only in that case: setOption with 'not merge mode' and view\n // instance will be recreated, which can be accepted.\n keyInfo.name = opt.name != null ? makeComparableKey(opt.name) : existing ? existing.name\n // Avoid that different series has the same name,\n // because name may be used like in color pallet.\n : DUMMY_COMPONENT_NAME_PREFIX + index;\n if (existing) {\n keyInfo.id = makeComparableKey(existing.id);\n } else if (opt.id != null) {\n keyInfo.id = makeComparableKey(opt.id);\n } else {\n // Consider this situatoin:\n // optionA: [{name: 'a'}, {name: 'a'}, {..}]\n // optionB [{..}, {name: 'a'}, {name: 'a'}]\n // Series with the same name between optionA and optionB\n // should be mapped.\n var idNum = 0;\n do {\n keyInfo.id = '\\0' + keyInfo.name + '\\0' + idNum++;\n } while (idMap.get(keyInfo.id));\n }\n idMap.set(keyInfo.id, item);\n });\n}\nfunction keyExistAndEqual(attr, obj1, obj2) {\n var key1 = convertOptionIdName(obj1[attr], null);\n var key2 = convertOptionIdName(obj2[attr], null);\n // See `MappingExistingItem`. `id` and `name` trade string equals to number.\n return key1 != null && key2 != null && key1 === key2;\n}\n/**\n * @return return null if not exist.\n */\nfunction makeComparableKey(val) {\n if (process.env.NODE_ENV !== 'production') {\n if (val == null) {\n throw new Error();\n }\n }\n return convertOptionIdName(val, '');\n}\nexport function convertOptionIdName(idOrName, defaultValue) {\n if (idOrName == null) {\n return defaultValue;\n }\n return isString(idOrName) ? idOrName : isNumber(idOrName) || isStringSafe(idOrName) ? idOrName + '' : defaultValue;\n}\nfunction warnInvalidateIdOrName(idOrName) {\n if (process.env.NODE_ENV !== 'production') {\n warn('`' + idOrName + '` is invalid id or name. Must be a string or number.');\n }\n}\nfunction isValidIdOrName(idOrName) {\n return isStringSafe(idOrName) || isNumeric(idOrName);\n}\nexport function isNameSpecified(componentModel) {\n var name = componentModel.name;\n // Is specified when `indexOf` get -1 or > 0.\n return !!(name && name.indexOf(DUMMY_COMPONENT_NAME_PREFIX));\n}\n/**\n * @public\n * @param {Object} cmptOption\n * @return {boolean}\n */\nexport function isComponentIdInternal(cmptOption) {\n return cmptOption && cmptOption.id != null && makeComparableKey(cmptOption.id).indexOf(INTERNAL_COMPONENT_ID_PREFIX) === 0;\n}\nexport function makeInternalComponentId(idSuffix) {\n return INTERNAL_COMPONENT_ID_PREFIX + idSuffix;\n}\nexport function setComponentTypeToKeyInfo(mappingResult, mainType, componentModelCtor) {\n // Set mainType and complete subType.\n each(mappingResult, function (item) {\n var newOption = item.newOption;\n if (isObject(newOption)) {\n item.keyInfo.mainType = mainType;\n item.keyInfo.subType = determineSubType(mainType, newOption, item.existing, componentModelCtor);\n }\n });\n}\nfunction determineSubType(mainType, newCmptOption, existComponent, componentModelCtor) {\n var subType = newCmptOption.type ? newCmptOption.type : existComponent ? existComponent.subType\n // Use determineSubType only when there is no existComponent.\n : componentModelCtor.determineSubType(mainType, newCmptOption);\n // tooltip, markline, markpoint may always has no subType\n return subType;\n}\n/**\n * A helper for removing duplicate items between batchA and batchB,\n * and in themselves, and categorize by series.\n *\n * @param batchA Like: [{seriesId: 2, dataIndex: [32, 4, 5]}, ...]\n * @param batchB Like: [{seriesId: 2, dataIndex: [32, 4, 5]}, ...]\n * @return result: [resultBatchA, resultBatchB]\n */\nexport function compressBatches(batchA, batchB) {\n var mapA = {};\n var mapB = {};\n makeMap(batchA || [], mapA);\n makeMap(batchB || [], mapB, mapA);\n return [mapToArray(mapA), mapToArray(mapB)];\n function makeMap(sourceBatch, map, otherMap) {\n for (var i = 0, len = sourceBatch.length; i < len; i++) {\n var seriesId = convertOptionIdName(sourceBatch[i].seriesId, null);\n if (seriesId == null) {\n return;\n }\n var dataIndices = normalizeToArray(sourceBatch[i].dataIndex);\n var otherDataIndices = otherMap && otherMap[seriesId];\n for (var j = 0, lenj = dataIndices.length; j < lenj; j++) {\n var dataIndex = dataIndices[j];\n if (otherDataIndices && otherDataIndices[dataIndex]) {\n otherDataIndices[dataIndex] = null;\n } else {\n (map[seriesId] || (map[seriesId] = {}))[dataIndex] = 1;\n }\n }\n }\n }\n function mapToArray(map, isData) {\n var result = [];\n for (var i in map) {\n if (map.hasOwnProperty(i) && map[i] != null) {\n if (isData) {\n result.push(+i);\n } else {\n var dataIndices = mapToArray(map[i], true);\n dataIndices.length && result.push({\n seriesId: i,\n dataIndex: dataIndices\n });\n }\n }\n }\n return result;\n }\n}\n/**\n * @param payload Contains dataIndex (means rawIndex) / dataIndexInside / name\n * each of which can be Array or primary type.\n * @return dataIndex If not found, return undefined/null.\n */\nexport function queryDataIndex(data, payload) {\n if (payload.dataIndexInside != null) {\n return payload.dataIndexInside;\n } else if (payload.dataIndex != null) {\n return isArray(payload.dataIndex) ? map(payload.dataIndex, function (value) {\n return data.indexOfRawIndex(value);\n }) : data.indexOfRawIndex(payload.dataIndex);\n } else if (payload.name != null) {\n return isArray(payload.name) ? map(payload.name, function (value) {\n return data.indexOfName(value);\n }) : data.indexOfName(payload.name);\n }\n}\n/**\n * Enable property storage to any host object.\n * Notice: Serialization is not supported.\n *\n * For example:\n * let inner = zrUitl.makeInner();\n *\n * function some1(hostObj) {\n * inner(hostObj).someProperty = 1212;\n * ...\n * }\n * function some2() {\n * let fields = inner(this);\n * fields.someProperty1 = 1212;\n * fields.someProperty2 = 'xx';\n * ...\n * }\n *\n * @return {Function}\n */\nexport function makeInner() {\n var key = '__ec_inner_' + innerUniqueIndex++;\n return function (hostObj) {\n return hostObj[key] || (hostObj[key] = {});\n };\n}\nvar innerUniqueIndex = getRandomIdBase();\n/**\n * The same behavior as `component.getReferringComponents`.\n */\nexport function parseFinder(ecModel, finderInput, opt) {\n var _a = preParseFinder(finderInput, opt),\n mainTypeSpecified = _a.mainTypeSpecified,\n queryOptionMap = _a.queryOptionMap,\n others = _a.others;\n var result = others;\n var defaultMainType = opt ? opt.defaultMainType : null;\n if (!mainTypeSpecified && defaultMainType) {\n queryOptionMap.set(defaultMainType, {});\n }\n queryOptionMap.each(function (queryOption, mainType) {\n var queryResult = queryReferringComponents(ecModel, mainType, queryOption, {\n useDefault: defaultMainType === mainType,\n enableAll: opt && opt.enableAll != null ? opt.enableAll : true,\n enableNone: opt && opt.enableNone != null ? opt.enableNone : true\n });\n result[mainType + 'Models'] = queryResult.models;\n result[mainType + 'Model'] = queryResult.models[0];\n });\n return result;\n}\nexport function preParseFinder(finderInput, opt) {\n var finder;\n if (isString(finderInput)) {\n var obj = {};\n obj[finderInput + 'Index'] = 0;\n finder = obj;\n } else {\n finder = finderInput;\n }\n var queryOptionMap = createHashMap();\n var others = {};\n var mainTypeSpecified = false;\n each(finder, function (value, key) {\n // Exclude 'dataIndex' and other illgal keys.\n if (key === 'dataIndex' || key === 'dataIndexInside') {\n others[key] = value;\n return;\n }\n var parsedKey = key.match(/^(\\w+)(Index|Id|Name)$/) || [];\n var mainType = parsedKey[1];\n var queryType = (parsedKey[2] || '').toLowerCase();\n if (!mainType || !queryType || opt && opt.includeMainTypes && indexOf(opt.includeMainTypes, mainType) < 0) {\n return;\n }\n mainTypeSpecified = mainTypeSpecified || !!mainType;\n var queryOption = queryOptionMap.get(mainType) || queryOptionMap.set(mainType, {});\n queryOption[queryType] = value;\n });\n return {\n mainTypeSpecified: mainTypeSpecified,\n queryOptionMap: queryOptionMap,\n others: others\n };\n}\nexport var SINGLE_REFERRING = {\n useDefault: true,\n enableAll: false,\n enableNone: false\n};\nexport var MULTIPLE_REFERRING = {\n useDefault: false,\n enableAll: true,\n enableNone: true\n};\nexport function queryReferringComponents(ecModel, mainType, userOption, opt) {\n opt = opt || SINGLE_REFERRING;\n var indexOption = userOption.index;\n var idOption = userOption.id;\n var nameOption = userOption.name;\n var result = {\n models: null,\n specified: indexOption != null || idOption != null || nameOption != null\n };\n if (!result.specified) {\n // Use the first as default if `useDefault`.\n var firstCmpt = void 0;\n result.models = opt.useDefault && (firstCmpt = ecModel.getComponent(mainType)) ? [firstCmpt] : [];\n return result;\n }\n if (indexOption === 'none' || indexOption === false) {\n assert(opt.enableNone, '`\"none\"` or `false` is not a valid value on index option.');\n result.models = [];\n return result;\n }\n // `queryComponents` will return all components if\n // both all of index/id/name are null/undefined.\n if (indexOption === 'all') {\n assert(opt.enableAll, '`\"all\"` is not a valid value on index option.');\n indexOption = idOption = nameOption = null;\n }\n result.models = ecModel.queryComponents({\n mainType: mainType,\n index: indexOption,\n id: idOption,\n name: nameOption\n });\n return result;\n}\nexport function setAttribute(dom, key, value) {\n dom.setAttribute ? dom.setAttribute(key, value) : dom[key] = value;\n}\nexport function getAttribute(dom, key) {\n return dom.getAttribute ? dom.getAttribute(key) : dom[key];\n}\nexport function getTooltipRenderMode(renderModeOption) {\n if (renderModeOption === 'auto') {\n // Using html when `document` exists, use richText otherwise\n return env.domSupported ? 'html' : 'richText';\n } else {\n return renderModeOption || 'html';\n }\n}\n/**\n * Group a list by key.\n */\nexport function groupData(array, getKey // return key\n) {\n var buckets = createHashMap();\n var keys = [];\n each(array, function (item) {\n var key = getKey(item);\n (buckets.get(key) || (keys.push(key), buckets.set(key, []))).push(item);\n });\n return {\n keys: keys,\n buckets: buckets\n };\n}\n/**\n * Interpolate raw values of a series with percent\n *\n * @param data data\n * @param labelModel label model of the text element\n * @param sourceValue start value. May be null/undefined when init.\n * @param targetValue end value\n * @param percent 0~1 percentage; 0 uses start value while 1 uses end value\n * @return interpolated values\n * If `sourceValue` and `targetValue` are `number`, return `number`.\n * If `sourceValue` and `targetValue` are `string`, return `string`.\n * If `sourceValue` and `targetValue` are `(string | number)[]`, return `(string | number)[]`.\n * Other cases do not supported.\n */\nexport function interpolateRawValues(data, precision, sourceValue, targetValue, percent) {\n var isAutoPrecision = precision == null || precision === 'auto';\n if (targetValue == null) {\n return targetValue;\n }\n if (isNumber(targetValue)) {\n var value = interpolateNumber(sourceValue || 0, targetValue, percent);\n return round(value, isAutoPrecision ? Math.max(getPrecision(sourceValue || 0), getPrecision(targetValue)) : precision);\n } else if (isString(targetValue)) {\n return percent < 1 ? sourceValue : targetValue;\n } else {\n var interpolated = [];\n var leftArr = sourceValue;\n var rightArr = targetValue;\n var length_1 = Math.max(leftArr ? leftArr.length : 0, rightArr.length);\n for (var i = 0; i < length_1; ++i) {\n var info = data.getDimensionInfo(i);\n // Don't interpolate ordinal dims\n if (info && info.type === 'ordinal') {\n // In init, there is no `sourceValue`, but should better not to get undefined result.\n interpolated[i] = (percent < 1 && leftArr ? leftArr : rightArr)[i];\n } else {\n var leftVal = leftArr && leftArr[i] ? leftArr[i] : 0;\n var rightVal = rightArr[i];\n var value = interpolateNumber(leftVal, rightVal, percent);\n interpolated[i] = round(value, isAutoPrecision ? Math.max(getPrecision(leftVal), getPrecision(rightVal)) : precision);\n }\n }\n return interpolated;\n }\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nvar TYPE_DELIMITER = '.';\nvar IS_CONTAINER = '___EC__COMPONENT__CONTAINER___';\nvar IS_EXTENDED_CLASS = '___EC__EXTENDED_CLASS___';\n/**\n * Notice, parseClassType('') should returns {main: '', sub: ''}\n * @public\n */\nexport function parseClassType(componentType) {\n var ret = {\n main: '',\n sub: ''\n };\n if (componentType) {\n var typeArr = componentType.split(TYPE_DELIMITER);\n ret.main = typeArr[0] || '';\n ret.sub = typeArr[1] || '';\n }\n return ret;\n}\n/**\n * @public\n */\nfunction checkClassType(componentType) {\n zrUtil.assert(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(componentType), 'componentType \"' + componentType + '\" illegal');\n}\nexport function isExtendedClass(clz) {\n return !!(clz && clz[IS_EXTENDED_CLASS]);\n}\n/**\n * Implements `ExtendableConstructor` for `rootClz`.\n *\n * @usage\n * ```ts\n * class Xxx {}\n * type XxxConstructor = typeof Xxx & ExtendableConstructor\n * enableClassExtend(Xxx as XxxConstructor);\n * ```\n */\nexport function enableClassExtend(rootClz, mandatoryMethods) {\n rootClz.$constructor = rootClz; // FIXME: not necessary?\n rootClz.extend = function (proto) {\n if (process.env.NODE_ENV !== 'production') {\n zrUtil.each(mandatoryMethods, function (method) {\n if (!proto[method]) {\n console.warn('Method `' + method + '` should be implemented' + (proto.type ? ' in ' + proto.type : '') + '.');\n }\n });\n }\n var superClass = this;\n var ExtendedClass;\n if (isESClass(superClass)) {\n ExtendedClass = /** @class */function (_super) {\n __extends(class_1, _super);\n function class_1() {\n return _super.apply(this, arguments) || this;\n }\n return class_1;\n }(superClass);\n } else {\n // For backward compat, we both support ts class inheritance and this\n // \"extend\" approach.\n // The constructor should keep the same behavior as ts class inheritance:\n // If this constructor/$constructor is not declared, auto invoke the super\n // constructor.\n // If this constructor/$constructor is declared, it is responsible for\n // calling the super constructor.\n ExtendedClass = function () {\n (proto.$constructor || superClass).apply(this, arguments);\n };\n zrUtil.inherits(ExtendedClass, this);\n }\n zrUtil.extend(ExtendedClass.prototype, proto);\n ExtendedClass[IS_EXTENDED_CLASS] = true;\n ExtendedClass.extend = this.extend;\n ExtendedClass.superCall = superCall;\n ExtendedClass.superApply = superApply;\n ExtendedClass.superClass = superClass;\n return ExtendedClass;\n };\n}\nfunction isESClass(fn) {\n return zrUtil.isFunction(fn) && /^class\\s/.test(Function.prototype.toString.call(fn));\n}\n/**\n * A work around to both support ts extend and this extend mechanism.\n * on sub-class.\n * @usage\n * ```ts\n * class Component { ... }\n * classUtil.enableClassExtend(Component);\n * classUtil.enableClassManagement(Component, {registerWhenExtend: true});\n *\n * class Series extends Component { ... }\n * // Without calling `markExtend`, `registerWhenExtend` will not work.\n * Component.markExtend(Series);\n * ```\n */\nexport function mountExtend(SubClz, SupperClz) {\n SubClz.extend = SupperClz.extend;\n}\n// A random offset.\nvar classBase = Math.round(Math.random() * 10);\n/**\n * Implements `CheckableConstructor` for `target`.\n * Can not use instanceof, consider different scope by\n * cross domain or es module import in ec extensions.\n * Mount a method \"isInstance()\" to Clz.\n *\n * @usage\n * ```ts\n * class Xxx {}\n * type XxxConstructor = typeof Xxx & CheckableConstructor;\n * enableClassCheck(Xxx as XxxConstructor)\n * ```\n */\nexport function enableClassCheck(target) {\n var classAttr = ['__\\0is_clz', classBase++].join('_');\n target.prototype[classAttr] = true;\n if (process.env.NODE_ENV !== 'production') {\n zrUtil.assert(!target.isInstance, 'The method \"is\" can not be defined.');\n }\n target.isInstance = function (obj) {\n return !!(obj && obj[classAttr]);\n };\n}\n// superCall should have class info, which can not be fetched from 'this'.\n// Consider this case:\n// class A has method f,\n// class B inherits class A, overrides method f, f call superApply('f'),\n// class C inherits class B, does not override method f,\n// then when method of class C is called, dead loop occurred.\nfunction superCall(context, methodName) {\n var args = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n args[_i - 2] = arguments[_i];\n }\n return this.superClass.prototype[methodName].apply(context, args);\n}\nfunction superApply(context, methodName, args) {\n return this.superClass.prototype[methodName].apply(context, args);\n}\n/**\n * Implements `ClassManager` for `target`\n *\n * @usage\n * ```ts\n * class Xxx {}\n * type XxxConstructor = typeof Xxx & ClassManager\n * enableClassManagement(Xxx as XxxConstructor);\n * ```\n */\nexport function enableClassManagement(target) {\n /**\n * Component model classes\n * key: componentType,\n * value:\n * componentClass, when componentType is 'a'\n * or Object., when componentType is 'a.b'\n */\n var storage = {};\n target.registerClass = function (clz) {\n // `type` should not be a \"instance member\".\n // If using TS class, should better declared as `static type = 'series.pie'`.\n // otherwise users have to mount `type` on prototype manually.\n // For backward compat and enable instance visit type via `this.type`,\n // we still support fetch `type` from prototype.\n var componentFullType = clz.type || clz.prototype.type;\n if (componentFullType) {\n checkClassType(componentFullType);\n // If only static type declared, we assign it to prototype mandatorily.\n clz.prototype.type = componentFullType;\n var componentTypeInfo = parseClassType(componentFullType);\n if (!componentTypeInfo.sub) {\n if (process.env.NODE_ENV !== 'production') {\n if (storage[componentTypeInfo.main]) {\n console.warn(componentTypeInfo.main + ' exists.');\n }\n }\n storage[componentTypeInfo.main] = clz;\n } else if (componentTypeInfo.sub !== IS_CONTAINER) {\n var container = makeContainer(componentTypeInfo);\n container[componentTypeInfo.sub] = clz;\n }\n }\n return clz;\n };\n target.getClass = function (mainType, subType, throwWhenNotFound) {\n var clz = storage[mainType];\n if (clz && clz[IS_CONTAINER]) {\n clz = subType ? clz[subType] : null;\n }\n if (throwWhenNotFound && !clz) {\n throw new Error(!subType ? mainType + '.' + 'type should be specified.' : 'Component ' + mainType + '.' + (subType || '') + ' is used but not imported.');\n }\n return clz;\n };\n target.getClassesByMainType = function (componentType) {\n var componentTypeInfo = parseClassType(componentType);\n var result = [];\n var obj = storage[componentTypeInfo.main];\n if (obj && obj[IS_CONTAINER]) {\n zrUtil.each(obj, function (o, type) {\n type !== IS_CONTAINER && result.push(o);\n });\n } else {\n result.push(obj);\n }\n return result;\n };\n target.hasClass = function (componentType) {\n // Just consider componentType.main.\n var componentTypeInfo = parseClassType(componentType);\n return !!storage[componentTypeInfo.main];\n };\n /**\n * @return Like ['aa', 'bb'], but can not be ['aa.xx']\n */\n target.getAllClassMainTypes = function () {\n var types = [];\n zrUtil.each(storage, function (obj, type) {\n types.push(type);\n });\n return types;\n };\n /**\n * If a main type is container and has sub types\n */\n target.hasSubTypes = function (componentType) {\n var componentTypeInfo = parseClassType(componentType);\n var obj = storage[componentTypeInfo.main];\n return obj && obj[IS_CONTAINER];\n };\n function makeContainer(componentTypeInfo) {\n var container = storage[componentTypeInfo.main];\n if (!container || !container[IS_CONTAINER]) {\n container = storage[componentTypeInfo.main] = {};\n container[IS_CONTAINER] = true;\n }\n return container;\n }\n}\n// /**\n// * @param {string|Array.} properties\n// */\n// export function setReadOnly(obj, properties) {\n// FIXME It seems broken in IE8 simulation of IE11\n// if (!zrUtil.isArray(properties)) {\n// properties = properties != null ? [properties] : [];\n// }\n// zrUtil.each(properties, function (prop) {\n// let value = obj[prop];\n// Object.defineProperty\n// && Object.defineProperty(obj, prop, {\n// value: value, writable: false\n// });\n// zrUtil.isArray(obj[prop])\n// && Object.freeze\n// && Object.freeze(obj[prop]);\n// });\n// }","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// TODO Parse shadow style\n// TODO Only shallow path support\nimport * as zrUtil from 'zrender/lib/core/util.js';\nexport default function makeStyleMapper(properties, ignoreParent) {\n // Normalize\n for (var i = 0; i < properties.length; i++) {\n if (!properties[i][1]) {\n properties[i][1] = properties[i][0];\n }\n }\n ignoreParent = ignoreParent || false;\n return function (model, excludes, includes) {\n var style = {};\n for (var i = 0; i < properties.length; i++) {\n var propName = properties[i][1];\n if (excludes && zrUtil.indexOf(excludes, propName) >= 0 || includes && zrUtil.indexOf(includes, propName) < 0) {\n continue;\n }\n var val = model.getShallow(propName, ignoreParent);\n if (val != null) {\n style[properties[i][0]] = val;\n }\n }\n // TODO Text or image?\n return style;\n };\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport makeStyleMapper from './makeStyleMapper.js';\nexport var AREA_STYLE_KEY_MAP = [['fill', 'color'], ['shadowBlur'], ['shadowOffsetX'], ['shadowOffsetY'], ['opacity'], ['shadowColor']\n// Option decal is in `DecalObject` but style.decal is in `PatternObject`.\n// So do not transfer decal directly.\n];\nvar getAreaStyle = makeStyleMapper(AREA_STYLE_KEY_MAP);\nvar AreaStyleMixin = /** @class */function () {\n function AreaStyleMixin() {}\n AreaStyleMixin.prototype.getAreaStyle = function (excludes, includes) {\n return getAreaStyle(this, excludes, includes);\n };\n return AreaStyleMixin;\n}();\n;\nexport { AreaStyleMixin };","import LRU from '../../core/LRU.js';\nimport { platformApi } from '../../core/platform.js';\nvar globalImageCache = new LRU(50);\nexport function findExistImage(newImageOrSrc) {\n if (typeof newImageOrSrc === 'string') {\n var cachedImgObj = globalImageCache.get(newImageOrSrc);\n return cachedImgObj && cachedImgObj.image;\n } else {\n return newImageOrSrc;\n }\n}\nexport function createOrUpdateImage(newImageOrSrc, image, hostEl, onload, cbPayload) {\n if (!newImageOrSrc) {\n return image;\n } else if (typeof newImageOrSrc === 'string') {\n if (image && image.__zrImageSrc === newImageOrSrc || !hostEl) {\n return image;\n }\n var cachedImgObj = globalImageCache.get(newImageOrSrc);\n var pendingWrap = {\n hostEl: hostEl,\n cb: onload,\n cbPayload: cbPayload\n };\n if (cachedImgObj) {\n image = cachedImgObj.image;\n !isImageReady(image) && cachedImgObj.pending.push(pendingWrap);\n } else {\n image = platformApi.loadImage(newImageOrSrc, imageOnLoad, imageOnLoad);\n image.__zrImageSrc = newImageOrSrc;\n globalImageCache.put(newImageOrSrc, image.__cachedImgObj = {\n image: image,\n pending: [pendingWrap]\n });\n }\n return image;\n } else {\n return newImageOrSrc;\n }\n}\nfunction imageOnLoad() {\n var cachedImgObj = this.__cachedImgObj;\n this.onload = this.onerror = this.__cachedImgObj = null;\n for (var i = 0; i < cachedImgObj.pending.length; i++) {\n var pendingWrap = cachedImgObj.pending[i];\n var cb = pendingWrap.cb;\n cb && cb(this, pendingWrap.cbPayload);\n pendingWrap.hostEl.dirty();\n }\n cachedImgObj.pending.length = 0;\n}\nexport function isImageReady(image) {\n return image && image.width && image.height;\n}","import * as imageHelper from '../helper/image.js';\nimport { extend, retrieve2, retrieve3, reduce } from '../../core/util.js';\nimport { getLineHeight, getWidth, parsePercent } from '../../contain/text.js';\nvar STYLE_REG = /\\{([a-zA-Z0-9_]+)\\|([^}]*)\\}/g;\nexport function truncateText(text, containerWidth, font, ellipsis, options) {\n if (!containerWidth) {\n return '';\n }\n var textLines = (text + '').split('\\n');\n options = prepareTruncateOptions(containerWidth, font, ellipsis, options);\n for (var i = 0, len = textLines.length; i < len; i++) {\n textLines[i] = truncateSingleLine(textLines[i], options);\n }\n return textLines.join('\\n');\n}\nfunction prepareTruncateOptions(containerWidth, font, ellipsis, options) {\n options = options || {};\n var preparedOpts = extend({}, options);\n preparedOpts.font = font;\n ellipsis = retrieve2(ellipsis, '...');\n preparedOpts.maxIterations = retrieve2(options.maxIterations, 2);\n var minChar = preparedOpts.minChar = retrieve2(options.minChar, 0);\n preparedOpts.cnCharWidth = getWidth('国', font);\n var ascCharWidth = preparedOpts.ascCharWidth = getWidth('a', font);\n preparedOpts.placeholder = retrieve2(options.placeholder, '');\n var contentWidth = containerWidth = Math.max(0, containerWidth - 1);\n for (var i = 0; i < minChar && contentWidth >= ascCharWidth; i++) {\n contentWidth -= ascCharWidth;\n }\n var ellipsisWidth = getWidth(ellipsis, font);\n if (ellipsisWidth > contentWidth) {\n ellipsis = '';\n ellipsisWidth = 0;\n }\n contentWidth = containerWidth - ellipsisWidth;\n preparedOpts.ellipsis = ellipsis;\n preparedOpts.ellipsisWidth = ellipsisWidth;\n preparedOpts.contentWidth = contentWidth;\n preparedOpts.containerWidth = containerWidth;\n return preparedOpts;\n}\nfunction truncateSingleLine(textLine, options) {\n var containerWidth = options.containerWidth;\n var font = options.font;\n var contentWidth = options.contentWidth;\n if (!containerWidth) {\n return '';\n }\n var lineWidth = getWidth(textLine, font);\n if (lineWidth <= containerWidth) {\n return textLine;\n }\n for (var j = 0;; j++) {\n if (lineWidth <= contentWidth || j >= options.maxIterations) {\n textLine += options.ellipsis;\n break;\n }\n var subLength = j === 0 ? estimateLength(textLine, contentWidth, options.ascCharWidth, options.cnCharWidth) : lineWidth > 0 ? Math.floor(textLine.length * contentWidth / lineWidth) : 0;\n textLine = textLine.substr(0, subLength);\n lineWidth = getWidth(textLine, font);\n }\n if (textLine === '') {\n textLine = options.placeholder;\n }\n return textLine;\n}\nfunction estimateLength(text, contentWidth, ascCharWidth, cnCharWidth) {\n var width = 0;\n var i = 0;\n for (var len = text.length; i < len && width < contentWidth; i++) {\n var charCode = text.charCodeAt(i);\n width += 0 <= charCode && charCode <= 127 ? ascCharWidth : cnCharWidth;\n }\n return i;\n}\nexport function parsePlainText(text, style) {\n text != null && (text += '');\n var overflow = style.overflow;\n var padding = style.padding;\n var font = style.font;\n var truncate = overflow === 'truncate';\n var calculatedLineHeight = getLineHeight(font);\n var lineHeight = retrieve2(style.lineHeight, calculatedLineHeight);\n var bgColorDrawn = !!style.backgroundColor;\n var truncateLineOverflow = style.lineOverflow === 'truncate';\n var width = style.width;\n var lines;\n if (width != null && (overflow === 'break' || overflow === 'breakAll')) {\n lines = text ? wrapText(text, style.font, width, overflow === 'breakAll', 0).lines : [];\n } else {\n lines = text ? text.split('\\n') : [];\n }\n var contentHeight = lines.length * lineHeight;\n var height = retrieve2(style.height, contentHeight);\n if (contentHeight > height && truncateLineOverflow) {\n var lineCount = Math.floor(height / lineHeight);\n lines = lines.slice(0, lineCount);\n }\n if (text && truncate && width != null) {\n var options = prepareTruncateOptions(width, font, style.ellipsis, {\n minChar: style.truncateMinChar,\n placeholder: style.placeholder\n });\n for (var i = 0; i < lines.length; i++) {\n lines[i] = truncateSingleLine(lines[i], options);\n }\n }\n var outerHeight = height;\n var contentWidth = 0;\n for (var i = 0; i < lines.length; i++) {\n contentWidth = Math.max(getWidth(lines[i], font), contentWidth);\n }\n if (width == null) {\n width = contentWidth;\n }\n var outerWidth = contentWidth;\n if (padding) {\n outerHeight += padding[0] + padding[2];\n outerWidth += padding[1] + padding[3];\n width += padding[1] + padding[3];\n }\n if (bgColorDrawn) {\n outerWidth = width;\n }\n return {\n lines: lines,\n height: height,\n outerWidth: outerWidth,\n outerHeight: outerHeight,\n lineHeight: lineHeight,\n calculatedLineHeight: calculatedLineHeight,\n contentWidth: contentWidth,\n contentHeight: contentHeight,\n width: width\n };\n}\nvar RichTextToken = function () {\n function RichTextToken() {}\n return RichTextToken;\n}();\nvar RichTextLine = function () {\n function RichTextLine(tokens) {\n this.tokens = [];\n if (tokens) {\n this.tokens = tokens;\n }\n }\n return RichTextLine;\n}();\nvar RichTextContentBlock = function () {\n function RichTextContentBlock() {\n this.width = 0;\n this.height = 0;\n this.contentWidth = 0;\n this.contentHeight = 0;\n this.outerWidth = 0;\n this.outerHeight = 0;\n this.lines = [];\n }\n return RichTextContentBlock;\n}();\nexport { RichTextContentBlock };\nexport function parseRichText(text, style) {\n var contentBlock = new RichTextContentBlock();\n text != null && (text += '');\n if (!text) {\n return contentBlock;\n }\n var topWidth = style.width;\n var topHeight = style.height;\n var overflow = style.overflow;\n var wrapInfo = (overflow === 'break' || overflow === 'breakAll') && topWidth != null ? {\n width: topWidth,\n accumWidth: 0,\n breakAll: overflow === 'breakAll'\n } : null;\n var lastIndex = STYLE_REG.lastIndex = 0;\n var result;\n while ((result = STYLE_REG.exec(text)) != null) {\n var matchedIndex = result.index;\n if (matchedIndex > lastIndex) {\n pushTokens(contentBlock, text.substring(lastIndex, matchedIndex), style, wrapInfo);\n }\n pushTokens(contentBlock, result[2], style, wrapInfo, result[1]);\n lastIndex = STYLE_REG.lastIndex;\n }\n if (lastIndex < text.length) {\n pushTokens(contentBlock, text.substring(lastIndex, text.length), style, wrapInfo);\n }\n var pendingList = [];\n var calculatedHeight = 0;\n var calculatedWidth = 0;\n var stlPadding = style.padding;\n var truncate = overflow === 'truncate';\n var truncateLine = style.lineOverflow === 'truncate';\n function finishLine(line, lineWidth, lineHeight) {\n line.width = lineWidth;\n line.lineHeight = lineHeight;\n calculatedHeight += lineHeight;\n calculatedWidth = Math.max(calculatedWidth, lineWidth);\n }\n outer: for (var i = 0; i < contentBlock.lines.length; i++) {\n var line = contentBlock.lines[i];\n var lineHeight = 0;\n var lineWidth = 0;\n for (var j = 0; j < line.tokens.length; j++) {\n var token = line.tokens[j];\n var tokenStyle = token.styleName && style.rich[token.styleName] || {};\n var textPadding = token.textPadding = tokenStyle.padding;\n var paddingH = textPadding ? textPadding[1] + textPadding[3] : 0;\n var font = token.font = tokenStyle.font || style.font;\n token.contentHeight = getLineHeight(font);\n var tokenHeight = retrieve2(tokenStyle.height, token.contentHeight);\n token.innerHeight = tokenHeight;\n textPadding && (tokenHeight += textPadding[0] + textPadding[2]);\n token.height = tokenHeight;\n token.lineHeight = retrieve3(tokenStyle.lineHeight, style.lineHeight, tokenHeight);\n token.align = tokenStyle && tokenStyle.align || style.align;\n token.verticalAlign = tokenStyle && tokenStyle.verticalAlign || 'middle';\n if (truncateLine && topHeight != null && calculatedHeight + token.lineHeight > topHeight) {\n if (j > 0) {\n line.tokens = line.tokens.slice(0, j);\n finishLine(line, lineWidth, lineHeight);\n contentBlock.lines = contentBlock.lines.slice(0, i + 1);\n } else {\n contentBlock.lines = contentBlock.lines.slice(0, i);\n }\n break outer;\n }\n var styleTokenWidth = tokenStyle.width;\n var tokenWidthNotSpecified = styleTokenWidth == null || styleTokenWidth === 'auto';\n if (typeof styleTokenWidth === 'string' && styleTokenWidth.charAt(styleTokenWidth.length - 1) === '%') {\n token.percentWidth = styleTokenWidth;\n pendingList.push(token);\n token.contentWidth = getWidth(token.text, font);\n } else {\n if (tokenWidthNotSpecified) {\n var textBackgroundColor = tokenStyle.backgroundColor;\n var bgImg = textBackgroundColor && textBackgroundColor.image;\n if (bgImg) {\n bgImg = imageHelper.findExistImage(bgImg);\n if (imageHelper.isImageReady(bgImg)) {\n token.width = Math.max(token.width, bgImg.width * tokenHeight / bgImg.height);\n }\n }\n }\n var remainTruncWidth = truncate && topWidth != null ? topWidth - lineWidth : null;\n if (remainTruncWidth != null && remainTruncWidth < token.width) {\n if (!tokenWidthNotSpecified || remainTruncWidth < paddingH) {\n token.text = '';\n token.width = token.contentWidth = 0;\n } else {\n token.text = truncateText(token.text, remainTruncWidth - paddingH, font, style.ellipsis, {\n minChar: style.truncateMinChar\n });\n token.width = token.contentWidth = getWidth(token.text, font);\n }\n } else {\n token.contentWidth = getWidth(token.text, font);\n }\n }\n token.width += paddingH;\n lineWidth += token.width;\n tokenStyle && (lineHeight = Math.max(lineHeight, token.lineHeight));\n }\n finishLine(line, lineWidth, lineHeight);\n }\n contentBlock.outerWidth = contentBlock.width = retrieve2(topWidth, calculatedWidth);\n contentBlock.outerHeight = contentBlock.height = retrieve2(topHeight, calculatedHeight);\n contentBlock.contentHeight = calculatedHeight;\n contentBlock.contentWidth = calculatedWidth;\n if (stlPadding) {\n contentBlock.outerWidth += stlPadding[1] + stlPadding[3];\n contentBlock.outerHeight += stlPadding[0] + stlPadding[2];\n }\n for (var i = 0; i < pendingList.length; i++) {\n var token = pendingList[i];\n var percentWidth = token.percentWidth;\n token.width = parseInt(percentWidth, 10) / 100 * contentBlock.width;\n }\n return contentBlock;\n}\nfunction pushTokens(block, str, style, wrapInfo, styleName) {\n var isEmptyStr = str === '';\n var tokenStyle = styleName && style.rich[styleName] || {};\n var lines = block.lines;\n var font = tokenStyle.font || style.font;\n var newLine = false;\n var strLines;\n var linesWidths;\n if (wrapInfo) {\n var tokenPadding = tokenStyle.padding;\n var tokenPaddingH = tokenPadding ? tokenPadding[1] + tokenPadding[3] : 0;\n if (tokenStyle.width != null && tokenStyle.width !== 'auto') {\n var outerWidth_1 = parsePercent(tokenStyle.width, wrapInfo.width) + tokenPaddingH;\n if (lines.length > 0) {\n if (outerWidth_1 + wrapInfo.accumWidth > wrapInfo.width) {\n strLines = str.split('\\n');\n newLine = true;\n }\n }\n wrapInfo.accumWidth = outerWidth_1;\n } else {\n var res = wrapText(str, font, wrapInfo.width, wrapInfo.breakAll, wrapInfo.accumWidth);\n wrapInfo.accumWidth = res.accumWidth + tokenPaddingH;\n linesWidths = res.linesWidths;\n strLines = res.lines;\n }\n } else {\n strLines = str.split('\\n');\n }\n for (var i = 0; i < strLines.length; i++) {\n var text = strLines[i];\n var token = new RichTextToken();\n token.styleName = styleName;\n token.text = text;\n token.isLineHolder = !text && !isEmptyStr;\n if (typeof tokenStyle.width === 'number') {\n token.width = tokenStyle.width;\n } else {\n token.width = linesWidths ? linesWidths[i] : getWidth(text, font);\n }\n if (!i && !newLine) {\n var tokens = (lines[lines.length - 1] || (lines[0] = new RichTextLine())).tokens;\n var tokensLen = tokens.length;\n tokensLen === 1 && tokens[0].isLineHolder ? tokens[0] = token : (text || !tokensLen || isEmptyStr) && tokens.push(token);\n } else {\n lines.push(new RichTextLine([token]));\n }\n }\n}\nfunction isAlphabeticLetter(ch) {\n var code = ch.charCodeAt(0);\n return code >= 0x20 && code <= 0x24F || code >= 0x370 && code <= 0x10FF || code >= 0x1200 && code <= 0x13FF || code >= 0x1E00 && code <= 0x206F;\n}\nvar breakCharMap = reduce(',&?/;] '.split(''), function (obj, ch) {\n obj[ch] = true;\n return obj;\n}, {});\nfunction isWordBreakChar(ch) {\n if (isAlphabeticLetter(ch)) {\n if (breakCharMap[ch]) {\n return true;\n }\n return false;\n }\n return true;\n}\nfunction wrapText(text, font, lineWidth, isBreakAll, lastAccumWidth) {\n var lines = [];\n var linesWidths = [];\n var line = '';\n var currentWord = '';\n var currentWordWidth = 0;\n var accumWidth = 0;\n for (var i = 0; i < text.length; i++) {\n var ch = text.charAt(i);\n if (ch === '\\n') {\n if (currentWord) {\n line += currentWord;\n accumWidth += currentWordWidth;\n }\n lines.push(line);\n linesWidths.push(accumWidth);\n line = '';\n currentWord = '';\n currentWordWidth = 0;\n accumWidth = 0;\n continue;\n }\n var chWidth = getWidth(ch, font);\n var inWord = isBreakAll ? false : !isWordBreakChar(ch);\n if (!lines.length ? lastAccumWidth + accumWidth + chWidth > lineWidth : accumWidth + chWidth > lineWidth) {\n if (!accumWidth) {\n if (inWord) {\n lines.push(currentWord);\n linesWidths.push(currentWordWidth);\n currentWord = ch;\n currentWordWidth = chWidth;\n } else {\n lines.push(ch);\n linesWidths.push(chWidth);\n }\n } else if (line || currentWord) {\n if (inWord) {\n if (!line) {\n line = currentWord;\n currentWord = '';\n currentWordWidth = 0;\n accumWidth = currentWordWidth;\n }\n lines.push(line);\n linesWidths.push(accumWidth - currentWordWidth);\n currentWord += ch;\n currentWordWidth += chWidth;\n line = '';\n accumWidth = currentWordWidth;\n } else {\n if (currentWord) {\n line += currentWord;\n currentWord = '';\n currentWordWidth = 0;\n }\n lines.push(line);\n linesWidths.push(accumWidth);\n line = ch;\n accumWidth = chWidth;\n }\n }\n continue;\n }\n accumWidth += chWidth;\n if (inWord) {\n currentWord += ch;\n currentWordWidth += chWidth;\n } else {\n if (currentWord) {\n line += currentWord;\n currentWord = '';\n currentWordWidth = 0;\n }\n line += ch;\n }\n }\n if (!lines.length && !line) {\n line = text;\n currentWord = '';\n currentWordWidth = 0;\n }\n if (currentWord) {\n line += currentWord;\n }\n if (line) {\n lines.push(line);\n linesWidths.push(accumWidth);\n }\n if (lines.length === 1) {\n accumWidth += lastAccumWidth;\n }\n return {\n accumWidth: accumWidth,\n lines: lines,\n linesWidths: linesWidths\n };\n}","import { __extends } from \"tslib\";\nimport Element from '../Element.js';\nimport BoundingRect from '../core/BoundingRect.js';\nimport { keys, extend, createObject } from '../core/util.js';\nimport { REDRAW_BIT, STYLE_CHANGED_BIT } from './constants.js';\nvar STYLE_MAGIC_KEY = '__zr_style_' + Math.round(Math.random() * 10);\nexport var DEFAULT_COMMON_STYLE = {\n shadowBlur: 0,\n shadowOffsetX: 0,\n shadowOffsetY: 0,\n shadowColor: '#000',\n opacity: 1,\n blend: 'source-over'\n};\nexport var DEFAULT_COMMON_ANIMATION_PROPS = {\n style: {\n shadowBlur: true,\n shadowOffsetX: true,\n shadowOffsetY: true,\n shadowColor: true,\n opacity: true\n }\n};\nDEFAULT_COMMON_STYLE[STYLE_MAGIC_KEY] = true;\nvar PRIMARY_STATES_KEYS = ['z', 'z2', 'invisible'];\nvar PRIMARY_STATES_KEYS_IN_HOVER_LAYER = ['invisible'];\nvar Displayable = function (_super) {\n __extends(Displayable, _super);\n function Displayable(props) {\n return _super.call(this, props) || this;\n }\n Displayable.prototype._init = function (props) {\n var keysArr = keys(props);\n for (var i = 0; i < keysArr.length; i++) {\n var key = keysArr[i];\n if (key === 'style') {\n this.useStyle(props[key]);\n } else {\n _super.prototype.attrKV.call(this, key, props[key]);\n }\n }\n if (!this.style) {\n this.useStyle({});\n }\n };\n Displayable.prototype.beforeBrush = function () {};\n Displayable.prototype.afterBrush = function () {};\n Displayable.prototype.innerBeforeBrush = function () {};\n Displayable.prototype.innerAfterBrush = function () {};\n Displayable.prototype.shouldBePainted = function (viewWidth, viewHeight, considerClipPath, considerAncestors) {\n var m = this.transform;\n if (this.ignore || this.invisible || this.style.opacity === 0 || this.culling && isDisplayableCulled(this, viewWidth, viewHeight) || m && !m[0] && !m[3]) {\n return false;\n }\n if (considerClipPath && this.__clipPaths) {\n for (var i = 0; i < this.__clipPaths.length; ++i) {\n if (this.__clipPaths[i].isZeroArea()) {\n return false;\n }\n }\n }\n if (considerAncestors && this.parent) {\n var parent_1 = this.parent;\n while (parent_1) {\n if (parent_1.ignore) {\n return false;\n }\n parent_1 = parent_1.parent;\n }\n }\n return true;\n };\n Displayable.prototype.contain = function (x, y) {\n return this.rectContain(x, y);\n };\n Displayable.prototype.traverse = function (cb, context) {\n cb.call(context, this);\n };\n Displayable.prototype.rectContain = function (x, y) {\n var coord = this.transformCoordToLocal(x, y);\n var rect = this.getBoundingRect();\n return rect.contain(coord[0], coord[1]);\n };\n Displayable.prototype.getPaintRect = function () {\n var rect = this._paintRect;\n if (!this._paintRect || this.__dirty) {\n var transform = this.transform;\n var elRect = this.getBoundingRect();\n var style = this.style;\n var shadowSize = style.shadowBlur || 0;\n var shadowOffsetX = style.shadowOffsetX || 0;\n var shadowOffsetY = style.shadowOffsetY || 0;\n rect = this._paintRect || (this._paintRect = new BoundingRect(0, 0, 0, 0));\n if (transform) {\n BoundingRect.applyTransform(rect, elRect, transform);\n } else {\n rect.copy(elRect);\n }\n if (shadowSize || shadowOffsetX || shadowOffsetY) {\n rect.width += shadowSize * 2 + Math.abs(shadowOffsetX);\n rect.height += shadowSize * 2 + Math.abs(shadowOffsetY);\n rect.x = Math.min(rect.x, rect.x + shadowOffsetX - shadowSize);\n rect.y = Math.min(rect.y, rect.y + shadowOffsetY - shadowSize);\n }\n var tolerance = this.dirtyRectTolerance;\n if (!rect.isZero()) {\n rect.x = Math.floor(rect.x - tolerance);\n rect.y = Math.floor(rect.y - tolerance);\n rect.width = Math.ceil(rect.width + 1 + tolerance * 2);\n rect.height = Math.ceil(rect.height + 1 + tolerance * 2);\n }\n }\n return rect;\n };\n Displayable.prototype.setPrevPaintRect = function (paintRect) {\n if (paintRect) {\n this._prevPaintRect = this._prevPaintRect || new BoundingRect(0, 0, 0, 0);\n this._prevPaintRect.copy(paintRect);\n } else {\n this._prevPaintRect = null;\n }\n };\n Displayable.prototype.getPrevPaintRect = function () {\n return this._prevPaintRect;\n };\n Displayable.prototype.animateStyle = function (loop) {\n return this.animate('style', loop);\n };\n Displayable.prototype.updateDuringAnimation = function (targetKey) {\n if (targetKey === 'style') {\n this.dirtyStyle();\n } else {\n this.markRedraw();\n }\n };\n Displayable.prototype.attrKV = function (key, value) {\n if (key !== 'style') {\n _super.prototype.attrKV.call(this, key, value);\n } else {\n if (!this.style) {\n this.useStyle(value);\n } else {\n this.setStyle(value);\n }\n }\n };\n Displayable.prototype.setStyle = function (keyOrObj, value) {\n if (typeof keyOrObj === 'string') {\n this.style[keyOrObj] = value;\n } else {\n extend(this.style, keyOrObj);\n }\n this.dirtyStyle();\n return this;\n };\n Displayable.prototype.dirtyStyle = function (notRedraw) {\n if (!notRedraw) {\n this.markRedraw();\n }\n this.__dirty |= STYLE_CHANGED_BIT;\n if (this._rect) {\n this._rect = null;\n }\n };\n Displayable.prototype.dirty = function () {\n this.dirtyStyle();\n };\n Displayable.prototype.styleChanged = function () {\n return !!(this.__dirty & STYLE_CHANGED_BIT);\n };\n Displayable.prototype.styleUpdated = function () {\n this.__dirty &= ~STYLE_CHANGED_BIT;\n };\n Displayable.prototype.createStyle = function (obj) {\n return createObject(DEFAULT_COMMON_STYLE, obj);\n };\n Displayable.prototype.useStyle = function (obj) {\n if (!obj[STYLE_MAGIC_KEY]) {\n obj = this.createStyle(obj);\n }\n if (this.__inHover) {\n this.__hoverStyle = obj;\n } else {\n this.style = obj;\n }\n this.dirtyStyle();\n };\n Displayable.prototype.isStyleObject = function (obj) {\n return obj[STYLE_MAGIC_KEY];\n };\n Displayable.prototype._innerSaveToNormal = function (toState) {\n _super.prototype._innerSaveToNormal.call(this, toState);\n var normalState = this._normalState;\n if (toState.style && !normalState.style) {\n normalState.style = this._mergeStyle(this.createStyle(), this.style);\n }\n this._savePrimaryToNormal(toState, normalState, PRIMARY_STATES_KEYS);\n };\n Displayable.prototype._applyStateObj = function (stateName, state, normalState, keepCurrentStates, transition, animationCfg) {\n _super.prototype._applyStateObj.call(this, stateName, state, normalState, keepCurrentStates, transition, animationCfg);\n var needsRestoreToNormal = !(state && keepCurrentStates);\n var targetStyle;\n if (state && state.style) {\n if (transition) {\n if (keepCurrentStates) {\n targetStyle = state.style;\n } else {\n targetStyle = this._mergeStyle(this.createStyle(), normalState.style);\n this._mergeStyle(targetStyle, state.style);\n }\n } else {\n targetStyle = this._mergeStyle(this.createStyle(), keepCurrentStates ? this.style : normalState.style);\n this._mergeStyle(targetStyle, state.style);\n }\n } else if (needsRestoreToNormal) {\n targetStyle = normalState.style;\n }\n if (targetStyle) {\n if (transition) {\n var sourceStyle = this.style;\n this.style = this.createStyle(needsRestoreToNormal ? {} : sourceStyle);\n if (needsRestoreToNormal) {\n var changedKeys = keys(sourceStyle);\n for (var i = 0; i < changedKeys.length; i++) {\n var key = changedKeys[i];\n if (key in targetStyle) {\n targetStyle[key] = targetStyle[key];\n this.style[key] = sourceStyle[key];\n }\n }\n }\n var targetKeys = keys(targetStyle);\n for (var i = 0; i < targetKeys.length; i++) {\n var key = targetKeys[i];\n this.style[key] = this.style[key];\n }\n this._transitionState(stateName, {\n style: targetStyle\n }, animationCfg, this.getAnimationStyleProps());\n } else {\n this.useStyle(targetStyle);\n }\n }\n var statesKeys = this.__inHover ? PRIMARY_STATES_KEYS_IN_HOVER_LAYER : PRIMARY_STATES_KEYS;\n for (var i = 0; i < statesKeys.length; i++) {\n var key = statesKeys[i];\n if (state && state[key] != null) {\n this[key] = state[key];\n } else if (needsRestoreToNormal) {\n if (normalState[key] != null) {\n this[key] = normalState[key];\n }\n }\n }\n };\n Displayable.prototype._mergeStates = function (states) {\n var mergedState = _super.prototype._mergeStates.call(this, states);\n var mergedStyle;\n for (var i = 0; i < states.length; i++) {\n var state = states[i];\n if (state.style) {\n mergedStyle = mergedStyle || {};\n this._mergeStyle(mergedStyle, state.style);\n }\n }\n if (mergedStyle) {\n mergedState.style = mergedStyle;\n }\n return mergedState;\n };\n Displayable.prototype._mergeStyle = function (targetStyle, sourceStyle) {\n extend(targetStyle, sourceStyle);\n return targetStyle;\n };\n Displayable.prototype.getAnimationStyleProps = function () {\n return DEFAULT_COMMON_ANIMATION_PROPS;\n };\n Displayable.initDefaultProps = function () {\n var dispProto = Displayable.prototype;\n dispProto.type = 'displayable';\n dispProto.invisible = false;\n dispProto.z = 0;\n dispProto.z2 = 0;\n dispProto.zlevel = 0;\n dispProto.culling = false;\n dispProto.cursor = 'pointer';\n dispProto.rectHover = false;\n dispProto.incremental = false;\n dispProto._rect = null;\n dispProto.dirtyRectTolerance = 0;\n dispProto.__dirty = REDRAW_BIT | STYLE_CHANGED_BIT;\n }();\n return Displayable;\n}(Element);\nvar tmpRect = new BoundingRect(0, 0, 0, 0);\nvar viewRect = new BoundingRect(0, 0, 0, 0);\nfunction isDisplayableCulled(el, width, height) {\n tmpRect.copy(el.getBoundingRect());\n if (el.transform) {\n tmpRect.applyTransform(el.transform);\n }\n viewRect.width = width;\n viewRect.height = height;\n return !tmpRect.intersect(viewRect);\n}\nexport default Displayable;","import * as vec2 from './vector.js';\nimport * as curve from './curve.js';\nvar mathMin = Math.min;\nvar mathMax = Math.max;\nvar mathSin = Math.sin;\nvar mathCos = Math.cos;\nvar PI2 = Math.PI * 2;\nvar start = vec2.create();\nvar end = vec2.create();\nvar extremity = vec2.create();\nexport function fromPoints(points, min, max) {\n if (points.length === 0) {\n return;\n }\n var p = points[0];\n var left = p[0];\n var right = p[0];\n var top = p[1];\n var bottom = p[1];\n for (var i = 1; i < points.length; i++) {\n p = points[i];\n left = mathMin(left, p[0]);\n right = mathMax(right, p[0]);\n top = mathMin(top, p[1]);\n bottom = mathMax(bottom, p[1]);\n }\n min[0] = left;\n min[1] = top;\n max[0] = right;\n max[1] = bottom;\n}\nexport function fromLine(x0, y0, x1, y1, min, max) {\n min[0] = mathMin(x0, x1);\n min[1] = mathMin(y0, y1);\n max[0] = mathMax(x0, x1);\n max[1] = mathMax(y0, y1);\n}\nvar xDim = [];\nvar yDim = [];\nexport function fromCubic(x0, y0, x1, y1, x2, y2, x3, y3, min, max) {\n var cubicExtrema = curve.cubicExtrema;\n var cubicAt = curve.cubicAt;\n var n = cubicExtrema(x0, x1, x2, x3, xDim);\n min[0] = Infinity;\n min[1] = Infinity;\n max[0] = -Infinity;\n max[1] = -Infinity;\n for (var i = 0; i < n; i++) {\n var x = cubicAt(x0, x1, x2, x3, xDim[i]);\n min[0] = mathMin(x, min[0]);\n max[0] = mathMax(x, max[0]);\n }\n n = cubicExtrema(y0, y1, y2, y3, yDim);\n for (var i = 0; i < n; i++) {\n var y = cubicAt(y0, y1, y2, y3, yDim[i]);\n min[1] = mathMin(y, min[1]);\n max[1] = mathMax(y, max[1]);\n }\n min[0] = mathMin(x0, min[0]);\n max[0] = mathMax(x0, max[0]);\n min[0] = mathMin(x3, min[0]);\n max[0] = mathMax(x3, max[0]);\n min[1] = mathMin(y0, min[1]);\n max[1] = mathMax(y0, max[1]);\n min[1] = mathMin(y3, min[1]);\n max[1] = mathMax(y3, max[1]);\n}\nexport function fromQuadratic(x0, y0, x1, y1, x2, y2, min, max) {\n var quadraticExtremum = curve.quadraticExtremum;\n var quadraticAt = curve.quadraticAt;\n var tx = mathMax(mathMin(quadraticExtremum(x0, x1, x2), 1), 0);\n var ty = mathMax(mathMin(quadraticExtremum(y0, y1, y2), 1), 0);\n var x = quadraticAt(x0, x1, x2, tx);\n var y = quadraticAt(y0, y1, y2, ty);\n min[0] = mathMin(x0, x2, x);\n min[1] = mathMin(y0, y2, y);\n max[0] = mathMax(x0, x2, x);\n max[1] = mathMax(y0, y2, y);\n}\nexport function fromArc(x, y, rx, ry, startAngle, endAngle, anticlockwise, min, max) {\n var vec2Min = vec2.min;\n var vec2Max = vec2.max;\n var diff = Math.abs(startAngle - endAngle);\n if (diff % PI2 < 1e-4 && diff > 1e-4) {\n min[0] = x - rx;\n min[1] = y - ry;\n max[0] = x + rx;\n max[1] = y + ry;\n return;\n }\n start[0] = mathCos(startAngle) * rx + x;\n start[1] = mathSin(startAngle) * ry + y;\n end[0] = mathCos(endAngle) * rx + x;\n end[1] = mathSin(endAngle) * ry + y;\n vec2Min(min, start, end);\n vec2Max(max, start, end);\n startAngle = startAngle % PI2;\n if (startAngle < 0) {\n startAngle = startAngle + PI2;\n }\n endAngle = endAngle % PI2;\n if (endAngle < 0) {\n endAngle = endAngle + PI2;\n }\n if (startAngle > endAngle && !anticlockwise) {\n endAngle += PI2;\n } else if (startAngle < endAngle && anticlockwise) {\n startAngle += PI2;\n }\n if (anticlockwise) {\n var tmp = endAngle;\n endAngle = startAngle;\n startAngle = tmp;\n }\n for (var angle = 0; angle < endAngle; angle += Math.PI / 2) {\n if (angle > startAngle) {\n extremity[0] = mathCos(angle) * rx + x;\n extremity[1] = mathSin(angle) * ry + y;\n vec2Min(min, extremity, min);\n vec2Max(max, extremity, max);\n }\n }\n}","import * as vec2 from './vector.js';\nimport BoundingRect from './BoundingRect.js';\nimport { devicePixelRatio as dpr } from '../config.js';\nimport { fromLine, fromCubic, fromQuadratic, fromArc } from './bbox.js';\nimport { cubicLength, cubicSubdivide, quadraticLength, quadraticSubdivide } from './curve.js';\nvar CMD = {\n M: 1,\n L: 2,\n C: 3,\n Q: 4,\n A: 5,\n Z: 6,\n R: 7\n};\nvar tmpOutX = [];\nvar tmpOutY = [];\nvar min = [];\nvar max = [];\nvar min2 = [];\nvar max2 = [];\nvar mathMin = Math.min;\nvar mathMax = Math.max;\nvar mathCos = Math.cos;\nvar mathSin = Math.sin;\nvar mathAbs = Math.abs;\nvar PI = Math.PI;\nvar PI2 = PI * 2;\nvar hasTypedArray = typeof Float32Array !== 'undefined';\nvar tmpAngles = [];\nfunction modPI2(radian) {\n var n = Math.round(radian / PI * 1e8) / 1e8;\n return n % 2 * PI;\n}\nexport function normalizeArcAngles(angles, anticlockwise) {\n var newStartAngle = modPI2(angles[0]);\n if (newStartAngle < 0) {\n newStartAngle += PI2;\n }\n var delta = newStartAngle - angles[0];\n var newEndAngle = angles[1];\n newEndAngle += delta;\n if (!anticlockwise && newEndAngle - newStartAngle >= PI2) {\n newEndAngle = newStartAngle + PI2;\n } else if (anticlockwise && newStartAngle - newEndAngle >= PI2) {\n newEndAngle = newStartAngle - PI2;\n } else if (!anticlockwise && newStartAngle > newEndAngle) {\n newEndAngle = newStartAngle + (PI2 - modPI2(newStartAngle - newEndAngle));\n } else if (anticlockwise && newStartAngle < newEndAngle) {\n newEndAngle = newStartAngle - (PI2 - modPI2(newEndAngle - newStartAngle));\n }\n angles[0] = newStartAngle;\n angles[1] = newEndAngle;\n}\nvar PathProxy = function () {\n function PathProxy(notSaveData) {\n this.dpr = 1;\n this._xi = 0;\n this._yi = 0;\n this._x0 = 0;\n this._y0 = 0;\n this._len = 0;\n if (notSaveData) {\n this._saveData = false;\n }\n if (this._saveData) {\n this.data = [];\n }\n }\n PathProxy.prototype.increaseVersion = function () {\n this._version++;\n };\n PathProxy.prototype.getVersion = function () {\n return this._version;\n };\n PathProxy.prototype.setScale = function (sx, sy, segmentIgnoreThreshold) {\n segmentIgnoreThreshold = segmentIgnoreThreshold || 0;\n if (segmentIgnoreThreshold > 0) {\n this._ux = mathAbs(segmentIgnoreThreshold / dpr / sx) || 0;\n this._uy = mathAbs(segmentIgnoreThreshold / dpr / sy) || 0;\n }\n };\n PathProxy.prototype.setDPR = function (dpr) {\n this.dpr = dpr;\n };\n PathProxy.prototype.setContext = function (ctx) {\n this._ctx = ctx;\n };\n PathProxy.prototype.getContext = function () {\n return this._ctx;\n };\n PathProxy.prototype.beginPath = function () {\n this._ctx && this._ctx.beginPath();\n this.reset();\n return this;\n };\n PathProxy.prototype.reset = function () {\n if (this._saveData) {\n this._len = 0;\n }\n if (this._pathSegLen) {\n this._pathSegLen = null;\n this._pathLen = 0;\n }\n this._version++;\n };\n PathProxy.prototype.moveTo = function (x, y) {\n this._drawPendingPt();\n this.addData(CMD.M, x, y);\n this._ctx && this._ctx.moveTo(x, y);\n this._x0 = x;\n this._y0 = y;\n this._xi = x;\n this._yi = y;\n return this;\n };\n PathProxy.prototype.lineTo = function (x, y) {\n var dx = mathAbs(x - this._xi);\n var dy = mathAbs(y - this._yi);\n var exceedUnit = dx > this._ux || dy > this._uy;\n this.addData(CMD.L, x, y);\n if (this._ctx && exceedUnit) {\n this._ctx.lineTo(x, y);\n }\n if (exceedUnit) {\n this._xi = x;\n this._yi = y;\n this._pendingPtDist = 0;\n } else {\n var d2 = dx * dx + dy * dy;\n if (d2 > this._pendingPtDist) {\n this._pendingPtX = x;\n this._pendingPtY = y;\n this._pendingPtDist = d2;\n }\n }\n return this;\n };\n PathProxy.prototype.bezierCurveTo = function (x1, y1, x2, y2, x3, y3) {\n this._drawPendingPt();\n this.addData(CMD.C, x1, y1, x2, y2, x3, y3);\n if (this._ctx) {\n this._ctx.bezierCurveTo(x1, y1, x2, y2, x3, y3);\n }\n this._xi = x3;\n this._yi = y3;\n return this;\n };\n PathProxy.prototype.quadraticCurveTo = function (x1, y1, x2, y2) {\n this._drawPendingPt();\n this.addData(CMD.Q, x1, y1, x2, y2);\n if (this._ctx) {\n this._ctx.quadraticCurveTo(x1, y1, x2, y2);\n }\n this._xi = x2;\n this._yi = y2;\n return this;\n };\n PathProxy.prototype.arc = function (cx, cy, r, startAngle, endAngle, anticlockwise) {\n this._drawPendingPt();\n tmpAngles[0] = startAngle;\n tmpAngles[1] = endAngle;\n normalizeArcAngles(tmpAngles, anticlockwise);\n startAngle = tmpAngles[0];\n endAngle = tmpAngles[1];\n var delta = endAngle - startAngle;\n this.addData(CMD.A, cx, cy, r, r, startAngle, delta, 0, anticlockwise ? 0 : 1);\n this._ctx && this._ctx.arc(cx, cy, r, startAngle, endAngle, anticlockwise);\n this._xi = mathCos(endAngle) * r + cx;\n this._yi = mathSin(endAngle) * r + cy;\n return this;\n };\n PathProxy.prototype.arcTo = function (x1, y1, x2, y2, radius) {\n this._drawPendingPt();\n if (this._ctx) {\n this._ctx.arcTo(x1, y1, x2, y2, radius);\n }\n return this;\n };\n PathProxy.prototype.rect = function (x, y, w, h) {\n this._drawPendingPt();\n this._ctx && this._ctx.rect(x, y, w, h);\n this.addData(CMD.R, x, y, w, h);\n return this;\n };\n PathProxy.prototype.closePath = function () {\n this._drawPendingPt();\n this.addData(CMD.Z);\n var ctx = this._ctx;\n var x0 = this._x0;\n var y0 = this._y0;\n if (ctx) {\n ctx.closePath();\n }\n this._xi = x0;\n this._yi = y0;\n return this;\n };\n PathProxy.prototype.fill = function (ctx) {\n ctx && ctx.fill();\n this.toStatic();\n };\n PathProxy.prototype.stroke = function (ctx) {\n ctx && ctx.stroke();\n this.toStatic();\n };\n PathProxy.prototype.len = function () {\n return this._len;\n };\n PathProxy.prototype.setData = function (data) {\n var len = data.length;\n if (!(this.data && this.data.length === len) && hasTypedArray) {\n this.data = new Float32Array(len);\n }\n for (var i = 0; i < len; i++) {\n this.data[i] = data[i];\n }\n this._len = len;\n };\n PathProxy.prototype.appendPath = function (path) {\n if (!(path instanceof Array)) {\n path = [path];\n }\n var len = path.length;\n var appendSize = 0;\n var offset = this._len;\n for (var i = 0; i < len; i++) {\n appendSize += path[i].len();\n }\n if (hasTypedArray && this.data instanceof Float32Array) {\n this.data = new Float32Array(offset + appendSize);\n }\n for (var i = 0; i < len; i++) {\n var appendPathData = path[i].data;\n for (var k = 0; k < appendPathData.length; k++) {\n this.data[offset++] = appendPathData[k];\n }\n }\n this._len = offset;\n };\n PathProxy.prototype.addData = function (cmd, a, b, c, d, e, f, g, h) {\n if (!this._saveData) {\n return;\n }\n var data = this.data;\n if (this._len + arguments.length > data.length) {\n this._expandData();\n data = this.data;\n }\n for (var i = 0; i < arguments.length; i++) {\n data[this._len++] = arguments[i];\n }\n };\n PathProxy.prototype._drawPendingPt = function () {\n if (this._pendingPtDist > 0) {\n this._ctx && this._ctx.lineTo(this._pendingPtX, this._pendingPtY);\n this._pendingPtDist = 0;\n }\n };\n PathProxy.prototype._expandData = function () {\n if (!(this.data instanceof Array)) {\n var newData = [];\n for (var i = 0; i < this._len; i++) {\n newData[i] = this.data[i];\n }\n this.data = newData;\n }\n };\n PathProxy.prototype.toStatic = function () {\n if (!this._saveData) {\n return;\n }\n this._drawPendingPt();\n var data = this.data;\n if (data instanceof Array) {\n data.length = this._len;\n if (hasTypedArray && this._len > 11) {\n this.data = new Float32Array(data);\n }\n }\n };\n PathProxy.prototype.getBoundingRect = function () {\n min[0] = min[1] = min2[0] = min2[1] = Number.MAX_VALUE;\n max[0] = max[1] = max2[0] = max2[1] = -Number.MAX_VALUE;\n var data = this.data;\n var xi = 0;\n var yi = 0;\n var x0 = 0;\n var y0 = 0;\n var i;\n for (i = 0; i < this._len;) {\n var cmd = data[i++];\n var isFirst = i === 1;\n if (isFirst) {\n xi = data[i];\n yi = data[i + 1];\n x0 = xi;\n y0 = yi;\n }\n switch (cmd) {\n case CMD.M:\n xi = x0 = data[i++];\n yi = y0 = data[i++];\n min2[0] = x0;\n min2[1] = y0;\n max2[0] = x0;\n max2[1] = y0;\n break;\n case CMD.L:\n fromLine(xi, yi, data[i], data[i + 1], min2, max2);\n xi = data[i++];\n yi = data[i++];\n break;\n case CMD.C:\n fromCubic(xi, yi, data[i++], data[i++], data[i++], data[i++], data[i], data[i + 1], min2, max2);\n xi = data[i++];\n yi = data[i++];\n break;\n case CMD.Q:\n fromQuadratic(xi, yi, data[i++], data[i++], data[i], data[i + 1], min2, max2);\n xi = data[i++];\n yi = data[i++];\n break;\n case CMD.A:\n var cx = data[i++];\n var cy = data[i++];\n var rx = data[i++];\n var ry = data[i++];\n var startAngle = data[i++];\n var endAngle = data[i++] + startAngle;\n i += 1;\n var anticlockwise = !data[i++];\n if (isFirst) {\n x0 = mathCos(startAngle) * rx + cx;\n y0 = mathSin(startAngle) * ry + cy;\n }\n fromArc(cx, cy, rx, ry, startAngle, endAngle, anticlockwise, min2, max2);\n xi = mathCos(endAngle) * rx + cx;\n yi = mathSin(endAngle) * ry + cy;\n break;\n case CMD.R:\n x0 = xi = data[i++];\n y0 = yi = data[i++];\n var width = data[i++];\n var height = data[i++];\n fromLine(x0, y0, x0 + width, y0 + height, min2, max2);\n break;\n case CMD.Z:\n xi = x0;\n yi = y0;\n break;\n }\n vec2.min(min, min, min2);\n vec2.max(max, max, max2);\n }\n if (i === 0) {\n min[0] = min[1] = max[0] = max[1] = 0;\n }\n return new BoundingRect(min[0], min[1], max[0] - min[0], max[1] - min[1]);\n };\n PathProxy.prototype._calculateLength = function () {\n var data = this.data;\n var len = this._len;\n var ux = this._ux;\n var uy = this._uy;\n var xi = 0;\n var yi = 0;\n var x0 = 0;\n var y0 = 0;\n if (!this._pathSegLen) {\n this._pathSegLen = [];\n }\n var pathSegLen = this._pathSegLen;\n var pathTotalLen = 0;\n var segCount = 0;\n for (var i = 0; i < len;) {\n var cmd = data[i++];\n var isFirst = i === 1;\n if (isFirst) {\n xi = data[i];\n yi = data[i + 1];\n x0 = xi;\n y0 = yi;\n }\n var l = -1;\n switch (cmd) {\n case CMD.M:\n xi = x0 = data[i++];\n yi = y0 = data[i++];\n break;\n case CMD.L:\n {\n var x2 = data[i++];\n var y2 = data[i++];\n var dx = x2 - xi;\n var dy = y2 - yi;\n if (mathAbs(dx) > ux || mathAbs(dy) > uy || i === len - 1) {\n l = Math.sqrt(dx * dx + dy * dy);\n xi = x2;\n yi = y2;\n }\n break;\n }\n case CMD.C:\n {\n var x1 = data[i++];\n var y1 = data[i++];\n var x2 = data[i++];\n var y2 = data[i++];\n var x3 = data[i++];\n var y3 = data[i++];\n l = cubicLength(xi, yi, x1, y1, x2, y2, x3, y3, 10);\n xi = x3;\n yi = y3;\n break;\n }\n case CMD.Q:\n {\n var x1 = data[i++];\n var y1 = data[i++];\n var x2 = data[i++];\n var y2 = data[i++];\n l = quadraticLength(xi, yi, x1, y1, x2, y2, 10);\n xi = x2;\n yi = y2;\n break;\n }\n case CMD.A:\n var cx = data[i++];\n var cy = data[i++];\n var rx = data[i++];\n var ry = data[i++];\n var startAngle = data[i++];\n var delta = data[i++];\n var endAngle = delta + startAngle;\n i += 1;\n if (isFirst) {\n x0 = mathCos(startAngle) * rx + cx;\n y0 = mathSin(startAngle) * ry + cy;\n }\n l = mathMax(rx, ry) * mathMin(PI2, Math.abs(delta));\n xi = mathCos(endAngle) * rx + cx;\n yi = mathSin(endAngle) * ry + cy;\n break;\n case CMD.R:\n {\n x0 = xi = data[i++];\n y0 = yi = data[i++];\n var width = data[i++];\n var height = data[i++];\n l = width * 2 + height * 2;\n break;\n }\n case CMD.Z:\n {\n var dx = x0 - xi;\n var dy = y0 - yi;\n l = Math.sqrt(dx * dx + dy * dy);\n xi = x0;\n yi = y0;\n break;\n }\n }\n if (l >= 0) {\n pathSegLen[segCount++] = l;\n pathTotalLen += l;\n }\n }\n this._pathLen = pathTotalLen;\n return pathTotalLen;\n };\n PathProxy.prototype.rebuildPath = function (ctx, percent) {\n var d = this.data;\n var ux = this._ux;\n var uy = this._uy;\n var len = this._len;\n var x0;\n var y0;\n var xi;\n var yi;\n var x;\n var y;\n var drawPart = percent < 1;\n var pathSegLen;\n var pathTotalLen;\n var accumLength = 0;\n var segCount = 0;\n var displayedLength;\n var pendingPtDist = 0;\n var pendingPtX;\n var pendingPtY;\n if (drawPart) {\n if (!this._pathSegLen) {\n this._calculateLength();\n }\n pathSegLen = this._pathSegLen;\n pathTotalLen = this._pathLen;\n displayedLength = percent * pathTotalLen;\n if (!displayedLength) {\n return;\n }\n }\n lo: for (var i = 0; i < len;) {\n var cmd = d[i++];\n var isFirst = i === 1;\n if (isFirst) {\n xi = d[i];\n yi = d[i + 1];\n x0 = xi;\n y0 = yi;\n }\n if (cmd !== CMD.L && pendingPtDist > 0) {\n ctx.lineTo(pendingPtX, pendingPtY);\n pendingPtDist = 0;\n }\n switch (cmd) {\n case CMD.M:\n x0 = xi = d[i++];\n y0 = yi = d[i++];\n ctx.moveTo(xi, yi);\n break;\n case CMD.L:\n {\n x = d[i++];\n y = d[i++];\n var dx = mathAbs(x - xi);\n var dy = mathAbs(y - yi);\n if (dx > ux || dy > uy) {\n if (drawPart) {\n var l = pathSegLen[segCount++];\n if (accumLength + l > displayedLength) {\n var t = (displayedLength - accumLength) / l;\n ctx.lineTo(xi * (1 - t) + x * t, yi * (1 - t) + y * t);\n break lo;\n }\n accumLength += l;\n }\n ctx.lineTo(x, y);\n xi = x;\n yi = y;\n pendingPtDist = 0;\n } else {\n var d2 = dx * dx + dy * dy;\n if (d2 > pendingPtDist) {\n pendingPtX = x;\n pendingPtY = y;\n pendingPtDist = d2;\n }\n }\n break;\n }\n case CMD.C:\n {\n var x1 = d[i++];\n var y1 = d[i++];\n var x2 = d[i++];\n var y2 = d[i++];\n var x3 = d[i++];\n var y3 = d[i++];\n if (drawPart) {\n var l = pathSegLen[segCount++];\n if (accumLength + l > displayedLength) {\n var t = (displayedLength - accumLength) / l;\n cubicSubdivide(xi, x1, x2, x3, t, tmpOutX);\n cubicSubdivide(yi, y1, y2, y3, t, tmpOutY);\n ctx.bezierCurveTo(tmpOutX[1], tmpOutY[1], tmpOutX[2], tmpOutY[2], tmpOutX[3], tmpOutY[3]);\n break lo;\n }\n accumLength += l;\n }\n ctx.bezierCurveTo(x1, y1, x2, y2, x3, y3);\n xi = x3;\n yi = y3;\n break;\n }\n case CMD.Q:\n {\n var x1 = d[i++];\n var y1 = d[i++];\n var x2 = d[i++];\n var y2 = d[i++];\n if (drawPart) {\n var l = pathSegLen[segCount++];\n if (accumLength + l > displayedLength) {\n var t = (displayedLength - accumLength) / l;\n quadraticSubdivide(xi, x1, x2, t, tmpOutX);\n quadraticSubdivide(yi, y1, y2, t, tmpOutY);\n ctx.quadraticCurveTo(tmpOutX[1], tmpOutY[1], tmpOutX[2], tmpOutY[2]);\n break lo;\n }\n accumLength += l;\n }\n ctx.quadraticCurveTo(x1, y1, x2, y2);\n xi = x2;\n yi = y2;\n break;\n }\n case CMD.A:\n var cx = d[i++];\n var cy = d[i++];\n var rx = d[i++];\n var ry = d[i++];\n var startAngle = d[i++];\n var delta = d[i++];\n var psi = d[i++];\n var anticlockwise = !d[i++];\n var r = rx > ry ? rx : ry;\n var isEllipse = mathAbs(rx - ry) > 1e-3;\n var endAngle = startAngle + delta;\n var breakBuild = false;\n if (drawPart) {\n var l = pathSegLen[segCount++];\n if (accumLength + l > displayedLength) {\n endAngle = startAngle + delta * (displayedLength - accumLength) / l;\n breakBuild = true;\n }\n accumLength += l;\n }\n if (isEllipse && ctx.ellipse) {\n ctx.ellipse(cx, cy, rx, ry, psi, startAngle, endAngle, anticlockwise);\n } else {\n ctx.arc(cx, cy, r, startAngle, endAngle, anticlockwise);\n }\n if (breakBuild) {\n break lo;\n }\n if (isFirst) {\n x0 = mathCos(startAngle) * rx + cx;\n y0 = mathSin(startAngle) * ry + cy;\n }\n xi = mathCos(endAngle) * rx + cx;\n yi = mathSin(endAngle) * ry + cy;\n break;\n case CMD.R:\n x0 = xi = d[i];\n y0 = yi = d[i + 1];\n x = d[i++];\n y = d[i++];\n var width = d[i++];\n var height = d[i++];\n if (drawPart) {\n var l = pathSegLen[segCount++];\n if (accumLength + l > displayedLength) {\n var d_1 = displayedLength - accumLength;\n ctx.moveTo(x, y);\n ctx.lineTo(x + mathMin(d_1, width), y);\n d_1 -= width;\n if (d_1 > 0) {\n ctx.lineTo(x + width, y + mathMin(d_1, height));\n }\n d_1 -= height;\n if (d_1 > 0) {\n ctx.lineTo(x + mathMax(width - d_1, 0), y + height);\n }\n d_1 -= width;\n if (d_1 > 0) {\n ctx.lineTo(x, y + mathMax(height - d_1, 0));\n }\n break lo;\n }\n accumLength += l;\n }\n ctx.rect(x, y, width, height);\n break;\n case CMD.Z:\n if (drawPart) {\n var l = pathSegLen[segCount++];\n if (accumLength + l > displayedLength) {\n var t = (displayedLength - accumLength) / l;\n ctx.lineTo(xi * (1 - t) + x0 * t, yi * (1 - t) + y0 * t);\n break lo;\n }\n accumLength += l;\n }\n ctx.closePath();\n xi = x0;\n yi = y0;\n }\n }\n };\n PathProxy.prototype.clone = function () {\n var newProxy = new PathProxy();\n var data = this.data;\n newProxy.data = data.slice ? data.slice() : Array.prototype.slice.call(data);\n newProxy._len = this._len;\n return newProxy;\n };\n PathProxy.CMD = CMD;\n PathProxy.initDefaultProps = function () {\n var proto = PathProxy.prototype;\n proto._saveData = true;\n proto._ux = 0;\n proto._uy = 0;\n proto._pendingPtDist = 0;\n proto._version = 0;\n }();\n return PathProxy;\n}();\nexport default PathProxy;","export function containStroke(x0, y0, x1, y1, lineWidth, x, y) {\n if (lineWidth === 0) {\n return false;\n }\n var _l = lineWidth;\n var _a = 0;\n var _b = x0;\n if (y > y0 + _l && y > y1 + _l || y < y0 - _l && y < y1 - _l || x > x0 + _l && x > x1 + _l || x < x0 - _l && x < x1 - _l) {\n return false;\n }\n if (x0 !== x1) {\n _a = (y0 - y1) / (x0 - x1);\n _b = (x0 * y1 - x1 * y0) / (x0 - x1);\n } else {\n return Math.abs(x - x0) <= _l / 2;\n }\n var tmp = _a * x - y + _b;\n var _s = tmp * tmp / (_a * _a + 1);\n return _s <= _l / 2 * _l / 2;\n}","import * as curve from '../core/curve.js';\nexport function containStroke(x0, y0, x1, y1, x2, y2, x3, y3, lineWidth, x, y) {\n if (lineWidth === 0) {\n return false;\n }\n var _l = lineWidth;\n if (y > y0 + _l && y > y1 + _l && y > y2 + _l && y > y3 + _l || y < y0 - _l && y < y1 - _l && y < y2 - _l && y < y3 - _l || x > x0 + _l && x > x1 + _l && x > x2 + _l && x > x3 + _l || x < x0 - _l && x < x1 - _l && x < x2 - _l && x < x3 - _l) {\n return false;\n }\n var d = curve.cubicProjectPoint(x0, y0, x1, y1, x2, y2, x3, y3, x, y, null);\n return d <= _l / 2;\n}","import { quadraticProjectPoint } from '../core/curve.js';\nexport function containStroke(x0, y0, x1, y1, x2, y2, lineWidth, x, y) {\n if (lineWidth === 0) {\n return false;\n }\n var _l = lineWidth;\n if (y > y0 + _l && y > y1 + _l && y > y2 + _l || y < y0 - _l && y < y1 - _l && y < y2 - _l || x > x0 + _l && x > x1 + _l && x > x2 + _l || x < x0 - _l && x < x1 - _l && x < x2 - _l) {\n return false;\n }\n var d = quadraticProjectPoint(x0, y0, x1, y1, x2, y2, x, y, null);\n return d <= _l / 2;\n}","var PI2 = Math.PI * 2;\nexport function normalizeRadian(angle) {\n angle %= PI2;\n if (angle < 0) {\n angle += PI2;\n }\n return angle;\n}","import { normalizeRadian } from './util.js';\nvar PI2 = Math.PI * 2;\nexport function containStroke(cx, cy, r, startAngle, endAngle, anticlockwise, lineWidth, x, y) {\n if (lineWidth === 0) {\n return false;\n }\n var _l = lineWidth;\n x -= cx;\n y -= cy;\n var d = Math.sqrt(x * x + y * y);\n if (d - _l > r || d + _l < r) {\n return false;\n }\n if (Math.abs(startAngle - endAngle) % PI2 < 1e-4) {\n return true;\n }\n if (anticlockwise) {\n var tmp = startAngle;\n startAngle = normalizeRadian(endAngle);\n endAngle = normalizeRadian(tmp);\n } else {\n startAngle = normalizeRadian(startAngle);\n endAngle = normalizeRadian(endAngle);\n }\n if (startAngle > endAngle) {\n endAngle += PI2;\n }\n var angle = Math.atan2(y, x);\n if (angle < 0) {\n angle += PI2;\n }\n return angle >= startAngle && angle <= endAngle || angle + PI2 >= startAngle && angle + PI2 <= endAngle;\n}","export default function windingLine(x0, y0, x1, y1, x, y) {\n if (y > y0 && y > y1 || y < y0 && y < y1) {\n return 0;\n }\n if (y1 === y0) {\n return 0;\n }\n var t = (y - y0) / (y1 - y0);\n var dir = y1 < y0 ? 1 : -1;\n if (t === 1 || t === 0) {\n dir = y1 < y0 ? 0.5 : -0.5;\n }\n var x_ = t * (x1 - x0) + x0;\n return x_ === x ? Infinity : x_ > x ? dir : 0;\n}","import PathProxy from '../core/PathProxy.js';\nimport * as line from './line.js';\nimport * as cubic from './cubic.js';\nimport * as quadratic from './quadratic.js';\nimport * as arc from './arc.js';\nimport * as curve from '../core/curve.js';\nimport windingLine from './windingLine.js';\nvar CMD = PathProxy.CMD;\nvar PI2 = Math.PI * 2;\nvar EPSILON = 1e-4;\nfunction isAroundEqual(a, b) {\n return Math.abs(a - b) < EPSILON;\n}\nvar roots = [-1, -1, -1];\nvar extrema = [-1, -1];\nfunction swapExtrema() {\n var tmp = extrema[0];\n extrema[0] = extrema[1];\n extrema[1] = tmp;\n}\nfunction windingCubic(x0, y0, x1, y1, x2, y2, x3, y3, x, y) {\n if (y > y0 && y > y1 && y > y2 && y > y3 || y < y0 && y < y1 && y < y2 && y < y3) {\n return 0;\n }\n var nRoots = curve.cubicRootAt(y0, y1, y2, y3, y, roots);\n if (nRoots === 0) {\n return 0;\n } else {\n var w = 0;\n var nExtrema = -1;\n var y0_ = void 0;\n var y1_ = void 0;\n for (var i = 0; i < nRoots; i++) {\n var t = roots[i];\n var unit = t === 0 || t === 1 ? 0.5 : 1;\n var x_ = curve.cubicAt(x0, x1, x2, x3, t);\n if (x_ < x) {\n continue;\n }\n if (nExtrema < 0) {\n nExtrema = curve.cubicExtrema(y0, y1, y2, y3, extrema);\n if (extrema[1] < extrema[0] && nExtrema > 1) {\n swapExtrema();\n }\n y0_ = curve.cubicAt(y0, y1, y2, y3, extrema[0]);\n if (nExtrema > 1) {\n y1_ = curve.cubicAt(y0, y1, y2, y3, extrema[1]);\n }\n }\n if (nExtrema === 2) {\n if (t < extrema[0]) {\n w += y0_ < y0 ? unit : -unit;\n } else if (t < extrema[1]) {\n w += y1_ < y0_ ? unit : -unit;\n } else {\n w += y3 < y1_ ? unit : -unit;\n }\n } else {\n if (t < extrema[0]) {\n w += y0_ < y0 ? unit : -unit;\n } else {\n w += y3 < y0_ ? unit : -unit;\n }\n }\n }\n return w;\n }\n}\nfunction windingQuadratic(x0, y0, x1, y1, x2, y2, x, y) {\n if (y > y0 && y > y1 && y > y2 || y < y0 && y < y1 && y < y2) {\n return 0;\n }\n var nRoots = curve.quadraticRootAt(y0, y1, y2, y, roots);\n if (nRoots === 0) {\n return 0;\n } else {\n var t = curve.quadraticExtremum(y0, y1, y2);\n if (t >= 0 && t <= 1) {\n var w = 0;\n var y_ = curve.quadraticAt(y0, y1, y2, t);\n for (var i = 0; i < nRoots; i++) {\n var unit = roots[i] === 0 || roots[i] === 1 ? 0.5 : 1;\n var x_ = curve.quadraticAt(x0, x1, x2, roots[i]);\n if (x_ < x) {\n continue;\n }\n if (roots[i] < t) {\n w += y_ < y0 ? unit : -unit;\n } else {\n w += y2 < y_ ? unit : -unit;\n }\n }\n return w;\n } else {\n var unit = roots[0] === 0 || roots[0] === 1 ? 0.5 : 1;\n var x_ = curve.quadraticAt(x0, x1, x2, roots[0]);\n if (x_ < x) {\n return 0;\n }\n return y2 < y0 ? unit : -unit;\n }\n }\n}\nfunction windingArc(cx, cy, r, startAngle, endAngle, anticlockwise, x, y) {\n y -= cy;\n if (y > r || y < -r) {\n return 0;\n }\n var tmp = Math.sqrt(r * r - y * y);\n roots[0] = -tmp;\n roots[1] = tmp;\n var dTheta = Math.abs(startAngle - endAngle);\n if (dTheta < 1e-4) {\n return 0;\n }\n if (dTheta >= PI2 - 1e-4) {\n startAngle = 0;\n endAngle = PI2;\n var dir = anticlockwise ? 1 : -1;\n if (x >= roots[0] + cx && x <= roots[1] + cx) {\n return dir;\n } else {\n return 0;\n }\n }\n if (startAngle > endAngle) {\n var tmp_1 = startAngle;\n startAngle = endAngle;\n endAngle = tmp_1;\n }\n if (startAngle < 0) {\n startAngle += PI2;\n endAngle += PI2;\n }\n var w = 0;\n for (var i = 0; i < 2; i++) {\n var x_ = roots[i];\n if (x_ + cx > x) {\n var angle = Math.atan2(y, x_);\n var dir = anticlockwise ? 1 : -1;\n if (angle < 0) {\n angle = PI2 + angle;\n }\n if (angle >= startAngle && angle <= endAngle || angle + PI2 >= startAngle && angle + PI2 <= endAngle) {\n if (angle > Math.PI / 2 && angle < Math.PI * 1.5) {\n dir = -dir;\n }\n w += dir;\n }\n }\n }\n return w;\n}\nfunction containPath(path, lineWidth, isStroke, x, y) {\n var data = path.data;\n var len = path.len();\n var w = 0;\n var xi = 0;\n var yi = 0;\n var x0 = 0;\n var y0 = 0;\n var x1;\n var y1;\n for (var i = 0; i < len;) {\n var cmd = data[i++];\n var isFirst = i === 1;\n if (cmd === CMD.M && i > 1) {\n if (!isStroke) {\n w += windingLine(xi, yi, x0, y0, x, y);\n }\n }\n if (isFirst) {\n xi = data[i];\n yi = data[i + 1];\n x0 = xi;\n y0 = yi;\n }\n switch (cmd) {\n case CMD.M:\n x0 = data[i++];\n y0 = data[i++];\n xi = x0;\n yi = y0;\n break;\n case CMD.L:\n if (isStroke) {\n if (line.containStroke(xi, yi, data[i], data[i + 1], lineWidth, x, y)) {\n return true;\n }\n } else {\n w += windingLine(xi, yi, data[i], data[i + 1], x, y) || 0;\n }\n xi = data[i++];\n yi = data[i++];\n break;\n case CMD.C:\n if (isStroke) {\n if (cubic.containStroke(xi, yi, data[i++], data[i++], data[i++], data[i++], data[i], data[i + 1], lineWidth, x, y)) {\n return true;\n }\n } else {\n w += windingCubic(xi, yi, data[i++], data[i++], data[i++], data[i++], data[i], data[i + 1], x, y) || 0;\n }\n xi = data[i++];\n yi = data[i++];\n break;\n case CMD.Q:\n if (isStroke) {\n if (quadratic.containStroke(xi, yi, data[i++], data[i++], data[i], data[i + 1], lineWidth, x, y)) {\n return true;\n }\n } else {\n w += windingQuadratic(xi, yi, data[i++], data[i++], data[i], data[i + 1], x, y) || 0;\n }\n xi = data[i++];\n yi = data[i++];\n break;\n case CMD.A:\n var cx = data[i++];\n var cy = data[i++];\n var rx = data[i++];\n var ry = data[i++];\n var theta = data[i++];\n var dTheta = data[i++];\n i += 1;\n var anticlockwise = !!(1 - data[i++]);\n x1 = Math.cos(theta) * rx + cx;\n y1 = Math.sin(theta) * ry + cy;\n if (!isFirst) {\n w += windingLine(xi, yi, x1, y1, x, y);\n } else {\n x0 = x1;\n y0 = y1;\n }\n var _x = (x - cx) * ry / rx + cx;\n if (isStroke) {\n if (arc.containStroke(cx, cy, ry, theta, theta + dTheta, anticlockwise, lineWidth, _x, y)) {\n return true;\n }\n } else {\n w += windingArc(cx, cy, ry, theta, theta + dTheta, anticlockwise, _x, y);\n }\n xi = Math.cos(theta + dTheta) * rx + cx;\n yi = Math.sin(theta + dTheta) * ry + cy;\n break;\n case CMD.R:\n x0 = xi = data[i++];\n y0 = yi = data[i++];\n var width = data[i++];\n var height = data[i++];\n x1 = x0 + width;\n y1 = y0 + height;\n if (isStroke) {\n if (line.containStroke(x0, y0, x1, y0, lineWidth, x, y) || line.containStroke(x1, y0, x1, y1, lineWidth, x, y) || line.containStroke(x1, y1, x0, y1, lineWidth, x, y) || line.containStroke(x0, y1, x0, y0, lineWidth, x, y)) {\n return true;\n }\n } else {\n w += windingLine(x1, y0, x1, y1, x, y);\n w += windingLine(x0, y1, x0, y0, x, y);\n }\n break;\n case CMD.Z:\n if (isStroke) {\n if (line.containStroke(xi, yi, x0, y0, lineWidth, x, y)) {\n return true;\n }\n } else {\n w += windingLine(xi, yi, x0, y0, x, y);\n }\n xi = x0;\n yi = y0;\n break;\n }\n }\n if (!isStroke && !isAroundEqual(yi, y0)) {\n w += windingLine(xi, yi, x0, y0, x, y) || 0;\n }\n return w !== 0;\n}\nexport function contain(pathProxy, x, y) {\n return containPath(pathProxy, 0, false, x, y);\n}\nexport function containStroke(pathProxy, lineWidth, x, y) {\n return containPath(pathProxy, lineWidth, true, x, y);\n}","import { __extends } from \"tslib\";\nimport Displayable, { DEFAULT_COMMON_STYLE, DEFAULT_COMMON_ANIMATION_PROPS } from './Displayable.js';\nimport PathProxy from '../core/PathProxy.js';\nimport * as pathContain from '../contain/path.js';\nimport { defaults, keys, extend, clone, isString, createObject } from '../core/util.js';\nimport { lum } from '../tool/color.js';\nimport { DARK_LABEL_COLOR, LIGHT_LABEL_COLOR, DARK_MODE_THRESHOLD, LIGHTER_LABEL_COLOR } from '../config.js';\nimport { REDRAW_BIT, SHAPE_CHANGED_BIT, STYLE_CHANGED_BIT } from './constants.js';\nimport { TRANSFORMABLE_PROPS } from '../core/Transformable.js';\nexport var DEFAULT_PATH_STYLE = defaults({\n fill: '#000',\n stroke: null,\n strokePercent: 1,\n fillOpacity: 1,\n strokeOpacity: 1,\n lineDashOffset: 0,\n lineWidth: 1,\n lineCap: 'butt',\n miterLimit: 10,\n strokeNoScale: false,\n strokeFirst: false\n}, DEFAULT_COMMON_STYLE);\nexport var DEFAULT_PATH_ANIMATION_PROPS = {\n style: defaults({\n fill: true,\n stroke: true,\n strokePercent: true,\n fillOpacity: true,\n strokeOpacity: true,\n lineDashOffset: true,\n lineWidth: true,\n miterLimit: true\n }, DEFAULT_COMMON_ANIMATION_PROPS.style)\n};\nvar pathCopyParams = TRANSFORMABLE_PROPS.concat(['invisible', 'culling', 'z', 'z2', 'zlevel', 'parent']);\nvar Path = function (_super) {\n __extends(Path, _super);\n function Path(opts) {\n return _super.call(this, opts) || this;\n }\n Path.prototype.update = function () {\n var _this = this;\n _super.prototype.update.call(this);\n var style = this.style;\n if (style.decal) {\n var decalEl = this._decalEl = this._decalEl || new Path();\n if (decalEl.buildPath === Path.prototype.buildPath) {\n decalEl.buildPath = function (ctx) {\n _this.buildPath(ctx, _this.shape);\n };\n }\n decalEl.silent = true;\n var decalElStyle = decalEl.style;\n for (var key in style) {\n if (decalElStyle[key] !== style[key]) {\n decalElStyle[key] = style[key];\n }\n }\n decalElStyle.fill = style.fill ? style.decal : null;\n decalElStyle.decal = null;\n decalElStyle.shadowColor = null;\n style.strokeFirst && (decalElStyle.stroke = null);\n for (var i = 0; i < pathCopyParams.length; ++i) {\n decalEl[pathCopyParams[i]] = this[pathCopyParams[i]];\n }\n decalEl.__dirty |= REDRAW_BIT;\n } else if (this._decalEl) {\n this._decalEl = null;\n }\n };\n Path.prototype.getDecalElement = function () {\n return this._decalEl;\n };\n Path.prototype._init = function (props) {\n var keysArr = keys(props);\n this.shape = this.getDefaultShape();\n var defaultStyle = this.getDefaultStyle();\n if (defaultStyle) {\n this.useStyle(defaultStyle);\n }\n for (var i = 0; i < keysArr.length; i++) {\n var key = keysArr[i];\n var value = props[key];\n if (key === 'style') {\n if (!this.style) {\n this.useStyle(value);\n } else {\n extend(this.style, value);\n }\n } else if (key === 'shape') {\n extend(this.shape, value);\n } else {\n _super.prototype.attrKV.call(this, key, value);\n }\n }\n if (!this.style) {\n this.useStyle({});\n }\n };\n Path.prototype.getDefaultStyle = function () {\n return null;\n };\n Path.prototype.getDefaultShape = function () {\n return {};\n };\n Path.prototype.canBeInsideText = function () {\n return this.hasFill();\n };\n Path.prototype.getInsideTextFill = function () {\n var pathFill = this.style.fill;\n if (pathFill !== 'none') {\n if (isString(pathFill)) {\n var fillLum = lum(pathFill, 0);\n if (fillLum > 0.5) {\n return DARK_LABEL_COLOR;\n } else if (fillLum > 0.2) {\n return LIGHTER_LABEL_COLOR;\n }\n return LIGHT_LABEL_COLOR;\n } else if (pathFill) {\n return LIGHT_LABEL_COLOR;\n }\n }\n return DARK_LABEL_COLOR;\n };\n Path.prototype.getInsideTextStroke = function (textFill) {\n var pathFill = this.style.fill;\n if (isString(pathFill)) {\n var zr = this.__zr;\n var isDarkMode = !!(zr && zr.isDarkMode());\n var isDarkLabel = lum(textFill, 0) < DARK_MODE_THRESHOLD;\n if (isDarkMode === isDarkLabel) {\n return pathFill;\n }\n }\n };\n Path.prototype.buildPath = function (ctx, shapeCfg, inBatch) {};\n Path.prototype.pathUpdated = function () {\n this.__dirty &= ~SHAPE_CHANGED_BIT;\n };\n Path.prototype.getUpdatedPathProxy = function (inBatch) {\n !this.path && this.createPathProxy();\n this.path.beginPath();\n this.buildPath(this.path, this.shape, inBatch);\n return this.path;\n };\n Path.prototype.createPathProxy = function () {\n this.path = new PathProxy(false);\n };\n Path.prototype.hasStroke = function () {\n var style = this.style;\n var stroke = style.stroke;\n return !(stroke == null || stroke === 'none' || !(style.lineWidth > 0));\n };\n Path.prototype.hasFill = function () {\n var style = this.style;\n var fill = style.fill;\n return fill != null && fill !== 'none';\n };\n Path.prototype.getBoundingRect = function () {\n var rect = this._rect;\n var style = this.style;\n var needsUpdateRect = !rect;\n if (needsUpdateRect) {\n var firstInvoke = false;\n if (!this.path) {\n firstInvoke = true;\n this.createPathProxy();\n }\n var path = this.path;\n if (firstInvoke || this.__dirty & SHAPE_CHANGED_BIT) {\n path.beginPath();\n this.buildPath(path, this.shape, false);\n this.pathUpdated();\n }\n rect = path.getBoundingRect();\n }\n this._rect = rect;\n if (this.hasStroke() && this.path && this.path.len() > 0) {\n var rectStroke = this._rectStroke || (this._rectStroke = rect.clone());\n if (this.__dirty || needsUpdateRect) {\n rectStroke.copy(rect);\n var lineScale = style.strokeNoScale ? this.getLineScale() : 1;\n var w = style.lineWidth;\n if (!this.hasFill()) {\n var strokeContainThreshold = this.strokeContainThreshold;\n w = Math.max(w, strokeContainThreshold == null ? 4 : strokeContainThreshold);\n }\n if (lineScale > 1e-10) {\n rectStroke.width += w / lineScale;\n rectStroke.height += w / lineScale;\n rectStroke.x -= w / lineScale / 2;\n rectStroke.y -= w / lineScale / 2;\n }\n }\n return rectStroke;\n }\n return rect;\n };\n Path.prototype.contain = function (x, y) {\n var localPos = this.transformCoordToLocal(x, y);\n var rect = this.getBoundingRect();\n var style = this.style;\n x = localPos[0];\n y = localPos[1];\n if (rect.contain(x, y)) {\n var pathProxy = this.path;\n if (this.hasStroke()) {\n var lineWidth = style.lineWidth;\n var lineScale = style.strokeNoScale ? this.getLineScale() : 1;\n if (lineScale > 1e-10) {\n if (!this.hasFill()) {\n lineWidth = Math.max(lineWidth, this.strokeContainThreshold);\n }\n if (pathContain.containStroke(pathProxy, lineWidth / lineScale, x, y)) {\n return true;\n }\n }\n }\n if (this.hasFill()) {\n return pathContain.contain(pathProxy, x, y);\n }\n }\n return false;\n };\n Path.prototype.dirtyShape = function () {\n this.__dirty |= SHAPE_CHANGED_BIT;\n if (this._rect) {\n this._rect = null;\n }\n if (this._decalEl) {\n this._decalEl.dirtyShape();\n }\n this.markRedraw();\n };\n Path.prototype.dirty = function () {\n this.dirtyStyle();\n this.dirtyShape();\n };\n Path.prototype.animateShape = function (loop) {\n return this.animate('shape', loop);\n };\n Path.prototype.updateDuringAnimation = function (targetKey) {\n if (targetKey === 'style') {\n this.dirtyStyle();\n } else if (targetKey === 'shape') {\n this.dirtyShape();\n } else {\n this.markRedraw();\n }\n };\n Path.prototype.attrKV = function (key, value) {\n if (key === 'shape') {\n this.setShape(value);\n } else {\n _super.prototype.attrKV.call(this, key, value);\n }\n };\n Path.prototype.setShape = function (keyOrObj, value) {\n var shape = this.shape;\n if (!shape) {\n shape = this.shape = {};\n }\n if (typeof keyOrObj === 'string') {\n shape[keyOrObj] = value;\n } else {\n extend(shape, keyOrObj);\n }\n this.dirtyShape();\n return this;\n };\n Path.prototype.shapeChanged = function () {\n return !!(this.__dirty & SHAPE_CHANGED_BIT);\n };\n Path.prototype.createStyle = function (obj) {\n return createObject(DEFAULT_PATH_STYLE, obj);\n };\n Path.prototype._innerSaveToNormal = function (toState) {\n _super.prototype._innerSaveToNormal.call(this, toState);\n var normalState = this._normalState;\n if (toState.shape && !normalState.shape) {\n normalState.shape = extend({}, this.shape);\n }\n };\n Path.prototype._applyStateObj = function (stateName, state, normalState, keepCurrentStates, transition, animationCfg) {\n _super.prototype._applyStateObj.call(this, stateName, state, normalState, keepCurrentStates, transition, animationCfg);\n var needsRestoreToNormal = !(state && keepCurrentStates);\n var targetShape;\n if (state && state.shape) {\n if (transition) {\n if (keepCurrentStates) {\n targetShape = state.shape;\n } else {\n targetShape = extend({}, normalState.shape);\n extend(targetShape, state.shape);\n }\n } else {\n targetShape = extend({}, keepCurrentStates ? this.shape : normalState.shape);\n extend(targetShape, state.shape);\n }\n } else if (needsRestoreToNormal) {\n targetShape = normalState.shape;\n }\n if (targetShape) {\n if (transition) {\n this.shape = extend({}, this.shape);\n var targetShapePrimaryProps = {};\n var shapeKeys = keys(targetShape);\n for (var i = 0; i < shapeKeys.length; i++) {\n var key = shapeKeys[i];\n if (typeof targetShape[key] === 'object') {\n this.shape[key] = targetShape[key];\n } else {\n targetShapePrimaryProps[key] = targetShape[key];\n }\n }\n this._transitionState(stateName, {\n shape: targetShapePrimaryProps\n }, animationCfg);\n } else {\n this.shape = targetShape;\n this.dirtyShape();\n }\n }\n };\n Path.prototype._mergeStates = function (states) {\n var mergedState = _super.prototype._mergeStates.call(this, states);\n var mergedShape;\n for (var i = 0; i < states.length; i++) {\n var state = states[i];\n if (state.shape) {\n mergedShape = mergedShape || {};\n this._mergeStyle(mergedShape, state.shape);\n }\n }\n if (mergedShape) {\n mergedState.shape = mergedShape;\n }\n return mergedState;\n };\n Path.prototype.getAnimationStyleProps = function () {\n return DEFAULT_PATH_ANIMATION_PROPS;\n };\n Path.prototype.isZeroArea = function () {\n return false;\n };\n Path.extend = function (defaultProps) {\n var Sub = function (_super) {\n __extends(Sub, _super);\n function Sub(opts) {\n var _this = _super.call(this, opts) || this;\n defaultProps.init && defaultProps.init.call(_this, opts);\n return _this;\n }\n Sub.prototype.getDefaultStyle = function () {\n return clone(defaultProps.style);\n };\n Sub.prototype.getDefaultShape = function () {\n return clone(defaultProps.shape);\n };\n return Sub;\n }(Path);\n for (var key in defaultProps) {\n if (typeof defaultProps[key] === 'function') {\n Sub.prototype[key] = defaultProps[key];\n }\n }\n return Sub;\n };\n Path.initDefaultProps = function () {\n var pathProto = Path.prototype;\n pathProto.type = 'path';\n pathProto.strokeContainThreshold = 5;\n pathProto.segmentIgnoreThreshold = 0;\n pathProto.subPixelOptimize = false;\n pathProto.autoBatch = false;\n pathProto.__dirty = REDRAW_BIT | STYLE_CHANGED_BIT | SHAPE_CHANGED_BIT;\n }();\n return Path;\n}(Displayable);\nexport default Path;","import { __extends } from \"tslib\";\nimport Displayable from './Displayable.js';\nimport { getBoundingRect } from '../contain/text.js';\nimport { DEFAULT_PATH_STYLE } from './Path.js';\nimport { createObject, defaults } from '../core/util.js';\nimport { DEFAULT_FONT } from '../core/platform.js';\nexport var DEFAULT_TSPAN_STYLE = defaults({\n strokeFirst: true,\n font: DEFAULT_FONT,\n x: 0,\n y: 0,\n textAlign: 'left',\n textBaseline: 'top',\n miterLimit: 2\n}, DEFAULT_PATH_STYLE);\nvar TSpan = function (_super) {\n __extends(TSpan, _super);\n function TSpan() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n TSpan.prototype.hasStroke = function () {\n var style = this.style;\n var stroke = style.stroke;\n return stroke != null && stroke !== 'none' && style.lineWidth > 0;\n };\n TSpan.prototype.hasFill = function () {\n var style = this.style;\n var fill = style.fill;\n return fill != null && fill !== 'none';\n };\n TSpan.prototype.createStyle = function (obj) {\n return createObject(DEFAULT_TSPAN_STYLE, obj);\n };\n TSpan.prototype.setBoundingRect = function (rect) {\n this._rect = rect;\n };\n TSpan.prototype.getBoundingRect = function () {\n var style = this.style;\n if (!this._rect) {\n var text = style.text;\n text != null ? text += '' : text = '';\n var rect = getBoundingRect(text, style.font, style.textAlign, style.textBaseline);\n rect.x += style.x || 0;\n rect.y += style.y || 0;\n if (this.hasStroke()) {\n var w = style.lineWidth;\n rect.x -= w / 2;\n rect.y -= w / 2;\n rect.width += w;\n rect.height += w;\n }\n this._rect = rect;\n }\n return this._rect;\n };\n TSpan.initDefaultProps = function () {\n var tspanProto = TSpan.prototype;\n tspanProto.dirtyRectTolerance = 10;\n }();\n return TSpan;\n}(Displayable);\nTSpan.prototype.type = 'tspan';\nexport default TSpan;","import { __extends } from \"tslib\";\nimport Displayable, { DEFAULT_COMMON_STYLE, DEFAULT_COMMON_ANIMATION_PROPS } from './Displayable.js';\nimport BoundingRect from '../core/BoundingRect.js';\nimport { defaults, createObject } from '../core/util.js';\nexport var DEFAULT_IMAGE_STYLE = defaults({\n x: 0,\n y: 0\n}, DEFAULT_COMMON_STYLE);\nexport var DEFAULT_IMAGE_ANIMATION_PROPS = {\n style: defaults({\n x: true,\n y: true,\n width: true,\n height: true,\n sx: true,\n sy: true,\n sWidth: true,\n sHeight: true\n }, DEFAULT_COMMON_ANIMATION_PROPS.style)\n};\nfunction isImageLike(source) {\n return !!(source && typeof source !== 'string' && source.width && source.height);\n}\nvar ZRImage = function (_super) {\n __extends(ZRImage, _super);\n function ZRImage() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ZRImage.prototype.createStyle = function (obj) {\n return createObject(DEFAULT_IMAGE_STYLE, obj);\n };\n ZRImage.prototype._getSize = function (dim) {\n var style = this.style;\n var size = style[dim];\n if (size != null) {\n return size;\n }\n var imageSource = isImageLike(style.image) ? style.image : this.__image;\n if (!imageSource) {\n return 0;\n }\n var otherDim = dim === 'width' ? 'height' : 'width';\n var otherDimSize = style[otherDim];\n if (otherDimSize == null) {\n return imageSource[dim];\n } else {\n return imageSource[dim] / imageSource[otherDim] * otherDimSize;\n }\n };\n ZRImage.prototype.getWidth = function () {\n return this._getSize('width');\n };\n ZRImage.prototype.getHeight = function () {\n return this._getSize('height');\n };\n ZRImage.prototype.getAnimationStyleProps = function () {\n return DEFAULT_IMAGE_ANIMATION_PROPS;\n };\n ZRImage.prototype.getBoundingRect = function () {\n var style = this.style;\n if (!this._rect) {\n this._rect = new BoundingRect(style.x || 0, style.y || 0, this.getWidth(), this.getHeight());\n }\n return this._rect;\n };\n return ZRImage;\n}(Displayable);\nZRImage.prototype.type = 'image';\nexport default ZRImage;","export function buildPath(ctx, shape) {\n var x = shape.x;\n var y = shape.y;\n var width = shape.width;\n var height = shape.height;\n var r = shape.r;\n var r1;\n var r2;\n var r3;\n var r4;\n if (width < 0) {\n x = x + width;\n width = -width;\n }\n if (height < 0) {\n y = y + height;\n height = -height;\n }\n if (typeof r === 'number') {\n r1 = r2 = r3 = r4 = r;\n } else if (r instanceof Array) {\n if (r.length === 1) {\n r1 = r2 = r3 = r4 = r[0];\n } else if (r.length === 2) {\n r1 = r3 = r[0];\n r2 = r4 = r[1];\n } else if (r.length === 3) {\n r1 = r[0];\n r2 = r4 = r[1];\n r3 = r[2];\n } else {\n r1 = r[0];\n r2 = r[1];\n r3 = r[2];\n r4 = r[3];\n }\n } else {\n r1 = r2 = r3 = r4 = 0;\n }\n var total;\n if (r1 + r2 > width) {\n total = r1 + r2;\n r1 *= width / total;\n r2 *= width / total;\n }\n if (r3 + r4 > width) {\n total = r3 + r4;\n r3 *= width / total;\n r4 *= width / total;\n }\n if (r2 + r3 > height) {\n total = r2 + r3;\n r2 *= height / total;\n r3 *= height / total;\n }\n if (r1 + r4 > height) {\n total = r1 + r4;\n r1 *= height / total;\n r4 *= height / total;\n }\n ctx.moveTo(x + r1, y);\n ctx.lineTo(x + width - r2, y);\n r2 !== 0 && ctx.arc(x + width - r2, y + r2, r2, -Math.PI / 2, 0);\n ctx.lineTo(x + width, y + height - r3);\n r3 !== 0 && ctx.arc(x + width - r3, y + height - r3, r3, 0, Math.PI / 2);\n ctx.lineTo(x + r4, y + height);\n r4 !== 0 && ctx.arc(x + r4, y + height - r4, r4, Math.PI / 2, Math.PI);\n ctx.lineTo(x, y + r1);\n r1 !== 0 && ctx.arc(x + r1, y + r1, r1, Math.PI, Math.PI * 1.5);\n}","var round = Math.round;\nexport function subPixelOptimizeLine(outputShape, inputShape, style) {\n if (!inputShape) {\n return;\n }\n var x1 = inputShape.x1;\n var x2 = inputShape.x2;\n var y1 = inputShape.y1;\n var y2 = inputShape.y2;\n outputShape.x1 = x1;\n outputShape.x2 = x2;\n outputShape.y1 = y1;\n outputShape.y2 = y2;\n var lineWidth = style && style.lineWidth;\n if (!lineWidth) {\n return outputShape;\n }\n if (round(x1 * 2) === round(x2 * 2)) {\n outputShape.x1 = outputShape.x2 = subPixelOptimize(x1, lineWidth, true);\n }\n if (round(y1 * 2) === round(y2 * 2)) {\n outputShape.y1 = outputShape.y2 = subPixelOptimize(y1, lineWidth, true);\n }\n return outputShape;\n}\nexport function subPixelOptimizeRect(outputShape, inputShape, style) {\n if (!inputShape) {\n return;\n }\n var originX = inputShape.x;\n var originY = inputShape.y;\n var originWidth = inputShape.width;\n var originHeight = inputShape.height;\n outputShape.x = originX;\n outputShape.y = originY;\n outputShape.width = originWidth;\n outputShape.height = originHeight;\n var lineWidth = style && style.lineWidth;\n if (!lineWidth) {\n return outputShape;\n }\n outputShape.x = subPixelOptimize(originX, lineWidth, true);\n outputShape.y = subPixelOptimize(originY, lineWidth, true);\n outputShape.width = Math.max(subPixelOptimize(originX + originWidth, lineWidth, false) - outputShape.x, originWidth === 0 ? 0 : 1);\n outputShape.height = Math.max(subPixelOptimize(originY + originHeight, lineWidth, false) - outputShape.y, originHeight === 0 ? 0 : 1);\n return outputShape;\n}\nexport function subPixelOptimize(position, lineWidth, positiveOrNegative) {\n if (!lineWidth) {\n return position;\n }\n var doubledPosition = round(position * 2);\n return (doubledPosition + round(lineWidth)) % 2 === 0 ? doubledPosition / 2 : (doubledPosition + (positiveOrNegative ? 1 : -1)) / 2;\n}","import { __extends } from \"tslib\";\nimport Path from '../Path.js';\nimport * as roundRectHelper from '../helper/roundRect.js';\nimport { subPixelOptimizeRect } from '../helper/subPixelOptimize.js';\nvar RectShape = function () {\n function RectShape() {\n this.x = 0;\n this.y = 0;\n this.width = 0;\n this.height = 0;\n }\n return RectShape;\n}();\nexport { RectShape };\nvar subPixelOptimizeOutputShape = {};\nvar Rect = function (_super) {\n __extends(Rect, _super);\n function Rect(opts) {\n return _super.call(this, opts) || this;\n }\n Rect.prototype.getDefaultShape = function () {\n return new RectShape();\n };\n Rect.prototype.buildPath = function (ctx, shape) {\n var x;\n var y;\n var width;\n var height;\n if (this.subPixelOptimize) {\n var optimizedShape = subPixelOptimizeRect(subPixelOptimizeOutputShape, shape, this.style);\n x = optimizedShape.x;\n y = optimizedShape.y;\n width = optimizedShape.width;\n height = optimizedShape.height;\n optimizedShape.r = shape.r;\n shape = optimizedShape;\n } else {\n x = shape.x;\n y = shape.y;\n width = shape.width;\n height = shape.height;\n }\n if (!shape.r) {\n ctx.rect(x, y, width, height);\n } else {\n roundRectHelper.buildPath(ctx, shape);\n }\n };\n Rect.prototype.isZeroArea = function () {\n return !this.shape.width || !this.shape.height;\n };\n return Rect;\n}(Path);\nRect.prototype.type = 'rect';\nexport default Rect;","import { __extends } from \"tslib\";\nimport { parseRichText, parsePlainText } from './helper/parseText.js';\nimport TSpan from './TSpan.js';\nimport { retrieve2, each, normalizeCssArray, trim, retrieve3, extend, keys, defaults } from '../core/util.js';\nimport { adjustTextX, adjustTextY } from '../contain/text.js';\nimport ZRImage from './Image.js';\nimport Rect from './shape/Rect.js';\nimport BoundingRect from '../core/BoundingRect.js';\nimport Displayable, { DEFAULT_COMMON_ANIMATION_PROPS } from './Displayable.js';\nimport { DEFAULT_FONT, DEFAULT_FONT_SIZE } from '../core/platform.js';\nvar DEFAULT_RICH_TEXT_COLOR = {\n fill: '#000'\n};\nvar DEFAULT_STROKE_LINE_WIDTH = 2;\nexport var DEFAULT_TEXT_ANIMATION_PROPS = {\n style: defaults({\n fill: true,\n stroke: true,\n fillOpacity: true,\n strokeOpacity: true,\n lineWidth: true,\n fontSize: true,\n lineHeight: true,\n width: true,\n height: true,\n textShadowColor: true,\n textShadowBlur: true,\n textShadowOffsetX: true,\n textShadowOffsetY: true,\n backgroundColor: true,\n padding: true,\n borderColor: true,\n borderWidth: true,\n borderRadius: true\n }, DEFAULT_COMMON_ANIMATION_PROPS.style)\n};\nvar ZRText = function (_super) {\n __extends(ZRText, _super);\n function ZRText(opts) {\n var _this = _super.call(this) || this;\n _this.type = 'text';\n _this._children = [];\n _this._defaultStyle = DEFAULT_RICH_TEXT_COLOR;\n _this.attr(opts);\n return _this;\n }\n ZRText.prototype.childrenRef = function () {\n return this._children;\n };\n ZRText.prototype.update = function () {\n _super.prototype.update.call(this);\n if (this.styleChanged()) {\n this._updateSubTexts();\n }\n for (var i = 0; i < this._children.length; i++) {\n var child = this._children[i];\n child.zlevel = this.zlevel;\n child.z = this.z;\n child.z2 = this.z2;\n child.culling = this.culling;\n child.cursor = this.cursor;\n child.invisible = this.invisible;\n }\n };\n ZRText.prototype.updateTransform = function () {\n var innerTransformable = this.innerTransformable;\n if (innerTransformable) {\n innerTransformable.updateTransform();\n if (innerTransformable.transform) {\n this.transform = innerTransformable.transform;\n }\n } else {\n _super.prototype.updateTransform.call(this);\n }\n };\n ZRText.prototype.getLocalTransform = function (m) {\n var innerTransformable = this.innerTransformable;\n return innerTransformable ? innerTransformable.getLocalTransform(m) : _super.prototype.getLocalTransform.call(this, m);\n };\n ZRText.prototype.getComputedTransform = function () {\n if (this.__hostTarget) {\n this.__hostTarget.getComputedTransform();\n this.__hostTarget.updateInnerText(true);\n }\n return _super.prototype.getComputedTransform.call(this);\n };\n ZRText.prototype._updateSubTexts = function () {\n this._childCursor = 0;\n normalizeTextStyle(this.style);\n this.style.rich ? this._updateRichTexts() : this._updatePlainTexts();\n this._children.length = this._childCursor;\n this.styleUpdated();\n };\n ZRText.prototype.addSelfToZr = function (zr) {\n _super.prototype.addSelfToZr.call(this, zr);\n for (var i = 0; i < this._children.length; i++) {\n this._children[i].__zr = zr;\n }\n };\n ZRText.prototype.removeSelfFromZr = function (zr) {\n _super.prototype.removeSelfFromZr.call(this, zr);\n for (var i = 0; i < this._children.length; i++) {\n this._children[i].__zr = null;\n }\n };\n ZRText.prototype.getBoundingRect = function () {\n if (this.styleChanged()) {\n this._updateSubTexts();\n }\n if (!this._rect) {\n var tmpRect = new BoundingRect(0, 0, 0, 0);\n var children = this._children;\n var tmpMat = [];\n var rect = null;\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n var childRect = child.getBoundingRect();\n var transform = child.getLocalTransform(tmpMat);\n if (transform) {\n tmpRect.copy(childRect);\n tmpRect.applyTransform(transform);\n rect = rect || tmpRect.clone();\n rect.union(tmpRect);\n } else {\n rect = rect || childRect.clone();\n rect.union(childRect);\n }\n }\n this._rect = rect || tmpRect;\n }\n return this._rect;\n };\n ZRText.prototype.setDefaultTextStyle = function (defaultTextStyle) {\n this._defaultStyle = defaultTextStyle || DEFAULT_RICH_TEXT_COLOR;\n };\n ZRText.prototype.setTextContent = function (textContent) {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error('Can\\'t attach text on another text');\n }\n };\n ZRText.prototype._mergeStyle = function (targetStyle, sourceStyle) {\n if (!sourceStyle) {\n return targetStyle;\n }\n var sourceRich = sourceStyle.rich;\n var targetRich = targetStyle.rich || sourceRich && {};\n extend(targetStyle, sourceStyle);\n if (sourceRich && targetRich) {\n this._mergeRich(targetRich, sourceRich);\n targetStyle.rich = targetRich;\n } else if (targetRich) {\n targetStyle.rich = targetRich;\n }\n return targetStyle;\n };\n ZRText.prototype._mergeRich = function (targetRich, sourceRich) {\n var richNames = keys(sourceRich);\n for (var i = 0; i < richNames.length; i++) {\n var richName = richNames[i];\n targetRich[richName] = targetRich[richName] || {};\n extend(targetRich[richName], sourceRich[richName]);\n }\n };\n ZRText.prototype.getAnimationStyleProps = function () {\n return DEFAULT_TEXT_ANIMATION_PROPS;\n };\n ZRText.prototype._getOrCreateChild = function (Ctor) {\n var child = this._children[this._childCursor];\n if (!child || !(child instanceof Ctor)) {\n child = new Ctor();\n }\n this._children[this._childCursor++] = child;\n child.__zr = this.__zr;\n child.parent = this;\n return child;\n };\n ZRText.prototype._updatePlainTexts = function () {\n var style = this.style;\n var textFont = style.font || DEFAULT_FONT;\n var textPadding = style.padding;\n var text = getStyleText(style);\n var contentBlock = parsePlainText(text, style);\n var needDrawBg = needDrawBackground(style);\n var bgColorDrawn = !!style.backgroundColor;\n var outerHeight = contentBlock.outerHeight;\n var outerWidth = contentBlock.outerWidth;\n var contentWidth = contentBlock.contentWidth;\n var textLines = contentBlock.lines;\n var lineHeight = contentBlock.lineHeight;\n var defaultStyle = this._defaultStyle;\n var baseX = style.x || 0;\n var baseY = style.y || 0;\n var textAlign = style.align || defaultStyle.align || 'left';\n var verticalAlign = style.verticalAlign || defaultStyle.verticalAlign || 'top';\n var textX = baseX;\n var textY = adjustTextY(baseY, contentBlock.contentHeight, verticalAlign);\n if (needDrawBg || textPadding) {\n var boxX = adjustTextX(baseX, outerWidth, textAlign);\n var boxY = adjustTextY(baseY, outerHeight, verticalAlign);\n needDrawBg && this._renderBackground(style, style, boxX, boxY, outerWidth, outerHeight);\n }\n textY += lineHeight / 2;\n if (textPadding) {\n textX = getTextXForPadding(baseX, textAlign, textPadding);\n if (verticalAlign === 'top') {\n textY += textPadding[0];\n } else if (verticalAlign === 'bottom') {\n textY -= textPadding[2];\n }\n }\n var defaultLineWidth = 0;\n var useDefaultFill = false;\n var textFill = getFill('fill' in style ? style.fill : (useDefaultFill = true, defaultStyle.fill));\n var textStroke = getStroke('stroke' in style ? style.stroke : !bgColorDrawn && (!defaultStyle.autoStroke || useDefaultFill) ? (defaultLineWidth = DEFAULT_STROKE_LINE_WIDTH, defaultStyle.stroke) : null);\n var hasShadow = style.textShadowBlur > 0;\n var fixedBoundingRect = style.width != null && (style.overflow === 'truncate' || style.overflow === 'break' || style.overflow === 'breakAll');\n var calculatedLineHeight = contentBlock.calculatedLineHeight;\n for (var i = 0; i < textLines.length; i++) {\n var el = this._getOrCreateChild(TSpan);\n var subElStyle = el.createStyle();\n el.useStyle(subElStyle);\n subElStyle.text = textLines[i];\n subElStyle.x = textX;\n subElStyle.y = textY;\n if (textAlign) {\n subElStyle.textAlign = textAlign;\n }\n subElStyle.textBaseline = 'middle';\n subElStyle.opacity = style.opacity;\n subElStyle.strokeFirst = true;\n if (hasShadow) {\n subElStyle.shadowBlur = style.textShadowBlur || 0;\n subElStyle.shadowColor = style.textShadowColor || 'transparent';\n subElStyle.shadowOffsetX = style.textShadowOffsetX || 0;\n subElStyle.shadowOffsetY = style.textShadowOffsetY || 0;\n }\n subElStyle.stroke = textStroke;\n subElStyle.fill = textFill;\n if (textStroke) {\n subElStyle.lineWidth = style.lineWidth || defaultLineWidth;\n subElStyle.lineDash = style.lineDash;\n subElStyle.lineDashOffset = style.lineDashOffset || 0;\n }\n subElStyle.font = textFont;\n setSeparateFont(subElStyle, style);\n textY += lineHeight;\n if (fixedBoundingRect) {\n el.setBoundingRect(new BoundingRect(adjustTextX(subElStyle.x, style.width, subElStyle.textAlign), adjustTextY(subElStyle.y, calculatedLineHeight, subElStyle.textBaseline), contentWidth, calculatedLineHeight));\n }\n }\n };\n ZRText.prototype._updateRichTexts = function () {\n var style = this.style;\n var text = getStyleText(style);\n var contentBlock = parseRichText(text, style);\n var contentWidth = contentBlock.width;\n var outerWidth = contentBlock.outerWidth;\n var outerHeight = contentBlock.outerHeight;\n var textPadding = style.padding;\n var baseX = style.x || 0;\n var baseY = style.y || 0;\n var defaultStyle = this._defaultStyle;\n var textAlign = style.align || defaultStyle.align;\n var verticalAlign = style.verticalAlign || defaultStyle.verticalAlign;\n var boxX = adjustTextX(baseX, outerWidth, textAlign);\n var boxY = adjustTextY(baseY, outerHeight, verticalAlign);\n var xLeft = boxX;\n var lineTop = boxY;\n if (textPadding) {\n xLeft += textPadding[3];\n lineTop += textPadding[0];\n }\n var xRight = xLeft + contentWidth;\n if (needDrawBackground(style)) {\n this._renderBackground(style, style, boxX, boxY, outerWidth, outerHeight);\n }\n var bgColorDrawn = !!style.backgroundColor;\n for (var i = 0; i < contentBlock.lines.length; i++) {\n var line = contentBlock.lines[i];\n var tokens = line.tokens;\n var tokenCount = tokens.length;\n var lineHeight = line.lineHeight;\n var remainedWidth = line.width;\n var leftIndex = 0;\n var lineXLeft = xLeft;\n var lineXRight = xRight;\n var rightIndex = tokenCount - 1;\n var token = void 0;\n while (leftIndex < tokenCount && (token = tokens[leftIndex], !token.align || token.align === 'left')) {\n this._placeToken(token, style, lineHeight, lineTop, lineXLeft, 'left', bgColorDrawn);\n remainedWidth -= token.width;\n lineXLeft += token.width;\n leftIndex++;\n }\n while (rightIndex >= 0 && (token = tokens[rightIndex], token.align === 'right')) {\n this._placeToken(token, style, lineHeight, lineTop, lineXRight, 'right', bgColorDrawn);\n remainedWidth -= token.width;\n lineXRight -= token.width;\n rightIndex--;\n }\n lineXLeft += (contentWidth - (lineXLeft - xLeft) - (xRight - lineXRight) - remainedWidth) / 2;\n while (leftIndex <= rightIndex) {\n token = tokens[leftIndex];\n this._placeToken(token, style, lineHeight, lineTop, lineXLeft + token.width / 2, 'center', bgColorDrawn);\n lineXLeft += token.width;\n leftIndex++;\n }\n lineTop += lineHeight;\n }\n };\n ZRText.prototype._placeToken = function (token, style, lineHeight, lineTop, x, textAlign, parentBgColorDrawn) {\n var tokenStyle = style.rich[token.styleName] || {};\n tokenStyle.text = token.text;\n var verticalAlign = token.verticalAlign;\n var y = lineTop + lineHeight / 2;\n if (verticalAlign === 'top') {\n y = lineTop + token.height / 2;\n } else if (verticalAlign === 'bottom') {\n y = lineTop + lineHeight - token.height / 2;\n }\n var needDrawBg = !token.isLineHolder && needDrawBackground(tokenStyle);\n needDrawBg && this._renderBackground(tokenStyle, style, textAlign === 'right' ? x - token.width : textAlign === 'center' ? x - token.width / 2 : x, y - token.height / 2, token.width, token.height);\n var bgColorDrawn = !!tokenStyle.backgroundColor;\n var textPadding = token.textPadding;\n if (textPadding) {\n x = getTextXForPadding(x, textAlign, textPadding);\n y -= token.height / 2 - textPadding[0] - token.innerHeight / 2;\n }\n var el = this._getOrCreateChild(TSpan);\n var subElStyle = el.createStyle();\n el.useStyle(subElStyle);\n var defaultStyle = this._defaultStyle;\n var useDefaultFill = false;\n var defaultLineWidth = 0;\n var textFill = getFill('fill' in tokenStyle ? tokenStyle.fill : 'fill' in style ? style.fill : (useDefaultFill = true, defaultStyle.fill));\n var textStroke = getStroke('stroke' in tokenStyle ? tokenStyle.stroke : 'stroke' in style ? style.stroke : !bgColorDrawn && !parentBgColorDrawn && (!defaultStyle.autoStroke || useDefaultFill) ? (defaultLineWidth = DEFAULT_STROKE_LINE_WIDTH, defaultStyle.stroke) : null);\n var hasShadow = tokenStyle.textShadowBlur > 0 || style.textShadowBlur > 0;\n subElStyle.text = token.text;\n subElStyle.x = x;\n subElStyle.y = y;\n if (hasShadow) {\n subElStyle.shadowBlur = tokenStyle.textShadowBlur || style.textShadowBlur || 0;\n subElStyle.shadowColor = tokenStyle.textShadowColor || style.textShadowColor || 'transparent';\n subElStyle.shadowOffsetX = tokenStyle.textShadowOffsetX || style.textShadowOffsetX || 0;\n subElStyle.shadowOffsetY = tokenStyle.textShadowOffsetY || style.textShadowOffsetY || 0;\n }\n subElStyle.textAlign = textAlign;\n subElStyle.textBaseline = 'middle';\n subElStyle.font = token.font || DEFAULT_FONT;\n subElStyle.opacity = retrieve3(tokenStyle.opacity, style.opacity, 1);\n setSeparateFont(subElStyle, tokenStyle);\n if (textStroke) {\n subElStyle.lineWidth = retrieve3(tokenStyle.lineWidth, style.lineWidth, defaultLineWidth);\n subElStyle.lineDash = retrieve2(tokenStyle.lineDash, style.lineDash);\n subElStyle.lineDashOffset = style.lineDashOffset || 0;\n subElStyle.stroke = textStroke;\n }\n if (textFill) {\n subElStyle.fill = textFill;\n }\n var textWidth = token.contentWidth;\n var textHeight = token.contentHeight;\n el.setBoundingRect(new BoundingRect(adjustTextX(subElStyle.x, textWidth, subElStyle.textAlign), adjustTextY(subElStyle.y, textHeight, subElStyle.textBaseline), textWidth, textHeight));\n };\n ZRText.prototype._renderBackground = function (style, topStyle, x, y, width, height) {\n var textBackgroundColor = style.backgroundColor;\n var textBorderWidth = style.borderWidth;\n var textBorderColor = style.borderColor;\n var isImageBg = textBackgroundColor && textBackgroundColor.image;\n var isPlainOrGradientBg = textBackgroundColor && !isImageBg;\n var textBorderRadius = style.borderRadius;\n var self = this;\n var rectEl;\n var imgEl;\n if (isPlainOrGradientBg || style.lineHeight || textBorderWidth && textBorderColor) {\n rectEl = this._getOrCreateChild(Rect);\n rectEl.useStyle(rectEl.createStyle());\n rectEl.style.fill = null;\n var rectShape = rectEl.shape;\n rectShape.x = x;\n rectShape.y = y;\n rectShape.width = width;\n rectShape.height = height;\n rectShape.r = textBorderRadius;\n rectEl.dirtyShape();\n }\n if (isPlainOrGradientBg) {\n var rectStyle = rectEl.style;\n rectStyle.fill = textBackgroundColor || null;\n rectStyle.fillOpacity = retrieve2(style.fillOpacity, 1);\n } else if (isImageBg) {\n imgEl = this._getOrCreateChild(ZRImage);\n imgEl.onload = function () {\n self.dirtyStyle();\n };\n var imgStyle = imgEl.style;\n imgStyle.image = textBackgroundColor.image;\n imgStyle.x = x;\n imgStyle.y = y;\n imgStyle.width = width;\n imgStyle.height = height;\n }\n if (textBorderWidth && textBorderColor) {\n var rectStyle = rectEl.style;\n rectStyle.lineWidth = textBorderWidth;\n rectStyle.stroke = textBorderColor;\n rectStyle.strokeOpacity = retrieve2(style.strokeOpacity, 1);\n rectStyle.lineDash = style.borderDash;\n rectStyle.lineDashOffset = style.borderDashOffset || 0;\n rectEl.strokeContainThreshold = 0;\n if (rectEl.hasFill() && rectEl.hasStroke()) {\n rectStyle.strokeFirst = true;\n rectStyle.lineWidth *= 2;\n }\n }\n var commonStyle = (rectEl || imgEl).style;\n commonStyle.shadowBlur = style.shadowBlur || 0;\n commonStyle.shadowColor = style.shadowColor || 'transparent';\n commonStyle.shadowOffsetX = style.shadowOffsetX || 0;\n commonStyle.shadowOffsetY = style.shadowOffsetY || 0;\n commonStyle.opacity = retrieve3(style.opacity, topStyle.opacity, 1);\n };\n ZRText.makeFont = function (style) {\n var font = '';\n if (hasSeparateFont(style)) {\n font = [style.fontStyle, style.fontWeight, parseFontSize(style.fontSize), style.fontFamily || 'sans-serif'].join(' ');\n }\n return font && trim(font) || style.textFont || style.font;\n };\n return ZRText;\n}(Displayable);\nvar VALID_TEXT_ALIGN = {\n left: true,\n right: 1,\n center: 1\n};\nvar VALID_TEXT_VERTICAL_ALIGN = {\n top: 1,\n bottom: 1,\n middle: 1\n};\nvar FONT_PARTS = ['fontStyle', 'fontWeight', 'fontSize', 'fontFamily'];\nexport function parseFontSize(fontSize) {\n if (typeof fontSize === 'string' && (fontSize.indexOf('px') !== -1 || fontSize.indexOf('rem') !== -1 || fontSize.indexOf('em') !== -1)) {\n return fontSize;\n } else if (!isNaN(+fontSize)) {\n return fontSize + 'px';\n } else {\n return DEFAULT_FONT_SIZE + 'px';\n }\n}\nfunction setSeparateFont(targetStyle, sourceStyle) {\n for (var i = 0; i < FONT_PARTS.length; i++) {\n var fontProp = FONT_PARTS[i];\n var val = sourceStyle[fontProp];\n if (val != null) {\n targetStyle[fontProp] = val;\n }\n }\n}\nexport function hasSeparateFont(style) {\n return style.fontSize != null || style.fontFamily || style.fontWeight;\n}\nexport function normalizeTextStyle(style) {\n normalizeStyle(style);\n each(style.rich, normalizeStyle);\n return style;\n}\nfunction normalizeStyle(style) {\n if (style) {\n style.font = ZRText.makeFont(style);\n var textAlign = style.align;\n textAlign === 'middle' && (textAlign = 'center');\n style.align = textAlign == null || VALID_TEXT_ALIGN[textAlign] ? textAlign : 'left';\n var verticalAlign = style.verticalAlign;\n verticalAlign === 'center' && (verticalAlign = 'middle');\n style.verticalAlign = verticalAlign == null || VALID_TEXT_VERTICAL_ALIGN[verticalAlign] ? verticalAlign : 'top';\n var textPadding = style.padding;\n if (textPadding) {\n style.padding = normalizeCssArray(style.padding);\n }\n }\n}\nfunction getStroke(stroke, lineWidth) {\n return stroke == null || lineWidth <= 0 || stroke === 'transparent' || stroke === 'none' ? null : stroke.image || stroke.colorStops ? '#000' : stroke;\n}\nfunction getFill(fill) {\n return fill == null || fill === 'none' ? null : fill.image || fill.colorStops ? '#000' : fill;\n}\nfunction getTextXForPadding(x, textAlign, textPadding) {\n return textAlign === 'right' ? x - textPadding[1] : textAlign === 'center' ? x + textPadding[3] / 2 - textPadding[1] / 2 : x + textPadding[3];\n}\nfunction getStyleText(style) {\n var text = style.text;\n text != null && (text += '');\n return text;\n}\nfunction needDrawBackground(style) {\n return !!(style.backgroundColor || style.lineHeight || style.borderWidth && style.borderColor);\n}\nexport default ZRText;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { makeInner } from './model.js';\nexport var getECData = makeInner();\nexport var setCommonECData = function (seriesIndex, dataType, dataIdx, el) {\n if (el) {\n var ecData = getECData(el);\n // Add data index and series index for indexing the data by element\n // Useful in tooltip\n ecData.dataIndex = dataIdx;\n ecData.dataType = dataType;\n ecData.seriesIndex = seriesIndex;\n ecData.ssrType = 'chart';\n // TODO: not store dataIndex on children.\n if (el.type === 'group') {\n el.traverse(function (child) {\n var childECData = getECData(child);\n childECData.seriesIndex = seriesIndex;\n childECData.dataIndex = dataIdx;\n childECData.dataType = dataType;\n childECData.ssrType = 'chart';\n });\n }\n }\n};","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { extend, indexOf, isArrayLike, isObject, keys, isArray, each } from 'zrender/lib/core/util.js';\nimport { getECData } from './innerStore.js';\nimport { liftColor } from 'zrender/lib/tool/color.js';\nimport { queryDataIndex, makeInner } from './model.js';\nimport Path from 'zrender/lib/graphic/Path.js';\nimport { error } from './log.js';\n// Reserve 0 as default.\nvar _highlightNextDigit = 1;\nvar _highlightKeyMap = {};\nvar getSavedStates = makeInner();\nvar getComponentStates = makeInner();\nexport var HOVER_STATE_NORMAL = 0;\nexport var HOVER_STATE_BLUR = 1;\nexport var HOVER_STATE_EMPHASIS = 2;\nexport var SPECIAL_STATES = ['emphasis', 'blur', 'select'];\nexport var DISPLAY_STATES = ['normal', 'emphasis', 'blur', 'select'];\nexport var Z2_EMPHASIS_LIFT = 10;\nexport var Z2_SELECT_LIFT = 9;\nexport var HIGHLIGHT_ACTION_TYPE = 'highlight';\nexport var DOWNPLAY_ACTION_TYPE = 'downplay';\nexport var SELECT_ACTION_TYPE = 'select';\nexport var UNSELECT_ACTION_TYPE = 'unselect';\nexport var TOGGLE_SELECT_ACTION_TYPE = 'toggleSelect';\nfunction hasFillOrStroke(fillOrStroke) {\n return fillOrStroke != null && fillOrStroke !== 'none';\n}\nfunction doChangeHoverState(el, stateName, hoverStateEnum) {\n if (el.onHoverStateChange && (el.hoverState || 0) !== hoverStateEnum) {\n el.onHoverStateChange(stateName);\n }\n el.hoverState = hoverStateEnum;\n}\nfunction singleEnterEmphasis(el) {\n // Only mark the flag.\n // States will be applied in the echarts.ts in next frame.\n doChangeHoverState(el, 'emphasis', HOVER_STATE_EMPHASIS);\n}\nfunction singleLeaveEmphasis(el) {\n // Only mark the flag.\n // States will be applied in the echarts.ts in next frame.\n if (el.hoverState === HOVER_STATE_EMPHASIS) {\n doChangeHoverState(el, 'normal', HOVER_STATE_NORMAL);\n }\n}\nfunction singleEnterBlur(el) {\n doChangeHoverState(el, 'blur', HOVER_STATE_BLUR);\n}\nfunction singleLeaveBlur(el) {\n if (el.hoverState === HOVER_STATE_BLUR) {\n doChangeHoverState(el, 'normal', HOVER_STATE_NORMAL);\n }\n}\nfunction singleEnterSelect(el) {\n el.selected = true;\n}\nfunction singleLeaveSelect(el) {\n el.selected = false;\n}\nfunction updateElementState(el, updater, commonParam) {\n updater(el, commonParam);\n}\nfunction traverseUpdateState(el, updater, commonParam) {\n updateElementState(el, updater, commonParam);\n el.isGroup && el.traverse(function (child) {\n updateElementState(child, updater, commonParam);\n });\n}\nexport function setStatesFlag(el, stateName) {\n switch (stateName) {\n case 'emphasis':\n el.hoverState = HOVER_STATE_EMPHASIS;\n break;\n case 'normal':\n el.hoverState = HOVER_STATE_NORMAL;\n break;\n case 'blur':\n el.hoverState = HOVER_STATE_BLUR;\n break;\n case 'select':\n el.selected = true;\n }\n}\n/**\n * If we reuse elements when rerender.\n * DON'T forget to clearStates before we update the style and shape.\n * Or we may update on the wrong state instead of normal state.\n */\nexport function clearStates(el) {\n if (el.isGroup) {\n el.traverse(function (child) {\n child.clearStates();\n });\n } else {\n el.clearStates();\n }\n}\nfunction getFromStateStyle(el, props, toStateName, defaultValue) {\n var style = el.style;\n var fromState = {};\n for (var i = 0; i < props.length; i++) {\n var propName = props[i];\n var val = style[propName];\n fromState[propName] = val == null ? defaultValue && defaultValue[propName] : val;\n }\n for (var i = 0; i < el.animators.length; i++) {\n var animator = el.animators[i];\n if (animator.__fromStateTransition\n // Don't consider the animation to emphasis state.\n && animator.__fromStateTransition.indexOf(toStateName) < 0 && animator.targetName === 'style') {\n animator.saveTo(fromState, props);\n }\n }\n return fromState;\n}\nfunction createEmphasisDefaultState(el, stateName, targetStates, state) {\n var hasSelect = targetStates && indexOf(targetStates, 'select') >= 0;\n var cloned = false;\n if (el instanceof Path) {\n var store = getSavedStates(el);\n var fromFill = hasSelect ? store.selectFill || store.normalFill : store.normalFill;\n var fromStroke = hasSelect ? store.selectStroke || store.normalStroke : store.normalStroke;\n if (hasFillOrStroke(fromFill) || hasFillOrStroke(fromStroke)) {\n state = state || {};\n var emphasisStyle = state.style || {};\n // inherit case\n if (emphasisStyle.fill === 'inherit') {\n cloned = true;\n state = extend({}, state);\n emphasisStyle = extend({}, emphasisStyle);\n emphasisStyle.fill = fromFill;\n }\n // Apply default color lift\n else if (!hasFillOrStroke(emphasisStyle.fill) && hasFillOrStroke(fromFill)) {\n cloned = true;\n // Not modify the original value.\n state = extend({}, state);\n emphasisStyle = extend({}, emphasisStyle);\n // Already being applied 'emphasis'. DON'T lift color multiple times.\n emphasisStyle.fill = liftColor(fromFill);\n }\n // Not highlight stroke if fill has been highlighted.\n else if (!hasFillOrStroke(emphasisStyle.stroke) && hasFillOrStroke(fromStroke)) {\n if (!cloned) {\n state = extend({}, state);\n emphasisStyle = extend({}, emphasisStyle);\n }\n emphasisStyle.stroke = liftColor(fromStroke);\n }\n state.style = emphasisStyle;\n }\n }\n if (state) {\n // TODO Share with textContent?\n if (state.z2 == null) {\n if (!cloned) {\n state = extend({}, state);\n }\n var z2EmphasisLift = el.z2EmphasisLift;\n state.z2 = el.z2 + (z2EmphasisLift != null ? z2EmphasisLift : Z2_EMPHASIS_LIFT);\n }\n }\n return state;\n}\nfunction createSelectDefaultState(el, stateName, state) {\n // const hasSelect = indexOf(el.currentStates, stateName) >= 0;\n if (state) {\n // TODO Share with textContent?\n if (state.z2 == null) {\n state = extend({}, state);\n var z2SelectLift = el.z2SelectLift;\n state.z2 = el.z2 + (z2SelectLift != null ? z2SelectLift : Z2_SELECT_LIFT);\n }\n }\n return state;\n}\nfunction createBlurDefaultState(el, stateName, state) {\n var hasBlur = indexOf(el.currentStates, stateName) >= 0;\n var currentOpacity = el.style.opacity;\n var fromState = !hasBlur ? getFromStateStyle(el, ['opacity'], stateName, {\n opacity: 1\n }) : null;\n state = state || {};\n var blurStyle = state.style || {};\n if (blurStyle.opacity == null) {\n // clone state\n state = extend({}, state);\n blurStyle = extend({\n // Already being applied 'emphasis'. DON'T mul opacity multiple times.\n opacity: hasBlur ? currentOpacity : fromState.opacity * 0.1\n }, blurStyle);\n state.style = blurStyle;\n }\n return state;\n}\nfunction elementStateProxy(stateName, targetStates) {\n var state = this.states[stateName];\n if (this.style) {\n if (stateName === 'emphasis') {\n return createEmphasisDefaultState(this, stateName, targetStates, state);\n } else if (stateName === 'blur') {\n return createBlurDefaultState(this, stateName, state);\n } else if (stateName === 'select') {\n return createSelectDefaultState(this, stateName, state);\n }\n }\n return state;\n}\n/**\n * Set hover style (namely \"emphasis style\") of element.\n * @param el Should not be `zrender/graphic/Group`.\n * @param focus 'self' | 'selfInSeries' | 'series'\n */\nexport function setDefaultStateProxy(el) {\n el.stateProxy = elementStateProxy;\n var textContent = el.getTextContent();\n var textGuide = el.getTextGuideLine();\n if (textContent) {\n textContent.stateProxy = elementStateProxy;\n }\n if (textGuide) {\n textGuide.stateProxy = elementStateProxy;\n }\n}\nexport function enterEmphasisWhenMouseOver(el, e) {\n !shouldSilent(el, e)\n // \"emphasis\" event highlight has higher priority than mouse highlight.\n && !el.__highByOuter && traverseUpdateState(el, singleEnterEmphasis);\n}\nexport function leaveEmphasisWhenMouseOut(el, e) {\n !shouldSilent(el, e)\n // \"emphasis\" event highlight has higher priority than mouse highlight.\n && !el.__highByOuter && traverseUpdateState(el, singleLeaveEmphasis);\n}\nexport function enterEmphasis(el, highlightDigit) {\n el.__highByOuter |= 1 << (highlightDigit || 0);\n traverseUpdateState(el, singleEnterEmphasis);\n}\nexport function leaveEmphasis(el, highlightDigit) {\n !(el.__highByOuter &= ~(1 << (highlightDigit || 0))) && traverseUpdateState(el, singleLeaveEmphasis);\n}\nexport function enterBlur(el) {\n traverseUpdateState(el, singleEnterBlur);\n}\nexport function leaveBlur(el) {\n traverseUpdateState(el, singleLeaveBlur);\n}\nexport function enterSelect(el) {\n traverseUpdateState(el, singleEnterSelect);\n}\nexport function leaveSelect(el) {\n traverseUpdateState(el, singleLeaveSelect);\n}\nfunction shouldSilent(el, e) {\n return el.__highDownSilentOnTouch && e.zrByTouch;\n}\nexport function allLeaveBlur(api) {\n var model = api.getModel();\n var leaveBlurredSeries = [];\n var allComponentViews = [];\n model.eachComponent(function (componentType, componentModel) {\n var componentStates = getComponentStates(componentModel);\n var isSeries = componentType === 'series';\n var view = isSeries ? api.getViewOfSeriesModel(componentModel) : api.getViewOfComponentModel(componentModel);\n !isSeries && allComponentViews.push(view);\n if (componentStates.isBlured) {\n // Leave blur anyway\n view.group.traverse(function (child) {\n singleLeaveBlur(child);\n });\n isSeries && leaveBlurredSeries.push(componentModel);\n }\n componentStates.isBlured = false;\n });\n each(allComponentViews, function (view) {\n if (view && view.toggleBlurSeries) {\n view.toggleBlurSeries(leaveBlurredSeries, false, model);\n }\n });\n}\nexport function blurSeries(targetSeriesIndex, focus, blurScope, api) {\n var ecModel = api.getModel();\n blurScope = blurScope || 'coordinateSystem';\n function leaveBlurOfIndices(data, dataIndices) {\n for (var i = 0; i < dataIndices.length; i++) {\n var itemEl = data.getItemGraphicEl(dataIndices[i]);\n itemEl && leaveBlur(itemEl);\n }\n }\n if (targetSeriesIndex == null) {\n return;\n }\n if (!focus || focus === 'none') {\n return;\n }\n var targetSeriesModel = ecModel.getSeriesByIndex(targetSeriesIndex);\n var targetCoordSys = targetSeriesModel.coordinateSystem;\n if (targetCoordSys && targetCoordSys.master) {\n targetCoordSys = targetCoordSys.master;\n }\n var blurredSeries = [];\n ecModel.eachSeries(function (seriesModel) {\n var sameSeries = targetSeriesModel === seriesModel;\n var coordSys = seriesModel.coordinateSystem;\n if (coordSys && coordSys.master) {\n coordSys = coordSys.master;\n }\n var sameCoordSys = coordSys && targetCoordSys ? coordSys === targetCoordSys : sameSeries; // If there is no coordinate system. use sameSeries instead.\n if (!(\n // Not blur other series if blurScope series\n blurScope === 'series' && !sameSeries\n // Not blur other coordinate system if blurScope is coordinateSystem\n || blurScope === 'coordinateSystem' && !sameCoordSys\n // Not blur self series if focus is series.\n || focus === 'series' && sameSeries\n // TODO blurScope: coordinate system\n )) {\n var view = api.getViewOfSeriesModel(seriesModel);\n view.group.traverse(function (child) {\n // For the elements that have been triggered by other components,\n // and are still required to be highlighted,\n // because the current is directly forced to blur the element,\n // it will cause the focus self to be unable to highlight, so skip the blur of this element.\n if (child.__highByOuter && sameSeries && focus === 'self') {\n return;\n }\n singleEnterBlur(child);\n });\n if (isArrayLike(focus)) {\n leaveBlurOfIndices(seriesModel.getData(), focus);\n } else if (isObject(focus)) {\n var dataTypes = keys(focus);\n for (var d = 0; d < dataTypes.length; d++) {\n leaveBlurOfIndices(seriesModel.getData(dataTypes[d]), focus[dataTypes[d]]);\n }\n }\n blurredSeries.push(seriesModel);\n getComponentStates(seriesModel).isBlured = true;\n }\n });\n ecModel.eachComponent(function (componentType, componentModel) {\n if (componentType === 'series') {\n return;\n }\n var view = api.getViewOfComponentModel(componentModel);\n if (view && view.toggleBlurSeries) {\n view.toggleBlurSeries(blurredSeries, true, ecModel);\n }\n });\n}\nexport function blurComponent(componentMainType, componentIndex, api) {\n if (componentMainType == null || componentIndex == null) {\n return;\n }\n var componentModel = api.getModel().getComponent(componentMainType, componentIndex);\n if (!componentModel) {\n return;\n }\n getComponentStates(componentModel).isBlured = true;\n var view = api.getViewOfComponentModel(componentModel);\n if (!view || !view.focusBlurEnabled) {\n return;\n }\n view.group.traverse(function (child) {\n singleEnterBlur(child);\n });\n}\nexport function blurSeriesFromHighlightPayload(seriesModel, payload, api) {\n var seriesIndex = seriesModel.seriesIndex;\n var data = seriesModel.getData(payload.dataType);\n if (!data) {\n if (process.env.NODE_ENV !== 'production') {\n error(\"Unknown dataType \" + payload.dataType);\n }\n return;\n }\n var dataIndex = queryDataIndex(data, payload);\n // Pick the first one if there is multiple/none exists.\n dataIndex = (isArray(dataIndex) ? dataIndex[0] : dataIndex) || 0;\n var el = data.getItemGraphicEl(dataIndex);\n if (!el) {\n var count = data.count();\n var current = 0;\n // If data on dataIndex is NaN.\n while (!el && current < count) {\n el = data.getItemGraphicEl(current++);\n }\n }\n if (el) {\n var ecData = getECData(el);\n blurSeries(seriesIndex, ecData.focus, ecData.blurScope, api);\n } else {\n // If there is no element put on the data. Try getting it from raw option\n // TODO Should put it on seriesModel?\n var focus_1 = seriesModel.get(['emphasis', 'focus']);\n var blurScope = seriesModel.get(['emphasis', 'blurScope']);\n if (focus_1 != null) {\n blurSeries(seriesIndex, focus_1, blurScope, api);\n }\n }\n}\nexport function findComponentHighDownDispatchers(componentMainType, componentIndex, name, api) {\n var ret = {\n focusSelf: false,\n dispatchers: null\n };\n if (componentMainType == null || componentMainType === 'series' || componentIndex == null || name == null) {\n return ret;\n }\n var componentModel = api.getModel().getComponent(componentMainType, componentIndex);\n if (!componentModel) {\n return ret;\n }\n var view = api.getViewOfComponentModel(componentModel);\n if (!view || !view.findHighDownDispatchers) {\n return ret;\n }\n var dispatchers = view.findHighDownDispatchers(name);\n // At presnet, the component (like Geo) only blur inside itself.\n // So we do not use `blurScope` in component.\n var focusSelf;\n for (var i = 0; i < dispatchers.length; i++) {\n if (process.env.NODE_ENV !== 'production' && !isHighDownDispatcher(dispatchers[i])) {\n error('param should be highDownDispatcher');\n }\n if (getECData(dispatchers[i]).focus === 'self') {\n focusSelf = true;\n break;\n }\n }\n return {\n focusSelf: focusSelf,\n dispatchers: dispatchers\n };\n}\nexport function handleGlobalMouseOverForHighDown(dispatcher, e, api) {\n if (process.env.NODE_ENV !== 'production' && !isHighDownDispatcher(dispatcher)) {\n error('param should be highDownDispatcher');\n }\n var ecData = getECData(dispatcher);\n var _a = findComponentHighDownDispatchers(ecData.componentMainType, ecData.componentIndex, ecData.componentHighDownName, api),\n dispatchers = _a.dispatchers,\n focusSelf = _a.focusSelf;\n // If `findHighDownDispatchers` is supported on the component,\n // highlight/downplay elements with the same name.\n if (dispatchers) {\n if (focusSelf) {\n blurComponent(ecData.componentMainType, ecData.componentIndex, api);\n }\n each(dispatchers, function (dispatcher) {\n return enterEmphasisWhenMouseOver(dispatcher, e);\n });\n } else {\n // Try blur all in the related series. Then emphasis the hoverred.\n // TODO. progressive mode.\n blurSeries(ecData.seriesIndex, ecData.focus, ecData.blurScope, api);\n if (ecData.focus === 'self') {\n blurComponent(ecData.componentMainType, ecData.componentIndex, api);\n }\n // Other than series, component that not support `findHighDownDispatcher` will\n // also use it. But in this case, highlight/downplay are only supported in\n // mouse hover but not in dispatchAction.\n enterEmphasisWhenMouseOver(dispatcher, e);\n }\n}\nexport function handleGlobalMouseOutForHighDown(dispatcher, e, api) {\n if (process.env.NODE_ENV !== 'production' && !isHighDownDispatcher(dispatcher)) {\n error('param should be highDownDispatcher');\n }\n allLeaveBlur(api);\n var ecData = getECData(dispatcher);\n var dispatchers = findComponentHighDownDispatchers(ecData.componentMainType, ecData.componentIndex, ecData.componentHighDownName, api).dispatchers;\n if (dispatchers) {\n each(dispatchers, function (dispatcher) {\n return leaveEmphasisWhenMouseOut(dispatcher, e);\n });\n } else {\n leaveEmphasisWhenMouseOut(dispatcher, e);\n }\n}\nexport function toggleSelectionFromPayload(seriesModel, payload, api) {\n if (!isSelectChangePayload(payload)) {\n return;\n }\n var dataType = payload.dataType;\n var data = seriesModel.getData(dataType);\n var dataIndex = queryDataIndex(data, payload);\n if (!isArray(dataIndex)) {\n dataIndex = [dataIndex];\n }\n seriesModel[payload.type === TOGGLE_SELECT_ACTION_TYPE ? 'toggleSelect' : payload.type === SELECT_ACTION_TYPE ? 'select' : 'unselect'](dataIndex, dataType);\n}\nexport function updateSeriesElementSelection(seriesModel) {\n var allData = seriesModel.getAllData();\n each(allData, function (_a) {\n var data = _a.data,\n type = _a.type;\n data.eachItemGraphicEl(function (el, idx) {\n seriesModel.isSelected(idx, type) ? enterSelect(el) : leaveSelect(el);\n });\n });\n}\nexport function getAllSelectedIndices(ecModel) {\n var ret = [];\n ecModel.eachSeries(function (seriesModel) {\n var allData = seriesModel.getAllData();\n each(allData, function (_a) {\n var data = _a.data,\n type = _a.type;\n var dataIndices = seriesModel.getSelectedDataIndices();\n if (dataIndices.length > 0) {\n var item = {\n dataIndex: dataIndices,\n seriesIndex: seriesModel.seriesIndex\n };\n if (type != null) {\n item.dataType = type;\n }\n ret.push(item);\n }\n });\n });\n return ret;\n}\n/**\n * Enable the function that mouseover will trigger the emphasis state.\n *\n * NOTE:\n * This function should be used on the element with dataIndex, seriesIndex.\n *\n */\nexport function enableHoverEmphasis(el, focus, blurScope) {\n setAsHighDownDispatcher(el, true);\n traverseUpdateState(el, setDefaultStateProxy);\n enableHoverFocus(el, focus, blurScope);\n}\nexport function disableHoverEmphasis(el) {\n setAsHighDownDispatcher(el, false);\n}\nexport function toggleHoverEmphasis(el, focus, blurScope, isDisabled) {\n isDisabled ? disableHoverEmphasis(el) : enableHoverEmphasis(el, focus, blurScope);\n}\nexport function enableHoverFocus(el, focus, blurScope) {\n var ecData = getECData(el);\n if (focus != null) {\n // TODO dataIndex may be set after this function. This check is not useful.\n // if (ecData.dataIndex == null) {\n // if (__DEV__) {\n // console.warn('focus can only been set on element with dataIndex');\n // }\n // }\n // else {\n ecData.focus = focus;\n ecData.blurScope = blurScope;\n // }\n } else if (ecData.focus) {\n ecData.focus = null;\n }\n}\nvar OTHER_STATES = ['emphasis', 'blur', 'select'];\nvar defaultStyleGetterMap = {\n itemStyle: 'getItemStyle',\n lineStyle: 'getLineStyle',\n areaStyle: 'getAreaStyle'\n};\n/**\n * Set emphasis/blur/selected states of element.\n */\nexport function setStatesStylesFromModel(el, itemModel, styleType,\n// default itemStyle\ngetter) {\n styleType = styleType || 'itemStyle';\n for (var i = 0; i < OTHER_STATES.length; i++) {\n var stateName = OTHER_STATES[i];\n var model = itemModel.getModel([stateName, styleType]);\n var state = el.ensureState(stateName);\n // Let it throw error if getterType is not found.\n state.style = getter ? getter(model) : model[defaultStyleGetterMap[styleType]]();\n }\n}\n/**\n *\n * Set element as highlight / downplay dispatcher.\n * It will be checked when element received mouseover event or from highlight action.\n * It's in change of all highlight/downplay behavior of it's children.\n *\n * @param el\n * @param el.highDownSilentOnTouch\n * In touch device, mouseover event will be trigger on touchstart event\n * (see module:zrender/dom/HandlerProxy). By this mechanism, we can\n * conveniently use hoverStyle when tap on touch screen without additional\n * code for compatibility.\n * But if the chart/component has select feature, which usually also use\n * hoverStyle, there might be conflict between 'select-highlight' and\n * 'hover-highlight' especially when roam is enabled (see geo for example).\n * In this case, `highDownSilentOnTouch` should be used to disable\n * hover-highlight on touch device.\n * @param asDispatcher If `false`, do not set as \"highDownDispatcher\".\n */\nexport function setAsHighDownDispatcher(el, asDispatcher) {\n var disable = asDispatcher === false;\n var extendedEl = el;\n // Make `highDownSilentOnTouch` and `onStateChange` only work after\n // `setAsHighDownDispatcher` called. Avoid it is modified by user unexpectedly.\n if (el.highDownSilentOnTouch) {\n extendedEl.__highDownSilentOnTouch = el.highDownSilentOnTouch;\n }\n // Simple optimize, since this method might be\n // called for each elements of a group in some cases.\n if (!disable || extendedEl.__highDownDispatcher) {\n // Emphasis, normal can be triggered manually by API or other components like hover link.\n // el[method]('emphasis', onElementEmphasisEvent)[method]('normal', onElementNormalEvent);\n // Also keep previous record.\n extendedEl.__highByOuter = extendedEl.__highByOuter || 0;\n extendedEl.__highDownDispatcher = !disable;\n }\n}\nexport function isHighDownDispatcher(el) {\n return !!(el && el.__highDownDispatcher);\n}\n/**\n * Enable component highlight/downplay features:\n * + hover link (within the same name)\n * + focus blur in component\n */\nexport function enableComponentHighDownFeatures(el, componentModel, componentHighDownName) {\n var ecData = getECData(el);\n ecData.componentMainType = componentModel.mainType;\n ecData.componentIndex = componentModel.componentIndex;\n ecData.componentHighDownName = componentHighDownName;\n}\n/**\n * Support highlight/downplay record on each elements.\n * For the case: hover highlight/downplay (legend, visualMap, ...) and\n * user triggered highlight/downplay should not conflict.\n * Only all of the highlightDigit cleared, return to normal.\n * @param {string} highlightKey\n * @return {number} highlightDigit\n */\nexport function getHighlightDigit(highlightKey) {\n var highlightDigit = _highlightKeyMap[highlightKey];\n if (highlightDigit == null && _highlightNextDigit <= 32) {\n highlightDigit = _highlightKeyMap[highlightKey] = _highlightNextDigit++;\n }\n return highlightDigit;\n}\nexport function isSelectChangePayload(payload) {\n var payloadType = payload.type;\n return payloadType === SELECT_ACTION_TYPE || payloadType === UNSELECT_ACTION_TYPE || payloadType === TOGGLE_SELECT_ACTION_TYPE;\n}\nexport function isHighDownPayload(payload) {\n var payloadType = payload.type;\n return payloadType === HIGHLIGHT_ACTION_TYPE || payloadType === DOWNPLAY_ACTION_TYPE;\n}\nexport function savePathStates(el) {\n var store = getSavedStates(el);\n store.normalFill = el.style.fill;\n store.normalStroke = el.style.stroke;\n var selectState = el.states.select || {};\n store.selectFill = selectState.style && selectState.style.fill || null;\n store.selectStroke = selectState.style && selectState.style.stroke || null;\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as pathTool from 'zrender/lib/tool/path.js';\nimport * as matrix from 'zrender/lib/core/matrix.js';\nimport * as vector from 'zrender/lib/core/vector.js';\nimport Path from 'zrender/lib/graphic/Path.js';\nimport Transformable from 'zrender/lib/core/Transformable.js';\nimport ZRImage from 'zrender/lib/graphic/Image.js';\nimport Group from 'zrender/lib/graphic/Group.js';\nimport ZRText from 'zrender/lib/graphic/Text.js';\nimport Circle from 'zrender/lib/graphic/shape/Circle.js';\nimport Ellipse from 'zrender/lib/graphic/shape/Ellipse.js';\nimport Sector from 'zrender/lib/graphic/shape/Sector.js';\nimport Ring from 'zrender/lib/graphic/shape/Ring.js';\nimport Polygon from 'zrender/lib/graphic/shape/Polygon.js';\nimport Polyline from 'zrender/lib/graphic/shape/Polyline.js';\nimport Rect from 'zrender/lib/graphic/shape/Rect.js';\nimport Line from 'zrender/lib/graphic/shape/Line.js';\nimport BezierCurve from 'zrender/lib/graphic/shape/BezierCurve.js';\nimport Arc from 'zrender/lib/graphic/shape/Arc.js';\nimport CompoundPath from 'zrender/lib/graphic/CompoundPath.js';\nimport LinearGradient from 'zrender/lib/graphic/LinearGradient.js';\nimport RadialGradient from 'zrender/lib/graphic/RadialGradient.js';\nimport BoundingRect from 'zrender/lib/core/BoundingRect.js';\nimport OrientedBoundingRect from 'zrender/lib/core/OrientedBoundingRect.js';\nimport Point from 'zrender/lib/core/Point.js';\nimport IncrementalDisplayable from 'zrender/lib/graphic/IncrementalDisplayable.js';\nimport * as subPixelOptimizeUtil from 'zrender/lib/graphic/helper/subPixelOptimize.js';\nimport { extend, isArrayLike, map, defaults, isString, keys, each, hasOwn, isArray } from 'zrender/lib/core/util.js';\nimport { getECData } from './innerStore.js';\nimport { updateProps, initProps, removeElement, removeElementWithFadeOut, isElementRemoved } from '../animation/basicTransition.js';\n/**\n * @deprecated export for compatitable reason\n */\nexport { updateProps, initProps, removeElement, removeElementWithFadeOut, isElementRemoved };\nvar mathMax = Math.max;\nvar mathMin = Math.min;\nvar _customShapeMap = {};\n/**\n * Extend shape with parameters\n */\nexport function extendShape(opts) {\n return Path.extend(opts);\n}\nvar extendPathFromString = pathTool.extendFromString;\n/**\n * Extend path\n */\nexport function extendPath(pathData, opts) {\n return extendPathFromString(pathData, opts);\n}\n/**\n * Register a user defined shape.\n * The shape class can be fetched by `getShapeClass`\n * This method will overwrite the registered shapes, including\n * the registered built-in shapes, if using the same `name`.\n * The shape can be used in `custom series` and\n * `graphic component` by declaring `{type: name}`.\n *\n * @param name\n * @param ShapeClass Can be generated by `extendShape`.\n */\nexport function registerShape(name, ShapeClass) {\n _customShapeMap[name] = ShapeClass;\n}\n/**\n * Find shape class registered by `registerShape`. Usually used in\n * fetching user defined shape.\n *\n * [Caution]:\n * (1) This method **MUST NOT be used inside echarts !!!**, unless it is prepared\n * to use user registered shapes.\n * Because the built-in shape (see `getBuiltInShape`) will be registered by\n * `registerShape` by default. That enables users to get both built-in\n * shapes as well as the shapes belonging to themsleves. But users can overwrite\n * the built-in shapes by using names like 'circle', 'rect' via calling\n * `registerShape`. So the echarts inner featrues should not fetch shapes from here\n * in case that it is overwritten by users, except that some features, like\n * `custom series`, `graphic component`, do it deliberately.\n *\n * (2) In the features like `custom series`, `graphic component`, the user input\n * `{tpye: 'xxx'}` does not only specify shapes but also specify other graphic\n * elements like `'group'`, `'text'`, `'image'` or event `'path'`. Those names\n * are reserved names, that is, if some user registers a shape named `'image'`,\n * the shape will not be used. If we intending to add some more reserved names\n * in feature, that might bring break changes (disable some existing user shape\n * names). But that case probably rarely happens. So we don't make more mechanism\n * to resolve this issue here.\n *\n * @param name\n * @return The shape class. If not found, return nothing.\n */\nexport function getShapeClass(name) {\n if (_customShapeMap.hasOwnProperty(name)) {\n return _customShapeMap[name];\n }\n}\n/**\n * Create a path element from path data string\n * @param pathData\n * @param opts\n * @param rect\n * @param layout 'center' or 'cover' default to be cover\n */\nexport function makePath(pathData, opts, rect, layout) {\n var path = pathTool.createFromString(pathData, opts);\n if (rect) {\n if (layout === 'center') {\n rect = centerGraphic(rect, path.getBoundingRect());\n }\n resizePath(path, rect);\n }\n return path;\n}\n/**\n * Create a image element from image url\n * @param imageUrl image url\n * @param opts options\n * @param rect constrain rect\n * @param layout 'center' or 'cover'. Default to be 'cover'\n */\nexport function makeImage(imageUrl, rect, layout) {\n var zrImg = new ZRImage({\n style: {\n image: imageUrl,\n x: rect.x,\n y: rect.y,\n width: rect.width,\n height: rect.height\n },\n onload: function (img) {\n if (layout === 'center') {\n var boundingRect = {\n width: img.width,\n height: img.height\n };\n zrImg.setStyle(centerGraphic(rect, boundingRect));\n }\n }\n });\n return zrImg;\n}\n/**\n * Get position of centered element in bounding box.\n *\n * @param rect element local bounding box\n * @param boundingRect constraint bounding box\n * @return element position containing x, y, width, and height\n */\nfunction centerGraphic(rect, boundingRect) {\n // Set rect to center, keep width / height ratio.\n var aspect = boundingRect.width / boundingRect.height;\n var width = rect.height * aspect;\n var height;\n if (width <= rect.width) {\n height = rect.height;\n } else {\n width = rect.width;\n height = width / aspect;\n }\n var cx = rect.x + rect.width / 2;\n var cy = rect.y + rect.height / 2;\n return {\n x: cx - width / 2,\n y: cy - height / 2,\n width: width,\n height: height\n };\n}\nexport var mergePath = pathTool.mergePath;\n/**\n * Resize a path to fit the rect\n * @param path\n * @param rect\n */\nexport function resizePath(path, rect) {\n if (!path.applyTransform) {\n return;\n }\n var pathRect = path.getBoundingRect();\n var m = pathRect.calculateTransform(rect);\n path.applyTransform(m);\n}\n/**\n * Sub pixel optimize line for canvas\n */\nexport function subPixelOptimizeLine(shape, lineWidth) {\n subPixelOptimizeUtil.subPixelOptimizeLine(shape, shape, {\n lineWidth: lineWidth\n });\n return shape;\n}\n/**\n * Sub pixel optimize rect for canvas\n */\nexport function subPixelOptimizeRect(param) {\n subPixelOptimizeUtil.subPixelOptimizeRect(param.shape, param.shape, param.style);\n return param;\n}\n/**\n * Sub pixel optimize for canvas\n *\n * @param position Coordinate, such as x, y\n * @param lineWidth Should be nonnegative integer.\n * @param positiveOrNegative Default false (negative).\n * @return Optimized position.\n */\nexport var subPixelOptimize = subPixelOptimizeUtil.subPixelOptimize;\n/**\n * Get transform matrix of target (param target),\n * in coordinate of its ancestor (param ancestor)\n *\n * @param target\n * @param [ancestor]\n */\nexport function getTransform(target, ancestor) {\n var mat = matrix.identity([]);\n while (target && target !== ancestor) {\n matrix.mul(mat, target.getLocalTransform(), mat);\n target = target.parent;\n }\n return mat;\n}\n/**\n * Apply transform to an vertex.\n * @param target [x, y]\n * @param transform Can be:\n * + Transform matrix: like [1, 0, 0, 1, 0, 0]\n * + {position, rotation, scale}, the same as `zrender/Transformable`.\n * @param invert Whether use invert matrix.\n * @return [x, y]\n */\nexport function applyTransform(target, transform, invert) {\n if (transform && !isArrayLike(transform)) {\n transform = Transformable.getLocalTransform(transform);\n }\n if (invert) {\n transform = matrix.invert([], transform);\n }\n return vector.applyTransform([], target, transform);\n}\n/**\n * @param direction 'left' 'right' 'top' 'bottom'\n * @param transform Transform matrix: like [1, 0, 0, 1, 0, 0]\n * @param invert Whether use invert matrix.\n * @return Transformed direction. 'left' 'right' 'top' 'bottom'\n */\nexport function transformDirection(direction, transform, invert) {\n // Pick a base, ensure that transform result will not be (0, 0).\n var hBase = transform[4] === 0 || transform[5] === 0 || transform[0] === 0 ? 1 : Math.abs(2 * transform[4] / transform[0]);\n var vBase = transform[4] === 0 || transform[5] === 0 || transform[2] === 0 ? 1 : Math.abs(2 * transform[4] / transform[2]);\n var vertex = [direction === 'left' ? -hBase : direction === 'right' ? hBase : 0, direction === 'top' ? -vBase : direction === 'bottom' ? vBase : 0];\n vertex = applyTransform(vertex, transform, invert);\n return Math.abs(vertex[0]) > Math.abs(vertex[1]) ? vertex[0] > 0 ? 'right' : 'left' : vertex[1] > 0 ? 'bottom' : 'top';\n}\nfunction isNotGroup(el) {\n return !el.isGroup;\n}\nfunction isPath(el) {\n return el.shape != null;\n}\n/**\n * Apply group transition animation from g1 to g2.\n * If no animatableModel, no animation.\n */\nexport function groupTransition(g1, g2, animatableModel) {\n if (!g1 || !g2) {\n return;\n }\n function getElMap(g) {\n var elMap = {};\n g.traverse(function (el) {\n if (isNotGroup(el) && el.anid) {\n elMap[el.anid] = el;\n }\n });\n return elMap;\n }\n function getAnimatableProps(el) {\n var obj = {\n x: el.x,\n y: el.y,\n rotation: el.rotation\n };\n if (isPath(el)) {\n obj.shape = extend({}, el.shape);\n }\n return obj;\n }\n var elMap1 = getElMap(g1);\n g2.traverse(function (el) {\n if (isNotGroup(el) && el.anid) {\n var oldEl = elMap1[el.anid];\n if (oldEl) {\n var newProp = getAnimatableProps(el);\n el.attr(getAnimatableProps(oldEl));\n updateProps(el, newProp, animatableModel, getECData(el).dataIndex);\n }\n }\n });\n}\nexport function clipPointsByRect(points, rect) {\n // FIXME: This way might be incorrect when graphic clipped by a corner\n // and when element has a border.\n return map(points, function (point) {\n var x = point[0];\n x = mathMax(x, rect.x);\n x = mathMin(x, rect.x + rect.width);\n var y = point[1];\n y = mathMax(y, rect.y);\n y = mathMin(y, rect.y + rect.height);\n return [x, y];\n });\n}\n/**\n * Return a new clipped rect. If rect size are negative, return undefined.\n */\nexport function clipRectByRect(targetRect, rect) {\n var x = mathMax(targetRect.x, rect.x);\n var x2 = mathMin(targetRect.x + targetRect.width, rect.x + rect.width);\n var y = mathMax(targetRect.y, rect.y);\n var y2 = mathMin(targetRect.y + targetRect.height, rect.y + rect.height);\n // If the total rect is cliped, nothing, including the border,\n // should be painted. So return undefined.\n if (x2 >= x && y2 >= y) {\n return {\n x: x,\n y: y,\n width: x2 - x,\n height: y2 - y\n };\n }\n}\nexport function createIcon(iconStr,\n// Support 'image://' or 'path://' or direct svg path.\nopt, rect) {\n var innerOpts = extend({\n rectHover: true\n }, opt);\n var style = innerOpts.style = {\n strokeNoScale: true\n };\n rect = rect || {\n x: -1,\n y: -1,\n width: 2,\n height: 2\n };\n if (iconStr) {\n return iconStr.indexOf('image://') === 0 ? (style.image = iconStr.slice(8), defaults(style, rect), new ZRImage(innerOpts)) : makePath(iconStr.replace('path://', ''), innerOpts, rect, 'center');\n }\n}\n/**\n * Return `true` if the given line (line `a`) and the given polygon\n * are intersect.\n * Note that we do not count colinear as intersect here because no\n * requirement for that. We could do that if required in future.\n */\nexport function linePolygonIntersect(a1x, a1y, a2x, a2y, points) {\n for (var i = 0, p2 = points[points.length - 1]; i < points.length; i++) {\n var p = points[i];\n if (lineLineIntersect(a1x, a1y, a2x, a2y, p[0], p[1], p2[0], p2[1])) {\n return true;\n }\n p2 = p;\n }\n}\n/**\n * Return `true` if the given two lines (line `a` and line `b`)\n * are intersect.\n * Note that we do not count colinear as intersect here because no\n * requirement for that. We could do that if required in future.\n */\nexport function lineLineIntersect(a1x, a1y, a2x, a2y, b1x, b1y, b2x, b2y) {\n // let `vec_m` to be `vec_a2 - vec_a1` and `vec_n` to be `vec_b2 - vec_b1`.\n var mx = a2x - a1x;\n var my = a2y - a1y;\n var nx = b2x - b1x;\n var ny = b2y - b1y;\n // `vec_m` and `vec_n` are parallel iff\n // existing `k` such that `vec_m = k · vec_n`, equivalent to `vec_m X vec_n = 0`.\n var nmCrossProduct = crossProduct2d(nx, ny, mx, my);\n if (nearZero(nmCrossProduct)) {\n return false;\n }\n // `vec_m` and `vec_n` are intersect iff\n // existing `p` and `q` in [0, 1] such that `vec_a1 + p * vec_m = vec_b1 + q * vec_n`,\n // such that `q = ((vec_a1 - vec_b1) X vec_m) / (vec_n X vec_m)`\n // and `p = ((vec_a1 - vec_b1) X vec_n) / (vec_n X vec_m)`.\n var b1a1x = a1x - b1x;\n var b1a1y = a1y - b1y;\n var q = crossProduct2d(b1a1x, b1a1y, mx, my) / nmCrossProduct;\n if (q < 0 || q > 1) {\n return false;\n }\n var p = crossProduct2d(b1a1x, b1a1y, nx, ny) / nmCrossProduct;\n if (p < 0 || p > 1) {\n return false;\n }\n return true;\n}\n/**\n * Cross product of 2-dimension vector.\n */\nfunction crossProduct2d(x1, y1, x2, y2) {\n return x1 * y2 - x2 * y1;\n}\nfunction nearZero(val) {\n return val <= 1e-6 && val >= -1e-6;\n}\nexport function setTooltipConfig(opt) {\n var itemTooltipOption = opt.itemTooltipOption;\n var componentModel = opt.componentModel;\n var itemName = opt.itemName;\n var itemTooltipOptionObj = isString(itemTooltipOption) ? {\n formatter: itemTooltipOption\n } : itemTooltipOption;\n var mainType = componentModel.mainType;\n var componentIndex = componentModel.componentIndex;\n var formatterParams = {\n componentType: mainType,\n name: itemName,\n $vars: ['name']\n };\n formatterParams[mainType + 'Index'] = componentIndex;\n var formatterParamsExtra = opt.formatterParamsExtra;\n if (formatterParamsExtra) {\n each(keys(formatterParamsExtra), function (key) {\n if (!hasOwn(formatterParams, key)) {\n formatterParams[key] = formatterParamsExtra[key];\n formatterParams.$vars.push(key);\n }\n });\n }\n var ecData = getECData(opt.el);\n ecData.componentMainType = mainType;\n ecData.componentIndex = componentIndex;\n ecData.tooltipConfig = {\n name: itemName,\n option: defaults({\n content: itemName,\n encodeHTMLContent: true,\n formatterParams: formatterParams\n }, itemTooltipOptionObj)\n };\n}\nfunction traverseElement(el, cb) {\n var stopped;\n // TODO\n // Polyfill for fixing zrender group traverse don't visit it's root issue.\n if (el.isGroup) {\n stopped = cb(el);\n }\n if (!stopped) {\n el.traverse(cb);\n }\n}\nexport function traverseElements(els, cb) {\n if (els) {\n if (isArray(els)) {\n for (var i = 0; i < els.length; i++) {\n traverseElement(els[i], cb);\n }\n } else {\n traverseElement(els, cb);\n }\n }\n}\n// Register built-in shapes. These shapes might be overwritten\n// by users, although we do not recommend that.\nregisterShape('circle', Circle);\nregisterShape('ellipse', Ellipse);\nregisterShape('sector', Sector);\nregisterShape('ring', Ring);\nregisterShape('polygon', Polygon);\nregisterShape('polyline', Polyline);\nregisterShape('rect', Rect);\nregisterShape('line', Line);\nregisterShape('bezierCurve', BezierCurve);\nregisterShape('arc', Arc);\nexport { Group, ZRImage as Image, ZRText as Text, Circle, Ellipse, Sector, Ring, Polygon, Polyline, Rect, Line, BezierCurve, Arc, IncrementalDisplayable, CompoundPath, LinearGradient, RadialGradient, BoundingRect, OrientedBoundingRect, Point, Path };","import PathProxy from '../core/PathProxy.js';\nimport { applyTransform as v2ApplyTransform } from '../core/vector.js';\nvar CMD = PathProxy.CMD;\nvar points = [[], [], []];\nvar mathSqrt = Math.sqrt;\nvar mathAtan2 = Math.atan2;\nexport default function transformPath(path, m) {\n if (!m) {\n return;\n }\n var data = path.data;\n var len = path.len();\n var cmd;\n var nPoint;\n var i;\n var j;\n var k;\n var p;\n var M = CMD.M;\n var C = CMD.C;\n var L = CMD.L;\n var R = CMD.R;\n var A = CMD.A;\n var Q = CMD.Q;\n for (i = 0, j = 0; i < len;) {\n cmd = data[i++];\n j = i;\n nPoint = 0;\n switch (cmd) {\n case M:\n nPoint = 1;\n break;\n case L:\n nPoint = 1;\n break;\n case C:\n nPoint = 3;\n break;\n case Q:\n nPoint = 2;\n break;\n case A:\n var x = m[4];\n var y = m[5];\n var sx = mathSqrt(m[0] * m[0] + m[1] * m[1]);\n var sy = mathSqrt(m[2] * m[2] + m[3] * m[3]);\n var angle = mathAtan2(-m[1] / sy, m[0] / sx);\n data[i] *= sx;\n data[i++] += x;\n data[i] *= sy;\n data[i++] += y;\n data[i++] *= sx;\n data[i++] *= sy;\n data[i++] += angle;\n data[i++] += angle;\n i += 2;\n j = i;\n break;\n case R:\n p[0] = data[i++];\n p[1] = data[i++];\n v2ApplyTransform(p, p, m);\n data[j++] = p[0];\n data[j++] = p[1];\n p[0] += data[i++];\n p[1] += data[i++];\n v2ApplyTransform(p, p, m);\n data[j++] = p[0];\n data[j++] = p[1];\n }\n for (k = 0; k < nPoint; k++) {\n var p_1 = points[k];\n p_1[0] = data[i++];\n p_1[1] = data[i++];\n v2ApplyTransform(p_1, p_1, m);\n data[j++] = p_1[0];\n data[j++] = p_1[1];\n }\n }\n path.increaseVersion();\n}","import { __extends } from \"tslib\";\nimport Path from '../graphic/Path.js';\nimport PathProxy from '../core/PathProxy.js';\nimport transformPath from './transformPath.js';\nimport { extend } from '../core/util.js';\nvar mathSqrt = Math.sqrt;\nvar mathSin = Math.sin;\nvar mathCos = Math.cos;\nvar PI = Math.PI;\nfunction vMag(v) {\n return Math.sqrt(v[0] * v[0] + v[1] * v[1]);\n}\n;\nfunction vRatio(u, v) {\n return (u[0] * v[0] + u[1] * v[1]) / (vMag(u) * vMag(v));\n}\n;\nfunction vAngle(u, v) {\n return (u[0] * v[1] < u[1] * v[0] ? -1 : 1) * Math.acos(vRatio(u, v));\n}\n;\nfunction processArc(x1, y1, x2, y2, fa, fs, rx, ry, psiDeg, cmd, path) {\n var psi = psiDeg * (PI / 180.0);\n var xp = mathCos(psi) * (x1 - x2) / 2.0 + mathSin(psi) * (y1 - y2) / 2.0;\n var yp = -1 * mathSin(psi) * (x1 - x2) / 2.0 + mathCos(psi) * (y1 - y2) / 2.0;\n var lambda = xp * xp / (rx * rx) + yp * yp / (ry * ry);\n if (lambda > 1) {\n rx *= mathSqrt(lambda);\n ry *= mathSqrt(lambda);\n }\n var f = (fa === fs ? -1 : 1) * mathSqrt((rx * rx * (ry * ry) - rx * rx * (yp * yp) - ry * ry * (xp * xp)) / (rx * rx * (yp * yp) + ry * ry * (xp * xp))) || 0;\n var cxp = f * rx * yp / ry;\n var cyp = f * -ry * xp / rx;\n var cx = (x1 + x2) / 2.0 + mathCos(psi) * cxp - mathSin(psi) * cyp;\n var cy = (y1 + y2) / 2.0 + mathSin(psi) * cxp + mathCos(psi) * cyp;\n var theta = vAngle([1, 0], [(xp - cxp) / rx, (yp - cyp) / ry]);\n var u = [(xp - cxp) / rx, (yp - cyp) / ry];\n var v = [(-1 * xp - cxp) / rx, (-1 * yp - cyp) / ry];\n var dTheta = vAngle(u, v);\n if (vRatio(u, v) <= -1) {\n dTheta = PI;\n }\n if (vRatio(u, v) >= 1) {\n dTheta = 0;\n }\n if (dTheta < 0) {\n var n = Math.round(dTheta / PI * 1e6) / 1e6;\n dTheta = PI * 2 + n % 2 * PI;\n }\n path.addData(cmd, cx, cy, rx, ry, theta, dTheta, psi, fs);\n}\nvar commandReg = /([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig;\nvar numberReg = /-?([0-9]*\\.)?[0-9]+([eE]-?[0-9]+)?/g;\nfunction createPathProxyFromString(data) {\n var path = new PathProxy();\n if (!data) {\n return path;\n }\n var cpx = 0;\n var cpy = 0;\n var subpathX = cpx;\n var subpathY = cpy;\n var prevCmd;\n var CMD = PathProxy.CMD;\n var cmdList = data.match(commandReg);\n if (!cmdList) {\n return path;\n }\n for (var l = 0; l < cmdList.length; l++) {\n var cmdText = cmdList[l];\n var cmdStr = cmdText.charAt(0);\n var cmd = void 0;\n var p = cmdText.match(numberReg) || [];\n var pLen = p.length;\n for (var i = 0; i < pLen; i++) {\n p[i] = parseFloat(p[i]);\n }\n var off = 0;\n while (off < pLen) {\n var ctlPtx = void 0;\n var ctlPty = void 0;\n var rx = void 0;\n var ry = void 0;\n var psi = void 0;\n var fa = void 0;\n var fs = void 0;\n var x1 = cpx;\n var y1 = cpy;\n var len = void 0;\n var pathData = void 0;\n switch (cmdStr) {\n case 'l':\n cpx += p[off++];\n cpy += p[off++];\n cmd = CMD.L;\n path.addData(cmd, cpx, cpy);\n break;\n case 'L':\n cpx = p[off++];\n cpy = p[off++];\n cmd = CMD.L;\n path.addData(cmd, cpx, cpy);\n break;\n case 'm':\n cpx += p[off++];\n cpy += p[off++];\n cmd = CMD.M;\n path.addData(cmd, cpx, cpy);\n subpathX = cpx;\n subpathY = cpy;\n cmdStr = 'l';\n break;\n case 'M':\n cpx = p[off++];\n cpy = p[off++];\n cmd = CMD.M;\n path.addData(cmd, cpx, cpy);\n subpathX = cpx;\n subpathY = cpy;\n cmdStr = 'L';\n break;\n case 'h':\n cpx += p[off++];\n cmd = CMD.L;\n path.addData(cmd, cpx, cpy);\n break;\n case 'H':\n cpx = p[off++];\n cmd = CMD.L;\n path.addData(cmd, cpx, cpy);\n break;\n case 'v':\n cpy += p[off++];\n cmd = CMD.L;\n path.addData(cmd, cpx, cpy);\n break;\n case 'V':\n cpy = p[off++];\n cmd = CMD.L;\n path.addData(cmd, cpx, cpy);\n break;\n case 'C':\n cmd = CMD.C;\n path.addData(cmd, p[off++], p[off++], p[off++], p[off++], p[off++], p[off++]);\n cpx = p[off - 2];\n cpy = p[off - 1];\n break;\n case 'c':\n cmd = CMD.C;\n path.addData(cmd, p[off++] + cpx, p[off++] + cpy, p[off++] + cpx, p[off++] + cpy, p[off++] + cpx, p[off++] + cpy);\n cpx += p[off - 2];\n cpy += p[off - 1];\n break;\n case 'S':\n ctlPtx = cpx;\n ctlPty = cpy;\n len = path.len();\n pathData = path.data;\n if (prevCmd === CMD.C) {\n ctlPtx += cpx - pathData[len - 4];\n ctlPty += cpy - pathData[len - 3];\n }\n cmd = CMD.C;\n x1 = p[off++];\n y1 = p[off++];\n cpx = p[off++];\n cpy = p[off++];\n path.addData(cmd, ctlPtx, ctlPty, x1, y1, cpx, cpy);\n break;\n case 's':\n ctlPtx = cpx;\n ctlPty = cpy;\n len = path.len();\n pathData = path.data;\n if (prevCmd === CMD.C) {\n ctlPtx += cpx - pathData[len - 4];\n ctlPty += cpy - pathData[len - 3];\n }\n cmd = CMD.C;\n x1 = cpx + p[off++];\n y1 = cpy + p[off++];\n cpx += p[off++];\n cpy += p[off++];\n path.addData(cmd, ctlPtx, ctlPty, x1, y1, cpx, cpy);\n break;\n case 'Q':\n x1 = p[off++];\n y1 = p[off++];\n cpx = p[off++];\n cpy = p[off++];\n cmd = CMD.Q;\n path.addData(cmd, x1, y1, cpx, cpy);\n break;\n case 'q':\n x1 = p[off++] + cpx;\n y1 = p[off++] + cpy;\n cpx += p[off++];\n cpy += p[off++];\n cmd = CMD.Q;\n path.addData(cmd, x1, y1, cpx, cpy);\n break;\n case 'T':\n ctlPtx = cpx;\n ctlPty = cpy;\n len = path.len();\n pathData = path.data;\n if (prevCmd === CMD.Q) {\n ctlPtx += cpx - pathData[len - 4];\n ctlPty += cpy - pathData[len - 3];\n }\n cpx = p[off++];\n cpy = p[off++];\n cmd = CMD.Q;\n path.addData(cmd, ctlPtx, ctlPty, cpx, cpy);\n break;\n case 't':\n ctlPtx = cpx;\n ctlPty = cpy;\n len = path.len();\n pathData = path.data;\n if (prevCmd === CMD.Q) {\n ctlPtx += cpx - pathData[len - 4];\n ctlPty += cpy - pathData[len - 3];\n }\n cpx += p[off++];\n cpy += p[off++];\n cmd = CMD.Q;\n path.addData(cmd, ctlPtx, ctlPty, cpx, cpy);\n break;\n case 'A':\n rx = p[off++];\n ry = p[off++];\n psi = p[off++];\n fa = p[off++];\n fs = p[off++];\n x1 = cpx, y1 = cpy;\n cpx = p[off++];\n cpy = p[off++];\n cmd = CMD.A;\n processArc(x1, y1, cpx, cpy, fa, fs, rx, ry, psi, cmd, path);\n break;\n case 'a':\n rx = p[off++];\n ry = p[off++];\n psi = p[off++];\n fa = p[off++];\n fs = p[off++];\n x1 = cpx, y1 = cpy;\n cpx += p[off++];\n cpy += p[off++];\n cmd = CMD.A;\n processArc(x1, y1, cpx, cpy, fa, fs, rx, ry, psi, cmd, path);\n break;\n }\n }\n if (cmdStr === 'z' || cmdStr === 'Z') {\n cmd = CMD.Z;\n path.addData(cmd);\n cpx = subpathX;\n cpy = subpathY;\n }\n prevCmd = cmd;\n }\n path.toStatic();\n return path;\n}\nvar SVGPath = function (_super) {\n __extends(SVGPath, _super);\n function SVGPath() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SVGPath.prototype.applyTransform = function (m) {};\n return SVGPath;\n}(Path);\nfunction isPathProxy(path) {\n return path.setData != null;\n}\nfunction createPathOptions(str, opts) {\n var pathProxy = createPathProxyFromString(str);\n var innerOpts = extend({}, opts);\n innerOpts.buildPath = function (path) {\n if (isPathProxy(path)) {\n path.setData(pathProxy.data);\n var ctx = path.getContext();\n if (ctx) {\n path.rebuildPath(ctx, 1);\n }\n } else {\n var ctx = path;\n pathProxy.rebuildPath(ctx, 1);\n }\n };\n innerOpts.applyTransform = function (m) {\n transformPath(pathProxy, m);\n this.dirtyShape();\n };\n return innerOpts;\n}\nexport function createFromString(str, opts) {\n return new SVGPath(createPathOptions(str, opts));\n}\nexport function extendFromString(str, defaultOpts) {\n var innerOpts = createPathOptions(str, defaultOpts);\n var Sub = function (_super) {\n __extends(Sub, _super);\n function Sub(opts) {\n var _this = _super.call(this, opts) || this;\n _this.applyTransform = innerOpts.applyTransform;\n _this.buildPath = innerOpts.buildPath;\n return _this;\n }\n return Sub;\n }(SVGPath);\n return Sub;\n}\nexport function mergePath(pathEls, opts) {\n var pathList = [];\n var len = pathEls.length;\n for (var i = 0; i < len; i++) {\n var pathEl = pathEls[i];\n pathList.push(pathEl.getUpdatedPathProxy(true));\n }\n var pathBundle = new Path(opts);\n pathBundle.createPathProxy();\n pathBundle.buildPath = function (path) {\n if (isPathProxy(path)) {\n path.appendPath(pathList);\n var ctx = path.getContext();\n if (ctx) {\n path.rebuildPath(ctx, 1);\n }\n }\n };\n return pathBundle;\n}\nexport function clonePath(sourcePath, opts) {\n opts = opts || {};\n var path = new Path();\n if (sourcePath.shape) {\n path.setShape(sourcePath.shape);\n }\n path.setStyle(sourcePath.style);\n if (opts.bakeTransform) {\n transformPath(path.path, sourcePath.getComputedTransform());\n } else {\n if (opts.toLocal) {\n path.setLocalTransform(sourcePath.getComputedTransform());\n } else {\n path.copyTransform(sourcePath);\n }\n }\n path.buildPath = sourcePath.buildPath;\n path.applyTransform = path.applyTransform;\n path.z = sourcePath.z;\n path.z2 = sourcePath.z2;\n path.zlevel = sourcePath.zlevel;\n return path;\n}","import { __extends } from \"tslib\";\nimport Path from '../Path.js';\nvar CircleShape = function () {\n function CircleShape() {\n this.cx = 0;\n this.cy = 0;\n this.r = 0;\n }\n return CircleShape;\n}();\nexport { CircleShape };\nvar Circle = function (_super) {\n __extends(Circle, _super);\n function Circle(opts) {\n return _super.call(this, opts) || this;\n }\n Circle.prototype.getDefaultShape = function () {\n return new CircleShape();\n };\n Circle.prototype.buildPath = function (ctx, shape) {\n ctx.moveTo(shape.cx + shape.r, shape.cy);\n ctx.arc(shape.cx, shape.cy, shape.r, 0, Math.PI * 2);\n };\n return Circle;\n}(Path);\n;\nCircle.prototype.type = 'circle';\nexport default Circle;","import { __extends } from \"tslib\";\nimport Path from '../Path.js';\nvar EllipseShape = function () {\n function EllipseShape() {\n this.cx = 0;\n this.cy = 0;\n this.rx = 0;\n this.ry = 0;\n }\n return EllipseShape;\n}();\nexport { EllipseShape };\nvar Ellipse = function (_super) {\n __extends(Ellipse, _super);\n function Ellipse(opts) {\n return _super.call(this, opts) || this;\n }\n Ellipse.prototype.getDefaultShape = function () {\n return new EllipseShape();\n };\n Ellipse.prototype.buildPath = function (ctx, shape) {\n var k = 0.5522848;\n var x = shape.cx;\n var y = shape.cy;\n var a = shape.rx;\n var b = shape.ry;\n var ox = a * k;\n var oy = b * k;\n ctx.moveTo(x - a, y);\n ctx.bezierCurveTo(x - a, y - oy, x - ox, y - b, x, y - b);\n ctx.bezierCurveTo(x + ox, y - b, x + a, y - oy, x + a, y);\n ctx.bezierCurveTo(x + a, y + oy, x + ox, y + b, x, y + b);\n ctx.bezierCurveTo(x - ox, y + b, x - a, y + oy, x - a, y);\n ctx.closePath();\n };\n return Ellipse;\n}(Path);\nEllipse.prototype.type = 'ellipse';\nexport default Ellipse;","import { isArray } from '../../core/util.js';\nvar PI = Math.PI;\nvar PI2 = PI * 2;\nvar mathSin = Math.sin;\nvar mathCos = Math.cos;\nvar mathACos = Math.acos;\nvar mathATan2 = Math.atan2;\nvar mathAbs = Math.abs;\nvar mathSqrt = Math.sqrt;\nvar mathMax = Math.max;\nvar mathMin = Math.min;\nvar e = 1e-4;\nfunction intersect(x0, y0, x1, y1, x2, y2, x3, y3) {\n var dx10 = x1 - x0;\n var dy10 = y1 - y0;\n var dx32 = x3 - x2;\n var dy32 = y3 - y2;\n var t = dy32 * dx10 - dx32 * dy10;\n if (t * t < e) {\n return;\n }\n t = (dx32 * (y0 - y2) - dy32 * (x0 - x2)) / t;\n return [x0 + t * dx10, y0 + t * dy10];\n}\nfunction computeCornerTangents(x0, y0, x1, y1, radius, cr, clockwise) {\n var x01 = x0 - x1;\n var y01 = y0 - y1;\n var lo = (clockwise ? cr : -cr) / mathSqrt(x01 * x01 + y01 * y01);\n var ox = lo * y01;\n var oy = -lo * x01;\n var x11 = x0 + ox;\n var y11 = y0 + oy;\n var x10 = x1 + ox;\n var y10 = y1 + oy;\n var x00 = (x11 + x10) / 2;\n var y00 = (y11 + y10) / 2;\n var dx = x10 - x11;\n var dy = y10 - y11;\n var d2 = dx * dx + dy * dy;\n var r = radius - cr;\n var s = x11 * y10 - x10 * y11;\n var d = (dy < 0 ? -1 : 1) * mathSqrt(mathMax(0, r * r * d2 - s * s));\n var cx0 = (s * dy - dx * d) / d2;\n var cy0 = (-s * dx - dy * d) / d2;\n var cx1 = (s * dy + dx * d) / d2;\n var cy1 = (-s * dx + dy * d) / d2;\n var dx0 = cx0 - x00;\n var dy0 = cy0 - y00;\n var dx1 = cx1 - x00;\n var dy1 = cy1 - y00;\n if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) {\n cx0 = cx1;\n cy0 = cy1;\n }\n return {\n cx: cx0,\n cy: cy0,\n x0: -ox,\n y0: -oy,\n x1: cx0 * (radius / r - 1),\n y1: cy0 * (radius / r - 1)\n };\n}\nfunction normalizeCornerRadius(cr) {\n var arr;\n if (isArray(cr)) {\n var len = cr.length;\n if (!len) {\n return cr;\n }\n if (len === 1) {\n arr = [cr[0], cr[0], 0, 0];\n } else if (len === 2) {\n arr = [cr[0], cr[0], cr[1], cr[1]];\n } else if (len === 3) {\n arr = cr.concat(cr[2]);\n } else {\n arr = cr;\n }\n } else {\n arr = [cr, cr, cr, cr];\n }\n return arr;\n}\nexport function buildPath(ctx, shape) {\n var _a;\n var radius = mathMax(shape.r, 0);\n var innerRadius = mathMax(shape.r0 || 0, 0);\n var hasRadius = radius > 0;\n var hasInnerRadius = innerRadius > 0;\n if (!hasRadius && !hasInnerRadius) {\n return;\n }\n if (!hasRadius) {\n radius = innerRadius;\n innerRadius = 0;\n }\n if (innerRadius > radius) {\n var tmp = radius;\n radius = innerRadius;\n innerRadius = tmp;\n }\n var startAngle = shape.startAngle,\n endAngle = shape.endAngle;\n if (isNaN(startAngle) || isNaN(endAngle)) {\n return;\n }\n var cx = shape.cx,\n cy = shape.cy;\n var clockwise = !!shape.clockwise;\n var arc = mathAbs(endAngle - startAngle);\n var mod = arc > PI2 && arc % PI2;\n mod > e && (arc = mod);\n if (!(radius > e)) {\n ctx.moveTo(cx, cy);\n } else if (arc > PI2 - e) {\n ctx.moveTo(cx + radius * mathCos(startAngle), cy + radius * mathSin(startAngle));\n ctx.arc(cx, cy, radius, startAngle, endAngle, !clockwise);\n if (innerRadius > e) {\n ctx.moveTo(cx + innerRadius * mathCos(endAngle), cy + innerRadius * mathSin(endAngle));\n ctx.arc(cx, cy, innerRadius, endAngle, startAngle, clockwise);\n }\n } else {\n var icrStart = void 0;\n var icrEnd = void 0;\n var ocrStart = void 0;\n var ocrEnd = void 0;\n var ocrs = void 0;\n var ocre = void 0;\n var icrs = void 0;\n var icre = void 0;\n var ocrMax = void 0;\n var icrMax = void 0;\n var limitedOcrMax = void 0;\n var limitedIcrMax = void 0;\n var xre = void 0;\n var yre = void 0;\n var xirs = void 0;\n var yirs = void 0;\n var xrs = radius * mathCos(startAngle);\n var yrs = radius * mathSin(startAngle);\n var xire = innerRadius * mathCos(endAngle);\n var yire = innerRadius * mathSin(endAngle);\n var hasArc = arc > e;\n if (hasArc) {\n var cornerRadius = shape.cornerRadius;\n if (cornerRadius) {\n _a = normalizeCornerRadius(cornerRadius), icrStart = _a[0], icrEnd = _a[1], ocrStart = _a[2], ocrEnd = _a[3];\n }\n var halfRd = mathAbs(radius - innerRadius) / 2;\n ocrs = mathMin(halfRd, ocrStart);\n ocre = mathMin(halfRd, ocrEnd);\n icrs = mathMin(halfRd, icrStart);\n icre = mathMin(halfRd, icrEnd);\n limitedOcrMax = ocrMax = mathMax(ocrs, ocre);\n limitedIcrMax = icrMax = mathMax(icrs, icre);\n if (ocrMax > e || icrMax > e) {\n xre = radius * mathCos(endAngle);\n yre = radius * mathSin(endAngle);\n xirs = innerRadius * mathCos(startAngle);\n yirs = innerRadius * mathSin(startAngle);\n if (arc < PI) {\n var it_1 = intersect(xrs, yrs, xirs, yirs, xre, yre, xire, yire);\n if (it_1) {\n var x0 = xrs - it_1[0];\n var y0 = yrs - it_1[1];\n var x1 = xre - it_1[0];\n var y1 = yre - it_1[1];\n var a = 1 / mathSin(mathACos((x0 * x1 + y0 * y1) / (mathSqrt(x0 * x0 + y0 * y0) * mathSqrt(x1 * x1 + y1 * y1))) / 2);\n var b = mathSqrt(it_1[0] * it_1[0] + it_1[1] * it_1[1]);\n limitedOcrMax = mathMin(ocrMax, (radius - b) / (a + 1));\n limitedIcrMax = mathMin(icrMax, (innerRadius - b) / (a - 1));\n }\n }\n }\n }\n if (!hasArc) {\n ctx.moveTo(cx + xrs, cy + yrs);\n } else if (limitedOcrMax > e) {\n var crStart = mathMin(ocrStart, limitedOcrMax);\n var crEnd = mathMin(ocrEnd, limitedOcrMax);\n var ct0 = computeCornerTangents(xirs, yirs, xrs, yrs, radius, crStart, clockwise);\n var ct1 = computeCornerTangents(xre, yre, xire, yire, radius, crEnd, clockwise);\n ctx.moveTo(cx + ct0.cx + ct0.x0, cy + ct0.cy + ct0.y0);\n if (limitedOcrMax < ocrMax && crStart === crEnd) {\n ctx.arc(cx + ct0.cx, cy + ct0.cy, limitedOcrMax, mathATan2(ct0.y0, ct0.x0), mathATan2(ct1.y0, ct1.x0), !clockwise);\n } else {\n crStart > 0 && ctx.arc(cx + ct0.cx, cy + ct0.cy, crStart, mathATan2(ct0.y0, ct0.x0), mathATan2(ct0.y1, ct0.x1), !clockwise);\n ctx.arc(cx, cy, radius, mathATan2(ct0.cy + ct0.y1, ct0.cx + ct0.x1), mathATan2(ct1.cy + ct1.y1, ct1.cx + ct1.x1), !clockwise);\n crEnd > 0 && ctx.arc(cx + ct1.cx, cy + ct1.cy, crEnd, mathATan2(ct1.y1, ct1.x1), mathATan2(ct1.y0, ct1.x0), !clockwise);\n }\n } else {\n ctx.moveTo(cx + xrs, cy + yrs);\n ctx.arc(cx, cy, radius, startAngle, endAngle, !clockwise);\n }\n if (!(innerRadius > e) || !hasArc) {\n ctx.lineTo(cx + xire, cy + yire);\n } else if (limitedIcrMax > e) {\n var crStart = mathMin(icrStart, limitedIcrMax);\n var crEnd = mathMin(icrEnd, limitedIcrMax);\n var ct0 = computeCornerTangents(xire, yire, xre, yre, innerRadius, -crEnd, clockwise);\n var ct1 = computeCornerTangents(xrs, yrs, xirs, yirs, innerRadius, -crStart, clockwise);\n ctx.lineTo(cx + ct0.cx + ct0.x0, cy + ct0.cy + ct0.y0);\n if (limitedIcrMax < icrMax && crStart === crEnd) {\n ctx.arc(cx + ct0.cx, cy + ct0.cy, limitedIcrMax, mathATan2(ct0.y0, ct0.x0), mathATan2(ct1.y0, ct1.x0), !clockwise);\n } else {\n crEnd > 0 && ctx.arc(cx + ct0.cx, cy + ct0.cy, crEnd, mathATan2(ct0.y0, ct0.x0), mathATan2(ct0.y1, ct0.x1), !clockwise);\n ctx.arc(cx, cy, innerRadius, mathATan2(ct0.cy + ct0.y1, ct0.cx + ct0.x1), mathATan2(ct1.cy + ct1.y1, ct1.cx + ct1.x1), clockwise);\n crStart > 0 && ctx.arc(cx + ct1.cx, cy + ct1.cy, crStart, mathATan2(ct1.y1, ct1.x1), mathATan2(ct1.y0, ct1.x0), !clockwise);\n }\n } else {\n ctx.lineTo(cx + xire, cy + yire);\n ctx.arc(cx, cy, innerRadius, endAngle, startAngle, clockwise);\n }\n }\n ctx.closePath();\n}","import { __extends } from \"tslib\";\nimport Path from '../Path.js';\nimport * as roundSectorHelper from '../helper/roundSector.js';\nvar SectorShape = function () {\n function SectorShape() {\n this.cx = 0;\n this.cy = 0;\n this.r0 = 0;\n this.r = 0;\n this.startAngle = 0;\n this.endAngle = Math.PI * 2;\n this.clockwise = true;\n this.cornerRadius = 0;\n }\n return SectorShape;\n}();\nexport { SectorShape };\nvar Sector = function (_super) {\n __extends(Sector, _super);\n function Sector(opts) {\n return _super.call(this, opts) || this;\n }\n Sector.prototype.getDefaultShape = function () {\n return new SectorShape();\n };\n Sector.prototype.buildPath = function (ctx, shape) {\n roundSectorHelper.buildPath(ctx, shape);\n };\n Sector.prototype.isZeroArea = function () {\n return this.shape.startAngle === this.shape.endAngle || this.shape.r === this.shape.r0;\n };\n return Sector;\n}(Path);\nSector.prototype.type = 'sector';\nexport default Sector;","import { __extends } from \"tslib\";\nimport Path from '../Path.js';\nvar RingShape = function () {\n function RingShape() {\n this.cx = 0;\n this.cy = 0;\n this.r = 0;\n this.r0 = 0;\n }\n return RingShape;\n}();\nexport { RingShape };\nvar Ring = function (_super) {\n __extends(Ring, _super);\n function Ring(opts) {\n return _super.call(this, opts) || this;\n }\n Ring.prototype.getDefaultShape = function () {\n return new RingShape();\n };\n Ring.prototype.buildPath = function (ctx, shape) {\n var x = shape.cx;\n var y = shape.cy;\n var PI2 = Math.PI * 2;\n ctx.moveTo(x + shape.r, y);\n ctx.arc(x, y, shape.r, 0, PI2, false);\n ctx.moveTo(x + shape.r0, y);\n ctx.arc(x, y, shape.r0, 0, PI2, true);\n };\n return Ring;\n}(Path);\nRing.prototype.type = 'ring';\nexport default Ring;","import { min as v2Min, max as v2Max, scale as v2Scale, distance as v2Distance, add as v2Add, clone as v2Clone, sub as v2Sub } from '../../core/vector.js';\nexport default function smoothBezier(points, smooth, isLoop, constraint) {\n var cps = [];\n var v = [];\n var v1 = [];\n var v2 = [];\n var prevPoint;\n var nextPoint;\n var min;\n var max;\n if (constraint) {\n min = [Infinity, Infinity];\n max = [-Infinity, -Infinity];\n for (var i = 0, len = points.length; i < len; i++) {\n v2Min(min, min, points[i]);\n v2Max(max, max, points[i]);\n }\n v2Min(min, min, constraint[0]);\n v2Max(max, max, constraint[1]);\n }\n for (var i = 0, len = points.length; i < len; i++) {\n var point = points[i];\n if (isLoop) {\n prevPoint = points[i ? i - 1 : len - 1];\n nextPoint = points[(i + 1) % len];\n } else {\n if (i === 0 || i === len - 1) {\n cps.push(v2Clone(points[i]));\n continue;\n } else {\n prevPoint = points[i - 1];\n nextPoint = points[i + 1];\n }\n }\n v2Sub(v, nextPoint, prevPoint);\n v2Scale(v, v, smooth);\n var d0 = v2Distance(point, prevPoint);\n var d1 = v2Distance(point, nextPoint);\n var sum = d0 + d1;\n if (sum !== 0) {\n d0 /= sum;\n d1 /= sum;\n }\n v2Scale(v1, v, -d0);\n v2Scale(v2, v, d1);\n var cp0 = v2Add([], point, v1);\n var cp1 = v2Add([], point, v2);\n if (constraint) {\n v2Max(cp0, cp0, min);\n v2Min(cp0, cp0, max);\n v2Max(cp1, cp1, min);\n v2Min(cp1, cp1, max);\n }\n cps.push(cp0);\n cps.push(cp1);\n }\n if (isLoop) {\n cps.push(cps.shift());\n }\n return cps;\n}","import smoothBezier from './smoothBezier.js';\nexport function buildPath(ctx, shape, closePath) {\n var smooth = shape.smooth;\n var points = shape.points;\n if (points && points.length >= 2) {\n if (smooth) {\n var controlPoints = smoothBezier(points, smooth, closePath, shape.smoothConstraint);\n ctx.moveTo(points[0][0], points[0][1]);\n var len = points.length;\n for (var i = 0; i < (closePath ? len : len - 1); i++) {\n var cp1 = controlPoints[i * 2];\n var cp2 = controlPoints[i * 2 + 1];\n var p = points[(i + 1) % len];\n ctx.bezierCurveTo(cp1[0], cp1[1], cp2[0], cp2[1], p[0], p[1]);\n }\n } else {\n ctx.moveTo(points[0][0], points[0][1]);\n for (var i = 1, l = points.length; i < l; i++) {\n ctx.lineTo(points[i][0], points[i][1]);\n }\n }\n closePath && ctx.closePath();\n }\n}","import { __extends } from \"tslib\";\nimport Path from '../Path.js';\nimport * as polyHelper from '../helper/poly.js';\nvar PolygonShape = function () {\n function PolygonShape() {\n this.points = null;\n this.smooth = 0;\n this.smoothConstraint = null;\n }\n return PolygonShape;\n}();\nexport { PolygonShape };\nvar Polygon = function (_super) {\n __extends(Polygon, _super);\n function Polygon(opts) {\n return _super.call(this, opts) || this;\n }\n Polygon.prototype.getDefaultShape = function () {\n return new PolygonShape();\n };\n Polygon.prototype.buildPath = function (ctx, shape) {\n polyHelper.buildPath(ctx, shape, true);\n };\n return Polygon;\n}(Path);\n;\nPolygon.prototype.type = 'polygon';\nexport default Polygon;","import { __extends } from \"tslib\";\nimport Path from '../Path.js';\nimport * as polyHelper from '../helper/poly.js';\nvar PolylineShape = function () {\n function PolylineShape() {\n this.points = null;\n this.percent = 1;\n this.smooth = 0;\n this.smoothConstraint = null;\n }\n return PolylineShape;\n}();\nexport { PolylineShape };\nvar Polyline = function (_super) {\n __extends(Polyline, _super);\n function Polyline(opts) {\n return _super.call(this, opts) || this;\n }\n Polyline.prototype.getDefaultStyle = function () {\n return {\n stroke: '#000',\n fill: null\n };\n };\n Polyline.prototype.getDefaultShape = function () {\n return new PolylineShape();\n };\n Polyline.prototype.buildPath = function (ctx, shape) {\n polyHelper.buildPath(ctx, shape, false);\n };\n return Polyline;\n}(Path);\nPolyline.prototype.type = 'polyline';\nexport default Polyline;","import { __extends } from \"tslib\";\nimport Path from '../Path.js';\nimport { subPixelOptimizeLine } from '../helper/subPixelOptimize.js';\nvar subPixelOptimizeOutputShape = {};\nvar LineShape = function () {\n function LineShape() {\n this.x1 = 0;\n this.y1 = 0;\n this.x2 = 0;\n this.y2 = 0;\n this.percent = 1;\n }\n return LineShape;\n}();\nexport { LineShape };\nvar Line = function (_super) {\n __extends(Line, _super);\n function Line(opts) {\n return _super.call(this, opts) || this;\n }\n Line.prototype.getDefaultStyle = function () {\n return {\n stroke: '#000',\n fill: null\n };\n };\n Line.prototype.getDefaultShape = function () {\n return new LineShape();\n };\n Line.prototype.buildPath = function (ctx, shape) {\n var x1;\n var y1;\n var x2;\n var y2;\n if (this.subPixelOptimize) {\n var optimizedShape = subPixelOptimizeLine(subPixelOptimizeOutputShape, shape, this.style);\n x1 = optimizedShape.x1;\n y1 = optimizedShape.y1;\n x2 = optimizedShape.x2;\n y2 = optimizedShape.y2;\n } else {\n x1 = shape.x1;\n y1 = shape.y1;\n x2 = shape.x2;\n y2 = shape.y2;\n }\n var percent = shape.percent;\n if (percent === 0) {\n return;\n }\n ctx.moveTo(x1, y1);\n if (percent < 1) {\n x2 = x1 * (1 - percent) + x2 * percent;\n y2 = y1 * (1 - percent) + y2 * percent;\n }\n ctx.lineTo(x2, y2);\n };\n Line.prototype.pointAt = function (p) {\n var shape = this.shape;\n return [shape.x1 * (1 - p) + shape.x2 * p, shape.y1 * (1 - p) + shape.y2 * p];\n };\n return Line;\n}(Path);\nLine.prototype.type = 'line';\nexport default Line;","import { __extends } from \"tslib\";\nimport Path from '../Path.js';\nimport * as vec2 from '../../core/vector.js';\nimport { quadraticSubdivide, cubicSubdivide, quadraticAt, cubicAt, quadraticDerivativeAt, cubicDerivativeAt } from '../../core/curve.js';\nvar out = [];\nvar BezierCurveShape = function () {\n function BezierCurveShape() {\n this.x1 = 0;\n this.y1 = 0;\n this.x2 = 0;\n this.y2 = 0;\n this.cpx1 = 0;\n this.cpy1 = 0;\n this.percent = 1;\n }\n return BezierCurveShape;\n}();\nexport { BezierCurveShape };\nfunction someVectorAt(shape, t, isTangent) {\n var cpx2 = shape.cpx2;\n var cpy2 = shape.cpy2;\n if (cpx2 != null || cpy2 != null) {\n return [(isTangent ? cubicDerivativeAt : cubicAt)(shape.x1, shape.cpx1, shape.cpx2, shape.x2, t), (isTangent ? cubicDerivativeAt : cubicAt)(shape.y1, shape.cpy1, shape.cpy2, shape.y2, t)];\n } else {\n return [(isTangent ? quadraticDerivativeAt : quadraticAt)(shape.x1, shape.cpx1, shape.x2, t), (isTangent ? quadraticDerivativeAt : quadraticAt)(shape.y1, shape.cpy1, shape.y2, t)];\n }\n}\nvar BezierCurve = function (_super) {\n __extends(BezierCurve, _super);\n function BezierCurve(opts) {\n return _super.call(this, opts) || this;\n }\n BezierCurve.prototype.getDefaultStyle = function () {\n return {\n stroke: '#000',\n fill: null\n };\n };\n BezierCurve.prototype.getDefaultShape = function () {\n return new BezierCurveShape();\n };\n BezierCurve.prototype.buildPath = function (ctx, shape) {\n var x1 = shape.x1;\n var y1 = shape.y1;\n var x2 = shape.x2;\n var y2 = shape.y2;\n var cpx1 = shape.cpx1;\n var cpy1 = shape.cpy1;\n var cpx2 = shape.cpx2;\n var cpy2 = shape.cpy2;\n var percent = shape.percent;\n if (percent === 0) {\n return;\n }\n ctx.moveTo(x1, y1);\n if (cpx2 == null || cpy2 == null) {\n if (percent < 1) {\n quadraticSubdivide(x1, cpx1, x2, percent, out);\n cpx1 = out[1];\n x2 = out[2];\n quadraticSubdivide(y1, cpy1, y2, percent, out);\n cpy1 = out[1];\n y2 = out[2];\n }\n ctx.quadraticCurveTo(cpx1, cpy1, x2, y2);\n } else {\n if (percent < 1) {\n cubicSubdivide(x1, cpx1, cpx2, x2, percent, out);\n cpx1 = out[1];\n cpx2 = out[2];\n x2 = out[3];\n cubicSubdivide(y1, cpy1, cpy2, y2, percent, out);\n cpy1 = out[1];\n cpy2 = out[2];\n y2 = out[3];\n }\n ctx.bezierCurveTo(cpx1, cpy1, cpx2, cpy2, x2, y2);\n }\n };\n BezierCurve.prototype.pointAt = function (t) {\n return someVectorAt(this.shape, t, false);\n };\n BezierCurve.prototype.tangentAt = function (t) {\n var p = someVectorAt(this.shape, t, true);\n return vec2.normalize(p, p);\n };\n return BezierCurve;\n}(Path);\n;\nBezierCurve.prototype.type = 'bezier-curve';\nexport default BezierCurve;","import { __extends } from \"tslib\";\nimport Path from '../Path.js';\nvar ArcShape = function () {\n function ArcShape() {\n this.cx = 0;\n this.cy = 0;\n this.r = 0;\n this.startAngle = 0;\n this.endAngle = Math.PI * 2;\n this.clockwise = true;\n }\n return ArcShape;\n}();\nexport { ArcShape };\nvar Arc = function (_super) {\n __extends(Arc, _super);\n function Arc(opts) {\n return _super.call(this, opts) || this;\n }\n Arc.prototype.getDefaultStyle = function () {\n return {\n stroke: '#000',\n fill: null\n };\n };\n Arc.prototype.getDefaultShape = function () {\n return new ArcShape();\n };\n Arc.prototype.buildPath = function (ctx, shape) {\n var x = shape.cx;\n var y = shape.cy;\n var r = Math.max(shape.r, 0);\n var startAngle = shape.startAngle;\n var endAngle = shape.endAngle;\n var clockwise = shape.clockwise;\n var unitX = Math.cos(startAngle);\n var unitY = Math.sin(startAngle);\n ctx.moveTo(unitX * r + x, unitY * r + y);\n ctx.arc(x, y, r, startAngle, endAngle, !clockwise);\n };\n return Arc;\n}(Path);\nArc.prototype.type = 'arc';\nexport default Arc;","import { __extends } from \"tslib\";\nimport Path from './Path.js';\nvar CompoundPath = function (_super) {\n __extends(CompoundPath, _super);\n function CompoundPath() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'compound';\n return _this;\n }\n CompoundPath.prototype._updatePathDirty = function () {\n var paths = this.shape.paths;\n var dirtyPath = this.shapeChanged();\n for (var i = 0; i < paths.length; i++) {\n dirtyPath = dirtyPath || paths[i].shapeChanged();\n }\n if (dirtyPath) {\n this.dirtyShape();\n }\n };\n CompoundPath.prototype.beforeBrush = function () {\n this._updatePathDirty();\n var paths = this.shape.paths || [];\n var scale = this.getGlobalScale();\n for (var i = 0; i < paths.length; i++) {\n if (!paths[i].path) {\n paths[i].createPathProxy();\n }\n paths[i].path.setScale(scale[0], scale[1], paths[i].segmentIgnoreThreshold);\n }\n };\n CompoundPath.prototype.buildPath = function (ctx, shape) {\n var paths = shape.paths || [];\n for (var i = 0; i < paths.length; i++) {\n paths[i].buildPath(ctx, paths[i].shape, true);\n }\n };\n CompoundPath.prototype.afterBrush = function () {\n var paths = this.shape.paths || [];\n for (var i = 0; i < paths.length; i++) {\n paths[i].pathUpdated();\n }\n };\n CompoundPath.prototype.getBoundingRect = function () {\n this._updatePathDirty.call(this);\n return Path.prototype.getBoundingRect.call(this);\n };\n return CompoundPath;\n}(Path);\nexport default CompoundPath;","var Gradient = function () {\n function Gradient(colorStops) {\n this.colorStops = colorStops || [];\n }\n Gradient.prototype.addColorStop = function (offset, color) {\n this.colorStops.push({\n offset: offset,\n color: color\n });\n };\n return Gradient;\n}();\nexport default Gradient;","import { __extends } from \"tslib\";\nimport Gradient from './Gradient.js';\nvar LinearGradient = function (_super) {\n __extends(LinearGradient, _super);\n function LinearGradient(x, y, x2, y2, colorStops, globalCoord) {\n var _this = _super.call(this, colorStops) || this;\n _this.x = x == null ? 0 : x;\n _this.y = y == null ? 0 : y;\n _this.x2 = x2 == null ? 1 : x2;\n _this.y2 = y2 == null ? 0 : y2;\n _this.type = 'linear';\n _this.global = globalCoord || false;\n return _this;\n }\n return LinearGradient;\n}(Gradient);\nexport default LinearGradient;\n;","import { __extends } from \"tslib\";\nimport Gradient from './Gradient.js';\nvar RadialGradient = function (_super) {\n __extends(RadialGradient, _super);\n function RadialGradient(x, y, r, colorStops, globalCoord) {\n var _this = _super.call(this, colorStops) || this;\n _this.x = x == null ? 0.5 : x;\n _this.y = y == null ? 0.5 : y;\n _this.r = r == null ? 0.5 : r;\n _this.type = 'radial';\n _this.global = globalCoord || false;\n return _this;\n }\n return RadialGradient;\n}(Gradient);\nexport default RadialGradient;","import Point from './Point.js';\nvar extent = [0, 0];\nvar extent2 = [0, 0];\nvar minTv = new Point();\nvar maxTv = new Point();\nvar OrientedBoundingRect = function () {\n function OrientedBoundingRect(rect, transform) {\n this._corners = [];\n this._axes = [];\n this._origin = [0, 0];\n for (var i = 0; i < 4; i++) {\n this._corners[i] = new Point();\n }\n for (var i = 0; i < 2; i++) {\n this._axes[i] = new Point();\n }\n if (rect) {\n this.fromBoundingRect(rect, transform);\n }\n }\n OrientedBoundingRect.prototype.fromBoundingRect = function (rect, transform) {\n var corners = this._corners;\n var axes = this._axes;\n var x = rect.x;\n var y = rect.y;\n var x2 = x + rect.width;\n var y2 = y + rect.height;\n corners[0].set(x, y);\n corners[1].set(x2, y);\n corners[2].set(x2, y2);\n corners[3].set(x, y2);\n if (transform) {\n for (var i = 0; i < 4; i++) {\n corners[i].transform(transform);\n }\n }\n Point.sub(axes[0], corners[1], corners[0]);\n Point.sub(axes[1], corners[3], corners[0]);\n axes[0].normalize();\n axes[1].normalize();\n for (var i = 0; i < 2; i++) {\n this._origin[i] = axes[i].dot(corners[0]);\n }\n };\n OrientedBoundingRect.prototype.intersect = function (other, mtv) {\n var overlapped = true;\n var noMtv = !mtv;\n minTv.set(Infinity, Infinity);\n maxTv.set(0, 0);\n if (!this._intersectCheckOneSide(this, other, minTv, maxTv, noMtv, 1)) {\n overlapped = false;\n if (noMtv) {\n return overlapped;\n }\n }\n if (!this._intersectCheckOneSide(other, this, minTv, maxTv, noMtv, -1)) {\n overlapped = false;\n if (noMtv) {\n return overlapped;\n }\n }\n if (!noMtv) {\n Point.copy(mtv, overlapped ? minTv : maxTv);\n }\n return overlapped;\n };\n OrientedBoundingRect.prototype._intersectCheckOneSide = function (self, other, minTv, maxTv, noMtv, inverse) {\n var overlapped = true;\n for (var i = 0; i < 2; i++) {\n var axis = this._axes[i];\n this._getProjMinMaxOnAxis(i, self._corners, extent);\n this._getProjMinMaxOnAxis(i, other._corners, extent2);\n if (extent[1] < extent2[0] || extent[0] > extent2[1]) {\n overlapped = false;\n if (noMtv) {\n return overlapped;\n }\n var dist0 = Math.abs(extent2[0] - extent[1]);\n var dist1 = Math.abs(extent[0] - extent2[1]);\n if (Math.min(dist0, dist1) > maxTv.len()) {\n if (dist0 < dist1) {\n Point.scale(maxTv, axis, -dist0 * inverse);\n } else {\n Point.scale(maxTv, axis, dist1 * inverse);\n }\n }\n } else if (minTv) {\n var dist0 = Math.abs(extent2[0] - extent[1]);\n var dist1 = Math.abs(extent[0] - extent2[1]);\n if (Math.min(dist0, dist1) < minTv.len()) {\n if (dist0 < dist1) {\n Point.scale(minTv, axis, dist0 * inverse);\n } else {\n Point.scale(minTv, axis, -dist1 * inverse);\n }\n }\n }\n }\n return overlapped;\n };\n OrientedBoundingRect.prototype._getProjMinMaxOnAxis = function (dim, corners, out) {\n var axis = this._axes[dim];\n var origin = this._origin;\n var proj = corners[0].dot(axis) + origin[dim];\n var min = proj;\n var max = proj;\n for (var i = 1; i < corners.length; i++) {\n var proj_1 = corners[i].dot(axis) + origin[dim];\n min = Math.min(proj_1, min);\n max = Math.max(proj_1, max);\n }\n out[0] = min;\n out[1] = max;\n };\n return OrientedBoundingRect;\n}();\nexport default OrientedBoundingRect;","import { __extends } from \"tslib\";\nimport Displayble from './Displayable.js';\nimport BoundingRect from '../core/BoundingRect.js';\nvar m = [];\nvar IncrementalDisplayable = function (_super) {\n __extends(IncrementalDisplayable, _super);\n function IncrementalDisplayable() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.notClear = true;\n _this.incremental = true;\n _this._displayables = [];\n _this._temporaryDisplayables = [];\n _this._cursor = 0;\n return _this;\n }\n IncrementalDisplayable.prototype.traverse = function (cb, context) {\n cb.call(context, this);\n };\n IncrementalDisplayable.prototype.useStyle = function () {\n this.style = {};\n };\n IncrementalDisplayable.prototype.getCursor = function () {\n return this._cursor;\n };\n IncrementalDisplayable.prototype.innerAfterBrush = function () {\n this._cursor = this._displayables.length;\n };\n IncrementalDisplayable.prototype.clearDisplaybles = function () {\n this._displayables = [];\n this._temporaryDisplayables = [];\n this._cursor = 0;\n this.markRedraw();\n this.notClear = false;\n };\n IncrementalDisplayable.prototype.clearTemporalDisplayables = function () {\n this._temporaryDisplayables = [];\n };\n IncrementalDisplayable.prototype.addDisplayable = function (displayable, notPersistent) {\n if (notPersistent) {\n this._temporaryDisplayables.push(displayable);\n } else {\n this._displayables.push(displayable);\n }\n this.markRedraw();\n };\n IncrementalDisplayable.prototype.addDisplayables = function (displayables, notPersistent) {\n notPersistent = notPersistent || false;\n for (var i = 0; i < displayables.length; i++) {\n this.addDisplayable(displayables[i], notPersistent);\n }\n };\n IncrementalDisplayable.prototype.getDisplayables = function () {\n return this._displayables;\n };\n IncrementalDisplayable.prototype.getTemporalDisplayables = function () {\n return this._temporaryDisplayables;\n };\n IncrementalDisplayable.prototype.eachPendingDisplayable = function (cb) {\n for (var i = this._cursor; i < this._displayables.length; i++) {\n cb && cb(this._displayables[i]);\n }\n for (var i = 0; i < this._temporaryDisplayables.length; i++) {\n cb && cb(this._temporaryDisplayables[i]);\n }\n };\n IncrementalDisplayable.prototype.update = function () {\n this.updateTransform();\n for (var i = this._cursor; i < this._displayables.length; i++) {\n var displayable = this._displayables[i];\n displayable.parent = this;\n displayable.update();\n displayable.parent = null;\n }\n for (var i = 0; i < this._temporaryDisplayables.length; i++) {\n var displayable = this._temporaryDisplayables[i];\n displayable.parent = this;\n displayable.update();\n displayable.parent = null;\n }\n };\n IncrementalDisplayable.prototype.getBoundingRect = function () {\n if (!this._rect) {\n var rect = new BoundingRect(Infinity, Infinity, -Infinity, -Infinity);\n for (var i = 0; i < this._displayables.length; i++) {\n var displayable = this._displayables[i];\n var childRect = displayable.getBoundingRect().clone();\n if (displayable.needLocalTransform()) {\n childRect.applyTransform(displayable.getLocalTransform(m));\n }\n rect.union(childRect);\n }\n this._rect = rect;\n }\n return this._rect;\n };\n IncrementalDisplayable.prototype.contain = function (x, y) {\n var localPos = this.transformCoordToLocal(x, y);\n var rect = this.getBoundingRect();\n if (rect.contain(localPos[0], localPos[1])) {\n for (var i = 0; i < this._displayables.length; i++) {\n var displayable = this._displayables[i];\n if (displayable.contain(x, y)) {\n return true;\n }\n }\n }\n return false;\n };\n return IncrementalDisplayable;\n}(Displayble);\nexport default IncrementalDisplayable;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { isFunction, isObject, retrieve2 } from 'zrender/lib/core/util.js';\nimport { makeInner } from '../util/model.js';\n// Stored properties for further transition.\nexport var transitionStore = makeInner();\n/**\n * Return null if animation is disabled.\n */\nexport function getAnimationConfig(animationType, animatableModel, dataIndex,\n// Extra opts can override the option in animatable model.\nextraOpts,\n// TODO It's only for pictorial bar now.\nextraDelayParams) {\n var animationPayload;\n // Check if there is global animation configuration from dataZoom/resize can override the config in option.\n // If animation is enabled. Will use this animation config in payload.\n // If animation is disabled. Just ignore it.\n if (animatableModel && animatableModel.ecModel) {\n var updatePayload = animatableModel.ecModel.getUpdatePayload();\n animationPayload = updatePayload && updatePayload.animation;\n }\n var animationEnabled = animatableModel && animatableModel.isAnimationEnabled();\n var isUpdate = animationType === 'update';\n if (animationEnabled) {\n var duration = void 0;\n var easing = void 0;\n var delay = void 0;\n if (extraOpts) {\n duration = retrieve2(extraOpts.duration, 200);\n easing = retrieve2(extraOpts.easing, 'cubicOut');\n delay = 0;\n } else {\n duration = animatableModel.getShallow(isUpdate ? 'animationDurationUpdate' : 'animationDuration');\n easing = animatableModel.getShallow(isUpdate ? 'animationEasingUpdate' : 'animationEasing');\n delay = animatableModel.getShallow(isUpdate ? 'animationDelayUpdate' : 'animationDelay');\n }\n // animation from payload has highest priority.\n if (animationPayload) {\n animationPayload.duration != null && (duration = animationPayload.duration);\n animationPayload.easing != null && (easing = animationPayload.easing);\n animationPayload.delay != null && (delay = animationPayload.delay);\n }\n if (isFunction(delay)) {\n delay = delay(dataIndex, extraDelayParams);\n }\n if (isFunction(duration)) {\n duration = duration(dataIndex);\n }\n var config = {\n duration: duration || 0,\n delay: delay,\n easing: easing\n };\n return config;\n } else {\n return null;\n }\n}\nfunction animateOrSetProps(animationType, el, props, animatableModel, dataIndex, cb, during) {\n var isFrom = false;\n var removeOpt;\n if (isFunction(dataIndex)) {\n during = cb;\n cb = dataIndex;\n dataIndex = null;\n } else if (isObject(dataIndex)) {\n cb = dataIndex.cb;\n during = dataIndex.during;\n isFrom = dataIndex.isFrom;\n removeOpt = dataIndex.removeOpt;\n dataIndex = dataIndex.dataIndex;\n }\n var isRemove = animationType === 'leave';\n if (!isRemove) {\n // Must stop the remove animation.\n el.stopAnimation('leave');\n }\n var animationConfig = getAnimationConfig(animationType, animatableModel, dataIndex, isRemove ? removeOpt || {} : null, animatableModel && animatableModel.getAnimationDelayParams ? animatableModel.getAnimationDelayParams(el, dataIndex) : null);\n if (animationConfig && animationConfig.duration > 0) {\n var duration = animationConfig.duration;\n var animationDelay = animationConfig.delay;\n var animationEasing = animationConfig.easing;\n var animateConfig = {\n duration: duration,\n delay: animationDelay || 0,\n easing: animationEasing,\n done: cb,\n force: !!cb || !!during,\n // Set to final state in update/init animation.\n // So the post processing based on the path shape can be done correctly.\n setToFinal: !isRemove,\n scope: animationType,\n during: during\n };\n isFrom ? el.animateFrom(props, animateConfig) : el.animateTo(props, animateConfig);\n } else {\n el.stopAnimation();\n // If `isFrom`, the props is the \"from\" props.\n !isFrom && el.attr(props);\n // Call during at least once.\n during && during(1);\n cb && cb();\n }\n}\n/**\n * Update graphic element properties with or without animation according to the\n * configuration in series.\n *\n * Caution: this method will stop previous animation.\n * So do not use this method to one element twice before\n * animation starts, unless you know what you are doing.\n * @example\n * graphic.updateProps(el, {\n * position: [100, 100]\n * }, seriesModel, dataIndex, function () { console.log('Animation done!'); });\n * // Or\n * graphic.updateProps(el, {\n * position: [100, 100]\n * }, seriesModel, function () { console.log('Animation done!'); });\n */\nfunction updateProps(el, props,\n// TODO: TYPE AnimatableModel\nanimatableModel, dataIndex, cb, during) {\n animateOrSetProps('update', el, props, animatableModel, dataIndex, cb, during);\n}\nexport { updateProps };\n/**\n * Init graphic element properties with or without animation according to the\n * configuration in series.\n *\n * Caution: this method will stop previous animation.\n * So do not use this method to one element twice before\n * animation starts, unless you know what you are doing.\n */\nexport function initProps(el, props, animatableModel, dataIndex, cb, during) {\n animateOrSetProps('enter', el, props, animatableModel, dataIndex, cb, during);\n}\n/**\n * If element is removed.\n * It can determine if element is having remove animation.\n */\nexport function isElementRemoved(el) {\n if (!el.__zr) {\n return true;\n }\n for (var i = 0; i < el.animators.length; i++) {\n var animator = el.animators[i];\n if (animator.scope === 'leave') {\n return true;\n }\n }\n return false;\n}\n/**\n * Remove graphic element\n */\nexport function removeElement(el, props, animatableModel, dataIndex, cb, during) {\n // Don't do remove animation twice.\n if (isElementRemoved(el)) {\n return;\n }\n animateOrSetProps('leave', el, props, animatableModel, dataIndex, cb, during);\n}\nfunction fadeOutDisplayable(el, animatableModel, dataIndex, done) {\n el.removeTextContent();\n el.removeTextGuideLine();\n removeElement(el, {\n style: {\n opacity: 0\n }\n }, animatableModel, dataIndex, done);\n}\nexport function removeElementWithFadeOut(el, animatableModel, dataIndex) {\n function doRemove() {\n el.parent && el.parent.remove(el);\n }\n // Hide label and labelLine first\n // TODO Also use fade out animation?\n if (!el.isGroup) {\n fadeOutDisplayable(el, animatableModel, dataIndex, doRemove);\n } else {\n el.traverse(function (disp) {\n if (!disp.isGroup) {\n // Can invoke doRemove multiple times.\n fadeOutDisplayable(disp, animatableModel, dataIndex, doRemove);\n }\n });\n }\n}\n/**\n * Save old style for style transition in universalTransition module.\n * It's used when element will be reused in each render.\n * For chart like map, heatmap, which will always create new element.\n * We don't need to save this because universalTransition can get old style from the old element\n */\nexport function saveOldStyle(el) {\n transitionStore(el).oldStyle = el.style;\n}\nexport function getOldStyle(el) {\n return transitionStore(el).oldStyle;\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport ZRText from 'zrender/lib/graphic/Text.js';\nimport { isFunction, retrieve2, extend, keys, trim } from 'zrender/lib/core/util.js';\nimport { SPECIAL_STATES, DISPLAY_STATES } from '../util/states.js';\nimport { deprecateReplaceLog } from '../util/log.js';\nimport { makeInner, interpolateRawValues } from '../util/model.js';\nimport { initProps, updateProps } from '../util/graphic.js';\nvar EMPTY_OBJ = {};\nexport function setLabelText(label, labelTexts) {\n for (var i = 0; i < SPECIAL_STATES.length; i++) {\n var stateName = SPECIAL_STATES[i];\n var text = labelTexts[stateName];\n var state = label.ensureState(stateName);\n state.style = state.style || {};\n state.style.text = text;\n }\n var oldStates = label.currentStates.slice();\n label.clearStates(true);\n label.setStyle({\n text: labelTexts.normal\n });\n label.useStates(oldStates, true);\n}\nfunction getLabelText(opt, stateModels, interpolatedValue) {\n var labelFetcher = opt.labelFetcher;\n var labelDataIndex = opt.labelDataIndex;\n var labelDimIndex = opt.labelDimIndex;\n var normalModel = stateModels.normal;\n var baseText;\n if (labelFetcher) {\n baseText = labelFetcher.getFormattedLabel(labelDataIndex, 'normal', null, labelDimIndex, normalModel && normalModel.get('formatter'), interpolatedValue != null ? {\n interpolatedValue: interpolatedValue\n } : null);\n }\n if (baseText == null) {\n baseText = isFunction(opt.defaultText) ? opt.defaultText(labelDataIndex, opt, interpolatedValue) : opt.defaultText;\n }\n var statesText = {\n normal: baseText\n };\n for (var i = 0; i < SPECIAL_STATES.length; i++) {\n var stateName = SPECIAL_STATES[i];\n var stateModel = stateModels[stateName];\n statesText[stateName] = retrieve2(labelFetcher ? labelFetcher.getFormattedLabel(labelDataIndex, stateName, null, labelDimIndex, stateModel && stateModel.get('formatter')) : null, baseText);\n }\n return statesText;\n}\nfunction setLabelStyle(targetEl, labelStatesModels, opt, stateSpecified\n// TODO specified position?\n) {\n opt = opt || EMPTY_OBJ;\n var isSetOnText = targetEl instanceof ZRText;\n var needsCreateText = false;\n for (var i = 0; i < DISPLAY_STATES.length; i++) {\n var stateModel = labelStatesModels[DISPLAY_STATES[i]];\n if (stateModel && stateModel.getShallow('show')) {\n needsCreateText = true;\n break;\n }\n }\n var textContent = isSetOnText ? targetEl : targetEl.getTextContent();\n if (needsCreateText) {\n if (!isSetOnText) {\n // Reuse the previous\n if (!textContent) {\n textContent = new ZRText();\n targetEl.setTextContent(textContent);\n }\n // Use same state proxy\n if (targetEl.stateProxy) {\n textContent.stateProxy = targetEl.stateProxy;\n }\n }\n var labelStatesTexts = getLabelText(opt, labelStatesModels);\n var normalModel = labelStatesModels.normal;\n var showNormal = !!normalModel.getShallow('show');\n var normalStyle = createTextStyle(normalModel, stateSpecified && stateSpecified.normal, opt, false, !isSetOnText);\n normalStyle.text = labelStatesTexts.normal;\n if (!isSetOnText) {\n // Always create new\n targetEl.setTextConfig(createTextConfig(normalModel, opt, false));\n }\n for (var i = 0; i < SPECIAL_STATES.length; i++) {\n var stateName = SPECIAL_STATES[i];\n var stateModel = labelStatesModels[stateName];\n if (stateModel) {\n var stateObj = textContent.ensureState(stateName);\n var stateShow = !!retrieve2(stateModel.getShallow('show'), showNormal);\n if (stateShow !== showNormal) {\n stateObj.ignore = !stateShow;\n }\n stateObj.style = createTextStyle(stateModel, stateSpecified && stateSpecified[stateName], opt, true, !isSetOnText);\n stateObj.style.text = labelStatesTexts[stateName];\n if (!isSetOnText) {\n var targetElEmphasisState = targetEl.ensureState(stateName);\n targetElEmphasisState.textConfig = createTextConfig(stateModel, opt, true);\n }\n }\n }\n // PENDING: if there is many requirements that emphasis position\n // need to be different from normal position, we might consider\n // auto silent is those cases.\n textContent.silent = !!normalModel.getShallow('silent');\n // Keep x and y\n if (textContent.style.x != null) {\n normalStyle.x = textContent.style.x;\n }\n if (textContent.style.y != null) {\n normalStyle.y = textContent.style.y;\n }\n textContent.ignore = !showNormal;\n // Always create new style.\n textContent.useStyle(normalStyle);\n textContent.dirty();\n if (opt.enableTextSetter) {\n labelInner(textContent).setLabelText = function (interpolatedValue) {\n var labelStatesTexts = getLabelText(opt, labelStatesModels, interpolatedValue);\n setLabelText(textContent, labelStatesTexts);\n };\n }\n } else if (textContent) {\n // Not display rich text.\n textContent.ignore = true;\n }\n targetEl.dirty();\n}\nexport { setLabelStyle };\nexport function getLabelStatesModels(itemModel, labelName) {\n labelName = labelName || 'label';\n var statesModels = {\n normal: itemModel.getModel(labelName)\n };\n for (var i = 0; i < SPECIAL_STATES.length; i++) {\n var stateName = SPECIAL_STATES[i];\n statesModels[stateName] = itemModel.getModel([stateName, labelName]);\n }\n return statesModels;\n}\n/**\n * Set basic textStyle properties.\n */\nexport function createTextStyle(textStyleModel, specifiedTextStyle,\n// Fixed style in the code. Can't be set by model.\nopt, isNotNormal, isAttached // If text is attached on an element. If so, auto color will handling in zrender.\n) {\n var textStyle = {};\n setTextStyleCommon(textStyle, textStyleModel, opt, isNotNormal, isAttached);\n specifiedTextStyle && extend(textStyle, specifiedTextStyle);\n // textStyle.host && textStyle.host.dirty && textStyle.host.dirty(false);\n return textStyle;\n}\nexport function createTextConfig(textStyleModel, opt, isNotNormal) {\n opt = opt || {};\n var textConfig = {};\n var labelPosition;\n var labelRotate = textStyleModel.getShallow('rotate');\n var labelDistance = retrieve2(textStyleModel.getShallow('distance'), isNotNormal ? null : 5);\n var labelOffset = textStyleModel.getShallow('offset');\n labelPosition = textStyleModel.getShallow('position') || (isNotNormal ? null : 'inside');\n // 'outside' is not a valid zr textPostion value, but used\n // in bar series, and magric type should be considered.\n labelPosition === 'outside' && (labelPosition = opt.defaultOutsidePosition || 'top');\n if (labelPosition != null) {\n textConfig.position = labelPosition;\n }\n if (labelOffset != null) {\n textConfig.offset = labelOffset;\n }\n if (labelRotate != null) {\n labelRotate *= Math.PI / 180;\n textConfig.rotation = labelRotate;\n }\n if (labelDistance != null) {\n textConfig.distance = labelDistance;\n }\n // fill and auto is determined by the color of path fill if it's not specified by developers.\n textConfig.outsideFill = textStyleModel.get('color') === 'inherit' ? opt.inheritColor || null : 'auto';\n return textConfig;\n}\n/**\n * The uniform entry of set text style, that is, retrieve style definitions\n * from `model` and set to `textStyle` object.\n *\n * Never in merge mode, but in overwrite mode, that is, all of the text style\n * properties will be set. (Consider the states of normal and emphasis and\n * default value can be adopted, merge would make the logic too complicated\n * to manage.)\n */\nfunction setTextStyleCommon(textStyle, textStyleModel, opt, isNotNormal, isAttached) {\n // Consider there will be abnormal when merge hover style to normal style if given default value.\n opt = opt || EMPTY_OBJ;\n var ecModel = textStyleModel.ecModel;\n var globalTextStyle = ecModel && ecModel.option.textStyle;\n // Consider case:\n // {\n // data: [{\n // value: 12,\n // label: {\n // rich: {\n // // no 'a' here but using parent 'a'.\n // }\n // }\n // }],\n // rich: {\n // a: { ... }\n // }\n // }\n var richItemNames = getRichItemNames(textStyleModel);\n var richResult;\n if (richItemNames) {\n richResult = {};\n for (var name_1 in richItemNames) {\n if (richItemNames.hasOwnProperty(name_1)) {\n // Cascade is supported in rich.\n var richTextStyle = textStyleModel.getModel(['rich', name_1]);\n // In rich, never `disableBox`.\n // FIXME: consider `label: {formatter: '{a|xx}', color: 'blue', rich: {a: {}}}`,\n // the default color `'blue'` will not be adopted if no color declared in `rich`.\n // That might confuses users. So probably we should put `textStyleModel` as the\n // root ancestor of the `richTextStyle`. But that would be a break change.\n setTokenTextStyle(richResult[name_1] = {}, richTextStyle, globalTextStyle, opt, isNotNormal, isAttached, false, true);\n }\n }\n }\n if (richResult) {\n textStyle.rich = richResult;\n }\n var overflow = textStyleModel.get('overflow');\n if (overflow) {\n textStyle.overflow = overflow;\n }\n var margin = textStyleModel.get('minMargin');\n if (margin != null) {\n textStyle.margin = margin;\n }\n setTokenTextStyle(textStyle, textStyleModel, globalTextStyle, opt, isNotNormal, isAttached, true, false);\n}\n// Consider case:\n// {\n// data: [{\n// value: 12,\n// label: {\n// rich: {\n// // no 'a' here but using parent 'a'.\n// }\n// }\n// }],\n// rich: {\n// a: { ... }\n// }\n// }\n// TODO TextStyleModel\nfunction getRichItemNames(textStyleModel) {\n // Use object to remove duplicated names.\n var richItemNameMap;\n while (textStyleModel && textStyleModel !== textStyleModel.ecModel) {\n var rich = (textStyleModel.option || EMPTY_OBJ).rich;\n if (rich) {\n richItemNameMap = richItemNameMap || {};\n var richKeys = keys(rich);\n for (var i = 0; i < richKeys.length; i++) {\n var richKey = richKeys[i];\n richItemNameMap[richKey] = 1;\n }\n }\n textStyleModel = textStyleModel.parentModel;\n }\n return richItemNameMap;\n}\nvar TEXT_PROPS_WITH_GLOBAL = ['fontStyle', 'fontWeight', 'fontSize', 'fontFamily', 'textShadowColor', 'textShadowBlur', 'textShadowOffsetX', 'textShadowOffsetY'];\nvar TEXT_PROPS_SELF = ['align', 'lineHeight', 'width', 'height', 'tag', 'verticalAlign', 'ellipsis'];\nvar TEXT_PROPS_BOX = ['padding', 'borderWidth', 'borderRadius', 'borderDashOffset', 'backgroundColor', 'borderColor', 'shadowColor', 'shadowBlur', 'shadowOffsetX', 'shadowOffsetY'];\nfunction setTokenTextStyle(textStyle, textStyleModel, globalTextStyle, opt, isNotNormal, isAttached, isBlock, inRich) {\n // In merge mode, default value should not be given.\n globalTextStyle = !isNotNormal && globalTextStyle || EMPTY_OBJ;\n var inheritColor = opt && opt.inheritColor;\n var fillColor = textStyleModel.getShallow('color');\n var strokeColor = textStyleModel.getShallow('textBorderColor');\n var opacity = retrieve2(textStyleModel.getShallow('opacity'), globalTextStyle.opacity);\n if (fillColor === 'inherit' || fillColor === 'auto') {\n if (process.env.NODE_ENV !== 'production') {\n if (fillColor === 'auto') {\n deprecateReplaceLog('color: \\'auto\\'', 'color: \\'inherit\\'');\n }\n }\n if (inheritColor) {\n fillColor = inheritColor;\n } else {\n fillColor = null;\n }\n }\n if (strokeColor === 'inherit' || strokeColor === 'auto') {\n if (process.env.NODE_ENV !== 'production') {\n if (strokeColor === 'auto') {\n deprecateReplaceLog('color: \\'auto\\'', 'color: \\'inherit\\'');\n }\n }\n if (inheritColor) {\n strokeColor = inheritColor;\n } else {\n strokeColor = null;\n }\n }\n if (!isAttached) {\n // Only use default global textStyle.color if text is individual.\n // Otherwise it will use the strategy of attached text color because text may be on a path.\n fillColor = fillColor || globalTextStyle.color;\n strokeColor = strokeColor || globalTextStyle.textBorderColor;\n }\n if (fillColor != null) {\n textStyle.fill = fillColor;\n }\n if (strokeColor != null) {\n textStyle.stroke = strokeColor;\n }\n var textBorderWidth = retrieve2(textStyleModel.getShallow('textBorderWidth'), globalTextStyle.textBorderWidth);\n if (textBorderWidth != null) {\n textStyle.lineWidth = textBorderWidth;\n }\n var textBorderType = retrieve2(textStyleModel.getShallow('textBorderType'), globalTextStyle.textBorderType);\n if (textBorderType != null) {\n textStyle.lineDash = textBorderType;\n }\n var textBorderDashOffset = retrieve2(textStyleModel.getShallow('textBorderDashOffset'), globalTextStyle.textBorderDashOffset);\n if (textBorderDashOffset != null) {\n textStyle.lineDashOffset = textBorderDashOffset;\n }\n if (!isNotNormal && opacity == null && !inRich) {\n opacity = opt && opt.defaultOpacity;\n }\n if (opacity != null) {\n textStyle.opacity = opacity;\n }\n // TODO\n if (!isNotNormal && !isAttached) {\n // Set default finally.\n if (textStyle.fill == null && opt.inheritColor) {\n textStyle.fill = opt.inheritColor;\n }\n }\n // Do not use `getFont` here, because merge should be supported, where\n // part of these properties may be changed in emphasis style, and the\n // others should remain their original value got from normal style.\n for (var i = 0; i < TEXT_PROPS_WITH_GLOBAL.length; i++) {\n var key = TEXT_PROPS_WITH_GLOBAL[i];\n var val = retrieve2(textStyleModel.getShallow(key), globalTextStyle[key]);\n if (val != null) {\n textStyle[key] = val;\n }\n }\n for (var i = 0; i < TEXT_PROPS_SELF.length; i++) {\n var key = TEXT_PROPS_SELF[i];\n var val = textStyleModel.getShallow(key);\n if (val != null) {\n textStyle[key] = val;\n }\n }\n if (textStyle.verticalAlign == null) {\n var baseline = textStyleModel.getShallow('baseline');\n if (baseline != null) {\n textStyle.verticalAlign = baseline;\n }\n }\n if (!isBlock || !opt.disableBox) {\n for (var i = 0; i < TEXT_PROPS_BOX.length; i++) {\n var key = TEXT_PROPS_BOX[i];\n var val = textStyleModel.getShallow(key);\n if (val != null) {\n textStyle[key] = val;\n }\n }\n var borderType = textStyleModel.getShallow('borderType');\n if (borderType != null) {\n textStyle.borderDash = borderType;\n }\n if ((textStyle.backgroundColor === 'auto' || textStyle.backgroundColor === 'inherit') && inheritColor) {\n if (process.env.NODE_ENV !== 'production') {\n if (textStyle.backgroundColor === 'auto') {\n deprecateReplaceLog('backgroundColor: \\'auto\\'', 'backgroundColor: \\'inherit\\'');\n }\n }\n textStyle.backgroundColor = inheritColor;\n }\n if ((textStyle.borderColor === 'auto' || textStyle.borderColor === 'inherit') && inheritColor) {\n if (process.env.NODE_ENV !== 'production') {\n if (textStyle.borderColor === 'auto') {\n deprecateReplaceLog('borderColor: \\'auto\\'', 'borderColor: \\'inherit\\'');\n }\n }\n textStyle.borderColor = inheritColor;\n }\n }\n}\nexport function getFont(opt, ecModel) {\n var gTextStyleModel = ecModel && ecModel.getModel('textStyle');\n return trim([\n // FIXME in node-canvas fontWeight is before fontStyle\n opt.fontStyle || gTextStyleModel && gTextStyleModel.getShallow('fontStyle') || '', opt.fontWeight || gTextStyleModel && gTextStyleModel.getShallow('fontWeight') || '', (opt.fontSize || gTextStyleModel && gTextStyleModel.getShallow('fontSize') || 12) + 'px', opt.fontFamily || gTextStyleModel && gTextStyleModel.getShallow('fontFamily') || 'sans-serif'].join(' '));\n}\nexport var labelInner = makeInner();\nexport function setLabelValueAnimation(label, labelStatesModels, value, getDefaultText) {\n if (!label) {\n return;\n }\n var obj = labelInner(label);\n obj.prevValue = obj.value;\n obj.value = value;\n var normalLabelModel = labelStatesModels.normal;\n obj.valueAnimation = normalLabelModel.get('valueAnimation');\n if (obj.valueAnimation) {\n obj.precision = normalLabelModel.get('precision');\n obj.defaultInterpolatedText = getDefaultText;\n obj.statesModels = labelStatesModels;\n }\n}\nexport function animateLabelValue(textEl, dataIndex, data, animatableModel, labelFetcher) {\n var labelInnerStore = labelInner(textEl);\n if (!labelInnerStore.valueAnimation || labelInnerStore.prevValue === labelInnerStore.value) {\n // Value not changed, no new label animation\n return;\n }\n var defaultInterpolatedText = labelInnerStore.defaultInterpolatedText;\n // Consider the case that being animating, do not use the `obj.value`,\n // Otherwise it will jump to the `obj.value` when this new animation started.\n var currValue = retrieve2(labelInnerStore.interpolatedValue, labelInnerStore.prevValue);\n var targetValue = labelInnerStore.value;\n function during(percent) {\n var interpolated = interpolateRawValues(data, labelInnerStore.precision, currValue, targetValue, percent);\n labelInnerStore.interpolatedValue = percent === 1 ? null : interpolated;\n var labelText = getLabelText({\n labelDataIndex: dataIndex,\n labelFetcher: labelFetcher,\n defaultText: defaultInterpolatedText ? defaultInterpolatedText(interpolated) : interpolated + ''\n }, labelInnerStore.statesModels, interpolated);\n setLabelText(textEl, labelText);\n }\n textEl.percent = 0;\n (labelInnerStore.prevValue == null ? initProps : updateProps)(textEl, {\n // percent is used to prevent animation from being aborted #15916\n percent: 1\n }, animatableModel, dataIndex, null, during);\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { getFont } from '../../label/labelStyle.js';\nimport ZRText from 'zrender/lib/graphic/Text.js';\nvar PATH_COLOR = ['textStyle', 'color'];\nvar textStyleParams = ['fontStyle', 'fontWeight', 'fontSize', 'fontFamily', 'padding', 'lineHeight', 'rich', 'width', 'height', 'overflow'];\n// TODO Performance improvement?\nvar tmpText = new ZRText();\nvar TextStyleMixin = /** @class */function () {\n function TextStyleMixin() {}\n /**\n * Get color property or get color from option.textStyle.color\n */\n // TODO Callback\n TextStyleMixin.prototype.getTextColor = function (isEmphasis) {\n var ecModel = this.ecModel;\n return this.getShallow('color') || (!isEmphasis && ecModel ? ecModel.get(PATH_COLOR) : null);\n };\n /**\n * Create font string from fontStyle, fontWeight, fontSize, fontFamily\n * @return {string}\n */\n TextStyleMixin.prototype.getFont = function () {\n return getFont({\n fontStyle: this.getShallow('fontStyle'),\n fontWeight: this.getShallow('fontWeight'),\n fontSize: this.getShallow('fontSize'),\n fontFamily: this.getShallow('fontFamily')\n }, this.ecModel);\n };\n TextStyleMixin.prototype.getTextRect = function (text) {\n var style = {\n text: text,\n verticalAlign: this.getShallow('verticalAlign') || this.getShallow('baseline')\n };\n for (var i = 0; i < textStyleParams.length; i++) {\n style[textStyleParams[i]] = this.getShallow(textStyleParams[i]);\n }\n tmpText.useStyle(style);\n tmpText.update();\n return tmpText.getBoundingRect();\n };\n return TextStyleMixin;\n}();\n;\nexport default TextStyleMixin;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport makeStyleMapper from './makeStyleMapper.js';\nexport var LINE_STYLE_KEY_MAP = [['lineWidth', 'width'], ['stroke', 'color'], ['opacity'], ['shadowBlur'], ['shadowOffsetX'], ['shadowOffsetY'], ['shadowColor'], ['lineDash', 'type'], ['lineDashOffset', 'dashOffset'], ['lineCap', 'cap'], ['lineJoin', 'join'], ['miterLimit']\n// Option decal is in `DecalObject` but style.decal is in `PatternObject`.\n// So do not transfer decal directly.\n];\nvar getLineStyle = makeStyleMapper(LINE_STYLE_KEY_MAP);\nvar LineStyleMixin = /** @class */function () {\n function LineStyleMixin() {}\n LineStyleMixin.prototype.getLineStyle = function (excludes) {\n return getLineStyle(this, excludes);\n };\n return LineStyleMixin;\n}();\n;\nexport { LineStyleMixin };","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport makeStyleMapper from './makeStyleMapper.js';\nexport var ITEM_STYLE_KEY_MAP = [['fill', 'color'], ['stroke', 'borderColor'], ['lineWidth', 'borderWidth'], ['opacity'], ['shadowBlur'], ['shadowOffsetX'], ['shadowOffsetY'], ['shadowColor'], ['lineDash', 'borderType'], ['lineDashOffset', 'borderDashOffset'], ['lineCap', 'borderCap'], ['lineJoin', 'borderJoin'], ['miterLimit', 'borderMiterLimit']\n// Option decal is in `DecalObject` but style.decal is in `PatternObject`.\n// So do not transfer decal directly.\n];\nvar getItemStyle = makeStyleMapper(ITEM_STYLE_KEY_MAP);\nvar ItemStyleMixin = /** @class */function () {\n function ItemStyleMixin() {}\n ItemStyleMixin.prototype.getItemStyle = function (excludes, includes) {\n return getItemStyle(this, excludes, includes);\n };\n return ItemStyleMixin;\n}();\nexport { ItemStyleMixin };","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport env from 'zrender/lib/core/env.js';\nimport { enableClassExtend, enableClassCheck } from '../util/clazz.js';\nimport { AreaStyleMixin } from './mixin/areaStyle.js';\nimport TextStyleMixin from './mixin/textStyle.js';\nimport { LineStyleMixin } from './mixin/lineStyle.js';\nimport { ItemStyleMixin } from './mixin/itemStyle.js';\nimport { mixin, clone, merge } from 'zrender/lib/core/util.js';\nvar Model = /** @class */function () {\n function Model(option, parentModel, ecModel) {\n this.parentModel = parentModel;\n this.ecModel = ecModel;\n this.option = option;\n // Simple optimization\n // if (this.init) {\n // if (arguments.length <= 4) {\n // this.init(option, parentModel, ecModel, extraOpt);\n // }\n // else {\n // this.init.apply(this, arguments);\n // }\n // }\n }\n Model.prototype.init = function (option, parentModel, ecModel) {\n var rest = [];\n for (var _i = 3; _i < arguments.length; _i++) {\n rest[_i - 3] = arguments[_i];\n }\n };\n /**\n * Merge the input option to me.\n */\n Model.prototype.mergeOption = function (option, ecModel) {\n merge(this.option, option, true);\n };\n // `path` can be 'a.b.c', so the return value type have to be `ModelOption`\n // TODO: TYPE strict key check?\n // get(path: string | string[], ignoreParent?: boolean): ModelOption;\n Model.prototype.get = function (path, ignoreParent) {\n if (path == null) {\n return this.option;\n }\n return this._doGet(this.parsePath(path), !ignoreParent && this.parentModel);\n };\n Model.prototype.getShallow = function (key, ignoreParent) {\n var option = this.option;\n var val = option == null ? option : option[key];\n if (val == null && !ignoreParent) {\n var parentModel = this.parentModel;\n if (parentModel) {\n // FIXME:TS do not know how to make it works\n val = parentModel.getShallow(key);\n }\n }\n return val;\n };\n // `path` can be 'a.b.c', so the return value type have to be `Model`\n // getModel(path: string | string[], parentModel?: Model): Model;\n // TODO 'a.b.c' is deprecated\n Model.prototype.getModel = function (path, parentModel) {\n var hasPath = path != null;\n var pathFinal = hasPath ? this.parsePath(path) : null;\n var obj = hasPath ? this._doGet(pathFinal) : this.option;\n parentModel = parentModel || this.parentModel && this.parentModel.getModel(this.resolveParentPath(pathFinal));\n return new Model(obj, parentModel, this.ecModel);\n };\n /**\n * If model has option\n */\n Model.prototype.isEmpty = function () {\n return this.option == null;\n };\n Model.prototype.restoreData = function () {};\n // Pending\n Model.prototype.clone = function () {\n var Ctor = this.constructor;\n return new Ctor(clone(this.option));\n };\n // setReadOnly(properties): void {\n // clazzUtil.setReadOnly(this, properties);\n // }\n // If path is null/undefined, return null/undefined.\n Model.prototype.parsePath = function (path) {\n if (typeof path === 'string') {\n return path.split('.');\n }\n return path;\n };\n // Resolve path for parent. Perhaps useful when parent use a different property.\n // Default to be a identity resolver.\n // Can be modified to a different resolver.\n Model.prototype.resolveParentPath = function (path) {\n return path;\n };\n // FIXME:TS check whether put this method here\n Model.prototype.isAnimationEnabled = function () {\n if (!env.node && this.option) {\n if (this.option.animation != null) {\n return !!this.option.animation;\n } else if (this.parentModel) {\n return this.parentModel.isAnimationEnabled();\n }\n }\n };\n Model.prototype._doGet = function (pathArr, parentModel) {\n var obj = this.option;\n if (!pathArr) {\n return obj;\n }\n for (var i = 0; i < pathArr.length; i++) {\n // Ignore empty\n if (!pathArr[i]) {\n continue;\n }\n // obj could be number/string/... (like 0)\n obj = obj && typeof obj === 'object' ? obj[pathArr[i]] : null;\n if (obj == null) {\n break;\n }\n }\n if (obj == null && parentModel) {\n obj = parentModel._doGet(this.resolveParentPath(pathArr), parentModel.parentModel);\n }\n return obj;\n };\n return Model;\n}();\n;\n// Enable Model.extend.\nenableClassExtend(Model);\nenableClassCheck(Model);\nmixin(Model, LineStyleMixin);\nmixin(Model, ItemStyleMixin);\nmixin(Model, AreaStyleMixin);\nmixin(Model, TextStyleMixin);\nexport default Model;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { parseClassType } from './clazz.js';\nimport { makePrintable } from './log.js';\n// A random offset\nvar base = Math.round(Math.random() * 10);\n/**\n * @public\n * @param {string} type\n * @return {string}\n */\nexport function getUID(type) {\n // Considering the case of crossing js context,\n // use Math.random to make id as unique as possible.\n return [type || '', base++].join('_');\n}\n/**\n * Implements `SubTypeDefaulterManager` for `target`.\n */\nexport function enableSubTypeDefaulter(target) {\n var subTypeDefaulters = {};\n target.registerSubTypeDefaulter = function (componentType, defaulter) {\n var componentTypeInfo = parseClassType(componentType);\n subTypeDefaulters[componentTypeInfo.main] = defaulter;\n };\n target.determineSubType = function (componentType, option) {\n var type = option.type;\n if (!type) {\n var componentTypeMain = parseClassType(componentType).main;\n if (target.hasSubTypes(componentType) && subTypeDefaulters[componentTypeMain]) {\n type = subTypeDefaulters[componentTypeMain](option);\n }\n }\n return type;\n };\n}\n/**\n * Implements `TopologicalTravelable` for `entity`.\n *\n * Topological travel on Activity Network (Activity On Vertices).\n * Dependencies is defined in Model.prototype.dependencies, like ['xAxis', 'yAxis'].\n * If 'xAxis' or 'yAxis' is absent in componentTypeList, just ignore it in topology.\n * If there is circular dependencey, Error will be thrown.\n */\nexport function enableTopologicalTravel(entity, dependencyGetter) {\n /**\n * @param targetNameList Target Component type list.\n * Can be ['aa', 'bb', 'aa.xx']\n * @param fullNameList By which we can build dependency graph.\n * @param callback Params: componentType, dependencies.\n * @param context Scope of callback.\n */\n entity.topologicalTravel = function (targetNameList, fullNameList, callback, context) {\n if (!targetNameList.length) {\n return;\n }\n var result = makeDepndencyGraph(fullNameList);\n var graph = result.graph;\n var noEntryList = result.noEntryList;\n var targetNameSet = {};\n zrUtil.each(targetNameList, function (name) {\n targetNameSet[name] = true;\n });\n while (noEntryList.length) {\n var currComponentType = noEntryList.pop();\n var currVertex = graph[currComponentType];\n var isInTargetNameSet = !!targetNameSet[currComponentType];\n if (isInTargetNameSet) {\n callback.call(context, currComponentType, currVertex.originalDeps.slice());\n delete targetNameSet[currComponentType];\n }\n zrUtil.each(currVertex.successor, isInTargetNameSet ? removeEdgeAndAdd : removeEdge);\n }\n zrUtil.each(targetNameSet, function () {\n var errMsg = '';\n if (process.env.NODE_ENV !== 'production') {\n errMsg = makePrintable('Circular dependency may exists: ', targetNameSet, targetNameList, fullNameList);\n }\n throw new Error(errMsg);\n });\n function removeEdge(succComponentType) {\n graph[succComponentType].entryCount--;\n if (graph[succComponentType].entryCount === 0) {\n noEntryList.push(succComponentType);\n }\n }\n // Consider this case: legend depends on series, and we call\n // chart.setOption({series: [...]}), where only series is in option.\n // If we do not have 'removeEdgeAndAdd', legendModel.mergeOption will\n // not be called, but only sereis.mergeOption is called. Thus legend\n // have no chance to update its local record about series (like which\n // name of series is available in legend).\n function removeEdgeAndAdd(succComponentType) {\n targetNameSet[succComponentType] = true;\n removeEdge(succComponentType);\n }\n };\n function makeDepndencyGraph(fullNameList) {\n var graph = {};\n var noEntryList = [];\n zrUtil.each(fullNameList, function (name) {\n var thisItem = createDependencyGraphItem(graph, name);\n var originalDeps = thisItem.originalDeps = dependencyGetter(name);\n var availableDeps = getAvailableDependencies(originalDeps, fullNameList);\n thisItem.entryCount = availableDeps.length;\n if (thisItem.entryCount === 0) {\n noEntryList.push(name);\n }\n zrUtil.each(availableDeps, function (dependentName) {\n if (zrUtil.indexOf(thisItem.predecessor, dependentName) < 0) {\n thisItem.predecessor.push(dependentName);\n }\n var thatItem = createDependencyGraphItem(graph, dependentName);\n if (zrUtil.indexOf(thatItem.successor, dependentName) < 0) {\n thatItem.successor.push(name);\n }\n });\n });\n return {\n graph: graph,\n noEntryList: noEntryList\n };\n }\n function createDependencyGraphItem(graph, name) {\n if (!graph[name]) {\n graph[name] = {\n predecessor: [],\n successor: []\n };\n }\n return graph[name];\n }\n function getAvailableDependencies(originalDeps, fullNameList) {\n var availableDeps = [];\n zrUtil.each(originalDeps, function (dep) {\n zrUtil.indexOf(fullNameList, dep) >= 0 && availableDeps.push(dep);\n });\n return availableDeps;\n }\n}\nexport function inheritDefaultOption(superOption, subOption) {\n // See also `model/Component.ts#getDefaultOption`\n return zrUtil.merge(zrUtil.merge({}, superOption, true), subOption, true);\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n/**\n * Language: English.\n */\nexport default {\n time: {\n month: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],\n monthAbbr: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],\n dayOfWeek: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\n dayOfWeekAbbr: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']\n },\n legend: {\n selector: {\n all: 'All',\n inverse: 'Inv'\n }\n },\n toolbox: {\n brush: {\n title: {\n rect: 'Box Select',\n polygon: 'Lasso Select',\n lineX: 'Horizontally Select',\n lineY: 'Vertically Select',\n keep: 'Keep Selections',\n clear: 'Clear Selections'\n }\n },\n dataView: {\n title: 'Data View',\n lang: ['Data View', 'Close', 'Refresh']\n },\n dataZoom: {\n title: {\n zoom: 'Zoom',\n back: 'Zoom Reset'\n }\n },\n magicType: {\n title: {\n line: 'Switch to Line Chart',\n bar: 'Switch to Bar Chart',\n stack: 'Stack',\n tiled: 'Tile'\n }\n },\n restore: {\n title: 'Restore'\n },\n saveAsImage: {\n title: 'Save as Image',\n lang: ['Right Click to Save Image']\n }\n },\n series: {\n typeNames: {\n pie: 'Pie chart',\n bar: 'Bar chart',\n line: 'Line chart',\n scatter: 'Scatter plot',\n effectScatter: 'Ripple scatter plot',\n radar: 'Radar chart',\n tree: 'Tree',\n treemap: 'Treemap',\n boxplot: 'Boxplot',\n candlestick: 'Candlestick',\n k: 'K line chart',\n heatmap: 'Heat map',\n map: 'Map',\n parallel: 'Parallel coordinate map',\n lines: 'Line graph',\n graph: 'Relationship graph',\n sankey: 'Sankey diagram',\n funnel: 'Funnel chart',\n gauge: 'Gauge',\n pictorialBar: 'Pictorial bar',\n themeRiver: 'Theme River Map',\n sunburst: 'Sunburst',\n custom: 'Custom chart',\n chart: 'Chart'\n }\n },\n aria: {\n general: {\n withTitle: 'This is a chart about \"{title}\"',\n withoutTitle: 'This is a chart'\n },\n series: {\n single: {\n prefix: '',\n withName: ' with type {seriesType} named {seriesName}.',\n withoutName: ' with type {seriesType}.'\n },\n multiple: {\n prefix: '. It consists of {seriesCount} series count.',\n withName: ' The {seriesId} series is a {seriesType} representing {seriesName}.',\n withoutName: ' The {seriesId} series is a {seriesType}.',\n separator: {\n middle: '',\n end: ''\n }\n }\n },\n data: {\n allData: 'The data is as follows: ',\n partialData: 'The first {displayCnt} items are: ',\n withName: 'the data for {name} is {value}',\n withoutName: '{value}',\n separator: {\n middle: ', ',\n end: '. '\n }\n }\n }\n};","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\nexport default {\n time: {\n month: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],\n monthAbbr: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],\n dayOfWeek: ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],\n dayOfWeekAbbr: ['日', '一', '二', '三', '四', '五', '六']\n },\n legend: {\n selector: {\n all: '全选',\n inverse: '反选'\n }\n },\n toolbox: {\n brush: {\n title: {\n rect: '矩形选择',\n polygon: '圈选',\n lineX: '横向选择',\n lineY: '纵向选择',\n keep: '保持选择',\n clear: '清除选择'\n }\n },\n dataView: {\n title: '数据视图',\n lang: ['数据视图', '关闭', '刷新']\n },\n dataZoom: {\n title: {\n zoom: '区域缩放',\n back: '区域缩放还原'\n }\n },\n magicType: {\n title: {\n line: '切换为折线图',\n bar: '切换为柱状图',\n stack: '切换为堆叠',\n tiled: '切换为平铺'\n }\n },\n restore: {\n title: '还原'\n },\n saveAsImage: {\n title: '保存为图片',\n lang: ['右键另存为图片']\n }\n },\n series: {\n typeNames: {\n pie: '饼图',\n bar: '柱状图',\n line: '折线图',\n scatter: '散点图',\n effectScatter: '涟漪散点图',\n radar: '雷达图',\n tree: '树图',\n treemap: '矩形树图',\n boxplot: '箱型图',\n candlestick: 'K线图',\n k: 'K线图',\n heatmap: '热力图',\n map: '地图',\n parallel: '平行坐标图',\n lines: '线图',\n graph: '关系图',\n sankey: '桑基图',\n funnel: '漏斗图',\n gauge: '仪表盘图',\n pictorialBar: '象形柱图',\n themeRiver: '主题河流图',\n sunburst: '旭日图',\n custom: '自定义图表',\n chart: '图表'\n }\n },\n aria: {\n general: {\n withTitle: '这是一个关于“{title}”的图表。',\n withoutTitle: '这是一个图表,'\n },\n series: {\n single: {\n prefix: '',\n withName: '图表类型是{seriesType},表示{seriesName}。',\n withoutName: '图表类型是{seriesType}。'\n },\n multiple: {\n prefix: '它由{seriesCount}个图表系列组成。',\n withName: '第{seriesId}个系列是一个表示{seriesName}的{seriesType},',\n withoutName: '第{seriesId}个系列是一个{seriesType},',\n separator: {\n middle: ';',\n end: '。'\n }\n }\n },\n data: {\n allData: '其数据是——',\n partialData: '其中,前{displayCnt}项是——',\n withName: '{name}的数据是{value}',\n withoutName: '{value}',\n separator: {\n middle: ',',\n end: ''\n }\n }\n }\n};","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport Model from '../model/Model.js';\nimport env from 'zrender/lib/core/env.js';\n// default import ZH and EN lang\nimport langEN from '../i18n/langEN.js';\nimport langZH from '../i18n/langZH.js';\nimport { isString, clone, merge } from 'zrender/lib/core/util.js';\nvar LOCALE_ZH = 'ZH';\nvar LOCALE_EN = 'EN';\nvar DEFAULT_LOCALE = LOCALE_EN;\nvar localeStorage = {};\nvar localeModels = {};\nexport var SYSTEM_LANG = !env.domSupported ? DEFAULT_LOCALE : function () {\n var langStr = (/* eslint-disable-next-line */\n document.documentElement.lang || navigator.language || navigator.browserLanguage || DEFAULT_LOCALE).toUpperCase();\n return langStr.indexOf(LOCALE_ZH) > -1 ? LOCALE_ZH : DEFAULT_LOCALE;\n}();\nexport function registerLocale(locale, localeObj) {\n locale = locale.toUpperCase();\n localeModels[locale] = new Model(localeObj);\n localeStorage[locale] = localeObj;\n}\n// export function getLocale(locale: string) {\n// return localeStorage[locale];\n// }\nexport function createLocaleObject(locale) {\n if (isString(locale)) {\n var localeObj = localeStorage[locale.toUpperCase()] || {};\n if (locale === LOCALE_ZH || locale === LOCALE_EN) {\n return clone(localeObj);\n } else {\n return merge(clone(localeObj), clone(localeStorage[DEFAULT_LOCALE]), false);\n }\n } else {\n return merge(clone(locale), clone(localeStorage[DEFAULT_LOCALE]), false);\n }\n}\nexport function getLocaleModel(lang) {\n return localeModels[lang];\n}\nexport function getDefaultLocaleModel() {\n return localeModels[DEFAULT_LOCALE];\n}\n// Default locale\nregisterLocale(LOCALE_EN, langEN);\nregisterLocale(LOCALE_ZH, langZH);","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as numberUtil from './number.js';\nimport { getDefaultLocaleModel, getLocaleModel, SYSTEM_LANG } from '../core/locale.js';\nimport Model from '../model/Model.js';\nexport var ONE_SECOND = 1000;\nexport var ONE_MINUTE = ONE_SECOND * 60;\nexport var ONE_HOUR = ONE_MINUTE * 60;\nexport var ONE_DAY = ONE_HOUR * 24;\nexport var ONE_YEAR = ONE_DAY * 365;\nexport var defaultLeveledFormatter = {\n year: '{yyyy}',\n month: '{MMM}',\n day: '{d}',\n hour: '{HH}:{mm}',\n minute: '{HH}:{mm}',\n second: '{HH}:{mm}:{ss}',\n millisecond: '{HH}:{mm}:{ss} {SSS}',\n none: '{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}'\n};\nvar fullDayFormatter = '{yyyy}-{MM}-{dd}';\nexport var fullLeveledFormatter = {\n year: '{yyyy}',\n month: '{yyyy}-{MM}',\n day: fullDayFormatter,\n hour: fullDayFormatter + ' ' + defaultLeveledFormatter.hour,\n minute: fullDayFormatter + ' ' + defaultLeveledFormatter.minute,\n second: fullDayFormatter + ' ' + defaultLeveledFormatter.second,\n millisecond: defaultLeveledFormatter.none\n};\nexport var primaryTimeUnits = ['year', 'month', 'day', 'hour', 'minute', 'second', 'millisecond'];\nexport var timeUnits = ['year', 'half-year', 'quarter', 'month', 'week', 'half-week', 'day', 'half-day', 'quarter-day', 'hour', 'minute', 'second', 'millisecond'];\nexport function pad(str, len) {\n str += '';\n return '0000'.substr(0, len - str.length) + str;\n}\nexport function getPrimaryTimeUnit(timeUnit) {\n switch (timeUnit) {\n case 'half-year':\n case 'quarter':\n return 'month';\n case 'week':\n case 'half-week':\n return 'day';\n case 'half-day':\n case 'quarter-day':\n return 'hour';\n default:\n // year, minutes, second, milliseconds\n return timeUnit;\n }\n}\nexport function isPrimaryTimeUnit(timeUnit) {\n return timeUnit === getPrimaryTimeUnit(timeUnit);\n}\nexport function getDefaultFormatPrecisionOfInterval(timeUnit) {\n switch (timeUnit) {\n case 'year':\n case 'month':\n return 'day';\n case 'millisecond':\n return 'millisecond';\n default:\n // Also for day, hour, minute, second\n return 'second';\n }\n}\nexport function format(\n// Note: The result based on `isUTC` are totally different, which can not be just simply\n// substituted by the result without `isUTC`. So we make the param `isUTC` mandatory.\ntime, template, isUTC, lang) {\n var date = numberUtil.parseDate(time);\n var y = date[fullYearGetterName(isUTC)]();\n var M = date[monthGetterName(isUTC)]() + 1;\n var q = Math.floor((M - 1) / 3) + 1;\n var d = date[dateGetterName(isUTC)]();\n var e = date['get' + (isUTC ? 'UTC' : '') + 'Day']();\n var H = date[hoursGetterName(isUTC)]();\n var h = (H - 1) % 12 + 1;\n var m = date[minutesGetterName(isUTC)]();\n var s = date[secondsGetterName(isUTC)]();\n var S = date[millisecondsGetterName(isUTC)]();\n var a = H >= 12 ? 'pm' : 'am';\n var A = a.toUpperCase();\n var localeModel = lang instanceof Model ? lang : getLocaleModel(lang || SYSTEM_LANG) || getDefaultLocaleModel();\n var timeModel = localeModel.getModel('time');\n var month = timeModel.get('month');\n var monthAbbr = timeModel.get('monthAbbr');\n var dayOfWeek = timeModel.get('dayOfWeek');\n var dayOfWeekAbbr = timeModel.get('dayOfWeekAbbr');\n return (template || '').replace(/{a}/g, a + '').replace(/{A}/g, A + '').replace(/{yyyy}/g, y + '').replace(/{yy}/g, pad(y % 100 + '', 2)).replace(/{Q}/g, q + '').replace(/{MMMM}/g, month[M - 1]).replace(/{MMM}/g, monthAbbr[M - 1]).replace(/{MM}/g, pad(M, 2)).replace(/{M}/g, M + '').replace(/{dd}/g, pad(d, 2)).replace(/{d}/g, d + '').replace(/{eeee}/g, dayOfWeek[e]).replace(/{ee}/g, dayOfWeekAbbr[e]).replace(/{e}/g, e + '').replace(/{HH}/g, pad(H, 2)).replace(/{H}/g, H + '').replace(/{hh}/g, pad(h + '', 2)).replace(/{h}/g, h + '').replace(/{mm}/g, pad(m, 2)).replace(/{m}/g, m + '').replace(/{ss}/g, pad(s, 2)).replace(/{s}/g, s + '').replace(/{SSS}/g, pad(S, 3)).replace(/{S}/g, S + '');\n}\nexport function leveledFormat(tick, idx, formatter, lang, isUTC) {\n var template = null;\n if (zrUtil.isString(formatter)) {\n // Single formatter for all units at all levels\n template = formatter;\n } else if (zrUtil.isFunction(formatter)) {\n // Callback formatter\n template = formatter(tick.value, idx, {\n level: tick.level\n });\n } else {\n var defaults = zrUtil.extend({}, defaultLeveledFormatter);\n if (tick.level > 0) {\n for (var i = 0; i < primaryTimeUnits.length; ++i) {\n defaults[primaryTimeUnits[i]] = \"{primary|\" + defaults[primaryTimeUnits[i]] + \"}\";\n }\n }\n var mergedFormatter = formatter ? formatter.inherit === false ? formatter // Use formatter with bigger units\n : zrUtil.defaults(formatter, defaults) : defaults;\n var unit = getUnitFromValue(tick.value, isUTC);\n if (mergedFormatter[unit]) {\n template = mergedFormatter[unit];\n } else if (mergedFormatter.inherit) {\n // Unit formatter is not defined and should inherit from bigger units\n var targetId = timeUnits.indexOf(unit);\n for (var i = targetId - 1; i >= 0; --i) {\n if (mergedFormatter[unit]) {\n template = mergedFormatter[unit];\n break;\n }\n }\n template = template || defaults.none;\n }\n if (zrUtil.isArray(template)) {\n var levelId = tick.level == null ? 0 : tick.level >= 0 ? tick.level : template.length + tick.level;\n levelId = Math.min(levelId, template.length - 1);\n template = template[levelId];\n }\n }\n return format(new Date(tick.value), template, isUTC, lang);\n}\nexport function getUnitFromValue(value, isUTC) {\n var date = numberUtil.parseDate(value);\n var M = date[monthGetterName(isUTC)]() + 1;\n var d = date[dateGetterName(isUTC)]();\n var h = date[hoursGetterName(isUTC)]();\n var m = date[minutesGetterName(isUTC)]();\n var s = date[secondsGetterName(isUTC)]();\n var S = date[millisecondsGetterName(isUTC)]();\n var isSecond = S === 0;\n var isMinute = isSecond && s === 0;\n var isHour = isMinute && m === 0;\n var isDay = isHour && h === 0;\n var isMonth = isDay && d === 1;\n var isYear = isMonth && M === 1;\n if (isYear) {\n return 'year';\n } else if (isMonth) {\n return 'month';\n } else if (isDay) {\n return 'day';\n } else if (isHour) {\n return 'hour';\n } else if (isMinute) {\n return 'minute';\n } else if (isSecond) {\n return 'second';\n } else {\n return 'millisecond';\n }\n}\nexport function getUnitValue(value, unit, isUTC) {\n var date = zrUtil.isNumber(value) ? numberUtil.parseDate(value) : value;\n unit = unit || getUnitFromValue(value, isUTC);\n switch (unit) {\n case 'year':\n return date[fullYearGetterName(isUTC)]();\n case 'half-year':\n return date[monthGetterName(isUTC)]() >= 6 ? 1 : 0;\n case 'quarter':\n return Math.floor((date[monthGetterName(isUTC)]() + 1) / 4);\n case 'month':\n return date[monthGetterName(isUTC)]();\n case 'day':\n return date[dateGetterName(isUTC)]();\n case 'half-day':\n return date[hoursGetterName(isUTC)]() / 24;\n case 'hour':\n return date[hoursGetterName(isUTC)]();\n case 'minute':\n return date[minutesGetterName(isUTC)]();\n case 'second':\n return date[secondsGetterName(isUTC)]();\n case 'millisecond':\n return date[millisecondsGetterName(isUTC)]();\n }\n}\nexport function fullYearGetterName(isUTC) {\n return isUTC ? 'getUTCFullYear' : 'getFullYear';\n}\nexport function monthGetterName(isUTC) {\n return isUTC ? 'getUTCMonth' : 'getMonth';\n}\nexport function dateGetterName(isUTC) {\n return isUTC ? 'getUTCDate' : 'getDate';\n}\nexport function hoursGetterName(isUTC) {\n return isUTC ? 'getUTCHours' : 'getHours';\n}\nexport function minutesGetterName(isUTC) {\n return isUTC ? 'getUTCMinutes' : 'getMinutes';\n}\nexport function secondsGetterName(isUTC) {\n return isUTC ? 'getUTCSeconds' : 'getSeconds';\n}\nexport function millisecondsGetterName(isUTC) {\n return isUTC ? 'getUTCMilliseconds' : 'getMilliseconds';\n}\nexport function fullYearSetterName(isUTC) {\n return isUTC ? 'setUTCFullYear' : 'setFullYear';\n}\nexport function monthSetterName(isUTC) {\n return isUTC ? 'setUTCMonth' : 'setMonth';\n}\nexport function dateSetterName(isUTC) {\n return isUTC ? 'setUTCDate' : 'setDate';\n}\nexport function hoursSetterName(isUTC) {\n return isUTC ? 'setUTCHours' : 'setHours';\n}\nexport function minutesSetterName(isUTC) {\n return isUTC ? 'setUTCMinutes' : 'setMinutes';\n}\nexport function secondsSetterName(isUTC) {\n return isUTC ? 'setUTCSeconds' : 'setSeconds';\n}\nexport function millisecondsSetterName(isUTC) {\n return isUTC ? 'setUTCMilliseconds' : 'setMilliseconds';\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { Text } from '../util/graphic.js';\nexport function getTextRect(text, font, align, verticalAlign, padding, rich, truncate, lineHeight) {\n var textEl = new Text({\n style: {\n text: text,\n font: font,\n align: align,\n verticalAlign: verticalAlign,\n padding: padding,\n rich: rich,\n overflow: truncate ? 'truncate' : null,\n lineHeight: lineHeight\n }\n });\n return textEl.getBoundingRect();\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { encodeHTML } from 'zrender/lib/core/dom.js';\nimport { parseDate, isNumeric, numericToNumber } from './number.js';\nimport { format as timeFormat, pad } from './time.js';\nimport { deprecateReplaceLog } from './log.js';\n/**\n * Add a comma each three digit.\n */\nexport function addCommas(x) {\n if (!isNumeric(x)) {\n return zrUtil.isString(x) ? x : '-';\n }\n var parts = (x + '').split('.');\n return parts[0].replace(/(\\d{1,3})(?=(?:\\d{3})+(?!\\d))/g, '$1,') + (parts.length > 1 ? '.' + parts[1] : '');\n}\nexport function toCamelCase(str, upperCaseFirst) {\n str = (str || '').toLowerCase().replace(/-(.)/g, function (match, group1) {\n return group1.toUpperCase();\n });\n if (upperCaseFirst && str) {\n str = str.charAt(0).toUpperCase() + str.slice(1);\n }\n return str;\n}\nexport var normalizeCssArray = zrUtil.normalizeCssArray;\nexport { encodeHTML };\n/**\n * Make value user readable for tooltip and label.\n * \"User readable\":\n * Try to not print programmer-specific text like NaN, Infinity, null, undefined.\n * Avoid to display an empty string, which users can not recognize there is\n * a value and it might look like a bug.\n */\nexport function makeValueReadable(value, valueType, useUTC) {\n var USER_READABLE_DEFUALT_TIME_PATTERN = '{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}';\n function stringToUserReadable(str) {\n return str && zrUtil.trim(str) ? str : '-';\n }\n function isNumberUserReadable(num) {\n return !!(num != null && !isNaN(num) && isFinite(num));\n }\n var isTypeTime = valueType === 'time';\n var isValueDate = value instanceof Date;\n if (isTypeTime || isValueDate) {\n var date = isTypeTime ? parseDate(value) : value;\n if (!isNaN(+date)) {\n return timeFormat(date, USER_READABLE_DEFUALT_TIME_PATTERN, useUTC);\n } else if (isValueDate) {\n return '-';\n }\n // In other cases, continue to try to display the value in the following code.\n }\n if (valueType === 'ordinal') {\n return zrUtil.isStringSafe(value) ? stringToUserReadable(value) : zrUtil.isNumber(value) ? isNumberUserReadable(value) ? value + '' : '-' : '-';\n }\n // By default.\n var numericResult = numericToNumber(value);\n return isNumberUserReadable(numericResult) ? addCommas(numericResult) : zrUtil.isStringSafe(value) ? stringToUserReadable(value) : typeof value === 'boolean' ? value + '' : '-';\n}\nvar TPL_VAR_ALIAS = ['a', 'b', 'c', 'd', 'e', 'f', 'g'];\nvar wrapVar = function (varName, seriesIdx) {\n return '{' + varName + (seriesIdx == null ? '' : seriesIdx) + '}';\n};\n/**\n * Template formatter\n * @param {Array.|Object} paramsList\n */\nexport function formatTpl(tpl, paramsList, encode) {\n if (!zrUtil.isArray(paramsList)) {\n paramsList = [paramsList];\n }\n var seriesLen = paramsList.length;\n if (!seriesLen) {\n return '';\n }\n var $vars = paramsList[0].$vars || [];\n for (var i = 0; i < $vars.length; i++) {\n var alias = TPL_VAR_ALIAS[i];\n tpl = tpl.replace(wrapVar(alias), wrapVar(alias, 0));\n }\n for (var seriesIdx = 0; seriesIdx < seriesLen; seriesIdx++) {\n for (var k = 0; k < $vars.length; k++) {\n var val = paramsList[seriesIdx][$vars[k]];\n tpl = tpl.replace(wrapVar(TPL_VAR_ALIAS[k], seriesIdx), encode ? encodeHTML(val) : val);\n }\n }\n return tpl;\n}\n/**\n * simple Template formatter\n */\nexport function formatTplSimple(tpl, param, encode) {\n zrUtil.each(param, function (value, key) {\n tpl = tpl.replace('{' + key + '}', encode ? encodeHTML(value) : value);\n });\n return tpl;\n}\nexport function getTooltipMarker(inOpt, extraCssText) {\n var opt = zrUtil.isString(inOpt) ? {\n color: inOpt,\n extraCssText: extraCssText\n } : inOpt || {};\n var color = opt.color;\n var type = opt.type;\n extraCssText = opt.extraCssText;\n var renderMode = opt.renderMode || 'html';\n if (!color) {\n return '';\n }\n if (renderMode === 'html') {\n return type === 'subItem' ? '' : '';\n } else {\n // Should better not to auto generate style name by auto-increment number here.\n // Because this util is usually called in tooltip formatter, which is probably\n // called repeatedly when mouse move and the auto-increment number increases fast.\n // Users can make their own style name by theirselves, make it unique and readable.\n var markerId = opt.markerId || 'markerX';\n return {\n renderMode: renderMode,\n content: '{' + markerId + '|} ',\n style: type === 'subItem' ? {\n width: 4,\n height: 4,\n borderRadius: 2,\n backgroundColor: color\n } : {\n width: 10,\n height: 10,\n borderRadius: 5,\n backgroundColor: color\n }\n };\n }\n}\n/**\n * @deprecated Use `time/format` instead.\n * ISO Date format\n * @param {string} tpl\n * @param {number} value\n * @param {boolean} [isUTC=false] Default in local time.\n * see `module:echarts/scale/Time`\n * and `module:echarts/util/number#parseDate`.\n * @inner\n */\nexport function formatTime(tpl, value, isUTC) {\n if (process.env.NODE_ENV !== 'production') {\n deprecateReplaceLog('echarts.format.formatTime', 'echarts.time.format');\n }\n if (tpl === 'week' || tpl === 'month' || tpl === 'quarter' || tpl === 'half-year' || tpl === 'year') {\n tpl = 'MM-dd\\nyyyy';\n }\n var date = parseDate(value);\n var getUTC = isUTC ? 'getUTC' : 'get';\n var y = date[getUTC + 'FullYear']();\n var M = date[getUTC + 'Month']() + 1;\n var d = date[getUTC + 'Date']();\n var h = date[getUTC + 'Hours']();\n var m = date[getUTC + 'Minutes']();\n var s = date[getUTC + 'Seconds']();\n var S = date[getUTC + 'Milliseconds']();\n tpl = tpl.replace('MM', pad(M, 2)).replace('M', M).replace('yyyy', y).replace('yy', pad(y % 100 + '', 2)).replace('dd', pad(d, 2)).replace('d', d).replace('hh', pad(h, 2)).replace('h', h).replace('mm', pad(m, 2)).replace('m', m).replace('ss', pad(s, 2)).replace('s', s).replace('SSS', pad(S, 3));\n return tpl;\n}\n/**\n * Capital first\n * @param {string} str\n * @return {string}\n */\nexport function capitalFirst(str) {\n return str ? str.charAt(0).toUpperCase() + str.substr(1) : str;\n}\n/**\n * @return Never be null/undefined.\n */\nexport function convertToColorString(color, defaultColor) {\n defaultColor = defaultColor || 'transparent';\n return zrUtil.isString(color) ? color : zrUtil.isObject(color) ? color.colorStops && (color.colorStops[0] || {}).color || defaultColor : defaultColor;\n}\nexport { truncateText } from 'zrender/lib/graphic/helper/parseText.js';\n/**\n * open new tab\n * @param link url\n * @param target blank or self\n */\nexport function windowOpen(link, target) {\n /* global window */\n if (target === '_blank' || target === 'blank') {\n var blank = window.open();\n blank.opener = null;\n blank.location.href = link;\n } else {\n window.open(link, target);\n }\n}\nexport { getTextRect } from '../legacy/getTextRect.js';","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// Layout helpers for each component positioning\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport BoundingRect from 'zrender/lib/core/BoundingRect.js';\nimport { parsePercent } from './number.js';\nimport * as formatUtil from './format.js';\nvar each = zrUtil.each;\n/**\n * @public\n */\nexport var LOCATION_PARAMS = ['left', 'right', 'top', 'bottom', 'width', 'height'];\n/**\n * @public\n */\nexport var HV_NAMES = [['width', 'left', 'right'], ['height', 'top', 'bottom']];\nfunction boxLayout(orient, group, gap, maxWidth, maxHeight) {\n var x = 0;\n var y = 0;\n if (maxWidth == null) {\n maxWidth = Infinity;\n }\n if (maxHeight == null) {\n maxHeight = Infinity;\n }\n var currentLineMaxSize = 0;\n group.eachChild(function (child, idx) {\n var rect = child.getBoundingRect();\n var nextChild = group.childAt(idx + 1);\n var nextChildRect = nextChild && nextChild.getBoundingRect();\n var nextX;\n var nextY;\n if (orient === 'horizontal') {\n var moveX = rect.width + (nextChildRect ? -nextChildRect.x + rect.x : 0);\n nextX = x + moveX;\n // Wrap when width exceeds maxWidth or meet a `newline` group\n // FIXME compare before adding gap?\n if (nextX > maxWidth || child.newline) {\n x = 0;\n nextX = moveX;\n y += currentLineMaxSize + gap;\n currentLineMaxSize = rect.height;\n } else {\n // FIXME: consider rect.y is not `0`?\n currentLineMaxSize = Math.max(currentLineMaxSize, rect.height);\n }\n } else {\n var moveY = rect.height + (nextChildRect ? -nextChildRect.y + rect.y : 0);\n nextY = y + moveY;\n // Wrap when width exceeds maxHeight or meet a `newline` group\n if (nextY > maxHeight || child.newline) {\n x += currentLineMaxSize + gap;\n y = 0;\n nextY = moveY;\n currentLineMaxSize = rect.width;\n } else {\n currentLineMaxSize = Math.max(currentLineMaxSize, rect.width);\n }\n }\n if (child.newline) {\n return;\n }\n child.x = x;\n child.y = y;\n child.markRedraw();\n orient === 'horizontal' ? x = nextX + gap : y = nextY + gap;\n });\n}\n/**\n * VBox or HBox layouting\n * @param {string} orient\n * @param {module:zrender/graphic/Group} group\n * @param {number} gap\n * @param {number} [width=Infinity]\n * @param {number} [height=Infinity]\n */\nexport var box = boxLayout;\n/**\n * VBox layouting\n * @param {module:zrender/graphic/Group} group\n * @param {number} gap\n * @param {number} [width=Infinity]\n * @param {number} [height=Infinity]\n */\nexport var vbox = zrUtil.curry(boxLayout, 'vertical');\n/**\n * HBox layouting\n * @param {module:zrender/graphic/Group} group\n * @param {number} gap\n * @param {number} [width=Infinity]\n * @param {number} [height=Infinity]\n */\nexport var hbox = zrUtil.curry(boxLayout, 'horizontal');\n/**\n * If x or x2 is not specified or 'center' 'left' 'right',\n * the width would be as long as possible.\n * If y or y2 is not specified or 'middle' 'top' 'bottom',\n * the height would be as long as possible.\n */\nexport function getAvailableSize(positionInfo, containerRect, margin) {\n var containerWidth = containerRect.width;\n var containerHeight = containerRect.height;\n var x = parsePercent(positionInfo.left, containerWidth);\n var y = parsePercent(positionInfo.top, containerHeight);\n var x2 = parsePercent(positionInfo.right, containerWidth);\n var y2 = parsePercent(positionInfo.bottom, containerHeight);\n (isNaN(x) || isNaN(parseFloat(positionInfo.left))) && (x = 0);\n (isNaN(x2) || isNaN(parseFloat(positionInfo.right))) && (x2 = containerWidth);\n (isNaN(y) || isNaN(parseFloat(positionInfo.top))) && (y = 0);\n (isNaN(y2) || isNaN(parseFloat(positionInfo.bottom))) && (y2 = containerHeight);\n margin = formatUtil.normalizeCssArray(margin || 0);\n return {\n width: Math.max(x2 - x - margin[1] - margin[3], 0),\n height: Math.max(y2 - y - margin[0] - margin[2], 0)\n };\n}\n/**\n * Parse position info.\n */\nexport function getLayoutRect(positionInfo, containerRect, margin) {\n margin = formatUtil.normalizeCssArray(margin || 0);\n var containerWidth = containerRect.width;\n var containerHeight = containerRect.height;\n var left = parsePercent(positionInfo.left, containerWidth);\n var top = parsePercent(positionInfo.top, containerHeight);\n var right = parsePercent(positionInfo.right, containerWidth);\n var bottom = parsePercent(positionInfo.bottom, containerHeight);\n var width = parsePercent(positionInfo.width, containerWidth);\n var height = parsePercent(positionInfo.height, containerHeight);\n var verticalMargin = margin[2] + margin[0];\n var horizontalMargin = margin[1] + margin[3];\n var aspect = positionInfo.aspect;\n // If width is not specified, calculate width from left and right\n if (isNaN(width)) {\n width = containerWidth - right - horizontalMargin - left;\n }\n if (isNaN(height)) {\n height = containerHeight - bottom - verticalMargin - top;\n }\n if (aspect != null) {\n // If width and height are not given\n // 1. Graph should not exceeds the container\n // 2. Aspect must be keeped\n // 3. Graph should take the space as more as possible\n // FIXME\n // Margin is not considered, because there is no case that both\n // using margin and aspect so far.\n if (isNaN(width) && isNaN(height)) {\n if (aspect > containerWidth / containerHeight) {\n width = containerWidth * 0.8;\n } else {\n height = containerHeight * 0.8;\n }\n }\n // Calculate width or height with given aspect\n if (isNaN(width)) {\n width = aspect * height;\n }\n if (isNaN(height)) {\n height = width / aspect;\n }\n }\n // If left is not specified, calculate left from right and width\n if (isNaN(left)) {\n left = containerWidth - right - width - horizontalMargin;\n }\n if (isNaN(top)) {\n top = containerHeight - bottom - height - verticalMargin;\n }\n // Align left and top\n switch (positionInfo.left || positionInfo.right) {\n case 'center':\n left = containerWidth / 2 - width / 2 - margin[3];\n break;\n case 'right':\n left = containerWidth - width - horizontalMargin;\n break;\n }\n switch (positionInfo.top || positionInfo.bottom) {\n case 'middle':\n case 'center':\n top = containerHeight / 2 - height / 2 - margin[0];\n break;\n case 'bottom':\n top = containerHeight - height - verticalMargin;\n break;\n }\n // If something is wrong and left, top, width, height are calculated as NaN\n left = left || 0;\n top = top || 0;\n if (isNaN(width)) {\n // Width may be NaN if only one value is given except width\n width = containerWidth - horizontalMargin - left - (right || 0);\n }\n if (isNaN(height)) {\n // Height may be NaN if only one value is given except height\n height = containerHeight - verticalMargin - top - (bottom || 0);\n }\n var rect = new BoundingRect(left + margin[3], top + margin[0], width, height);\n rect.margin = margin;\n return rect;\n}\n/**\n * Position a zr element in viewport\n * Group position is specified by either\n * {left, top}, {right, bottom}\n * If all properties exists, right and bottom will be igonred.\n *\n * Logic:\n * 1. Scale (against origin point in parent coord)\n * 2. Rotate (against origin point in parent coord)\n * 3. Translate (with el.position by this method)\n * So this method only fixes the last step 'Translate', which does not affect\n * scaling and rotating.\n *\n * If be called repeatedly with the same input el, the same result will be gotten.\n *\n * Return true if the layout happened.\n *\n * @param el Should have `getBoundingRect` method.\n * @param positionInfo\n * @param positionInfo.left\n * @param positionInfo.top\n * @param positionInfo.right\n * @param positionInfo.bottom\n * @param positionInfo.width Only for opt.boundingModel: 'raw'\n * @param positionInfo.height Only for opt.boundingModel: 'raw'\n * @param containerRect\n * @param margin\n * @param opt\n * @param opt.hv Only horizontal or only vertical. Default to be [1, 1]\n * @param opt.boundingMode\n * Specify how to calculate boundingRect when locating.\n * 'all': Position the boundingRect that is transformed and uioned\n * both itself and its descendants.\n * This mode simplies confine the elements in the bounding\n * of their container (e.g., using 'right: 0').\n * 'raw': Position the boundingRect that is not transformed and only itself.\n * This mode is useful when you want a element can overflow its\n * container. (Consider a rotated circle needs to be located in a corner.)\n * In this mode positionInfo.width/height can only be number.\n */\nexport function positionElement(el, positionInfo, containerRect, margin, opt, out) {\n var h = !opt || !opt.hv || opt.hv[0];\n var v = !opt || !opt.hv || opt.hv[1];\n var boundingMode = opt && opt.boundingMode || 'all';\n out = out || el;\n out.x = el.x;\n out.y = el.y;\n if (!h && !v) {\n return false;\n }\n var rect;\n if (boundingMode === 'raw') {\n rect = el.type === 'group' ? new BoundingRect(0, 0, +positionInfo.width || 0, +positionInfo.height || 0) : el.getBoundingRect();\n } else {\n rect = el.getBoundingRect();\n if (el.needLocalTransform()) {\n var transform = el.getLocalTransform();\n // Notice: raw rect may be inner object of el,\n // which should not be modified.\n rect = rect.clone();\n rect.applyTransform(transform);\n }\n }\n // The real width and height can not be specified but calculated by the given el.\n var layoutRect = getLayoutRect(zrUtil.defaults({\n width: rect.width,\n height: rect.height\n }, positionInfo), containerRect, margin);\n // Because 'tranlate' is the last step in transform\n // (see zrender/core/Transformable#getLocalTransform),\n // we can just only modify el.position to get final result.\n var dx = h ? layoutRect.x - rect.x : 0;\n var dy = v ? layoutRect.y - rect.y : 0;\n if (boundingMode === 'raw') {\n out.x = dx;\n out.y = dy;\n } else {\n out.x += dx;\n out.y += dy;\n }\n if (out === el) {\n el.markRedraw();\n }\n return true;\n}\n/**\n * @param option Contains some of the properties in HV_NAMES.\n * @param hvIdx 0: horizontal; 1: vertical.\n */\nexport function sizeCalculable(option, hvIdx) {\n return option[HV_NAMES[hvIdx][0]] != null || option[HV_NAMES[hvIdx][1]] != null && option[HV_NAMES[hvIdx][2]] != null;\n}\nexport function fetchLayoutMode(ins) {\n var layoutMode = ins.layoutMode || ins.constructor.layoutMode;\n return zrUtil.isObject(layoutMode) ? layoutMode : layoutMode ? {\n type: layoutMode\n } : null;\n}\n/**\n * Consider Case:\n * When default option has {left: 0, width: 100}, and we set {right: 0}\n * through setOption or media query, using normal zrUtil.merge will cause\n * {right: 0} does not take effect.\n *\n * @example\n * ComponentModel.extend({\n * init: function () {\n * ...\n * let inputPositionParams = layout.getLayoutParams(option);\n * this.mergeOption(inputPositionParams);\n * },\n * mergeOption: function (newOption) {\n * newOption && zrUtil.merge(thisOption, newOption, true);\n * layout.mergeLayoutParam(thisOption, newOption);\n * }\n * });\n *\n * @param targetOption\n * @param newOption\n * @param opt\n */\nexport function mergeLayoutParam(targetOption, newOption, opt) {\n var ignoreSize = opt && opt.ignoreSize;\n !zrUtil.isArray(ignoreSize) && (ignoreSize = [ignoreSize, ignoreSize]);\n var hResult = merge(HV_NAMES[0], 0);\n var vResult = merge(HV_NAMES[1], 1);\n copy(HV_NAMES[0], targetOption, hResult);\n copy(HV_NAMES[1], targetOption, vResult);\n function merge(names, hvIdx) {\n var newParams = {};\n var newValueCount = 0;\n var merged = {};\n var mergedValueCount = 0;\n var enoughParamNumber = 2;\n each(names, function (name) {\n merged[name] = targetOption[name];\n });\n each(names, function (name) {\n // Consider case: newOption.width is null, which is\n // set by user for removing width setting.\n hasProp(newOption, name) && (newParams[name] = merged[name] = newOption[name]);\n hasValue(newParams, name) && newValueCount++;\n hasValue(merged, name) && mergedValueCount++;\n });\n if (ignoreSize[hvIdx]) {\n // Only one of left/right is premitted to exist.\n if (hasValue(newOption, names[1])) {\n merged[names[2]] = null;\n } else if (hasValue(newOption, names[2])) {\n merged[names[1]] = null;\n }\n return merged;\n }\n // Case: newOption: {width: ..., right: ...},\n // or targetOption: {right: ...} and newOption: {width: ...},\n // There is no conflict when merged only has params count\n // little than enoughParamNumber.\n if (mergedValueCount === enoughParamNumber || !newValueCount) {\n return merged;\n }\n // Case: newOption: {width: ..., right: ...},\n // Than we can make sure user only want those two, and ignore\n // all origin params in targetOption.\n else if (newValueCount >= enoughParamNumber) {\n return newParams;\n } else {\n // Chose another param from targetOption by priority.\n for (var i = 0; i < names.length; i++) {\n var name_1 = names[i];\n if (!hasProp(newParams, name_1) && hasProp(targetOption, name_1)) {\n newParams[name_1] = targetOption[name_1];\n break;\n }\n }\n return newParams;\n }\n }\n function hasProp(obj, name) {\n return obj.hasOwnProperty(name);\n }\n function hasValue(obj, name) {\n return obj[name] != null && obj[name] !== 'auto';\n }\n function copy(names, target, source) {\n each(names, function (name) {\n target[name] = source[name];\n });\n }\n}\n/**\n * Retrieve 'left', 'right', 'top', 'bottom', 'width', 'height' from object.\n */\nexport function getLayoutParams(source) {\n return copyLayoutParams({}, source);\n}\n/**\n * Retrieve 'left', 'right', 'top', 'bottom', 'width', 'height' from object.\n * @param {Object} source\n * @return {Object} Result contains those props.\n */\nexport function copyLayoutParams(target, source) {\n source && target && each(LOCATION_PARAMS, function (name) {\n source.hasOwnProperty(name) && (target[name] = source[name]);\n });\n return target;\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport Model from './Model.js';\nimport * as componentUtil from '../util/component.js';\nimport { enableClassManagement, parseClassType, isExtendedClass, mountExtend } from '../util/clazz.js';\nimport { makeInner, queryReferringComponents } from '../util/model.js';\nimport * as layout from '../util/layout.js';\nvar inner = makeInner();\nvar ComponentModel = /** @class */function (_super) {\n __extends(ComponentModel, _super);\n function ComponentModel(option, parentModel, ecModel) {\n var _this = _super.call(this, option, parentModel, ecModel) || this;\n _this.uid = componentUtil.getUID('ec_cpt_model');\n return _this;\n }\n ComponentModel.prototype.init = function (option, parentModel, ecModel) {\n this.mergeDefaultAndTheme(option, ecModel);\n };\n ComponentModel.prototype.mergeDefaultAndTheme = function (option, ecModel) {\n var layoutMode = layout.fetchLayoutMode(this);\n var inputPositionParams = layoutMode ? layout.getLayoutParams(option) : {};\n var themeModel = ecModel.getTheme();\n zrUtil.merge(option, themeModel.get(this.mainType));\n zrUtil.merge(option, this.getDefaultOption());\n if (layoutMode) {\n layout.mergeLayoutParam(option, inputPositionParams, layoutMode);\n }\n };\n ComponentModel.prototype.mergeOption = function (option, ecModel) {\n zrUtil.merge(this.option, option, true);\n var layoutMode = layout.fetchLayoutMode(this);\n if (layoutMode) {\n layout.mergeLayoutParam(this.option, option, layoutMode);\n }\n };\n /**\n * Called immediately after `init` or `mergeOption` of this instance called.\n */\n ComponentModel.prototype.optionUpdated = function (newCptOption, isInit) {};\n /**\n * [How to declare defaultOption]:\n *\n * (A) If using class declaration in typescript (since echarts 5):\n * ```ts\n * import {ComponentOption} from '../model/option.js';\n * export interface XxxOption extends ComponentOption {\n * aaa: number\n * }\n * export class XxxModel extends Component {\n * static type = 'xxx';\n * static defaultOption: XxxOption = {\n * aaa: 123\n * }\n * }\n * Component.registerClass(XxxModel);\n * ```\n * ```ts\n * import {inheritDefaultOption} from '../util/component.js';\n * import {XxxModel, XxxOption} from './XxxModel.js';\n * export interface XxxSubOption extends XxxOption {\n * bbb: number\n * }\n * class XxxSubModel extends XxxModel {\n * static defaultOption: XxxSubOption = inheritDefaultOption(XxxModel.defaultOption, {\n * bbb: 456\n * })\n * fn() {\n * let opt = this.getDefaultOption();\n * // opt is {aaa: 123, bbb: 456}\n * }\n * }\n * ```\n *\n * (B) If using class extend (previous approach in echarts 3 & 4):\n * ```js\n * let XxxComponent = Component.extend({\n * defaultOption: {\n * xx: 123\n * }\n * })\n * ```\n * ```js\n * let XxxSubComponent = XxxComponent.extend({\n * defaultOption: {\n * yy: 456\n * },\n * fn: function () {\n * let opt = this.getDefaultOption();\n * // opt is {xx: 123, yy: 456}\n * }\n * })\n * ```\n */\n ComponentModel.prototype.getDefaultOption = function () {\n var ctor = this.constructor;\n // If using class declaration, it is different to travel super class\n // in legacy env and auto merge defaultOption. So if using class\n // declaration, defaultOption should be merged manually.\n if (!isExtendedClass(ctor)) {\n // When using ts class, defaultOption must be declared as static.\n return ctor.defaultOption;\n }\n // FIXME: remove this approach?\n var fields = inner(this);\n if (!fields.defaultOption) {\n var optList = [];\n var clz = ctor;\n while (clz) {\n var opt = clz.prototype.defaultOption;\n opt && optList.push(opt);\n clz = clz.superClass;\n }\n var defaultOption = {};\n for (var i = optList.length - 1; i >= 0; i--) {\n defaultOption = zrUtil.merge(defaultOption, optList[i], true);\n }\n fields.defaultOption = defaultOption;\n }\n return fields.defaultOption;\n };\n /**\n * Notice: always force to input param `useDefault` in case that forget to consider it.\n * The same behavior as `modelUtil.parseFinder`.\n *\n * @param useDefault In many cases like series refer axis and axis refer grid,\n * If axis index / axis id not specified, use the first target as default.\n * In other cases like dataZoom refer axis, if not specified, measn no refer.\n */\n ComponentModel.prototype.getReferringComponents = function (mainType, opt) {\n var indexKey = mainType + 'Index';\n var idKey = mainType + 'Id';\n return queryReferringComponents(this.ecModel, mainType, {\n index: this.get(indexKey, true),\n id: this.get(idKey, true)\n }, opt);\n };\n ComponentModel.prototype.getBoxLayoutParams = function () {\n // Consider itself having box layout configs.\n var boxLayoutModel = this;\n return {\n left: boxLayoutModel.get('left'),\n top: boxLayoutModel.get('top'),\n right: boxLayoutModel.get('right'),\n bottom: boxLayoutModel.get('bottom'),\n width: boxLayoutModel.get('width'),\n height: boxLayoutModel.get('height')\n };\n };\n /**\n * Get key for zlevel.\n * If developers don't configure zlevel. We will assign zlevel to series based on the key.\n * For example, lines with trail effect and progressive series will in an individual zlevel.\n */\n ComponentModel.prototype.getZLevelKey = function () {\n return '';\n };\n ComponentModel.prototype.setZLevel = function (zlevel) {\n this.option.zlevel = zlevel;\n };\n ComponentModel.protoInitialize = function () {\n var proto = ComponentModel.prototype;\n proto.type = 'component';\n proto.id = '';\n proto.name = '';\n proto.mainType = '';\n proto.subType = '';\n proto.componentIndex = 0;\n }();\n return ComponentModel;\n}(Model);\nmountExtend(ComponentModel, Model);\nenableClassManagement(ComponentModel);\ncomponentUtil.enableSubTypeDefaulter(ComponentModel);\ncomponentUtil.enableTopologicalTravel(ComponentModel, getDependencies);\nfunction getDependencies(componentType) {\n var deps = [];\n zrUtil.each(ComponentModel.getClassesByMainType(componentType), function (clz) {\n deps = deps.concat(clz.dependencies || clz.prototype.dependencies || []);\n });\n // Ensure main type.\n deps = zrUtil.map(deps, function (type) {\n return parseClassType(type).main;\n });\n // Hack dataset for convenience.\n if (componentType !== 'dataset' && zrUtil.indexOf(deps, 'dataset') <= 0) {\n deps.unshift('dataset');\n }\n return deps;\n}\nexport default ComponentModel;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar platform = '';\n// Navigator not exists in node\nif (typeof navigator !== 'undefined') {\n /* global navigator */\n platform = navigator.platform || '';\n}\nvar decalColor = 'rgba(0, 0, 0, 0.2)';\nexport default {\n darkMode: 'auto',\n // backgroundColor: 'rgba(0,0,0,0)',\n colorBy: 'series',\n color: ['#5470c6', '#91cc75', '#fac858', '#ee6666', '#73c0de', '#3ba272', '#fc8452', '#9a60b4', '#ea7ccc'],\n gradientColor: ['#f6efa6', '#d88273', '#bf444c'],\n aria: {\n decal: {\n decals: [{\n color: decalColor,\n dashArrayX: [1, 0],\n dashArrayY: [2, 5],\n symbolSize: 1,\n rotation: Math.PI / 6\n }, {\n color: decalColor,\n symbol: 'circle',\n dashArrayX: [[8, 8], [0, 8, 8, 0]],\n dashArrayY: [6, 0],\n symbolSize: 0.8\n }, {\n color: decalColor,\n dashArrayX: [1, 0],\n dashArrayY: [4, 3],\n rotation: -Math.PI / 4\n }, {\n color: decalColor,\n dashArrayX: [[6, 6], [0, 6, 6, 0]],\n dashArrayY: [6, 0]\n }, {\n color: decalColor,\n dashArrayX: [[1, 0], [1, 6]],\n dashArrayY: [1, 0, 6, 0],\n rotation: Math.PI / 4\n }, {\n color: decalColor,\n symbol: 'triangle',\n dashArrayX: [[9, 9], [0, 9, 9, 0]],\n dashArrayY: [7, 2],\n symbolSize: 0.75\n }]\n }\n },\n // If xAxis and yAxis declared, grid is created by default.\n // grid: {},\n textStyle: {\n // color: '#000',\n // decoration: 'none',\n // PENDING\n fontFamily: platform.match(/^Win/) ? 'Microsoft YaHei' : 'sans-serif',\n // fontFamily: 'Arial, Verdana, sans-serif',\n fontSize: 12,\n fontStyle: 'normal',\n fontWeight: 'normal'\n },\n // http://blogs.adobe.com/webplatform/2014/02/24/using-blend-modes-in-html-canvas/\n // https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation\n // Default is source-over\n blendMode: null,\n stateAnimation: {\n duration: 300,\n easing: 'cubicOut'\n },\n animation: 'auto',\n animationDuration: 1000,\n animationDurationUpdate: 500,\n animationEasing: 'cubicInOut',\n animationEasingUpdate: 'cubicInOut',\n animationThreshold: 2000,\n // Configuration for progressive/incremental rendering\n progressiveThreshold: 3000,\n progressive: 400,\n // Threshold of if use single hover layer to optimize.\n // It is recommended that `hoverLayerThreshold` is equivalent to or less than\n // `progressiveThreshold`, otherwise hover will cause restart of progressive,\n // which is unexpected.\n // see example .\n hoverLayerThreshold: 3000,\n // See: module:echarts/scale/Time\n useUTC: false\n};","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { createHashMap } from 'zrender/lib/core/util.js';\n;\n;\n;\nexport var VISUAL_DIMENSIONS = createHashMap(['tooltip', 'label', 'itemName', 'itemId', 'itemGroupId', 'itemChildGroupId', 'seriesName']);\nexport var SOURCE_FORMAT_ORIGINAL = 'original';\nexport var SOURCE_FORMAT_ARRAY_ROWS = 'arrayRows';\nexport var SOURCE_FORMAT_OBJECT_ROWS = 'objectRows';\nexport var SOURCE_FORMAT_KEYED_COLUMNS = 'keyedColumns';\nexport var SOURCE_FORMAT_TYPED_ARRAY = 'typedArray';\nexport var SOURCE_FORMAT_UNKNOWN = 'unknown';\nexport var SERIES_LAYOUT_BY_COLUMN = 'column';\nexport var SERIES_LAYOUT_BY_ROW = 'row';\n;\n;\n;\n;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { makeInner, getDataItemValue, queryReferringComponents, SINGLE_REFERRING } from '../../util/model.js';\nimport { createHashMap, each, isArray, isString, isObject, isTypedArray } from 'zrender/lib/core/util.js';\nimport { SOURCE_FORMAT_ORIGINAL, SOURCE_FORMAT_ARRAY_ROWS, SOURCE_FORMAT_OBJECT_ROWS, SERIES_LAYOUT_BY_ROW, SOURCE_FORMAT_KEYED_COLUMNS } from '../../util/types.js';\n// The result of `guessOrdinal`.\nexport var BE_ORDINAL = {\n Must: 1,\n Might: 2,\n Not: 3 // Other cases\n};\nvar innerGlobalModel = makeInner();\n/**\n * MUST be called before mergeOption of all series.\n */\nexport function resetSourceDefaulter(ecModel) {\n // `datasetMap` is used to make default encode.\n innerGlobalModel(ecModel).datasetMap = createHashMap();\n}\n/**\n * [The strategy of the arrengment of data dimensions for dataset]:\n * \"value way\": all axes are non-category axes. So series one by one take\n * several (the number is coordSysDims.length) dimensions from dataset.\n * The result of data arrengment of data dimensions like:\n * | ser0_x | ser0_y | ser1_x | ser1_y | ser2_x | ser2_y |\n * \"category way\": at least one axis is category axis. So the the first data\n * dimension is always mapped to the first category axis and shared by\n * all of the series. The other data dimensions are taken by series like\n * \"value way\" does.\n * The result of data arrengment of data dimensions like:\n * | ser_shared_x | ser0_y | ser1_y | ser2_y |\n *\n * @return encode Never be `null/undefined`.\n */\nexport function makeSeriesEncodeForAxisCoordSys(coordDimensions, seriesModel, source) {\n var encode = {};\n var datasetModel = querySeriesUpstreamDatasetModel(seriesModel);\n // Currently only make default when using dataset, util more reqirements occur.\n if (!datasetModel || !coordDimensions) {\n return encode;\n }\n var encodeItemName = [];\n var encodeSeriesName = [];\n var ecModel = seriesModel.ecModel;\n var datasetMap = innerGlobalModel(ecModel).datasetMap;\n var key = datasetModel.uid + '_' + source.seriesLayoutBy;\n var baseCategoryDimIndex;\n var categoryWayValueDimStart;\n coordDimensions = coordDimensions.slice();\n each(coordDimensions, function (coordDimInfoLoose, coordDimIdx) {\n var coordDimInfo = isObject(coordDimInfoLoose) ? coordDimInfoLoose : coordDimensions[coordDimIdx] = {\n name: coordDimInfoLoose\n };\n if (coordDimInfo.type === 'ordinal' && baseCategoryDimIndex == null) {\n baseCategoryDimIndex = coordDimIdx;\n categoryWayValueDimStart = getDataDimCountOnCoordDim(coordDimInfo);\n }\n encode[coordDimInfo.name] = [];\n });\n var datasetRecord = datasetMap.get(key) || datasetMap.set(key, {\n categoryWayDim: categoryWayValueDimStart,\n valueWayDim: 0\n });\n // TODO\n // Auto detect first time axis and do arrangement.\n each(coordDimensions, function (coordDimInfo, coordDimIdx) {\n var coordDimName = coordDimInfo.name;\n var count = getDataDimCountOnCoordDim(coordDimInfo);\n // In value way.\n if (baseCategoryDimIndex == null) {\n var start = datasetRecord.valueWayDim;\n pushDim(encode[coordDimName], start, count);\n pushDim(encodeSeriesName, start, count);\n datasetRecord.valueWayDim += count;\n // ??? TODO give a better default series name rule?\n // especially when encode x y specified.\n // consider: when multiple series share one dimension\n // category axis, series name should better use\n // the other dimension name. On the other hand, use\n // both dimensions name.\n }\n // In category way, the first category axis.\n else if (baseCategoryDimIndex === coordDimIdx) {\n pushDim(encode[coordDimName], 0, count);\n pushDim(encodeItemName, 0, count);\n }\n // In category way, the other axis.\n else {\n var start = datasetRecord.categoryWayDim;\n pushDim(encode[coordDimName], start, count);\n pushDim(encodeSeriesName, start, count);\n datasetRecord.categoryWayDim += count;\n }\n });\n function pushDim(dimIdxArr, idxFrom, idxCount) {\n for (var i = 0; i < idxCount; i++) {\n dimIdxArr.push(idxFrom + i);\n }\n }\n function getDataDimCountOnCoordDim(coordDimInfo) {\n var dimsDef = coordDimInfo.dimsDef;\n return dimsDef ? dimsDef.length : 1;\n }\n encodeItemName.length && (encode.itemName = encodeItemName);\n encodeSeriesName.length && (encode.seriesName = encodeSeriesName);\n return encode;\n}\n/**\n * Work for data like [{name: ..., value: ...}, ...].\n *\n * @return encode Never be `null/undefined`.\n */\nexport function makeSeriesEncodeForNameBased(seriesModel, source, dimCount) {\n var encode = {};\n var datasetModel = querySeriesUpstreamDatasetModel(seriesModel);\n // Currently only make default when using dataset, util more reqirements occur.\n if (!datasetModel) {\n return encode;\n }\n var sourceFormat = source.sourceFormat;\n var dimensionsDefine = source.dimensionsDefine;\n var potentialNameDimIndex;\n if (sourceFormat === SOURCE_FORMAT_OBJECT_ROWS || sourceFormat === SOURCE_FORMAT_KEYED_COLUMNS) {\n each(dimensionsDefine, function (dim, idx) {\n if ((isObject(dim) ? dim.name : dim) === 'name') {\n potentialNameDimIndex = idx;\n }\n });\n }\n var idxResult = function () {\n var idxRes0 = {};\n var idxRes1 = {};\n var guessRecords = [];\n // 5 is an experience value.\n for (var i = 0, len = Math.min(5, dimCount); i < len; i++) {\n var guessResult = doGuessOrdinal(source.data, sourceFormat, source.seriesLayoutBy, dimensionsDefine, source.startIndex, i);\n guessRecords.push(guessResult);\n var isPureNumber = guessResult === BE_ORDINAL.Not;\n // [Strategy of idxRes0]: find the first BE_ORDINAL.Not as the value dim,\n // and then find a name dim with the priority:\n // \"BE_ORDINAL.Might|BE_ORDINAL.Must\" > \"other dim\" > \"the value dim itself\".\n if (isPureNumber && idxRes0.v == null && i !== potentialNameDimIndex) {\n idxRes0.v = i;\n }\n if (idxRes0.n == null || idxRes0.n === idxRes0.v || !isPureNumber && guessRecords[idxRes0.n] === BE_ORDINAL.Not) {\n idxRes0.n = i;\n }\n if (fulfilled(idxRes0) && guessRecords[idxRes0.n] !== BE_ORDINAL.Not) {\n return idxRes0;\n }\n // [Strategy of idxRes1]: if idxRes0 not satisfied (that is, no BE_ORDINAL.Not),\n // find the first BE_ORDINAL.Might as the value dim,\n // and then find a name dim with the priority:\n // \"other dim\" > \"the value dim itself\".\n // That is for backward compat: number-like (e.g., `'3'`, `'55'`) can be\n // treated as number.\n if (!isPureNumber) {\n if (guessResult === BE_ORDINAL.Might && idxRes1.v == null && i !== potentialNameDimIndex) {\n idxRes1.v = i;\n }\n if (idxRes1.n == null || idxRes1.n === idxRes1.v) {\n idxRes1.n = i;\n }\n }\n }\n function fulfilled(idxResult) {\n return idxResult.v != null && idxResult.n != null;\n }\n return fulfilled(idxRes0) ? idxRes0 : fulfilled(idxRes1) ? idxRes1 : null;\n }();\n if (idxResult) {\n encode.value = [idxResult.v];\n // `potentialNameDimIndex` has highest priority.\n var nameDimIndex = potentialNameDimIndex != null ? potentialNameDimIndex : idxResult.n;\n // By default, label uses itemName in charts.\n // So we don't set encodeLabel here.\n encode.itemName = [nameDimIndex];\n encode.seriesName = [nameDimIndex];\n }\n return encode;\n}\n/**\n * @return If return null/undefined, indicate that should not use datasetModel.\n */\nexport function querySeriesUpstreamDatasetModel(seriesModel) {\n // Caution: consider the scenario:\n // A dataset is declared and a series is not expected to use the dataset,\n // and at the beginning `setOption({series: { noData })` (just prepare other\n // option but no data), then `setOption({series: {data: [...]}); In this case,\n // the user should set an empty array to avoid that dataset is used by default.\n var thisData = seriesModel.get('data', true);\n if (!thisData) {\n return queryReferringComponents(seriesModel.ecModel, 'dataset', {\n index: seriesModel.get('datasetIndex', true),\n id: seriesModel.get('datasetId', true)\n }, SINGLE_REFERRING).models[0];\n }\n}\n/**\n * @return Always return an array event empty.\n */\nexport function queryDatasetUpstreamDatasetModels(datasetModel) {\n // Only these attributes declared, we by default reference to `datasetIndex: 0`.\n // Otherwise, no reference.\n if (!datasetModel.get('transform', true) && !datasetModel.get('fromTransformResult', true)) {\n return [];\n }\n return queryReferringComponents(datasetModel.ecModel, 'dataset', {\n index: datasetModel.get('fromDatasetIndex', true),\n id: datasetModel.get('fromDatasetId', true)\n }, SINGLE_REFERRING).models;\n}\n/**\n * The rule should not be complex, otherwise user might not\n * be able to known where the data is wrong.\n * The code is ugly, but how to make it neat?\n */\nexport function guessOrdinal(source, dimIndex) {\n return doGuessOrdinal(source.data, source.sourceFormat, source.seriesLayoutBy, source.dimensionsDefine, source.startIndex, dimIndex);\n}\n// dimIndex may be overflow source data.\n// return {BE_ORDINAL}\nfunction doGuessOrdinal(data, sourceFormat, seriesLayoutBy, dimensionsDefine, startIndex, dimIndex) {\n var result;\n // Experience value.\n var maxLoop = 5;\n if (isTypedArray(data)) {\n return BE_ORDINAL.Not;\n }\n // When sourceType is 'objectRows' or 'keyedColumns', dimensionsDefine\n // always exists in source.\n var dimName;\n var dimType;\n if (dimensionsDefine) {\n var dimDefItem = dimensionsDefine[dimIndex];\n if (isObject(dimDefItem)) {\n dimName = dimDefItem.name;\n dimType = dimDefItem.type;\n } else if (isString(dimDefItem)) {\n dimName = dimDefItem;\n }\n }\n if (dimType != null) {\n return dimType === 'ordinal' ? BE_ORDINAL.Must : BE_ORDINAL.Not;\n }\n if (sourceFormat === SOURCE_FORMAT_ARRAY_ROWS) {\n var dataArrayRows = data;\n if (seriesLayoutBy === SERIES_LAYOUT_BY_ROW) {\n var sample = dataArrayRows[dimIndex];\n for (var i = 0; i < (sample || []).length && i < maxLoop; i++) {\n if ((result = detectValue(sample[startIndex + i])) != null) {\n return result;\n }\n }\n } else {\n for (var i = 0; i < dataArrayRows.length && i < maxLoop; i++) {\n var row = dataArrayRows[startIndex + i];\n if (row && (result = detectValue(row[dimIndex])) != null) {\n return result;\n }\n }\n }\n } else if (sourceFormat === SOURCE_FORMAT_OBJECT_ROWS) {\n var dataObjectRows = data;\n if (!dimName) {\n return BE_ORDINAL.Not;\n }\n for (var i = 0; i < dataObjectRows.length && i < maxLoop; i++) {\n var item = dataObjectRows[i];\n if (item && (result = detectValue(item[dimName])) != null) {\n return result;\n }\n }\n } else if (sourceFormat === SOURCE_FORMAT_KEYED_COLUMNS) {\n var dataKeyedColumns = data;\n if (!dimName) {\n return BE_ORDINAL.Not;\n }\n var sample = dataKeyedColumns[dimName];\n if (!sample || isTypedArray(sample)) {\n return BE_ORDINAL.Not;\n }\n for (var i = 0; i < sample.length && i < maxLoop; i++) {\n if ((result = detectValue(sample[i])) != null) {\n return result;\n }\n }\n } else if (sourceFormat === SOURCE_FORMAT_ORIGINAL) {\n var dataOriginal = data;\n for (var i = 0; i < dataOriginal.length && i < maxLoop; i++) {\n var item = dataOriginal[i];\n var val = getDataItemValue(item);\n if (!isArray(val)) {\n return BE_ORDINAL.Not;\n }\n if ((result = detectValue(val[dimIndex])) != null) {\n return result;\n }\n }\n }\n function detectValue(val) {\n var beStr = isString(val);\n // Consider usage convenience, '1', '2' will be treated as \"number\".\n // `Number('')` (or any whitespace) is `0`.\n if (val != null && Number.isFinite(Number(val)) && val !== '') {\n return beStr ? BE_ORDINAL.Might : BE_ORDINAL.Not;\n } else if (beStr && val !== '-') {\n return BE_ORDINAL.Must;\n }\n }\n return BE_ORDINAL.Not;\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { createHashMap, assert } from 'zrender/lib/core/util.js';\nimport { isComponentIdInternal } from '../util/model.js';\nvar internalOptionCreatorMap = createHashMap();\nexport function registerInternalOptionCreator(mainType, creator) {\n assert(internalOptionCreatorMap.get(mainType) == null && creator);\n internalOptionCreatorMap.set(mainType, creator);\n}\nexport function concatInternalOptions(ecModel, mainType, newCmptOptionList) {\n var internalOptionCreator = internalOptionCreatorMap.get(mainType);\n if (!internalOptionCreator) {\n return newCmptOptionList;\n }\n var internalOptions = internalOptionCreator(ecModel);\n if (!internalOptions) {\n return newCmptOptionList;\n }\n if (process.env.NODE_ENV !== 'production') {\n for (var i = 0; i < internalOptions.length; i++) {\n assert(isComponentIdInternal(internalOptions[i]));\n }\n }\n return newCmptOptionList.concat(internalOptions);\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { makeInner, normalizeToArray } from '../../util/model.js';\nvar innerColor = makeInner();\nvar innerDecal = makeInner();\nvar PaletteMixin = /** @class */function () {\n function PaletteMixin() {}\n PaletteMixin.prototype.getColorFromPalette = function (name, scope, requestNum) {\n var defaultPalette = normalizeToArray(this.get('color', true));\n var layeredPalette = this.get('colorLayer', true);\n return getFromPalette(this, innerColor, defaultPalette, layeredPalette, name, scope, requestNum);\n };\n PaletteMixin.prototype.clearColorPalette = function () {\n clearPalette(this, innerColor);\n };\n return PaletteMixin;\n}();\nexport function getDecalFromPalette(ecModel, name, scope, requestNum) {\n var defaultDecals = normalizeToArray(ecModel.get(['aria', 'decal', 'decals']));\n return getFromPalette(ecModel, innerDecal, defaultDecals, null, name, scope, requestNum);\n}\nfunction getNearestPalette(palettes, requestColorNum) {\n var paletteNum = palettes.length;\n // TODO palettes must be in order\n for (var i = 0; i < paletteNum; i++) {\n if (palettes[i].length > requestColorNum) {\n return palettes[i];\n }\n }\n return palettes[paletteNum - 1];\n}\n/**\n * @param name MUST NOT be null/undefined. Otherwise call this function\n * twise with the same parameters will get different result.\n * @param scope default this.\n * @return Can be null/undefined\n */\nfunction getFromPalette(that, inner, defaultPalette, layeredPalette, name, scope, requestNum) {\n scope = scope || that;\n var scopeFields = inner(scope);\n var paletteIdx = scopeFields.paletteIdx || 0;\n var paletteNameMap = scopeFields.paletteNameMap = scopeFields.paletteNameMap || {};\n // Use `hasOwnProperty` to avoid conflict with Object.prototype.\n if (paletteNameMap.hasOwnProperty(name)) {\n return paletteNameMap[name];\n }\n var palette = requestNum == null || !layeredPalette ? defaultPalette : getNearestPalette(layeredPalette, requestNum);\n // In case can't find in layered color palette.\n palette = palette || defaultPalette;\n if (!palette || !palette.length) {\n return;\n }\n var pickedPaletteItem = palette[paletteIdx];\n if (name) {\n paletteNameMap[name] = pickedPaletteItem;\n }\n scopeFields.paletteIdx = (paletteIdx + 1) % palette.length;\n return pickedPaletteItem;\n}\nfunction clearPalette(that, inner) {\n inner(that).paletteIdx = 0;\n inner(that).paletteNameMap = {};\n}\nexport { PaletteMixin };","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\n/**\n * Caution: If the mechanism should be changed some day, these cases\n * should be considered:\n *\n * (1) In `merge option` mode, if using the same option to call `setOption`\n * many times, the result should be the same (try our best to ensure that).\n * (2) In `merge option` mode, if a component has no id/name specified, it\n * will be merged by index, and the result sequence of the components is\n * consistent to the original sequence.\n * (3) In `replaceMerge` mode, keep the result sequence of the components is\n * consistent to the original sequence, even though there might result in \"hole\".\n * (4) `reset` feature (in toolbox). Find detailed info in comments about\n * `mergeOption` in module:echarts/model/OptionManager.\n */\nimport { each, filter, isArray, isObject, isString, createHashMap, assert, clone, merge, extend, mixin, isFunction } from 'zrender/lib/core/util.js';\nimport * as modelUtil from '../util/model.js';\nimport Model from './Model.js';\nimport ComponentModel from './Component.js';\nimport globalDefault from './globalDefault.js';\nimport { resetSourceDefaulter } from '../data/helper/sourceHelper.js';\nimport { concatInternalOptions } from './internalComponentCreator.js';\nimport { PaletteMixin } from './mixin/palette.js';\nimport { error, warn } from '../util/log.js';\n// -----------------------\n// Internal method names:\n// -----------------------\nvar reCreateSeriesIndices;\nvar assertSeriesInitialized;\nvar initBase;\nvar OPTION_INNER_KEY = '\\0_ec_inner';\nvar OPTION_INNER_VALUE = 1;\nvar BUITIN_COMPONENTS_MAP = {\n grid: 'GridComponent',\n polar: 'PolarComponent',\n geo: 'GeoComponent',\n singleAxis: 'SingleAxisComponent',\n parallel: 'ParallelComponent',\n calendar: 'CalendarComponent',\n graphic: 'GraphicComponent',\n toolbox: 'ToolboxComponent',\n tooltip: 'TooltipComponent',\n axisPointer: 'AxisPointerComponent',\n brush: 'BrushComponent',\n title: 'TitleComponent',\n timeline: 'TimelineComponent',\n markPoint: 'MarkPointComponent',\n markLine: 'MarkLineComponent',\n markArea: 'MarkAreaComponent',\n legend: 'LegendComponent',\n dataZoom: 'DataZoomComponent',\n visualMap: 'VisualMapComponent',\n // aria: 'AriaComponent',\n // dataset: 'DatasetComponent',\n // Dependencies\n xAxis: 'GridComponent',\n yAxis: 'GridComponent',\n angleAxis: 'PolarComponent',\n radiusAxis: 'PolarComponent'\n};\nvar BUILTIN_CHARTS_MAP = {\n line: 'LineChart',\n bar: 'BarChart',\n pie: 'PieChart',\n scatter: 'ScatterChart',\n radar: 'RadarChart',\n map: 'MapChart',\n tree: 'TreeChart',\n treemap: 'TreemapChart',\n graph: 'GraphChart',\n gauge: 'GaugeChart',\n funnel: 'FunnelChart',\n parallel: 'ParallelChart',\n sankey: 'SankeyChart',\n boxplot: 'BoxplotChart',\n candlestick: 'CandlestickChart',\n effectScatter: 'EffectScatterChart',\n lines: 'LinesChart',\n heatmap: 'HeatmapChart',\n pictorialBar: 'PictorialBarChart',\n themeRiver: 'ThemeRiverChart',\n sunburst: 'SunburstChart',\n custom: 'CustomChart'\n};\nvar componetsMissingLogPrinted = {};\nfunction checkMissingComponents(option) {\n each(option, function (componentOption, mainType) {\n if (!ComponentModel.hasClass(mainType)) {\n var componentImportName = BUITIN_COMPONENTS_MAP[mainType];\n if (componentImportName && !componetsMissingLogPrinted[componentImportName]) {\n error(\"Component \" + mainType + \" is used but not imported.\\nimport { \" + componentImportName + \" } from 'echarts/components';\\necharts.use([\" + componentImportName + \"]);\");\n componetsMissingLogPrinted[componentImportName] = true;\n }\n }\n });\n}\nvar GlobalModel = /** @class */function (_super) {\n __extends(GlobalModel, _super);\n function GlobalModel() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n GlobalModel.prototype.init = function (option, parentModel, ecModel, theme, locale, optionManager) {\n theme = theme || {};\n this.option = null; // Mark as not initialized.\n this._theme = new Model(theme);\n this._locale = new Model(locale);\n this._optionManager = optionManager;\n };\n GlobalModel.prototype.setOption = function (option, opts, optionPreprocessorFuncs) {\n if (process.env.NODE_ENV !== 'production') {\n assert(option != null, 'option is null/undefined');\n assert(option[OPTION_INNER_KEY] !== OPTION_INNER_VALUE, 'please use chart.getOption()');\n }\n var innerOpt = normalizeSetOptionInput(opts);\n this._optionManager.setOption(option, optionPreprocessorFuncs, innerOpt);\n this._resetOption(null, innerOpt);\n };\n /**\n * @param type null/undefined: reset all.\n * 'recreate': force recreate all.\n * 'timeline': only reset timeline option\n * 'media': only reset media query option\n * @return Whether option changed.\n */\n GlobalModel.prototype.resetOption = function (type, opt) {\n return this._resetOption(type, normalizeSetOptionInput(opt));\n };\n GlobalModel.prototype._resetOption = function (type, opt) {\n var optionChanged = false;\n var optionManager = this._optionManager;\n if (!type || type === 'recreate') {\n var baseOption = optionManager.mountOption(type === 'recreate');\n if (process.env.NODE_ENV !== 'production') {\n checkMissingComponents(baseOption);\n }\n if (!this.option || type === 'recreate') {\n initBase(this, baseOption);\n } else {\n this.restoreData();\n this._mergeOption(baseOption, opt);\n }\n optionChanged = true;\n }\n if (type === 'timeline' || type === 'media') {\n this.restoreData();\n }\n // By design, if `setOption(option2)` at the second time, and `option2` is a `ECUnitOption`,\n // it should better not have the same props with `MediaUnit['option']`.\n // Because either `option2` or `MediaUnit['option']` will be always merged to \"current option\"\n // rather than original \"baseOption\". If they both override a prop, the result might be\n // unexpected when media state changed after `setOption` called.\n // If we really need to modify a props in each `MediaUnit['option']`, use the full version\n // (`{baseOption, media}`) in `setOption`.\n // For `timeline`, the case is the same.\n if (!type || type === 'recreate' || type === 'timeline') {\n var timelineOption = optionManager.getTimelineOption(this);\n if (timelineOption) {\n optionChanged = true;\n this._mergeOption(timelineOption, opt);\n }\n }\n if (!type || type === 'recreate' || type === 'media') {\n var mediaOptions = optionManager.getMediaOption(this);\n if (mediaOptions.length) {\n each(mediaOptions, function (mediaOption) {\n optionChanged = true;\n this._mergeOption(mediaOption, opt);\n }, this);\n }\n }\n return optionChanged;\n };\n GlobalModel.prototype.mergeOption = function (option) {\n this._mergeOption(option, null);\n };\n GlobalModel.prototype._mergeOption = function (newOption, opt) {\n var option = this.option;\n var componentsMap = this._componentsMap;\n var componentsCount = this._componentsCount;\n var newCmptTypes = [];\n var newCmptTypeMap = createHashMap();\n var replaceMergeMainTypeMap = opt && opt.replaceMergeMainTypeMap;\n resetSourceDefaulter(this);\n // If no component class, merge directly.\n // For example: color, animaiton options, etc.\n each(newOption, function (componentOption, mainType) {\n if (componentOption == null) {\n return;\n }\n if (!ComponentModel.hasClass(mainType)) {\n // globalSettingTask.dirty();\n option[mainType] = option[mainType] == null ? clone(componentOption) : merge(option[mainType], componentOption, true);\n } else if (mainType) {\n newCmptTypes.push(mainType);\n newCmptTypeMap.set(mainType, true);\n }\n });\n if (replaceMergeMainTypeMap) {\n // If there is a mainType `xxx` in `replaceMerge` but not declared in option,\n // we trade it as it is declared in option as `{xxx: []}`. Because:\n // (1) for normal merge, `{xxx: null/undefined}` are the same meaning as `{xxx: []}`.\n // (2) some preprocessor may convert some of `{xxx: null/undefined}` to `{xxx: []}`.\n replaceMergeMainTypeMap.each(function (val, mainTypeInReplaceMerge) {\n if (ComponentModel.hasClass(mainTypeInReplaceMerge) && !newCmptTypeMap.get(mainTypeInReplaceMerge)) {\n newCmptTypes.push(mainTypeInReplaceMerge);\n newCmptTypeMap.set(mainTypeInReplaceMerge, true);\n }\n });\n }\n ComponentModel.topologicalTravel(newCmptTypes, ComponentModel.getAllClassMainTypes(), visitComponent, this);\n function visitComponent(mainType) {\n var newCmptOptionList = concatInternalOptions(this, mainType, modelUtil.normalizeToArray(newOption[mainType]));\n var oldCmptList = componentsMap.get(mainType);\n var mergeMode =\n // `!oldCmptList` means init. See the comment in `mappingToExists`\n !oldCmptList ? 'replaceAll' : replaceMergeMainTypeMap && replaceMergeMainTypeMap.get(mainType) ? 'replaceMerge' : 'normalMerge';\n var mappingResult = modelUtil.mappingToExists(oldCmptList, newCmptOptionList, mergeMode);\n // Set mainType and complete subType.\n modelUtil.setComponentTypeToKeyInfo(mappingResult, mainType, ComponentModel);\n // Empty it before the travel, in order to prevent `this._componentsMap`\n // from being used in the `init`/`mergeOption`/`optionUpdated` of some\n // components, which is probably incorrect logic.\n option[mainType] = null;\n componentsMap.set(mainType, null);\n componentsCount.set(mainType, 0);\n var optionsByMainType = [];\n var cmptsByMainType = [];\n var cmptsCountByMainType = 0;\n var tooltipExists;\n var tooltipWarningLogged;\n each(mappingResult, function (resultItem, index) {\n var componentModel = resultItem.existing;\n var newCmptOption = resultItem.newOption;\n if (!newCmptOption) {\n if (componentModel) {\n // Consider where is no new option and should be merged using {},\n // see removeEdgeAndAdd in topologicalTravel and\n // ComponentModel.getAllClassMainTypes.\n componentModel.mergeOption({}, this);\n componentModel.optionUpdated({}, false);\n }\n // If no both `resultItem.exist` and `resultItem.option`,\n // either it is in `replaceMerge` and not matched by any id,\n // or it has been removed in previous `replaceMerge` and left a \"hole\" in this component index.\n } else {\n var isSeriesType = mainType === 'series';\n var ComponentModelClass = ComponentModel.getClass(mainType, resultItem.keyInfo.subType, !isSeriesType // Give a more detailed warn later if series don't exists\n );\n if (!ComponentModelClass) {\n if (process.env.NODE_ENV !== 'production') {\n var subType = resultItem.keyInfo.subType;\n var seriesImportName = BUILTIN_CHARTS_MAP[subType];\n if (!componetsMissingLogPrinted[subType]) {\n componetsMissingLogPrinted[subType] = true;\n if (seriesImportName) {\n error(\"Series \" + subType + \" is used but not imported.\\nimport { \" + seriesImportName + \" } from 'echarts/charts';\\necharts.use([\" + seriesImportName + \"]);\");\n } else {\n error(\"Unknown series \" + subType);\n }\n }\n }\n return;\n }\n // TODO Before multiple tooltips get supported, we do this check to avoid unexpected exception.\n if (mainType === 'tooltip') {\n if (tooltipExists) {\n if (process.env.NODE_ENV !== 'production') {\n if (!tooltipWarningLogged) {\n warn('Currently only one tooltip component is allowed.');\n tooltipWarningLogged = true;\n }\n }\n return;\n }\n tooltipExists = true;\n }\n if (componentModel && componentModel.constructor === ComponentModelClass) {\n componentModel.name = resultItem.keyInfo.name;\n // componentModel.settingTask && componentModel.settingTask.dirty();\n componentModel.mergeOption(newCmptOption, this);\n componentModel.optionUpdated(newCmptOption, false);\n } else {\n // PENDING Global as parent ?\n var extraOpt = extend({\n componentIndex: index\n }, resultItem.keyInfo);\n componentModel = new ComponentModelClass(newCmptOption, this, this, extraOpt);\n // Assign `keyInfo`\n extend(componentModel, extraOpt);\n if (resultItem.brandNew) {\n componentModel.__requireNewView = true;\n }\n componentModel.init(newCmptOption, this, this);\n // Call optionUpdated after init.\n // newCmptOption has been used as componentModel.option\n // and may be merged with theme and default, so pass null\n // to avoid confusion.\n componentModel.optionUpdated(null, true);\n }\n }\n if (componentModel) {\n optionsByMainType.push(componentModel.option);\n cmptsByMainType.push(componentModel);\n cmptsCountByMainType++;\n } else {\n // Always do assign to avoid elided item in array.\n optionsByMainType.push(void 0);\n cmptsByMainType.push(void 0);\n }\n }, this);\n option[mainType] = optionsByMainType;\n componentsMap.set(mainType, cmptsByMainType);\n componentsCount.set(mainType, cmptsCountByMainType);\n // Backup series for filtering.\n if (mainType === 'series') {\n reCreateSeriesIndices(this);\n }\n }\n // If no series declared, ensure `_seriesIndices` initialized.\n if (!this._seriesIndices) {\n reCreateSeriesIndices(this);\n }\n };\n /**\n * Get option for output (cloned option and inner info removed)\n */\n GlobalModel.prototype.getOption = function () {\n var option = clone(this.option);\n each(option, function (optInMainType, mainType) {\n if (ComponentModel.hasClass(mainType)) {\n var opts = modelUtil.normalizeToArray(optInMainType);\n // Inner cmpts need to be removed.\n // Inner cmpts might not be at last since ec5.0, but still\n // compatible for users: if inner cmpt at last, splice the returned array.\n var realLen = opts.length;\n var metNonInner = false;\n for (var i = realLen - 1; i >= 0; i--) {\n // Remove options with inner id.\n if (opts[i] && !modelUtil.isComponentIdInternal(opts[i])) {\n metNonInner = true;\n } else {\n opts[i] = null;\n !metNonInner && realLen--;\n }\n }\n opts.length = realLen;\n option[mainType] = opts;\n }\n });\n delete option[OPTION_INNER_KEY];\n return option;\n };\n GlobalModel.prototype.getTheme = function () {\n return this._theme;\n };\n GlobalModel.prototype.getLocaleModel = function () {\n return this._locale;\n };\n GlobalModel.prototype.setUpdatePayload = function (payload) {\n this._payload = payload;\n };\n GlobalModel.prototype.getUpdatePayload = function () {\n return this._payload;\n };\n /**\n * @param idx If not specified, return the first one.\n */\n GlobalModel.prototype.getComponent = function (mainType, idx) {\n var list = this._componentsMap.get(mainType);\n if (list) {\n var cmpt = list[idx || 0];\n if (cmpt) {\n return cmpt;\n } else if (idx == null) {\n for (var i = 0; i < list.length; i++) {\n if (list[i]) {\n return list[i];\n }\n }\n }\n }\n };\n /**\n * @return Never be null/undefined.\n */\n GlobalModel.prototype.queryComponents = function (condition) {\n var mainType = condition.mainType;\n if (!mainType) {\n return [];\n }\n var index = condition.index;\n var id = condition.id;\n var name = condition.name;\n var cmpts = this._componentsMap.get(mainType);\n if (!cmpts || !cmpts.length) {\n return [];\n }\n var result;\n if (index != null) {\n result = [];\n each(modelUtil.normalizeToArray(index), function (idx) {\n cmpts[idx] && result.push(cmpts[idx]);\n });\n } else if (id != null) {\n result = queryByIdOrName('id', id, cmpts);\n } else if (name != null) {\n result = queryByIdOrName('name', name, cmpts);\n } else {\n // Return all non-empty components in that mainType\n result = filter(cmpts, function (cmpt) {\n return !!cmpt;\n });\n }\n return filterBySubType(result, condition);\n };\n /**\n * The interface is different from queryComponents,\n * which is convenient for inner usage.\n *\n * @usage\n * let result = findComponents(\n * {mainType: 'dataZoom', query: {dataZoomId: 'abc'}}\n * );\n * let result = findComponents(\n * {mainType: 'series', subType: 'pie', query: {seriesName: 'uio'}}\n * );\n * let result = findComponents(\n * {mainType: 'series',\n * filter: function (model, index) {...}}\n * );\n * // result like [component0, componnet1, ...]\n */\n GlobalModel.prototype.findComponents = function (condition) {\n var query = condition.query;\n var mainType = condition.mainType;\n var queryCond = getQueryCond(query);\n var result = queryCond ? this.queryComponents(queryCond)\n // Retrieve all non-empty components.\n : filter(this._componentsMap.get(mainType), function (cmpt) {\n return !!cmpt;\n });\n return doFilter(filterBySubType(result, condition));\n function getQueryCond(q) {\n var indexAttr = mainType + 'Index';\n var idAttr = mainType + 'Id';\n var nameAttr = mainType + 'Name';\n return q && (q[indexAttr] != null || q[idAttr] != null || q[nameAttr] != null) ? {\n mainType: mainType,\n // subType will be filtered finally.\n index: q[indexAttr],\n id: q[idAttr],\n name: q[nameAttr]\n } : null;\n }\n function doFilter(res) {\n return condition.filter ? filter(res, condition.filter) : res;\n }\n };\n GlobalModel.prototype.eachComponent = function (mainType, cb, context) {\n var componentsMap = this._componentsMap;\n if (isFunction(mainType)) {\n var ctxForAll_1 = cb;\n var cbForAll_1 = mainType;\n componentsMap.each(function (cmpts, componentType) {\n for (var i = 0; cmpts && i < cmpts.length; i++) {\n var cmpt = cmpts[i];\n cmpt && cbForAll_1.call(ctxForAll_1, componentType, cmpt, cmpt.componentIndex);\n }\n });\n } else {\n var cmpts = isString(mainType) ? componentsMap.get(mainType) : isObject(mainType) ? this.findComponents(mainType) : null;\n for (var i = 0; cmpts && i < cmpts.length; i++) {\n var cmpt = cmpts[i];\n cmpt && cb.call(context, cmpt, cmpt.componentIndex);\n }\n }\n };\n /**\n * Get series list before filtered by name.\n */\n GlobalModel.prototype.getSeriesByName = function (name) {\n var nameStr = modelUtil.convertOptionIdName(name, null);\n return filter(this._componentsMap.get('series'), function (oneSeries) {\n return !!oneSeries && nameStr != null && oneSeries.name === nameStr;\n });\n };\n /**\n * Get series list before filtered by index.\n */\n GlobalModel.prototype.getSeriesByIndex = function (seriesIndex) {\n return this._componentsMap.get('series')[seriesIndex];\n };\n /**\n * Get series list before filtered by type.\n * FIXME: rename to getRawSeriesByType?\n */\n GlobalModel.prototype.getSeriesByType = function (subType) {\n return filter(this._componentsMap.get('series'), function (oneSeries) {\n return !!oneSeries && oneSeries.subType === subType;\n });\n };\n /**\n * Get all series before filtered.\n */\n GlobalModel.prototype.getSeries = function () {\n return filter(this._componentsMap.get('series'), function (oneSeries) {\n return !!oneSeries;\n });\n };\n /**\n * Count series before filtered.\n */\n GlobalModel.prototype.getSeriesCount = function () {\n return this._componentsCount.get('series');\n };\n /**\n * After filtering, series may be different\n * from raw series.\n */\n GlobalModel.prototype.eachSeries = function (cb, context) {\n assertSeriesInitialized(this);\n each(this._seriesIndices, function (rawSeriesIndex) {\n var series = this._componentsMap.get('series')[rawSeriesIndex];\n cb.call(context, series, rawSeriesIndex);\n }, this);\n };\n /**\n * Iterate raw series before filtered.\n *\n * @param {Function} cb\n * @param {*} context\n */\n GlobalModel.prototype.eachRawSeries = function (cb, context) {\n each(this._componentsMap.get('series'), function (series) {\n series && cb.call(context, series, series.componentIndex);\n });\n };\n /**\n * After filtering, series may be different.\n * from raw series.\n */\n GlobalModel.prototype.eachSeriesByType = function (subType, cb, context) {\n assertSeriesInitialized(this);\n each(this._seriesIndices, function (rawSeriesIndex) {\n var series = this._componentsMap.get('series')[rawSeriesIndex];\n if (series.subType === subType) {\n cb.call(context, series, rawSeriesIndex);\n }\n }, this);\n };\n /**\n * Iterate raw series before filtered of given type.\n */\n GlobalModel.prototype.eachRawSeriesByType = function (subType, cb, context) {\n return each(this.getSeriesByType(subType), cb, context);\n };\n GlobalModel.prototype.isSeriesFiltered = function (seriesModel) {\n assertSeriesInitialized(this);\n return this._seriesIndicesMap.get(seriesModel.componentIndex) == null;\n };\n GlobalModel.prototype.getCurrentSeriesIndices = function () {\n return (this._seriesIndices || []).slice();\n };\n GlobalModel.prototype.filterSeries = function (cb, context) {\n assertSeriesInitialized(this);\n var newSeriesIndices = [];\n each(this._seriesIndices, function (seriesRawIdx) {\n var series = this._componentsMap.get('series')[seriesRawIdx];\n cb.call(context, series, seriesRawIdx) && newSeriesIndices.push(seriesRawIdx);\n }, this);\n this._seriesIndices = newSeriesIndices;\n this._seriesIndicesMap = createHashMap(newSeriesIndices);\n };\n GlobalModel.prototype.restoreData = function (payload) {\n reCreateSeriesIndices(this);\n var componentsMap = this._componentsMap;\n var componentTypes = [];\n componentsMap.each(function (components, componentType) {\n if (ComponentModel.hasClass(componentType)) {\n componentTypes.push(componentType);\n }\n });\n ComponentModel.topologicalTravel(componentTypes, ComponentModel.getAllClassMainTypes(), function (componentType) {\n each(componentsMap.get(componentType), function (component) {\n if (component && (componentType !== 'series' || !isNotTargetSeries(component, payload))) {\n component.restoreData();\n }\n });\n });\n };\n GlobalModel.internalField = function () {\n reCreateSeriesIndices = function (ecModel) {\n var seriesIndices = ecModel._seriesIndices = [];\n each(ecModel._componentsMap.get('series'), function (series) {\n // series may have been removed by `replaceMerge`.\n series && seriesIndices.push(series.componentIndex);\n });\n ecModel._seriesIndicesMap = createHashMap(seriesIndices);\n };\n assertSeriesInitialized = function (ecModel) {\n // Components that use _seriesIndices should depends on series component,\n // which make sure that their initialization is after series.\n if (process.env.NODE_ENV !== 'production') {\n if (!ecModel._seriesIndices) {\n throw new Error('Option should contains series.');\n }\n }\n };\n initBase = function (ecModel, baseOption) {\n // Using OPTION_INNER_KEY to mark that this option cannot be used outside,\n // i.e. `chart.setOption(chart.getModel().option);` is forbidden.\n ecModel.option = {};\n ecModel.option[OPTION_INNER_KEY] = OPTION_INNER_VALUE;\n // Init with series: [], in case of calling findSeries method\n // before series initialized.\n ecModel._componentsMap = createHashMap({\n series: []\n });\n ecModel._componentsCount = createHashMap();\n // If user spefied `option.aria`, aria will be enable. This detection should be\n // performed before theme and globalDefault merge.\n var airaOption = baseOption.aria;\n if (isObject(airaOption) && airaOption.enabled == null) {\n airaOption.enabled = true;\n }\n mergeTheme(baseOption, ecModel._theme.option);\n // TODO Needs clone when merging to the unexisted property\n merge(baseOption, globalDefault, false);\n ecModel._mergeOption(baseOption, null);\n };\n }();\n return GlobalModel;\n}(Model);\nfunction isNotTargetSeries(seriesModel, payload) {\n if (payload) {\n var index = payload.seriesIndex;\n var id = payload.seriesId;\n var name_1 = payload.seriesName;\n return index != null && seriesModel.componentIndex !== index || id != null && seriesModel.id !== id || name_1 != null && seriesModel.name !== name_1;\n }\n}\nfunction mergeTheme(option, theme) {\n // PENDING\n // NOT use `colorLayer` in theme if option has `color`\n var notMergeColorLayer = option.color && !option.colorLayer;\n each(theme, function (themeItem, name) {\n if (name === 'colorLayer' && notMergeColorLayer) {\n return;\n }\n // If it is component model mainType, the model handles that merge later.\n // otherwise, merge them here.\n if (!ComponentModel.hasClass(name)) {\n if (typeof themeItem === 'object') {\n option[name] = !option[name] ? clone(themeItem) : merge(option[name], themeItem, false);\n } else {\n if (option[name] == null) {\n option[name] = themeItem;\n }\n }\n }\n });\n}\nfunction queryByIdOrName(attr, idOrName, cmpts) {\n // Here is a break from echarts4: string and number are\n // treated as equal.\n if (isArray(idOrName)) {\n var keyMap_1 = createHashMap();\n each(idOrName, function (idOrNameItem) {\n if (idOrNameItem != null) {\n var idName = modelUtil.convertOptionIdName(idOrNameItem, null);\n idName != null && keyMap_1.set(idOrNameItem, true);\n }\n });\n return filter(cmpts, function (cmpt) {\n return cmpt && keyMap_1.get(cmpt[attr]);\n });\n } else {\n var idName_1 = modelUtil.convertOptionIdName(idOrName, null);\n return filter(cmpts, function (cmpt) {\n return cmpt && idName_1 != null && cmpt[attr] === idName_1;\n });\n }\n}\nfunction filterBySubType(components, condition) {\n // Using hasOwnProperty for restrict. Consider\n // subType is undefined in user payload.\n return condition.hasOwnProperty('subType') ? filter(components, function (cmpt) {\n return cmpt && cmpt.subType === condition.subType;\n }) : components;\n}\nfunction normalizeSetOptionInput(opts) {\n var replaceMergeMainTypeMap = createHashMap();\n opts && each(modelUtil.normalizeToArray(opts.replaceMerge), function (mainType) {\n if (process.env.NODE_ENV !== 'production') {\n assert(ComponentModel.hasClass(mainType), '\"' + mainType + '\" is not valid component main type in \"replaceMerge\"');\n }\n replaceMergeMainTypeMap.set(mainType, true);\n });\n return {\n replaceMergeMainTypeMap: replaceMergeMainTypeMap\n };\n}\nmixin(GlobalModel, PaletteMixin);\nexport default GlobalModel;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nvar availableMethods = ['getDom', 'getZr', 'getWidth', 'getHeight', 'getDevicePixelRatio', 'dispatchAction', 'isSSR', 'isDisposed', 'on', 'off', 'getDataURL', 'getConnectedDataURL',\n// 'getModel',\n'getOption',\n// 'getViewOfComponentModel',\n// 'getViewOfSeriesModel',\n'getId', 'updateLabelLayout'];\nvar ExtensionAPI = /** @class */function () {\n function ExtensionAPI(ecInstance) {\n zrUtil.each(availableMethods, function (methodName) {\n this[methodName] = zrUtil.bind(ecInstance[methodName], ecInstance);\n }, this);\n }\n return ExtensionAPI;\n}();\nexport default ExtensionAPI;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nvar coordinateSystemCreators = {};\nvar CoordinateSystemManager = /** @class */function () {\n function CoordinateSystemManager() {\n this._coordinateSystems = [];\n }\n CoordinateSystemManager.prototype.create = function (ecModel, api) {\n var coordinateSystems = [];\n zrUtil.each(coordinateSystemCreators, function (creator, type) {\n var list = creator.create(ecModel, api);\n coordinateSystems = coordinateSystems.concat(list || []);\n });\n this._coordinateSystems = coordinateSystems;\n };\n CoordinateSystemManager.prototype.update = function (ecModel, api) {\n zrUtil.each(this._coordinateSystems, function (coordSys) {\n coordSys.update && coordSys.update(ecModel, api);\n });\n };\n CoordinateSystemManager.prototype.getCoordinateSystems = function () {\n return this._coordinateSystems.slice();\n };\n CoordinateSystemManager.register = function (type, creator) {\n coordinateSystemCreators[type] = creator;\n };\n CoordinateSystemManager.get = function (type) {\n return coordinateSystemCreators[type];\n };\n return CoordinateSystemManager;\n}();\nexport default CoordinateSystemManager;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { normalizeToArray\n// , MappingExistingItem, setComponentTypeToKeyInfo, mappingToExists\n} from '../util/model.js';\nimport { each, clone, map, isTypedArray, setAsPrimitive, isArray, isObject\n// , HashMap , createHashMap, extend, merge,\n} from 'zrender/lib/core/util.js';\nimport { error } from '../util/log.js';\nvar QUERY_REG = /^(min|max)?(.+)$/;\n// Key: mainType\n// type FakeComponentsMap = HashMap<(MappingExistingItem & { subType: string })[]>;\n/**\n * TERM EXPLANATIONS:\n * See `ECOption` and `ECUnitOption` in `src/util/types.ts`.\n */\nvar OptionManager = /** @class */function () {\n // timeline.notMerge is not supported in ec3. Firstly there is rearly\n // case that notMerge is needed. Secondly supporting 'notMerge' requires\n // rawOption cloned and backuped when timeline changed, which does no\n // good to performance. What's more, that both timeline and setOption\n // method supply 'notMerge' brings complex and some problems.\n // Consider this case:\n // (step1) chart.setOption({timeline: {notMerge: false}, ...}, false);\n // (step2) chart.setOption({timeline: {notMerge: true}, ...}, false);\n function OptionManager(api) {\n this._timelineOptions = [];\n this._mediaList = [];\n /**\n * -1, means default.\n * empty means no media.\n */\n this._currentMediaIndices = [];\n this._api = api;\n }\n OptionManager.prototype.setOption = function (rawOption, optionPreprocessorFuncs, opt) {\n if (rawOption) {\n // That set dat primitive is dangerous if user reuse the data when setOption again.\n each(normalizeToArray(rawOption.series), function (series) {\n series && series.data && isTypedArray(series.data) && setAsPrimitive(series.data);\n });\n each(normalizeToArray(rawOption.dataset), function (dataset) {\n dataset && dataset.source && isTypedArray(dataset.source) && setAsPrimitive(dataset.source);\n });\n }\n // Caution: some series modify option data, if do not clone,\n // it should ensure that the repeat modify correctly\n // (create a new object when modify itself).\n rawOption = clone(rawOption);\n // FIXME\n // If some property is set in timeline options or media option but\n // not set in baseOption, a warning should be given.\n var optionBackup = this._optionBackup;\n var newParsedOption = parseRawOption(rawOption, optionPreprocessorFuncs, !optionBackup);\n this._newBaseOption = newParsedOption.baseOption;\n // For setOption at second time (using merge mode);\n if (optionBackup) {\n // FIXME\n // the restore merge solution is essentially incorrect.\n // the mapping can not be 100% consistent with ecModel, which probably brings\n // potential bug!\n // The first merge is delayed, because in most cases, users do not call `setOption` twice.\n // let fakeCmptsMap = this._fakeCmptsMap;\n // if (!fakeCmptsMap) {\n // fakeCmptsMap = this._fakeCmptsMap = createHashMap();\n // mergeToBackupOption(fakeCmptsMap, null, optionBackup.baseOption, null);\n // }\n // mergeToBackupOption(\n // fakeCmptsMap, optionBackup.baseOption, newParsedOption.baseOption, opt\n // );\n // For simplicity, timeline options and media options do not support merge,\n // that is, if you `setOption` twice and both has timeline options, the latter\n // timeline options will not be merged to the former, but just substitute them.\n if (newParsedOption.timelineOptions.length) {\n optionBackup.timelineOptions = newParsedOption.timelineOptions;\n }\n if (newParsedOption.mediaList.length) {\n optionBackup.mediaList = newParsedOption.mediaList;\n }\n if (newParsedOption.mediaDefault) {\n optionBackup.mediaDefault = newParsedOption.mediaDefault;\n }\n } else {\n this._optionBackup = newParsedOption;\n }\n };\n OptionManager.prototype.mountOption = function (isRecreate) {\n var optionBackup = this._optionBackup;\n this._timelineOptions = optionBackup.timelineOptions;\n this._mediaList = optionBackup.mediaList;\n this._mediaDefault = optionBackup.mediaDefault;\n this._currentMediaIndices = [];\n return clone(isRecreate\n // this._optionBackup.baseOption, which is created at the first `setOption`\n // called, and is merged into every new option by inner method `mergeToBackupOption`\n // each time `setOption` called, can be only used in `isRecreate`, because\n // its reliability is under suspicion. In other cases option merge is\n // performed by `model.mergeOption`.\n ? optionBackup.baseOption : this._newBaseOption);\n };\n OptionManager.prototype.getTimelineOption = function (ecModel) {\n var option;\n var timelineOptions = this._timelineOptions;\n if (timelineOptions.length) {\n // getTimelineOption can only be called after ecModel inited,\n // so we can get currentIndex from timelineModel.\n var timelineModel = ecModel.getComponent('timeline');\n if (timelineModel) {\n option = clone(\n // FIXME:TS as TimelineModel or quivlant interface\n timelineOptions[timelineModel.getCurrentIndex()]);\n }\n }\n return option;\n };\n OptionManager.prototype.getMediaOption = function (ecModel) {\n var ecWidth = this._api.getWidth();\n var ecHeight = this._api.getHeight();\n var mediaList = this._mediaList;\n var mediaDefault = this._mediaDefault;\n var indices = [];\n var result = [];\n // No media defined.\n if (!mediaList.length && !mediaDefault) {\n return result;\n }\n // Multi media may be applied, the latter defined media has higher priority.\n for (var i = 0, len = mediaList.length; i < len; i++) {\n if (applyMediaQuery(mediaList[i].query, ecWidth, ecHeight)) {\n indices.push(i);\n }\n }\n // FIXME\n // Whether mediaDefault should force users to provide? Otherwise\n // the change by media query can not be recorvered.\n if (!indices.length && mediaDefault) {\n indices = [-1];\n }\n if (indices.length && !indicesEquals(indices, this._currentMediaIndices)) {\n result = map(indices, function (index) {\n return clone(index === -1 ? mediaDefault.option : mediaList[index].option);\n });\n }\n // Otherwise return nothing.\n this._currentMediaIndices = indices;\n return result;\n };\n return OptionManager;\n}();\n/**\n * [RAW_OPTION_PATTERNS]\n * (Note: \"series: []\" represents all other props in `ECUnitOption`)\n *\n * (1) No prop \"baseOption\" declared:\n * Root option is used as \"baseOption\" (except prop \"options\" and \"media\").\n * ```js\n * option = {\n * series: [],\n * timeline: {},\n * options: [],\n * };\n * option = {\n * series: [],\n * media: {},\n * };\n * option = {\n * series: [],\n * timeline: {},\n * options: [],\n * media: {},\n * }\n * ```\n *\n * (2) Prop \"baseOption\" declared:\n * If \"baseOption\" declared, `ECUnitOption` props can only be declared\n * inside \"baseOption\" except prop \"timeline\" (compat ec2).\n * ```js\n * option = {\n * baseOption: {\n * timeline: {},\n * series: [],\n * },\n * options: []\n * };\n * option = {\n * baseOption: {\n * series: [],\n * },\n * media: []\n * };\n * option = {\n * baseOption: {\n * timeline: {},\n * series: [],\n * },\n * options: []\n * media: []\n * };\n * option = {\n * // ec3 compat ec2: allow (only) `timeline` declared\n * // outside baseOption. Keep this setting for compat.\n * timeline: {},\n * baseOption: {\n * series: [],\n * },\n * options: [],\n * media: []\n * };\n * ```\n */\nfunction parseRawOption(\n// `rawOption` May be modified\nrawOption, optionPreprocessorFuncs, isNew) {\n var mediaList = [];\n var mediaDefault;\n var baseOption;\n var declaredBaseOption = rawOption.baseOption;\n // Compatible with ec2, [RAW_OPTION_PATTERNS] above.\n var timelineOnRoot = rawOption.timeline;\n var timelineOptionsOnRoot = rawOption.options;\n var mediaOnRoot = rawOption.media;\n var hasMedia = !!rawOption.media;\n var hasTimeline = !!(timelineOptionsOnRoot || timelineOnRoot || declaredBaseOption && declaredBaseOption.timeline);\n if (declaredBaseOption) {\n baseOption = declaredBaseOption;\n // For merge option.\n if (!baseOption.timeline) {\n baseOption.timeline = timelineOnRoot;\n }\n }\n // For convenience, enable to use the root option as the `baseOption`:\n // `{ ...normalOptionProps, media: [{ ... }, { ... }] }`\n else {\n if (hasTimeline || hasMedia) {\n rawOption.options = rawOption.media = null;\n }\n baseOption = rawOption;\n }\n if (hasMedia) {\n if (isArray(mediaOnRoot)) {\n each(mediaOnRoot, function (singleMedia) {\n if (process.env.NODE_ENV !== 'production') {\n // Real case of wrong config.\n if (singleMedia && !singleMedia.option && isObject(singleMedia.query) && isObject(singleMedia.query.option)) {\n error('Illegal media option. Must be like { media: [ { query: {}, option: {} } ] }');\n }\n }\n if (singleMedia && singleMedia.option) {\n if (singleMedia.query) {\n mediaList.push(singleMedia);\n } else if (!mediaDefault) {\n // Use the first media default.\n mediaDefault = singleMedia;\n }\n }\n });\n } else {\n if (process.env.NODE_ENV !== 'production') {\n // Real case of wrong config.\n error('Illegal media option. Must be an array. Like { media: [ {...}, {...} ] }');\n }\n }\n }\n doPreprocess(baseOption);\n each(timelineOptionsOnRoot, function (option) {\n return doPreprocess(option);\n });\n each(mediaList, function (media) {\n return doPreprocess(media.option);\n });\n function doPreprocess(option) {\n each(optionPreprocessorFuncs, function (preProcess) {\n preProcess(option, isNew);\n });\n }\n return {\n baseOption: baseOption,\n timelineOptions: timelineOptionsOnRoot || [],\n mediaDefault: mediaDefault,\n mediaList: mediaList\n };\n}\n/**\n * @see \n * Support: width, height, aspectRatio\n * Can use max or min as prefix.\n */\nfunction applyMediaQuery(query, ecWidth, ecHeight) {\n var realMap = {\n width: ecWidth,\n height: ecHeight,\n aspectratio: ecWidth / ecHeight // lower case for convenience.\n };\n var applicable = true;\n each(query, function (value, attr) {\n var matched = attr.match(QUERY_REG);\n if (!matched || !matched[1] || !matched[2]) {\n return;\n }\n var operator = matched[1];\n var realAttr = matched[2].toLowerCase();\n if (!compare(realMap[realAttr], value, operator)) {\n applicable = false;\n }\n });\n return applicable;\n}\nfunction compare(real, expect, operator) {\n if (operator === 'min') {\n return real >= expect;\n } else if (operator === 'max') {\n return real <= expect;\n } else {\n // Equals\n return real === expect;\n }\n}\nfunction indicesEquals(indices1, indices2) {\n // indices is always order by asc and has only finite number.\n return indices1.join(',') === indices2.join(',');\n}\n/**\n * Consider case:\n * `chart.setOption(opt1);`\n * Then user do some interaction like dataZoom, dataView changing.\n * `chart.setOption(opt2);`\n * Then user press 'reset button' in toolbox.\n *\n * After doing that all of the interaction effects should be reset, the\n * chart should be the same as the result of invoke\n * `chart.setOption(opt1); chart.setOption(opt2);`.\n *\n * Although it is not able ensure that\n * `chart.setOption(opt1); chart.setOption(opt2);` is equivalents to\n * `chart.setOption(merge(opt1, opt2));` exactly,\n * this might be the only simple way to implement that feature.\n *\n * MEMO: We've considered some other approaches:\n * 1. Each model handles its self restoration but not uniform treatment.\n * (Too complex in logic and error-prone)\n * 2. Use a shadow ecModel. (Performance expensive)\n *\n * FIXME: A possible solution:\n * Add a extra level of model for each component model. The inheritance chain would be:\n * ecModel <- componentModel <- componentActionModel <- dataItemModel\n * And all of the actions can only modify the `componentActionModel` rather than\n * `componentModel`. `setOption` will only modify the `ecModel` and `componentModel`.\n * When \"resotre\" action triggered, model from `componentActionModel` will be discarded\n * instead of recreating the \"ecModel\" from the \"_optionBackup\".\n */\n// function mergeToBackupOption(\n// fakeCmptsMap: FakeComponentsMap,\n// // `tarOption` Can be null/undefined, means init\n// tarOption: ECUnitOption,\n// newOption: ECUnitOption,\n// // Can be null/undefined\n// opt: InnerSetOptionOpts\n// ): void {\n// newOption = newOption || {} as ECUnitOption;\n// const notInit = !!tarOption;\n// each(newOption, function (newOptsInMainType, mainType) {\n// if (newOptsInMainType == null) {\n// return;\n// }\n// if (!ComponentModel.hasClass(mainType)) {\n// if (tarOption) {\n// tarOption[mainType] = merge(tarOption[mainType], newOptsInMainType, true);\n// }\n// }\n// else {\n// const oldTarOptsInMainType = notInit ? normalizeToArray(tarOption[mainType]) : null;\n// const oldFakeCmptsInMainType = fakeCmptsMap.get(mainType) || [];\n// const resultTarOptsInMainType = notInit ? (tarOption[mainType] = [] as ComponentOption[]) : null;\n// const resultFakeCmptsInMainType = fakeCmptsMap.set(mainType, []);\n// const mappingResult = mappingToExists(\n// oldFakeCmptsInMainType,\n// normalizeToArray(newOptsInMainType),\n// (opt && opt.replaceMergeMainTypeMap.get(mainType)) ? 'replaceMerge' : 'normalMerge'\n// );\n// setComponentTypeToKeyInfo(mappingResult, mainType, ComponentModel as ComponentModelConstructor);\n// each(mappingResult, function (resultItem, index) {\n// // The same logic as `Global.ts#_mergeOption`.\n// let fakeCmpt = resultItem.existing;\n// const newOption = resultItem.newOption;\n// const keyInfo = resultItem.keyInfo;\n// let fakeCmptOpt;\n// if (!newOption) {\n// fakeCmptOpt = oldTarOptsInMainType[index];\n// }\n// else {\n// if (fakeCmpt && fakeCmpt.subType === keyInfo.subType) {\n// fakeCmpt.name = keyInfo.name;\n// if (notInit) {\n// fakeCmptOpt = merge(oldTarOptsInMainType[index], newOption, true);\n// }\n// }\n// else {\n// fakeCmpt = extend({}, keyInfo);\n// if (notInit) {\n// fakeCmptOpt = clone(newOption);\n// }\n// }\n// }\n// if (fakeCmpt) {\n// notInit && resultTarOptsInMainType.push(fakeCmptOpt);\n// resultFakeCmptsInMainType.push(fakeCmpt);\n// }\n// else {\n// notInit && resultTarOptsInMainType.push(void 0);\n// resultFakeCmptsInMainType.push(void 0);\n// }\n// });\n// }\n// });\n// }\nexport default OptionManager;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as modelUtil from '../../util/model.js';\nimport { deprecateLog, deprecateReplaceLog } from '../../util/log.js';\nvar each = zrUtil.each;\nvar isObject = zrUtil.isObject;\nvar POSSIBLE_STYLES = ['areaStyle', 'lineStyle', 'nodeStyle', 'linkStyle', 'chordStyle', 'label', 'labelLine'];\nfunction compatEC2ItemStyle(opt) {\n var itemStyleOpt = opt && opt.itemStyle;\n if (!itemStyleOpt) {\n return;\n }\n for (var i = 0, len = POSSIBLE_STYLES.length; i < len; i++) {\n var styleName = POSSIBLE_STYLES[i];\n var normalItemStyleOpt = itemStyleOpt.normal;\n var emphasisItemStyleOpt = itemStyleOpt.emphasis;\n if (normalItemStyleOpt && normalItemStyleOpt[styleName]) {\n if (process.env.NODE_ENV !== 'production') {\n deprecateReplaceLog(\"itemStyle.normal.\" + styleName, styleName);\n }\n opt[styleName] = opt[styleName] || {};\n if (!opt[styleName].normal) {\n opt[styleName].normal = normalItemStyleOpt[styleName];\n } else {\n zrUtil.merge(opt[styleName].normal, normalItemStyleOpt[styleName]);\n }\n normalItemStyleOpt[styleName] = null;\n }\n if (emphasisItemStyleOpt && emphasisItemStyleOpt[styleName]) {\n if (process.env.NODE_ENV !== 'production') {\n deprecateReplaceLog(\"itemStyle.emphasis.\" + styleName, \"emphasis.\" + styleName);\n }\n opt[styleName] = opt[styleName] || {};\n if (!opt[styleName].emphasis) {\n opt[styleName].emphasis = emphasisItemStyleOpt[styleName];\n } else {\n zrUtil.merge(opt[styleName].emphasis, emphasisItemStyleOpt[styleName]);\n }\n emphasisItemStyleOpt[styleName] = null;\n }\n }\n}\nfunction convertNormalEmphasis(opt, optType, useExtend) {\n if (opt && opt[optType] && (opt[optType].normal || opt[optType].emphasis)) {\n var normalOpt = opt[optType].normal;\n var emphasisOpt = opt[optType].emphasis;\n if (normalOpt) {\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line max-len\n deprecateLog(\"'normal' hierarchy in \" + optType + \" has been removed since 4.0. All style properties are configured in \" + optType + \" directly now.\");\n }\n // Timeline controlStyle has other properties besides normal and emphasis\n if (useExtend) {\n opt[optType].normal = opt[optType].emphasis = null;\n zrUtil.defaults(opt[optType], normalOpt);\n } else {\n opt[optType] = normalOpt;\n }\n }\n if (emphasisOpt) {\n if (process.env.NODE_ENV !== 'production') {\n deprecateLog(optType + \".emphasis has been changed to emphasis.\" + optType + \" since 4.0\");\n }\n opt.emphasis = opt.emphasis || {};\n opt.emphasis[optType] = emphasisOpt;\n // Also compat the case user mix the style and focus together in ec3 style\n // for example: { itemStyle: { normal: {}, emphasis: {focus, shadowBlur} } }\n if (emphasisOpt.focus) {\n opt.emphasis.focus = emphasisOpt.focus;\n }\n if (emphasisOpt.blurScope) {\n opt.emphasis.blurScope = emphasisOpt.blurScope;\n }\n }\n }\n}\nfunction removeEC3NormalStatus(opt) {\n convertNormalEmphasis(opt, 'itemStyle');\n convertNormalEmphasis(opt, 'lineStyle');\n convertNormalEmphasis(opt, 'areaStyle');\n convertNormalEmphasis(opt, 'label');\n convertNormalEmphasis(opt, 'labelLine');\n // treemap\n convertNormalEmphasis(opt, 'upperLabel');\n // graph\n convertNormalEmphasis(opt, 'edgeLabel');\n}\nfunction compatTextStyle(opt, propName) {\n // Check whether is not object (string\\null\\undefined ...)\n var labelOptSingle = isObject(opt) && opt[propName];\n var textStyle = isObject(labelOptSingle) && labelOptSingle.textStyle;\n if (textStyle) {\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line max-len\n deprecateLog(\"textStyle hierarchy in \" + propName + \" has been removed since 4.0. All textStyle properties are configured in \" + propName + \" directly now.\");\n }\n for (var i = 0, len = modelUtil.TEXT_STYLE_OPTIONS.length; i < len; i++) {\n var textPropName = modelUtil.TEXT_STYLE_OPTIONS[i];\n if (textStyle.hasOwnProperty(textPropName)) {\n labelOptSingle[textPropName] = textStyle[textPropName];\n }\n }\n }\n}\nfunction compatEC3CommonStyles(opt) {\n if (opt) {\n removeEC3NormalStatus(opt);\n compatTextStyle(opt, 'label');\n opt.emphasis && compatTextStyle(opt.emphasis, 'label');\n }\n}\nfunction processSeries(seriesOpt) {\n if (!isObject(seriesOpt)) {\n return;\n }\n compatEC2ItemStyle(seriesOpt);\n removeEC3NormalStatus(seriesOpt);\n compatTextStyle(seriesOpt, 'label');\n // treemap\n compatTextStyle(seriesOpt, 'upperLabel');\n // graph\n compatTextStyle(seriesOpt, 'edgeLabel');\n if (seriesOpt.emphasis) {\n compatTextStyle(seriesOpt.emphasis, 'label');\n // treemap\n compatTextStyle(seriesOpt.emphasis, 'upperLabel');\n // graph\n compatTextStyle(seriesOpt.emphasis, 'edgeLabel');\n }\n var markPoint = seriesOpt.markPoint;\n if (markPoint) {\n compatEC2ItemStyle(markPoint);\n compatEC3CommonStyles(markPoint);\n }\n var markLine = seriesOpt.markLine;\n if (markLine) {\n compatEC2ItemStyle(markLine);\n compatEC3CommonStyles(markLine);\n }\n var markArea = seriesOpt.markArea;\n if (markArea) {\n compatEC3CommonStyles(markArea);\n }\n var data = seriesOpt.data;\n // Break with ec3: if `setOption` again, there may be no `type` in option,\n // then the backward compat based on option type will not be performed.\n if (seriesOpt.type === 'graph') {\n data = data || seriesOpt.nodes;\n var edgeData = seriesOpt.links || seriesOpt.edges;\n if (edgeData && !zrUtil.isTypedArray(edgeData)) {\n for (var i = 0; i < edgeData.length; i++) {\n compatEC3CommonStyles(edgeData[i]);\n }\n }\n zrUtil.each(seriesOpt.categories, function (opt) {\n removeEC3NormalStatus(opt);\n });\n }\n if (data && !zrUtil.isTypedArray(data)) {\n for (var i = 0; i < data.length; i++) {\n compatEC3CommonStyles(data[i]);\n }\n }\n // mark point data\n markPoint = seriesOpt.markPoint;\n if (markPoint && markPoint.data) {\n var mpData = markPoint.data;\n for (var i = 0; i < mpData.length; i++) {\n compatEC3CommonStyles(mpData[i]);\n }\n }\n // mark line data\n markLine = seriesOpt.markLine;\n if (markLine && markLine.data) {\n var mlData = markLine.data;\n for (var i = 0; i < mlData.length; i++) {\n if (zrUtil.isArray(mlData[i])) {\n compatEC3CommonStyles(mlData[i][0]);\n compatEC3CommonStyles(mlData[i][1]);\n } else {\n compatEC3CommonStyles(mlData[i]);\n }\n }\n }\n // Series\n if (seriesOpt.type === 'gauge') {\n compatTextStyle(seriesOpt, 'axisLabel');\n compatTextStyle(seriesOpt, 'title');\n compatTextStyle(seriesOpt, 'detail');\n } else if (seriesOpt.type === 'treemap') {\n convertNormalEmphasis(seriesOpt.breadcrumb, 'itemStyle');\n zrUtil.each(seriesOpt.levels, function (opt) {\n removeEC3NormalStatus(opt);\n });\n } else if (seriesOpt.type === 'tree') {\n removeEC3NormalStatus(seriesOpt.leaves);\n }\n // sunburst starts from ec4, so it does not need to compat levels.\n}\nfunction toArr(o) {\n return zrUtil.isArray(o) ? o : o ? [o] : [];\n}\nfunction toObj(o) {\n return (zrUtil.isArray(o) ? o[0] : o) || {};\n}\nexport default function globalCompatStyle(option, isTheme) {\n each(toArr(option.series), function (seriesOpt) {\n isObject(seriesOpt) && processSeries(seriesOpt);\n });\n var axes = ['xAxis', 'yAxis', 'radiusAxis', 'angleAxis', 'singleAxis', 'parallelAxis', 'radar'];\n isTheme && axes.push('valueAxis', 'categoryAxis', 'logAxis', 'timeAxis');\n each(axes, function (axisName) {\n each(toArr(option[axisName]), function (axisOpt) {\n if (axisOpt) {\n compatTextStyle(axisOpt, 'axisLabel');\n compatTextStyle(axisOpt.axisPointer, 'label');\n }\n });\n });\n each(toArr(option.parallel), function (parallelOpt) {\n var parallelAxisDefault = parallelOpt && parallelOpt.parallelAxisDefault;\n compatTextStyle(parallelAxisDefault, 'axisLabel');\n compatTextStyle(parallelAxisDefault && parallelAxisDefault.axisPointer, 'label');\n });\n each(toArr(option.calendar), function (calendarOpt) {\n convertNormalEmphasis(calendarOpt, 'itemStyle');\n compatTextStyle(calendarOpt, 'dayLabel');\n compatTextStyle(calendarOpt, 'monthLabel');\n compatTextStyle(calendarOpt, 'yearLabel');\n });\n // radar.name.textStyle\n each(toArr(option.radar), function (radarOpt) {\n compatTextStyle(radarOpt, 'name');\n // Use axisName instead of name because component has name property\n if (radarOpt.name && radarOpt.axisName == null) {\n radarOpt.axisName = radarOpt.name;\n delete radarOpt.name;\n if (process.env.NODE_ENV !== 'production') {\n deprecateLog('name property in radar component has been changed to axisName');\n }\n }\n if (radarOpt.nameGap != null && radarOpt.axisNameGap == null) {\n radarOpt.axisNameGap = radarOpt.nameGap;\n delete radarOpt.nameGap;\n if (process.env.NODE_ENV !== 'production') {\n deprecateLog('nameGap property in radar component has been changed to axisNameGap');\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n each(radarOpt.indicator, function (indicatorOpt) {\n if (indicatorOpt.text) {\n deprecateReplaceLog('text', 'name', 'radar.indicator');\n }\n });\n }\n });\n each(toArr(option.geo), function (geoOpt) {\n if (isObject(geoOpt)) {\n compatEC3CommonStyles(geoOpt);\n each(toArr(geoOpt.regions), function (regionObj) {\n compatEC3CommonStyles(regionObj);\n });\n }\n });\n each(toArr(option.timeline), function (timelineOpt) {\n compatEC3CommonStyles(timelineOpt);\n convertNormalEmphasis(timelineOpt, 'label');\n convertNormalEmphasis(timelineOpt, 'itemStyle');\n convertNormalEmphasis(timelineOpt, 'controlStyle', true);\n var data = timelineOpt.data;\n zrUtil.isArray(data) && zrUtil.each(data, function (item) {\n if (zrUtil.isObject(item)) {\n convertNormalEmphasis(item, 'label');\n convertNormalEmphasis(item, 'itemStyle');\n }\n });\n });\n each(toArr(option.toolbox), function (toolboxOpt) {\n convertNormalEmphasis(toolboxOpt, 'iconStyle');\n each(toolboxOpt.feature, function (featureOpt) {\n convertNormalEmphasis(featureOpt, 'iconStyle');\n });\n });\n compatTextStyle(toObj(option.axisPointer), 'label');\n compatTextStyle(toObj(option.tooltip).axisPointer, 'label');\n // Clean logs\n // storedLogs = {};\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { each, isArray, isObject, isTypedArray, defaults } from 'zrender/lib/core/util.js';\nimport compatStyle from './helper/compatStyle.js';\nimport { normalizeToArray } from '../util/model.js';\nimport { deprecateLog, deprecateReplaceLog } from '../util/log.js';\nfunction get(opt, path) {\n var pathArr = path.split(',');\n var obj = opt;\n for (var i = 0; i < pathArr.length; i++) {\n obj = obj && obj[pathArr[i]];\n if (obj == null) {\n break;\n }\n }\n return obj;\n}\nfunction set(opt, path, val, overwrite) {\n var pathArr = path.split(',');\n var obj = opt;\n var key;\n var i = 0;\n for (; i < pathArr.length - 1; i++) {\n key = pathArr[i];\n if (obj[key] == null) {\n obj[key] = {};\n }\n obj = obj[key];\n }\n if (overwrite || obj[pathArr[i]] == null) {\n obj[pathArr[i]] = val;\n }\n}\nfunction compatLayoutProperties(option) {\n option && each(LAYOUT_PROPERTIES, function (prop) {\n if (prop[0] in option && !(prop[1] in option)) {\n option[prop[1]] = option[prop[0]];\n }\n });\n}\nvar LAYOUT_PROPERTIES = [['x', 'left'], ['y', 'top'], ['x2', 'right'], ['y2', 'bottom']];\nvar COMPATITABLE_COMPONENTS = ['grid', 'geo', 'parallel', 'legend', 'toolbox', 'title', 'visualMap', 'dataZoom', 'timeline'];\nvar BAR_ITEM_STYLE_MAP = [['borderRadius', 'barBorderRadius'], ['borderColor', 'barBorderColor'], ['borderWidth', 'barBorderWidth']];\nfunction compatBarItemStyle(option) {\n var itemStyle = option && option.itemStyle;\n if (itemStyle) {\n for (var i = 0; i < BAR_ITEM_STYLE_MAP.length; i++) {\n var oldName = BAR_ITEM_STYLE_MAP[i][1];\n var newName = BAR_ITEM_STYLE_MAP[i][0];\n if (itemStyle[oldName] != null) {\n itemStyle[newName] = itemStyle[oldName];\n if (process.env.NODE_ENV !== 'production') {\n deprecateReplaceLog(oldName, newName);\n }\n }\n }\n }\n}\nfunction compatPieLabel(option) {\n if (!option) {\n return;\n }\n if (option.alignTo === 'edge' && option.margin != null && option.edgeDistance == null) {\n if (process.env.NODE_ENV !== 'production') {\n deprecateReplaceLog('label.margin', 'label.edgeDistance', 'pie');\n }\n option.edgeDistance = option.margin;\n }\n}\nfunction compatSunburstState(option) {\n if (!option) {\n return;\n }\n if (option.downplay && !option.blur) {\n option.blur = option.downplay;\n if (process.env.NODE_ENV !== 'production') {\n deprecateReplaceLog('downplay', 'blur', 'sunburst');\n }\n }\n}\nfunction compatGraphFocus(option) {\n if (!option) {\n return;\n }\n if (option.focusNodeAdjacency != null) {\n option.emphasis = option.emphasis || {};\n if (option.emphasis.focus == null) {\n if (process.env.NODE_ENV !== 'production') {\n deprecateReplaceLog('focusNodeAdjacency', 'emphasis: { focus: \\'adjacency\\'}', 'graph/sankey');\n }\n option.emphasis.focus = 'adjacency';\n }\n }\n}\nfunction traverseTree(data, cb) {\n if (data) {\n for (var i = 0; i < data.length; i++) {\n cb(data[i]);\n data[i] && traverseTree(data[i].children, cb);\n }\n }\n}\nexport default function globalBackwardCompat(option, isTheme) {\n compatStyle(option, isTheme);\n // Make sure series array for model initialization.\n option.series = normalizeToArray(option.series);\n each(option.series, function (seriesOpt) {\n if (!isObject(seriesOpt)) {\n return;\n }\n var seriesType = seriesOpt.type;\n if (seriesType === 'line') {\n if (seriesOpt.clipOverflow != null) {\n seriesOpt.clip = seriesOpt.clipOverflow;\n if (process.env.NODE_ENV !== 'production') {\n deprecateReplaceLog('clipOverflow', 'clip', 'line');\n }\n }\n } else if (seriesType === 'pie' || seriesType === 'gauge') {\n if (seriesOpt.clockWise != null) {\n seriesOpt.clockwise = seriesOpt.clockWise;\n if (process.env.NODE_ENV !== 'production') {\n deprecateReplaceLog('clockWise', 'clockwise');\n }\n }\n compatPieLabel(seriesOpt.label);\n var data = seriesOpt.data;\n if (data && !isTypedArray(data)) {\n for (var i = 0; i < data.length; i++) {\n compatPieLabel(data[i]);\n }\n }\n if (seriesOpt.hoverOffset != null) {\n seriesOpt.emphasis = seriesOpt.emphasis || {};\n if (seriesOpt.emphasis.scaleSize = null) {\n if (process.env.NODE_ENV !== 'production') {\n deprecateReplaceLog('hoverOffset', 'emphasis.scaleSize');\n }\n seriesOpt.emphasis.scaleSize = seriesOpt.hoverOffset;\n }\n }\n } else if (seriesType === 'gauge') {\n var pointerColor = get(seriesOpt, 'pointer.color');\n pointerColor != null && set(seriesOpt, 'itemStyle.color', pointerColor);\n } else if (seriesType === 'bar') {\n compatBarItemStyle(seriesOpt);\n compatBarItemStyle(seriesOpt.backgroundStyle);\n compatBarItemStyle(seriesOpt.emphasis);\n var data = seriesOpt.data;\n if (data && !isTypedArray(data)) {\n for (var i = 0; i < data.length; i++) {\n if (typeof data[i] === 'object') {\n compatBarItemStyle(data[i]);\n compatBarItemStyle(data[i] && data[i].emphasis);\n }\n }\n }\n } else if (seriesType === 'sunburst') {\n var highlightPolicy = seriesOpt.highlightPolicy;\n if (highlightPolicy) {\n seriesOpt.emphasis = seriesOpt.emphasis || {};\n if (!seriesOpt.emphasis.focus) {\n seriesOpt.emphasis.focus = highlightPolicy;\n if (process.env.NODE_ENV !== 'production') {\n deprecateReplaceLog('highlightPolicy', 'emphasis.focus', 'sunburst');\n }\n }\n }\n compatSunburstState(seriesOpt);\n traverseTree(seriesOpt.data, compatSunburstState);\n } else if (seriesType === 'graph' || seriesType === 'sankey') {\n compatGraphFocus(seriesOpt);\n // TODO nodes, edges?\n } else if (seriesType === 'map') {\n if (seriesOpt.mapType && !seriesOpt.map) {\n if (process.env.NODE_ENV !== 'production') {\n deprecateReplaceLog('mapType', 'map', 'map');\n }\n seriesOpt.map = seriesOpt.mapType;\n }\n if (seriesOpt.mapLocation) {\n if (process.env.NODE_ENV !== 'production') {\n deprecateLog('`mapLocation` is not used anymore.');\n }\n defaults(seriesOpt, seriesOpt.mapLocation);\n }\n }\n if (seriesOpt.hoverAnimation != null) {\n seriesOpt.emphasis = seriesOpt.emphasis || {};\n if (seriesOpt.emphasis && seriesOpt.emphasis.scale == null) {\n if (process.env.NODE_ENV !== 'production') {\n deprecateReplaceLog('hoverAnimation', 'emphasis.scale');\n }\n seriesOpt.emphasis.scale = seriesOpt.hoverAnimation;\n }\n }\n compatLayoutProperties(seriesOpt);\n });\n // dataRange has changed to visualMap\n if (option.dataRange) {\n option.visualMap = option.dataRange;\n }\n each(COMPATITABLE_COMPONENTS, function (componentName) {\n var options = option[componentName];\n if (options) {\n if (!isArray(options)) {\n options = [options];\n }\n each(options, function (option) {\n compatLayoutProperties(option);\n });\n }\n });\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { createHashMap, each } from 'zrender/lib/core/util.js';\nimport { addSafe } from '../util/number.js';\n// (1) [Caution]: the logic is correct based on the premises:\n// data processing stage is blocked in stream.\n// See \n// (2) Only register once when import repeatedly.\n// Should be executed after series is filtered and before stack calculation.\nexport default function dataStack(ecModel) {\n var stackInfoMap = createHashMap();\n ecModel.eachSeries(function (seriesModel) {\n var stack = seriesModel.get('stack');\n // Compatible: when `stack` is set as '', do not stack.\n if (stack) {\n var stackInfoList = stackInfoMap.get(stack) || stackInfoMap.set(stack, []);\n var data = seriesModel.getData();\n var stackInfo = {\n // Used for calculate axis extent automatically.\n // TODO: Type getCalculationInfo return more specific type?\n stackResultDimension: data.getCalculationInfo('stackResultDimension'),\n stackedOverDimension: data.getCalculationInfo('stackedOverDimension'),\n stackedDimension: data.getCalculationInfo('stackedDimension'),\n stackedByDimension: data.getCalculationInfo('stackedByDimension'),\n isStackedByIndex: data.getCalculationInfo('isStackedByIndex'),\n data: data,\n seriesModel: seriesModel\n };\n // If stacked on axis that do not support data stack.\n if (!stackInfo.stackedDimension || !(stackInfo.isStackedByIndex || stackInfo.stackedByDimension)) {\n return;\n }\n stackInfoList.length && data.setCalculationInfo('stackedOnSeries', stackInfoList[stackInfoList.length - 1].seriesModel);\n stackInfoList.push(stackInfo);\n }\n });\n stackInfoMap.each(calculateStack);\n}\nfunction calculateStack(stackInfoList) {\n each(stackInfoList, function (targetStackInfo, idxInStack) {\n var resultVal = [];\n var resultNaN = [NaN, NaN];\n var dims = [targetStackInfo.stackResultDimension, targetStackInfo.stackedOverDimension];\n var targetData = targetStackInfo.data;\n var isStackedByIndex = targetStackInfo.isStackedByIndex;\n var stackStrategy = targetStackInfo.seriesModel.get('stackStrategy') || 'samesign';\n // Should not write on raw data, because stack series model list changes\n // depending on legend selection.\n targetData.modify(dims, function (v0, v1, dataIndex) {\n var sum = targetData.get(targetStackInfo.stackedDimension, dataIndex);\n // Consider `connectNulls` of line area, if value is NaN, stackedOver\n // should also be NaN, to draw a appropriate belt area.\n if (isNaN(sum)) {\n return resultNaN;\n }\n var byValue;\n var stackedDataRawIndex;\n if (isStackedByIndex) {\n stackedDataRawIndex = targetData.getRawIndex(dataIndex);\n } else {\n byValue = targetData.get(targetStackInfo.stackedByDimension, dataIndex);\n }\n // If stackOver is NaN, chart view will render point on value start.\n var stackedOver = NaN;\n for (var j = idxInStack - 1; j >= 0; j--) {\n var stackInfo = stackInfoList[j];\n // Has been optimized by inverted indices on `stackedByDimension`.\n if (!isStackedByIndex) {\n stackedDataRawIndex = stackInfo.data.rawIndexOf(stackInfo.stackedByDimension, byValue);\n }\n if (stackedDataRawIndex >= 0) {\n var val = stackInfo.data.getByRawIndex(stackInfo.stackResultDimension, stackedDataRawIndex);\n // Considering positive stack, negative stack and empty data\n if (stackStrategy === 'all' // single stack group\n || stackStrategy === 'positive' && val > 0 || stackStrategy === 'negative' && val < 0 || stackStrategy === 'samesign' && sum >= 0 && val > 0 // All positive stack\n || stackStrategy === 'samesign' && sum <= 0 && val < 0 // All negative stack\n ) {\n // The sum has to be very small to be affected by the\n // floating arithmetic problem. An incorrect result will probably\n // cause axis min/max to be filtered incorrectly.\n sum = addSafe(sum, val);\n stackedOver = val;\n break;\n }\n }\n }\n resultVal[0] = sum;\n resultVal[1] = stackedOver;\n return resultVal;\n });\n });\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { isTypedArray, clone, createHashMap, isArray, isObject, isArrayLike, hasOwn, assert, each, map, isNumber, isString, keys } from 'zrender/lib/core/util.js';\nimport { SOURCE_FORMAT_ORIGINAL, SERIES_LAYOUT_BY_COLUMN, SOURCE_FORMAT_UNKNOWN, SOURCE_FORMAT_KEYED_COLUMNS, SOURCE_FORMAT_TYPED_ARRAY, SOURCE_FORMAT_ARRAY_ROWS, SOURCE_FORMAT_OBJECT_ROWS, SERIES_LAYOUT_BY_ROW } from '../util/types.js';\nimport { getDataItemValue } from '../util/model.js';\nimport { BE_ORDINAL, guessOrdinal } from './helper/sourceHelper.js';\n;\n// @inner\nvar SourceImpl = /** @class */function () {\n function SourceImpl(fields) {\n this.data = fields.data || (fields.sourceFormat === SOURCE_FORMAT_KEYED_COLUMNS ? {} : []);\n this.sourceFormat = fields.sourceFormat || SOURCE_FORMAT_UNKNOWN;\n // Visit config\n this.seriesLayoutBy = fields.seriesLayoutBy || SERIES_LAYOUT_BY_COLUMN;\n this.startIndex = fields.startIndex || 0;\n this.dimensionsDetectedCount = fields.dimensionsDetectedCount;\n this.metaRawOption = fields.metaRawOption;\n var dimensionsDefine = this.dimensionsDefine = fields.dimensionsDefine;\n if (dimensionsDefine) {\n for (var i = 0; i < dimensionsDefine.length; i++) {\n var dim = dimensionsDefine[i];\n if (dim.type == null) {\n if (guessOrdinal(this, i) === BE_ORDINAL.Must) {\n dim.type = 'ordinal';\n }\n }\n }\n }\n }\n return SourceImpl;\n}();\nexport function isSourceInstance(val) {\n return val instanceof SourceImpl;\n}\n/**\n * Create a source from option.\n * NOTE: Created source is immutable. Don't change any properties in it.\n */\nexport function createSource(sourceData, thisMetaRawOption,\n// can be null. If not provided, auto detect it from `sourceData`.\nsourceFormat) {\n sourceFormat = sourceFormat || detectSourceFormat(sourceData);\n var seriesLayoutBy = thisMetaRawOption.seriesLayoutBy;\n var determined = determineSourceDimensions(sourceData, sourceFormat, seriesLayoutBy, thisMetaRawOption.sourceHeader, thisMetaRawOption.dimensions);\n var source = new SourceImpl({\n data: sourceData,\n sourceFormat: sourceFormat,\n seriesLayoutBy: seriesLayoutBy,\n dimensionsDefine: determined.dimensionsDefine,\n startIndex: determined.startIndex,\n dimensionsDetectedCount: determined.dimensionsDetectedCount,\n metaRawOption: clone(thisMetaRawOption)\n });\n return source;\n}\n/**\n * Wrap original series data for some compatibility cases.\n */\nexport function createSourceFromSeriesDataOption(data) {\n return new SourceImpl({\n data: data,\n sourceFormat: isTypedArray(data) ? SOURCE_FORMAT_TYPED_ARRAY : SOURCE_FORMAT_ORIGINAL\n });\n}\n/**\n * Clone source but excludes source data.\n */\nexport function cloneSourceShallow(source) {\n return new SourceImpl({\n data: source.data,\n sourceFormat: source.sourceFormat,\n seriesLayoutBy: source.seriesLayoutBy,\n dimensionsDefine: clone(source.dimensionsDefine),\n startIndex: source.startIndex,\n dimensionsDetectedCount: source.dimensionsDetectedCount\n });\n}\n/**\n * Note: An empty array will be detected as `SOURCE_FORMAT_ARRAY_ROWS`.\n */\nexport function detectSourceFormat(data) {\n var sourceFormat = SOURCE_FORMAT_UNKNOWN;\n if (isTypedArray(data)) {\n sourceFormat = SOURCE_FORMAT_TYPED_ARRAY;\n } else if (isArray(data)) {\n // FIXME Whether tolerate null in top level array?\n if (data.length === 0) {\n sourceFormat = SOURCE_FORMAT_ARRAY_ROWS;\n }\n for (var i = 0, len = data.length; i < len; i++) {\n var item = data[i];\n if (item == null) {\n continue;\n } else if (isArray(item) || isTypedArray(item)) {\n sourceFormat = SOURCE_FORMAT_ARRAY_ROWS;\n break;\n } else if (isObject(item)) {\n sourceFormat = SOURCE_FORMAT_OBJECT_ROWS;\n break;\n }\n }\n } else if (isObject(data)) {\n for (var key in data) {\n if (hasOwn(data, key) && isArrayLike(data[key])) {\n sourceFormat = SOURCE_FORMAT_KEYED_COLUMNS;\n break;\n }\n }\n }\n return sourceFormat;\n}\n/**\n * Determine the source definitions from data standalone dimensions definitions\n * are not specified.\n */\nfunction determineSourceDimensions(data, sourceFormat, seriesLayoutBy, sourceHeader,\n// standalone raw dimensions definition, like:\n// {\n// dimensions: ['aa', 'bb', { name: 'cc', type: 'time' }]\n// }\n// in `dataset` or `series`\ndimensionsDefine) {\n var dimensionsDetectedCount;\n var startIndex;\n // PENDING: Could data be null/undefined here?\n // currently, if `dataset.source` not specified, error thrown.\n // if `series.data` not specified, nothing rendered without error thrown.\n // Should test these cases.\n if (!data) {\n return {\n dimensionsDefine: normalizeDimensionsOption(dimensionsDefine),\n startIndex: startIndex,\n dimensionsDetectedCount: dimensionsDetectedCount\n };\n }\n if (sourceFormat === SOURCE_FORMAT_ARRAY_ROWS) {\n var dataArrayRows = data;\n // Rule: Most of the first line are string: it is header.\n // Caution: consider a line with 5 string and 1 number,\n // it still can not be sure it is a head, because the\n // 5 string may be 5 values of category columns.\n if (sourceHeader === 'auto' || sourceHeader == null) {\n arrayRowsTravelFirst(function (val) {\n // '-' is regarded as null/undefined.\n if (val != null && val !== '-') {\n if (isString(val)) {\n startIndex == null && (startIndex = 1);\n } else {\n startIndex = 0;\n }\n }\n // 10 is an experience number, avoid long loop.\n }, seriesLayoutBy, dataArrayRows, 10);\n } else {\n startIndex = isNumber(sourceHeader) ? sourceHeader : sourceHeader ? 1 : 0;\n }\n if (!dimensionsDefine && startIndex === 1) {\n dimensionsDefine = [];\n arrayRowsTravelFirst(function (val, index) {\n dimensionsDefine[index] = val != null ? val + '' : '';\n }, seriesLayoutBy, dataArrayRows, Infinity);\n }\n dimensionsDetectedCount = dimensionsDefine ? dimensionsDefine.length : seriesLayoutBy === SERIES_LAYOUT_BY_ROW ? dataArrayRows.length : dataArrayRows[0] ? dataArrayRows[0].length : null;\n } else if (sourceFormat === SOURCE_FORMAT_OBJECT_ROWS) {\n if (!dimensionsDefine) {\n dimensionsDefine = objectRowsCollectDimensions(data);\n }\n } else if (sourceFormat === SOURCE_FORMAT_KEYED_COLUMNS) {\n if (!dimensionsDefine) {\n dimensionsDefine = [];\n each(data, function (colArr, key) {\n dimensionsDefine.push(key);\n });\n }\n } else if (sourceFormat === SOURCE_FORMAT_ORIGINAL) {\n var value0 = getDataItemValue(data[0]);\n dimensionsDetectedCount = isArray(value0) && value0.length || 1;\n } else if (sourceFormat === SOURCE_FORMAT_TYPED_ARRAY) {\n if (process.env.NODE_ENV !== 'production') {\n assert(!!dimensionsDefine, 'dimensions must be given if data is TypedArray.');\n }\n }\n return {\n startIndex: startIndex,\n dimensionsDefine: normalizeDimensionsOption(dimensionsDefine),\n dimensionsDetectedCount: dimensionsDetectedCount\n };\n}\nfunction objectRowsCollectDimensions(data) {\n var firstIndex = 0;\n var obj;\n while (firstIndex < data.length && !(obj = data[firstIndex++])) {} // jshint ignore: line\n if (obj) {\n return keys(obj);\n }\n}\n// Consider dimensions defined like ['A', 'price', 'B', 'price', 'C', 'price'],\n// which is reasonable. But dimension name is duplicated.\n// Returns undefined or an array contains only object without null/undefined or string.\nfunction normalizeDimensionsOption(dimensionsDefine) {\n if (!dimensionsDefine) {\n // The meaning of null/undefined is different from empty array.\n return;\n }\n var nameMap = createHashMap();\n return map(dimensionsDefine, function (rawItem, index) {\n rawItem = isObject(rawItem) ? rawItem : {\n name: rawItem\n };\n // Other fields will be discarded.\n var item = {\n name: rawItem.name,\n displayName: rawItem.displayName,\n type: rawItem.type\n };\n // User can set null in dimensions.\n // We don't auto specify name, otherwise a given name may\n // cause it to be referred unexpectedly.\n if (item.name == null) {\n return item;\n }\n // Also consider number form like 2012.\n item.name += '';\n // User may also specify displayName.\n // displayName will always exists except user not\n // specified or dim name is not specified or detected.\n // (A auto generated dim name will not be used as\n // displayName).\n if (item.displayName == null) {\n item.displayName = item.name;\n }\n var exist = nameMap.get(item.name);\n if (!exist) {\n nameMap.set(item.name, {\n count: 1\n });\n } else {\n item.name += '-' + exist.count++;\n }\n return item;\n });\n}\nfunction arrayRowsTravelFirst(cb, seriesLayoutBy, data, maxLoop) {\n if (seriesLayoutBy === SERIES_LAYOUT_BY_ROW) {\n for (var i = 0; i < data.length && i < maxLoop; i++) {\n cb(data[i] ? data[i][0] : null, i);\n }\n } else {\n var value0 = data[0] || [];\n for (var i = 0; i < value0.length && i < maxLoop; i++) {\n cb(value0[i], i);\n }\n }\n}\nexport function shouldRetrieveDataByName(source) {\n var sourceFormat = source.sourceFormat;\n return sourceFormat === SOURCE_FORMAT_OBJECT_ROWS || sourceFormat === SOURCE_FORMAT_KEYED_COLUMNS;\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar _a, _b, _c;\n// TODO\n// ??? refactor? check the outer usage of data provider.\n// merge with defaultDimValueGetter?\nimport { isTypedArray, extend, assert, each, isObject, bind } from 'zrender/lib/core/util.js';\nimport { getDataItemValue } from '../../util/model.js';\nimport { createSourceFromSeriesDataOption, isSourceInstance } from '../Source.js';\nimport { SOURCE_FORMAT_ORIGINAL, SOURCE_FORMAT_OBJECT_ROWS, SOURCE_FORMAT_KEYED_COLUMNS, SOURCE_FORMAT_TYPED_ARRAY, SOURCE_FORMAT_ARRAY_ROWS, SERIES_LAYOUT_BY_COLUMN, SERIES_LAYOUT_BY_ROW } from '../../util/types.js';\nvar providerMethods;\nvar mountMethods;\n/**\n * If normal array used, mutable chunk size is supported.\n * If typed array used, chunk size must be fixed.\n */\nvar DefaultDataProvider = /** @class */function () {\n function DefaultDataProvider(sourceParam, dimSize) {\n // let source: Source;\n var source = !isSourceInstance(sourceParam) ? createSourceFromSeriesDataOption(sourceParam) : sourceParam;\n // declare source is Source;\n this._source = source;\n var data = this._data = source.data;\n // Typed array. TODO IE10+?\n if (source.sourceFormat === SOURCE_FORMAT_TYPED_ARRAY) {\n if (process.env.NODE_ENV !== 'production') {\n if (dimSize == null) {\n throw new Error('Typed array data must specify dimension size');\n }\n }\n this._offset = 0;\n this._dimSize = dimSize;\n this._data = data;\n }\n mountMethods(this, data, source);\n }\n DefaultDataProvider.prototype.getSource = function () {\n return this._source;\n };\n DefaultDataProvider.prototype.count = function () {\n return 0;\n };\n DefaultDataProvider.prototype.getItem = function (idx, out) {\n return;\n };\n DefaultDataProvider.prototype.appendData = function (newData) {};\n DefaultDataProvider.prototype.clean = function () {};\n DefaultDataProvider.protoInitialize = function () {\n // PENDING: To avoid potential incompat (e.g., prototype\n // is visited somewhere), still init them on prototype.\n var proto = DefaultDataProvider.prototype;\n proto.pure = false;\n proto.persistent = true;\n }();\n DefaultDataProvider.internalField = function () {\n var _a;\n mountMethods = function (provider, data, source) {\n var sourceFormat = source.sourceFormat;\n var seriesLayoutBy = source.seriesLayoutBy;\n var startIndex = source.startIndex;\n var dimsDef = source.dimensionsDefine;\n var methods = providerMethods[getMethodMapKey(sourceFormat, seriesLayoutBy)];\n if (process.env.NODE_ENV !== 'production') {\n assert(methods, 'Invalide sourceFormat: ' + sourceFormat);\n }\n extend(provider, methods);\n if (sourceFormat === SOURCE_FORMAT_TYPED_ARRAY) {\n provider.getItem = getItemForTypedArray;\n provider.count = countForTypedArray;\n provider.fillStorage = fillStorageForTypedArray;\n } else {\n var rawItemGetter = getRawSourceItemGetter(sourceFormat, seriesLayoutBy);\n provider.getItem = bind(rawItemGetter, null, data, startIndex, dimsDef);\n var rawCounter = getRawSourceDataCounter(sourceFormat, seriesLayoutBy);\n provider.count = bind(rawCounter, null, data, startIndex, dimsDef);\n }\n };\n var getItemForTypedArray = function (idx, out) {\n idx = idx - this._offset;\n out = out || [];\n var data = this._data;\n var dimSize = this._dimSize;\n var offset = dimSize * idx;\n for (var i = 0; i < dimSize; i++) {\n out[i] = data[offset + i];\n }\n return out;\n };\n var fillStorageForTypedArray = function (start, end, storage, extent) {\n var data = this._data;\n var dimSize = this._dimSize;\n for (var dim = 0; dim < dimSize; dim++) {\n var dimExtent = extent[dim];\n var min = dimExtent[0] == null ? Infinity : dimExtent[0];\n var max = dimExtent[1] == null ? -Infinity : dimExtent[1];\n var count = end - start;\n var arr = storage[dim];\n for (var i = 0; i < count; i++) {\n // appendData with TypedArray will always do replace in provider.\n var val = data[i * dimSize + dim];\n arr[start + i] = val;\n val < min && (min = val);\n val > max && (max = val);\n }\n dimExtent[0] = min;\n dimExtent[1] = max;\n }\n };\n var countForTypedArray = function () {\n return this._data ? this._data.length / this._dimSize : 0;\n };\n providerMethods = (_a = {}, _a[SOURCE_FORMAT_ARRAY_ROWS + '_' + SERIES_LAYOUT_BY_COLUMN] = {\n pure: true,\n appendData: appendDataSimply\n }, _a[SOURCE_FORMAT_ARRAY_ROWS + '_' + SERIES_LAYOUT_BY_ROW] = {\n pure: true,\n appendData: function () {\n throw new Error('Do not support appendData when set seriesLayoutBy: \"row\".');\n }\n }, _a[SOURCE_FORMAT_OBJECT_ROWS] = {\n pure: true,\n appendData: appendDataSimply\n }, _a[SOURCE_FORMAT_KEYED_COLUMNS] = {\n pure: true,\n appendData: function (newData) {\n var data = this._data;\n each(newData, function (newCol, key) {\n var oldCol = data[key] || (data[key] = []);\n for (var i = 0; i < (newCol || []).length; i++) {\n oldCol.push(newCol[i]);\n }\n });\n }\n }, _a[SOURCE_FORMAT_ORIGINAL] = {\n appendData: appendDataSimply\n }, _a[SOURCE_FORMAT_TYPED_ARRAY] = {\n persistent: false,\n pure: true,\n appendData: function (newData) {\n if (process.env.NODE_ENV !== 'production') {\n assert(isTypedArray(newData), 'Added data must be TypedArray if data in initialization is TypedArray');\n }\n this._data = newData;\n },\n // Clean self if data is already used.\n clean: function () {\n // PENDING\n this._offset += this.count();\n this._data = null;\n }\n }, _a);\n function appendDataSimply(newData) {\n for (var i = 0; i < newData.length; i++) {\n this._data.push(newData[i]);\n }\n }\n }();\n return DefaultDataProvider;\n}();\nexport { DefaultDataProvider };\nvar getItemSimply = function (rawData, startIndex, dimsDef, idx) {\n return rawData[idx];\n};\nvar rawSourceItemGetterMap = (_a = {}, _a[SOURCE_FORMAT_ARRAY_ROWS + '_' + SERIES_LAYOUT_BY_COLUMN] = function (rawData, startIndex, dimsDef, idx) {\n return rawData[idx + startIndex];\n}, _a[SOURCE_FORMAT_ARRAY_ROWS + '_' + SERIES_LAYOUT_BY_ROW] = function (rawData, startIndex, dimsDef, idx, out) {\n idx += startIndex;\n var item = out || [];\n var data = rawData;\n for (var i = 0; i < data.length; i++) {\n var row = data[i];\n item[i] = row ? row[idx] : null;\n }\n return item;\n}, _a[SOURCE_FORMAT_OBJECT_ROWS] = getItemSimply, _a[SOURCE_FORMAT_KEYED_COLUMNS] = function (rawData, startIndex, dimsDef, idx, out) {\n var item = out || [];\n for (var i = 0; i < dimsDef.length; i++) {\n var dimName = dimsDef[i].name;\n if (process.env.NODE_ENV !== 'production') {\n if (dimName == null) {\n throw new Error();\n }\n }\n var col = rawData[dimName];\n item[i] = col ? col[idx] : null;\n }\n return item;\n}, _a[SOURCE_FORMAT_ORIGINAL] = getItemSimply, _a);\nexport function getRawSourceItemGetter(sourceFormat, seriesLayoutBy) {\n var method = rawSourceItemGetterMap[getMethodMapKey(sourceFormat, seriesLayoutBy)];\n if (process.env.NODE_ENV !== 'production') {\n assert(method, 'Do not support get item on \"' + sourceFormat + '\", \"' + seriesLayoutBy + '\".');\n }\n return method;\n}\nvar countSimply = function (rawData, startIndex, dimsDef) {\n return rawData.length;\n};\nvar rawSourceDataCounterMap = (_b = {}, _b[SOURCE_FORMAT_ARRAY_ROWS + '_' + SERIES_LAYOUT_BY_COLUMN] = function (rawData, startIndex, dimsDef) {\n return Math.max(0, rawData.length - startIndex);\n}, _b[SOURCE_FORMAT_ARRAY_ROWS + '_' + SERIES_LAYOUT_BY_ROW] = function (rawData, startIndex, dimsDef) {\n var row = rawData[0];\n return row ? Math.max(0, row.length - startIndex) : 0;\n}, _b[SOURCE_FORMAT_OBJECT_ROWS] = countSimply, _b[SOURCE_FORMAT_KEYED_COLUMNS] = function (rawData, startIndex, dimsDef) {\n var dimName = dimsDef[0].name;\n if (process.env.NODE_ENV !== 'production') {\n if (dimName == null) {\n throw new Error();\n }\n }\n var col = rawData[dimName];\n return col ? col.length : 0;\n}, _b[SOURCE_FORMAT_ORIGINAL] = countSimply, _b);\nexport function getRawSourceDataCounter(sourceFormat, seriesLayoutBy) {\n var method = rawSourceDataCounterMap[getMethodMapKey(sourceFormat, seriesLayoutBy)];\n if (process.env.NODE_ENV !== 'production') {\n assert(method, 'Do not support count on \"' + sourceFormat + '\", \"' + seriesLayoutBy + '\".');\n }\n return method;\n}\nvar getRawValueSimply = function (dataItem, dimIndex, property) {\n return dataItem[dimIndex];\n};\nvar rawSourceValueGetterMap = (_c = {}, _c[SOURCE_FORMAT_ARRAY_ROWS] = getRawValueSimply, _c[SOURCE_FORMAT_OBJECT_ROWS] = function (dataItem, dimIndex, property) {\n return dataItem[property];\n}, _c[SOURCE_FORMAT_KEYED_COLUMNS] = getRawValueSimply, _c[SOURCE_FORMAT_ORIGINAL] = function (dataItem, dimIndex, property) {\n // FIXME: In some case (markpoint in geo (geo-map.html)),\n // dataItem is {coord: [...]}\n var value = getDataItemValue(dataItem);\n return !(value instanceof Array) ? value : value[dimIndex];\n}, _c[SOURCE_FORMAT_TYPED_ARRAY] = getRawValueSimply, _c);\nexport function getRawSourceValueGetter(sourceFormat) {\n var method = rawSourceValueGetterMap[sourceFormat];\n if (process.env.NODE_ENV !== 'production') {\n assert(method, 'Do not support get value on \"' + sourceFormat + '\".');\n }\n return method;\n}\nfunction getMethodMapKey(sourceFormat, seriesLayoutBy) {\n return sourceFormat === SOURCE_FORMAT_ARRAY_ROWS ? sourceFormat + '_' + seriesLayoutBy : sourceFormat;\n}\n// ??? FIXME can these logic be more neat: getRawValue, getRawDataItem,\n// Consider persistent.\n// Caution: why use raw value to display on label or tooltip?\n// A reason is to avoid format. For example time value we do not know\n// how to format is expected. More over, if stack is used, calculated\n// value may be 0.91000000001, which have brings trouble to display.\n// TODO: consider how to treat null/undefined/NaN when display?\nexport function retrieveRawValue(data, dataIndex,\n// If dimIndex is null/undefined, return OptionDataItem.\n// Otherwise, return OptionDataValue.\ndim) {\n if (!data) {\n return;\n }\n // Consider data may be not persistent.\n var dataItem = data.getRawDataItem(dataIndex);\n if (dataItem == null) {\n return;\n }\n var store = data.getStore();\n var sourceFormat = store.getSource().sourceFormat;\n if (dim != null) {\n var dimIndex = data.getDimensionIndex(dim);\n var property = store.getDimensionProperty(dimIndex);\n return getRawSourceValueGetter(sourceFormat)(dataItem, dimIndex, property);\n } else {\n var result = dataItem;\n if (sourceFormat === SOURCE_FORMAT_ORIGINAL) {\n result = getDataItemValue(dataItem);\n }\n return result;\n }\n}\n/**\n * Compatible with some cases (in pie, map) like:\n * data: [{name: 'xx', value: 5, selected: true}, ...]\n * where only sourceFormat is 'original' and 'objectRows' supported.\n *\n * // TODO\n * Supported detail options in data item when using 'arrayRows'.\n *\n * @param data\n * @param dataIndex\n * @param attr like 'selected'\n */\nexport function retrieveRawAttr(data, dataIndex, attr) {\n if (!data) {\n return;\n }\n var sourceFormat = data.getStore().getSource().sourceFormat;\n if (sourceFormat !== SOURCE_FORMAT_ORIGINAL && sourceFormat !== SOURCE_FORMAT_OBJECT_ROWS) {\n return;\n }\n var dataItem = data.getRawDataItem(dataIndex);\n if (sourceFormat === SOURCE_FORMAT_ORIGINAL && !isObject(dataItem)) {\n dataItem = null;\n }\n if (dataItem) {\n return dataItem[attr];\n }\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { retrieveRawValue } from '../../data/helper/dataProvider.js';\nimport { formatTpl } from '../../util/format.js';\nimport { error, makePrintable } from '../../util/log.js';\nvar DIMENSION_LABEL_REG = /\\{@(.+?)\\}/g;\nvar DataFormatMixin = /** @class */function () {\n function DataFormatMixin() {}\n /**\n * Get params for formatter\n */\n DataFormatMixin.prototype.getDataParams = function (dataIndex, dataType) {\n var data = this.getData(dataType);\n var rawValue = this.getRawValue(dataIndex, dataType);\n var rawDataIndex = data.getRawIndex(dataIndex);\n var name = data.getName(dataIndex);\n var itemOpt = data.getRawDataItem(dataIndex);\n var style = data.getItemVisual(dataIndex, 'style');\n var color = style && style[data.getItemVisual(dataIndex, 'drawType') || 'fill'];\n var borderColor = style && style.stroke;\n var mainType = this.mainType;\n var isSeries = mainType === 'series';\n var userOutput = data.userOutput && data.userOutput.get();\n return {\n componentType: mainType,\n componentSubType: this.subType,\n componentIndex: this.componentIndex,\n seriesType: isSeries ? this.subType : null,\n seriesIndex: this.seriesIndex,\n seriesId: isSeries ? this.id : null,\n seriesName: isSeries ? this.name : null,\n name: name,\n dataIndex: rawDataIndex,\n data: itemOpt,\n dataType: dataType,\n value: rawValue,\n color: color,\n borderColor: borderColor,\n dimensionNames: userOutput ? userOutput.fullDimensions : null,\n encode: userOutput ? userOutput.encode : null,\n // Param name list for mapping `a`, `b`, `c`, `d`, `e`\n $vars: ['seriesName', 'name', 'value']\n };\n };\n /**\n * Format label\n * @param dataIndex\n * @param status 'normal' by default\n * @param dataType\n * @param labelDimIndex Only used in some chart that\n * use formatter in different dimensions, like radar.\n * @param formatter Formatter given outside.\n * @return return null/undefined if no formatter\n */\n DataFormatMixin.prototype.getFormattedLabel = function (dataIndex, status, dataType, labelDimIndex, formatter, extendParams) {\n status = status || 'normal';\n var data = this.getData(dataType);\n var params = this.getDataParams(dataIndex, dataType);\n if (extendParams) {\n params.value = extendParams.interpolatedValue;\n }\n if (labelDimIndex != null && zrUtil.isArray(params.value)) {\n params.value = params.value[labelDimIndex];\n }\n if (!formatter) {\n var itemModel = data.getItemModel(dataIndex);\n // @ts-ignore\n formatter = itemModel.get(status === 'normal' ? ['label', 'formatter'] : [status, 'label', 'formatter']);\n }\n if (zrUtil.isFunction(formatter)) {\n params.status = status;\n params.dimensionIndex = labelDimIndex;\n return formatter(params);\n } else if (zrUtil.isString(formatter)) {\n var str = formatTpl(formatter, params);\n // Support 'aaa{@[3]}bbb{@product}ccc'.\n // Do not support '}' in dim name util have to.\n return str.replace(DIMENSION_LABEL_REG, function (origin, dimStr) {\n var len = dimStr.length;\n var dimLoose = dimStr;\n if (dimLoose.charAt(0) === '[' && dimLoose.charAt(len - 1) === ']') {\n dimLoose = +dimLoose.slice(1, len - 1); // Also support: '[]' => 0\n if (process.env.NODE_ENV !== 'production') {\n if (isNaN(dimLoose)) {\n error(\"Invalide label formatter: @\" + dimStr + \", only support @[0], @[1], @[2], ...\");\n }\n }\n }\n var val = retrieveRawValue(data, dataIndex, dimLoose);\n if (extendParams && zrUtil.isArray(extendParams.interpolatedValue)) {\n var dimIndex = data.getDimensionIndex(dimLoose);\n if (dimIndex >= 0) {\n val = extendParams.interpolatedValue[dimIndex];\n }\n }\n return val != null ? val + '' : '';\n });\n }\n };\n /**\n * Get raw value in option\n */\n DataFormatMixin.prototype.getRawValue = function (idx, dataType) {\n return retrieveRawValue(this.getData(dataType), idx);\n };\n /**\n * Should be implemented.\n * @param {number} dataIndex\n * @param {boolean} [multipleSeries=false]\n * @param {string} [dataType]\n */\n DataFormatMixin.prototype.formatTooltip = function (dataIndex, multipleSeries, dataType) {\n // Empty function\n return;\n };\n return DataFormatMixin;\n}();\nexport { DataFormatMixin };\n;\n// PENDING: previously we accept this type when calling `formatTooltip`,\n// but guess little chance has been used outside. Do we need to backward\n// compat it?\n// type TooltipFormatResultLegacyObject = {\n// // `html` means the markup language text, either in 'html' or 'richText'.\n// // The name `html` is not appropriate because in 'richText' it is not a HTML\n// // string. But still support it for backward compatibility.\n// html: string;\n// markers: Dictionary;\n// };\n/**\n * For backward compat, normalize the return from `formatTooltip`.\n */\nexport function normalizeTooltipFormatResult(result) {\n var markupText;\n // let markers: Dictionary;\n var markupFragment;\n if (zrUtil.isObject(result)) {\n if (result.type) {\n markupFragment = result;\n } else {\n if (process.env.NODE_ENV !== 'production') {\n console.warn('The return type of `formatTooltip` is not supported: ' + makePrintable(result));\n }\n }\n // else {\n // markupText = (result as TooltipFormatResultLegacyObject).html;\n // markers = (result as TooltipFormatResultLegacyObject).markers;\n // if (markersExisting) {\n // markers = zrUtil.merge(markersExisting, markers);\n // }\n // }\n } else {\n markupText = result;\n }\n return {\n text: markupText,\n // markers: markers || markersExisting,\n frag: markupFragment\n };\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { assert, isArray } from 'zrender/lib/core/util.js';\n;\n/**\n * @param {Object} define\n * @return See the return of `createTask`.\n */\nexport function createTask(define) {\n return new Task(define);\n}\nvar Task = /** @class */function () {\n function Task(define) {\n define = define || {};\n this._reset = define.reset;\n this._plan = define.plan;\n this._count = define.count;\n this._onDirty = define.onDirty;\n this._dirty = true;\n }\n /**\n * @param step Specified step.\n * @param skip Skip customer perform call.\n * @param modBy Sampling window size.\n * @param modDataCount Sampling count.\n * @return whether unfinished.\n */\n Task.prototype.perform = function (performArgs) {\n var upTask = this._upstream;\n var skip = performArgs && performArgs.skip;\n // TODO some refactor.\n // Pull data. Must pull data each time, because context.data\n // may be updated by Series.setData.\n if (this._dirty && upTask) {\n var context = this.context;\n context.data = context.outputData = upTask.context.outputData;\n }\n if (this.__pipeline) {\n this.__pipeline.currentTask = this;\n }\n var planResult;\n if (this._plan && !skip) {\n planResult = this._plan(this.context);\n }\n // Support sharding by mod, which changes the render sequence and makes the rendered graphic\n // elements uniformed distributed when progress, especially when moving or zooming.\n var lastModBy = normalizeModBy(this._modBy);\n var lastModDataCount = this._modDataCount || 0;\n var modBy = normalizeModBy(performArgs && performArgs.modBy);\n var modDataCount = performArgs && performArgs.modDataCount || 0;\n if (lastModBy !== modBy || lastModDataCount !== modDataCount) {\n planResult = 'reset';\n }\n function normalizeModBy(val) {\n !(val >= 1) && (val = 1); // jshint ignore:line\n return val;\n }\n var forceFirstProgress;\n if (this._dirty || planResult === 'reset') {\n this._dirty = false;\n forceFirstProgress = this._doReset(skip);\n }\n this._modBy = modBy;\n this._modDataCount = modDataCount;\n var step = performArgs && performArgs.step;\n if (upTask) {\n if (process.env.NODE_ENV !== 'production') {\n assert(upTask._outputDueEnd != null);\n }\n this._dueEnd = upTask._outputDueEnd;\n }\n // DataTask or overallTask\n else {\n if (process.env.NODE_ENV !== 'production') {\n assert(!this._progress || this._count);\n }\n this._dueEnd = this._count ? this._count(this.context) : Infinity;\n }\n // Note: Stubs, that its host overall task let it has progress, has progress.\n // If no progress, pass index from upstream to downstream each time plan called.\n if (this._progress) {\n var start = this._dueIndex;\n var end = Math.min(step != null ? this._dueIndex + step : Infinity, this._dueEnd);\n if (!skip && (forceFirstProgress || start < end)) {\n var progress = this._progress;\n if (isArray(progress)) {\n for (var i = 0; i < progress.length; i++) {\n this._doProgress(progress[i], start, end, modBy, modDataCount);\n }\n } else {\n this._doProgress(progress, start, end, modBy, modDataCount);\n }\n }\n this._dueIndex = end;\n // If no `outputDueEnd`, assume that output data and\n // input data is the same, so use `dueIndex` as `outputDueEnd`.\n var outputDueEnd = this._settedOutputEnd != null ? this._settedOutputEnd : end;\n if (process.env.NODE_ENV !== 'production') {\n // ??? Can not rollback.\n assert(outputDueEnd >= this._outputDueEnd);\n }\n this._outputDueEnd = outputDueEnd;\n } else {\n // (1) Some overall task has no progress.\n // (2) Stubs, that its host overall task do not let it has progress, has no progress.\n // This should always be performed so it can be passed to downstream.\n this._dueIndex = this._outputDueEnd = this._settedOutputEnd != null ? this._settedOutputEnd : this._dueEnd;\n }\n return this.unfinished();\n };\n Task.prototype.dirty = function () {\n this._dirty = true;\n this._onDirty && this._onDirty(this.context);\n };\n Task.prototype._doProgress = function (progress, start, end, modBy, modDataCount) {\n iterator.reset(start, end, modBy, modDataCount);\n this._callingProgress = progress;\n this._callingProgress({\n start: start,\n end: end,\n count: end - start,\n next: iterator.next\n }, this.context);\n };\n Task.prototype._doReset = function (skip) {\n this._dueIndex = this._outputDueEnd = this._dueEnd = 0;\n this._settedOutputEnd = null;\n var progress;\n var forceFirstProgress;\n if (!skip && this._reset) {\n progress = this._reset(this.context);\n if (progress && progress.progress) {\n forceFirstProgress = progress.forceFirstProgress;\n progress = progress.progress;\n }\n // To simplify no progress checking, array must has item.\n if (isArray(progress) && !progress.length) {\n progress = null;\n }\n }\n this._progress = progress;\n this._modBy = this._modDataCount = null;\n var downstream = this._downstream;\n downstream && downstream.dirty();\n return forceFirstProgress;\n };\n Task.prototype.unfinished = function () {\n return this._progress && this._dueIndex < this._dueEnd;\n };\n /**\n * @param downTask The downstream task.\n * @return The downstream task.\n */\n Task.prototype.pipe = function (downTask) {\n if (process.env.NODE_ENV !== 'production') {\n assert(downTask && !downTask._disposed && downTask !== this);\n }\n // If already downstream, do not dirty downTask.\n if (this._downstream !== downTask || this._dirty) {\n this._downstream = downTask;\n downTask._upstream = this;\n downTask.dirty();\n }\n };\n Task.prototype.dispose = function () {\n if (this._disposed) {\n return;\n }\n this._upstream && (this._upstream._downstream = null);\n this._downstream && (this._downstream._upstream = null);\n this._dirty = false;\n this._disposed = true;\n };\n Task.prototype.getUpstream = function () {\n return this._upstream;\n };\n Task.prototype.getDownstream = function () {\n return this._downstream;\n };\n Task.prototype.setOutputEnd = function (end) {\n // This only happens in dataTask, dataZoom, map, currently.\n // where dataZoom do not set end each time, but only set\n // when reset. So we should record the set end, in case\n // that the stub of dataZoom perform again and earse the\n // set end by upstream.\n this._outputDueEnd = this._settedOutputEnd = end;\n };\n return Task;\n}();\nexport { Task };\nvar iterator = function () {\n var end;\n var current;\n var modBy;\n var modDataCount;\n var winCount;\n var it = {\n reset: function (s, e, sStep, sCount) {\n current = s;\n end = e;\n modBy = sStep;\n modDataCount = sCount;\n winCount = Math.ceil(modDataCount / modBy);\n it.next = modBy > 1 && modDataCount > 0 ? modNext : sequentialNext;\n }\n };\n return it;\n function sequentialNext() {\n return current < end ? current++ : null;\n }\n function modNext() {\n var dataIndex = current % winCount * modBy + Math.ceil(current / winCount);\n var result = current >= end ? null : dataIndex < modDataCount ? dataIndex\n // If modDataCount is smaller than data.count() (consider `appendData` case),\n // Use normal linear rendering mode.\n : current;\n current++;\n return result;\n }\n}();\n// -----------------------------------------------------------------------------\n// For stream debug (Should be commented out after used!)\n// @usage: printTask(this, 'begin');\n// @usage: printTask(this, null, {someExtraProp});\n// @usage: Use `__idxInPipeline` as conditional breakpiont.\n//\n// window.printTask = function (task: any, prefix: string, extra: { [key: string]: unknown }): void {\n// window.ecTaskUID == null && (window.ecTaskUID = 0);\n// task.uidDebug == null && (task.uidDebug = `task_${window.ecTaskUID++}`);\n// task.agent && task.agent.uidDebug == null && (task.agent.uidDebug = `task_${window.ecTaskUID++}`);\n// let props = [];\n// if (task.__pipeline) {\n// let val = `${task.__idxInPipeline}/${task.__pipeline.tail.__idxInPipeline} ${task.agent ? '(stub)' : ''}`;\n// props.push({text: '__idxInPipeline/total', value: val});\n// } else {\n// let stubCount = 0;\n// task.agentStubMap.each(() => stubCount++);\n// props.push({text: 'idx', value: `overall (stubs: ${stubCount})`});\n// }\n// props.push({text: 'uid', value: task.uidDebug});\n// if (task.__pipeline) {\n// props.push({text: 'pipelineId', value: task.__pipeline.id});\n// task.agent && props.push(\n// {text: 'stubFor', value: task.agent.uidDebug}\n// );\n// }\n// props.push(\n// {text: 'dirty', value: task._dirty},\n// {text: 'dueIndex', value: task._dueIndex},\n// {text: 'dueEnd', value: task._dueEnd},\n// {text: 'outputDueEnd', value: task._outputDueEnd}\n// );\n// if (extra) {\n// Object.keys(extra).forEach(key => {\n// props.push({text: key, value: extra[key]});\n// });\n// }\n// let args = ['color: blue'];\n// let msg = `%c[${prefix || 'T'}] %c` + props.map(item => (\n// args.push('color: green', 'color: red'),\n// `${item.text}: %c${item.value}`\n// )).join('%c, ');\n// console.log.apply(console, [msg].concat(args));\n// // console.log(this);\n// };\n// window.printPipeline = function (task: any, prefix: string) {\n// const pipeline = task.__pipeline;\n// let currTask = pipeline.head;\n// while (currTask) {\n// window.printTask(currTask, prefix);\n// currTask = currTask._downstream;\n// }\n// };\n// window.showChain = function (chainHeadTask) {\n// var chain = [];\n// var task = chainHeadTask;\n// while (task) {\n// chain.push({\n// task: task,\n// up: task._upstream,\n// down: task._downstream,\n// idxInPipeline: task.__idxInPipeline\n// });\n// task = task._downstream;\n// }\n// return chain;\n// };\n// window.findTaskInChain = function (task, chainHeadTask) {\n// let chain = window.showChain(chainHeadTask);\n// let result = [];\n// for (let i = 0; i < chain.length; i++) {\n// let chainItem = chain[i];\n// if (chainItem.task === task) {\n// result.push(i);\n// }\n// }\n// return result;\n// };\n// window.printChainAEachInChainB = function (chainHeadTaskA, chainHeadTaskB) {\n// let chainA = window.showChain(chainHeadTaskA);\n// for (let i = 0; i < chainA.length; i++) {\n// console.log('chainAIdx:', i, 'inChainB:', window.findTaskInChain(chainA[i].task, chainHeadTaskB));\n// }\n// };","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { parseDate, numericToNumber } from '../../util/number.js';\nimport { createHashMap, trim, hasOwn, isString, isNumber } from 'zrender/lib/core/util.js';\nimport { throwError } from '../../util/log.js';\n/**\n * Convert raw the value in to inner value in List.\n *\n * [Performance sensitive]\n *\n * [Caution]: this is the key logic of user value parser.\n * For backward compatibility, do not modify it until you have to!\n */\nexport function parseDataValue(value,\n// For high performance, do not omit the second param.\nopt) {\n // Performance sensitive.\n var dimType = opt && opt.type;\n if (dimType === 'ordinal') {\n // If given value is a category string\n return value;\n }\n if (dimType === 'time'\n // spead up when using timestamp\n && !isNumber(value) && value != null && value !== '-') {\n value = +parseDate(value);\n }\n // dimType defaults 'number'.\n // If dimType is not ordinal and value is null or undefined or NaN or '-',\n // parse to NaN.\n // number-like string (like ' 123 ') can be converted to a number.\n // where null/undefined or other string will be converted to NaN.\n return value == null || value === '' ? NaN\n // If string (like '-'), using '+' parse to NaN\n // If object, also parse to NaN\n : Number(value);\n}\n;\nvar valueParserMap = createHashMap({\n 'number': function (val) {\n // Do not use `numericToNumber` here. We have `numericToNumber` by default.\n // Here the number parser can have loose rule:\n // enable to cut suffix: \"120px\" => 120, \"14%\" => 14.\n return parseFloat(val);\n },\n 'time': function (val) {\n // return timestamp.\n return +parseDate(val);\n },\n 'trim': function (val) {\n return isString(val) ? trim(val) : val;\n }\n});\nexport function getRawValueParser(type) {\n return valueParserMap.get(type);\n}\nvar ORDER_COMPARISON_OP_MAP = {\n lt: function (lval, rval) {\n return lval < rval;\n },\n lte: function (lval, rval) {\n return lval <= rval;\n },\n gt: function (lval, rval) {\n return lval > rval;\n },\n gte: function (lval, rval) {\n return lval >= rval;\n }\n};\nvar FilterOrderComparator = /** @class */function () {\n function FilterOrderComparator(op, rval) {\n if (!isNumber(rval)) {\n var errMsg = '';\n if (process.env.NODE_ENV !== 'production') {\n errMsg = 'rvalue of \"<\", \">\", \"<=\", \">=\" can only be number in filter.';\n }\n throwError(errMsg);\n }\n this._opFn = ORDER_COMPARISON_OP_MAP[op];\n this._rvalFloat = numericToNumber(rval);\n }\n // Performance sensitive.\n FilterOrderComparator.prototype.evaluate = function (lval) {\n // Most cases is 'number', and typeof maybe 10 times faseter than parseFloat.\n return isNumber(lval) ? this._opFn(lval, this._rvalFloat) : this._opFn(numericToNumber(lval), this._rvalFloat);\n };\n return FilterOrderComparator;\n}();\nvar SortOrderComparator = /** @class */function () {\n /**\n * @param order by default: 'asc'\n * @param incomparable by default: Always on the tail.\n * That is, if 'asc' => 'max', if 'desc' => 'min'\n * See the definition of \"incomparable\" in [SORT_COMPARISON_RULE].\n */\n function SortOrderComparator(order, incomparable) {\n var isDesc = order === 'desc';\n this._resultLT = isDesc ? 1 : -1;\n if (incomparable == null) {\n incomparable = isDesc ? 'min' : 'max';\n }\n this._incomparable = incomparable === 'min' ? -Infinity : Infinity;\n }\n // See [SORT_COMPARISON_RULE].\n // Performance sensitive.\n SortOrderComparator.prototype.evaluate = function (lval, rval) {\n // Most cases is 'number', and typeof maybe 10 times faseter than parseFloat.\n var lvalFloat = isNumber(lval) ? lval : numericToNumber(lval);\n var rvalFloat = isNumber(rval) ? rval : numericToNumber(rval);\n var lvalNotNumeric = isNaN(lvalFloat);\n var rvalNotNumeric = isNaN(rvalFloat);\n if (lvalNotNumeric) {\n lvalFloat = this._incomparable;\n }\n if (rvalNotNumeric) {\n rvalFloat = this._incomparable;\n }\n if (lvalNotNumeric && rvalNotNumeric) {\n var lvalIsStr = isString(lval);\n var rvalIsStr = isString(rval);\n if (lvalIsStr) {\n lvalFloat = rvalIsStr ? lval : 0;\n }\n if (rvalIsStr) {\n rvalFloat = lvalIsStr ? rval : 0;\n }\n }\n return lvalFloat < rvalFloat ? this._resultLT : lvalFloat > rvalFloat ? -this._resultLT : 0;\n };\n return SortOrderComparator;\n}();\nexport { SortOrderComparator };\nvar FilterEqualityComparator = /** @class */function () {\n function FilterEqualityComparator(isEq, rval) {\n this._rval = rval;\n this._isEQ = isEq;\n this._rvalTypeof = typeof rval;\n this._rvalFloat = numericToNumber(rval);\n }\n // Performance sensitive.\n FilterEqualityComparator.prototype.evaluate = function (lval) {\n var eqResult = lval === this._rval;\n if (!eqResult) {\n var lvalTypeof = typeof lval;\n if (lvalTypeof !== this._rvalTypeof && (lvalTypeof === 'number' || this._rvalTypeof === 'number')) {\n eqResult = numericToNumber(lval) === this._rvalFloat;\n }\n }\n return this._isEQ ? eqResult : !eqResult;\n };\n return FilterEqualityComparator;\n}();\n/**\n * [FILTER_COMPARISON_RULE]\n * `lt`|`lte`|`gt`|`gte`:\n * + rval must be a number. And lval will be converted to number (`numericToNumber`) to compare.\n * `eq`:\n * + If same type, compare with `===`.\n * + If there is one number, convert to number (`numericToNumber`) to compare.\n * + Else return `false`.\n * `ne`:\n * + Not `eq`.\n *\n *\n * [SORT_COMPARISON_RULE]\n * All the values are grouped into three categories:\n * + \"numeric\" (number and numeric string)\n * + \"non-numeric-string\" (string that excluding numeric string)\n * + \"others\"\n * \"numeric\" vs \"numeric\": values are ordered by number order.\n * \"non-numeric-string\" vs \"non-numeric-string\": values are ordered by ES spec (#sec-abstract-relational-comparison).\n * \"others\" vs \"others\": do not change order (always return 0).\n * \"numeric\" vs \"non-numeric-string\": \"non-numeric-string\" is treated as \"incomparable\".\n * \"number\" vs \"others\": \"others\" is treated as \"incomparable\".\n * \"non-numeric-string\" vs \"others\": \"others\" is treated as \"incomparable\".\n * \"incomparable\" will be seen as -Infinity or Infinity (depends on the settings).\n * MEMO:\n * Non-numeric string sort makes sense when we need to put the items with the same tag together.\n * But if we support string sort, we still need to avoid the misleading like `'2' > '12'`,\n * So we treat \"numeric-string\" sorted by number order rather than string comparison.\n *\n *\n * [CHECK_LIST_OF_THE_RULE_DESIGN]\n * + Do not support string comparison until required. And also need to\n * avoid the misleading of \"2\" > \"12\".\n * + Should avoid the misleading case:\n * `\" 22 \" gte \"22\"` is `true` but `\" 22 \" eq \"22\"` is `false`.\n * + JS bad case should be avoided: null <= 0, [] <= 0, ' ' <= 0, ...\n * + Only \"numeric\" can be converted to comparable number, otherwise converted to NaN.\n * See `util/number.ts#numericToNumber`.\n *\n * @return If `op` is not `RelationalOperator`, return null;\n */\nexport function createFilterComparator(op, rval) {\n return op === 'eq' || op === 'ne' ? new FilterEqualityComparator(op === 'eq', rval) : hasOwn(ORDER_COMPARISON_OP_MAP, op) ? new FilterOrderComparator(op, rval) : null;\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { SERIES_LAYOUT_BY_COLUMN, SOURCE_FORMAT_OBJECT_ROWS, SOURCE_FORMAT_ARRAY_ROWS } from '../../util/types.js';\nimport { normalizeToArray } from '../../util/model.js';\nimport { createHashMap, bind, each, hasOwn, map, clone, isObject, extend, isNumber } from 'zrender/lib/core/util.js';\nimport { getRawSourceItemGetter, getRawSourceDataCounter, getRawSourceValueGetter } from './dataProvider.js';\nimport { parseDataValue } from './dataValueHelper.js';\nimport { log, makePrintable, throwError } from '../../util/log.js';\nimport { createSource, detectSourceFormat } from '../Source.js';\n/**\n * TODO: disable writable.\n * This structure will be exposed to users.\n */\nvar ExternalSource = /** @class */function () {\n function ExternalSource() {}\n ExternalSource.prototype.getRawData = function () {\n // Only built-in transform available.\n throw new Error('not supported');\n };\n ExternalSource.prototype.getRawDataItem = function (dataIndex) {\n // Only built-in transform available.\n throw new Error('not supported');\n };\n ExternalSource.prototype.cloneRawData = function () {\n return;\n };\n /**\n * @return If dimension not found, return null/undefined.\n */\n ExternalSource.prototype.getDimensionInfo = function (dim) {\n return;\n };\n /**\n * dimensions defined if and only if either:\n * (a) dataset.dimensions are declared.\n * (b) dataset data include dimensions definitions in data (detected or via specified `sourceHeader`).\n * If dimensions are defined, `dimensionInfoAll` is corresponding to\n * the defined dimensions.\n * Otherwise, `dimensionInfoAll` is determined by data columns.\n * @return Always return an array (even empty array).\n */\n ExternalSource.prototype.cloneAllDimensionInfo = function () {\n return;\n };\n ExternalSource.prototype.count = function () {\n return;\n };\n /**\n * Only support by dimension index.\n * No need to support by dimension name in transform function,\n * because transform function is not case-specific, no need to use name literally.\n */\n ExternalSource.prototype.retrieveValue = function (dataIndex, dimIndex) {\n return;\n };\n ExternalSource.prototype.retrieveValueFromItem = function (dataItem, dimIndex) {\n return;\n };\n ExternalSource.prototype.convertValue = function (rawVal, dimInfo) {\n return parseDataValue(rawVal, dimInfo);\n };\n return ExternalSource;\n}();\nexport { ExternalSource };\nfunction createExternalSource(internalSource, externalTransform) {\n var extSource = new ExternalSource();\n var data = internalSource.data;\n var sourceFormat = extSource.sourceFormat = internalSource.sourceFormat;\n var sourceHeaderCount = internalSource.startIndex;\n var errMsg = '';\n if (internalSource.seriesLayoutBy !== SERIES_LAYOUT_BY_COLUMN) {\n // For the logic simplicity in transformer, only 'culumn' is\n // supported in data transform. Otherwise, the `dimensionsDefine`\n // might be detected by 'row', which probably confuses users.\n if (process.env.NODE_ENV !== 'production') {\n errMsg = '`seriesLayoutBy` of upstream dataset can only be \"column\" in data transform.';\n }\n throwError(errMsg);\n }\n // [MEMO]\n // Create a new dimensions structure for exposing.\n // Do not expose all dimension info to users directly.\n // Because the dimension is probably auto detected from data and not might reliable.\n // Should not lead the transformers to think that is reliable and return it.\n // See [DIMENSION_INHERIT_RULE] in `sourceManager.ts`.\n var dimensions = [];\n var dimsByName = {};\n var dimsDef = internalSource.dimensionsDefine;\n if (dimsDef) {\n each(dimsDef, function (dimDef, idx) {\n var name = dimDef.name;\n var dimDefExt = {\n index: idx,\n name: name,\n displayName: dimDef.displayName\n };\n dimensions.push(dimDefExt);\n // Users probably do not specify dimension name. For simplicity, data transform\n // does not generate dimension name.\n if (name != null) {\n // Dimension name should not be duplicated.\n // For simplicity, data transform forbids name duplication, do not generate\n // new name like module `completeDimensions.ts` did, but just tell users.\n var errMsg_1 = '';\n if (hasOwn(dimsByName, name)) {\n if (process.env.NODE_ENV !== 'production') {\n errMsg_1 = 'dimension name \"' + name + '\" duplicated.';\n }\n throwError(errMsg_1);\n }\n dimsByName[name] = dimDefExt;\n }\n });\n }\n // If dimension definitions are not defined and can not be detected.\n // e.g., pure data `[[11, 22], ...]`.\n else {\n for (var i = 0; i < internalSource.dimensionsDetectedCount || 0; i++) {\n // Do not generete name or anything others. The consequence process in\n // `transform` or `series` probably have there own name generation strategry.\n dimensions.push({\n index: i\n });\n }\n }\n // Implement public methods:\n var rawItemGetter = getRawSourceItemGetter(sourceFormat, SERIES_LAYOUT_BY_COLUMN);\n if (externalTransform.__isBuiltIn) {\n extSource.getRawDataItem = function (dataIndex) {\n return rawItemGetter(data, sourceHeaderCount, dimensions, dataIndex);\n };\n extSource.getRawData = bind(getRawData, null, internalSource);\n }\n extSource.cloneRawData = bind(cloneRawData, null, internalSource);\n var rawCounter = getRawSourceDataCounter(sourceFormat, SERIES_LAYOUT_BY_COLUMN);\n extSource.count = bind(rawCounter, null, data, sourceHeaderCount, dimensions);\n var rawValueGetter = getRawSourceValueGetter(sourceFormat);\n extSource.retrieveValue = function (dataIndex, dimIndex) {\n var rawItem = rawItemGetter(data, sourceHeaderCount, dimensions, dataIndex);\n return retrieveValueFromItem(rawItem, dimIndex);\n };\n var retrieveValueFromItem = extSource.retrieveValueFromItem = function (dataItem, dimIndex) {\n if (dataItem == null) {\n return;\n }\n var dimDef = dimensions[dimIndex];\n // When `dimIndex` is `null`, `rawValueGetter` return the whole item.\n if (dimDef) {\n return rawValueGetter(dataItem, dimIndex, dimDef.name);\n }\n };\n extSource.getDimensionInfo = bind(getDimensionInfo, null, dimensions, dimsByName);\n extSource.cloneAllDimensionInfo = bind(cloneAllDimensionInfo, null, dimensions);\n return extSource;\n}\nfunction getRawData(upstream) {\n var sourceFormat = upstream.sourceFormat;\n if (!isSupportedSourceFormat(sourceFormat)) {\n var errMsg = '';\n if (process.env.NODE_ENV !== 'production') {\n errMsg = '`getRawData` is not supported in source format ' + sourceFormat;\n }\n throwError(errMsg);\n }\n return upstream.data;\n}\nfunction cloneRawData(upstream) {\n var sourceFormat = upstream.sourceFormat;\n var data = upstream.data;\n if (!isSupportedSourceFormat(sourceFormat)) {\n var errMsg = '';\n if (process.env.NODE_ENV !== 'production') {\n errMsg = '`cloneRawData` is not supported in source format ' + sourceFormat;\n }\n throwError(errMsg);\n }\n if (sourceFormat === SOURCE_FORMAT_ARRAY_ROWS) {\n var result = [];\n for (var i = 0, len = data.length; i < len; i++) {\n // Not strictly clone for performance\n result.push(data[i].slice());\n }\n return result;\n } else if (sourceFormat === SOURCE_FORMAT_OBJECT_ROWS) {\n var result = [];\n for (var i = 0, len = data.length; i < len; i++) {\n // Not strictly clone for performance\n result.push(extend({}, data[i]));\n }\n return result;\n }\n}\nfunction getDimensionInfo(dimensions, dimsByName, dim) {\n if (dim == null) {\n return;\n }\n // Keep the same logic as `List::getDimension` did.\n if (isNumber(dim)\n // If being a number-like string but not being defined a dimension name.\n || !isNaN(dim) && !hasOwn(dimsByName, dim)) {\n return dimensions[dim];\n } else if (hasOwn(dimsByName, dim)) {\n return dimsByName[dim];\n }\n}\nfunction cloneAllDimensionInfo(dimensions) {\n return clone(dimensions);\n}\nvar externalTransformMap = createHashMap();\nexport function registerExternalTransform(externalTransform) {\n externalTransform = clone(externalTransform);\n var type = externalTransform.type;\n var errMsg = '';\n if (!type) {\n if (process.env.NODE_ENV !== 'production') {\n errMsg = 'Must have a `type` when `registerTransform`.';\n }\n throwError(errMsg);\n }\n var typeParsed = type.split(':');\n if (typeParsed.length !== 2) {\n if (process.env.NODE_ENV !== 'production') {\n errMsg = 'Name must include namespace like \"ns:regression\".';\n }\n throwError(errMsg);\n }\n // Namespace 'echarts:xxx' is official namespace, where the transforms should\n // be called directly via 'xxx' rather than 'echarts:xxx'.\n var isBuiltIn = false;\n if (typeParsed[0] === 'echarts') {\n type = typeParsed[1];\n isBuiltIn = true;\n }\n externalTransform.__isBuiltIn = isBuiltIn;\n externalTransformMap.set(type, externalTransform);\n}\nexport function applyDataTransform(rawTransOption, sourceList, infoForPrint) {\n var pipedTransOption = normalizeToArray(rawTransOption);\n var pipeLen = pipedTransOption.length;\n var errMsg = '';\n if (!pipeLen) {\n if (process.env.NODE_ENV !== 'production') {\n errMsg = 'If `transform` declared, it should at least contain one transform.';\n }\n throwError(errMsg);\n }\n for (var i = 0, len = pipeLen; i < len; i++) {\n var transOption = pipedTransOption[i];\n sourceList = applySingleDataTransform(transOption, sourceList, infoForPrint, pipeLen === 1 ? null : i);\n // piped transform only support single input, except the fist one.\n // piped transform only support single output, except the last one.\n if (i !== len - 1) {\n sourceList.length = Math.max(sourceList.length, 1);\n }\n }\n return sourceList;\n}\nfunction applySingleDataTransform(transOption, upSourceList, infoForPrint,\n// If `pipeIndex` is null/undefined, no piped transform.\npipeIndex) {\n var errMsg = '';\n if (!upSourceList.length) {\n if (process.env.NODE_ENV !== 'production') {\n errMsg = 'Must have at least one upstream dataset.';\n }\n throwError(errMsg);\n }\n if (!isObject(transOption)) {\n if (process.env.NODE_ENV !== 'production') {\n errMsg = 'transform declaration must be an object rather than ' + typeof transOption + '.';\n }\n throwError(errMsg);\n }\n var transType = transOption.type;\n var externalTransform = externalTransformMap.get(transType);\n if (!externalTransform) {\n if (process.env.NODE_ENV !== 'production') {\n errMsg = 'Can not find transform on type \"' + transType + '\".';\n }\n throwError(errMsg);\n }\n // Prepare source\n var extUpSourceList = map(upSourceList, function (upSource) {\n return createExternalSource(upSource, externalTransform);\n });\n var resultList = normalizeToArray(externalTransform.transform({\n upstream: extUpSourceList[0],\n upstreamList: extUpSourceList,\n config: clone(transOption.config)\n }));\n if (process.env.NODE_ENV !== 'production') {\n if (transOption.print) {\n var printStrArr = map(resultList, function (extSource) {\n var pipeIndexStr = pipeIndex != null ? ' === pipe index: ' + pipeIndex : '';\n return ['=== dataset index: ' + infoForPrint.datasetIndex + pipeIndexStr + ' ===', '- transform result data:', makePrintable(extSource.data), '- transform result dimensions:', makePrintable(extSource.dimensions)].join('\\n');\n }).join('\\n');\n log(printStrArr);\n }\n }\n return map(resultList, function (result, resultIndex) {\n var errMsg = '';\n if (!isObject(result)) {\n if (process.env.NODE_ENV !== 'production') {\n errMsg = 'A transform should not return some empty results.';\n }\n throwError(errMsg);\n }\n if (!result.data) {\n if (process.env.NODE_ENV !== 'production') {\n errMsg = 'Transform result data should be not be null or undefined';\n }\n throwError(errMsg);\n }\n var sourceFormat = detectSourceFormat(result.data);\n if (!isSupportedSourceFormat(sourceFormat)) {\n if (process.env.NODE_ENV !== 'production') {\n errMsg = 'Transform result data should be array rows or object rows.';\n }\n throwError(errMsg);\n }\n var resultMetaRawOption;\n var firstUpSource = upSourceList[0];\n /**\n * Intuitively, the end users known the content of the original `dataset.source`,\n * calucating the transform result in mind.\n * Suppose the original `dataset.source` is:\n * ```js\n * [\n * ['product', '2012', '2013', '2014', '2015'],\n * ['AAA', 41.1, 30.4, 65.1, 53.3],\n * ['BBB', 86.5, 92.1, 85.7, 83.1],\n * ['CCC', 24.1, 67.2, 79.5, 86.4]\n * ]\n * ```\n * The dimension info have to be detected from the source data.\n * Some of the transformers (like filter, sort) will follow the dimension info\n * of upstream, while others use new dimensions (like aggregate).\n * Transformer can output a field `dimensions` to define the its own output dimensions.\n * We also allow transformers to ignore the output `dimensions` field, and\n * inherit the upstream dimensions definition. It can reduce the burden of handling\n * dimensions in transformers.\n *\n * See also [DIMENSION_INHERIT_RULE] in `sourceManager.ts`.\n */\n if (firstUpSource && resultIndex === 0\n // If transformer returns `dimensions`, it means that the transformer has different\n // dimensions definitions. We do not inherit anything from upstream.\n && !result.dimensions) {\n var startIndex = firstUpSource.startIndex;\n // We copy the header of upstream to the result, because:\n // (1) The returned data always does not contain header line and can not be used\n // as dimension-detection. In this case we can not use \"detected dimensions\" of\n // upstream directly, because it might be detected based on different `seriesLayoutBy`.\n // (2) We should support that the series read the upstream source in `seriesLayoutBy: 'row'`.\n // So the original detected header should be add to the result, otherwise they can not be read.\n if (startIndex) {\n result.data = firstUpSource.data.slice(0, startIndex).concat(result.data);\n }\n resultMetaRawOption = {\n seriesLayoutBy: SERIES_LAYOUT_BY_COLUMN,\n sourceHeader: startIndex,\n dimensions: firstUpSource.metaRawOption.dimensions\n };\n } else {\n resultMetaRawOption = {\n seriesLayoutBy: SERIES_LAYOUT_BY_COLUMN,\n sourceHeader: 0,\n dimensions: result.dimensions\n };\n }\n return createSource(result.data, resultMetaRawOption, null);\n });\n}\nfunction isSupportedSourceFormat(sourceFormat) {\n return sourceFormat === SOURCE_FORMAT_ARRAY_ROWS || sourceFormat === SOURCE_FORMAT_OBJECT_ROWS;\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { assert, clone, createHashMap, isFunction, keys, map, reduce } from 'zrender/lib/core/util.js';\nimport { parseDataValue } from './helper/dataValueHelper.js';\nimport { shouldRetrieveDataByName } from './Source.js';\nvar UNDEFINED = 'undefined';\n/* global Float64Array, Int32Array, Uint32Array, Uint16Array */\n// Caution: MUST not use `new CtorUint32Array(arr, 0, len)`, because the Ctor of array is\n// different from the Ctor of typed array.\nexport var CtorUint32Array = typeof Uint32Array === UNDEFINED ? Array : Uint32Array;\nexport var CtorUint16Array = typeof Uint16Array === UNDEFINED ? Array : Uint16Array;\nexport var CtorInt32Array = typeof Int32Array === UNDEFINED ? Array : Int32Array;\nexport var CtorFloat64Array = typeof Float64Array === UNDEFINED ? Array : Float64Array;\n/**\n * Multi dimensional data store\n */\nvar dataCtors = {\n 'float': CtorFloat64Array,\n 'int': CtorInt32Array,\n // Ordinal data type can be string or int\n 'ordinal': Array,\n 'number': Array,\n 'time': CtorFloat64Array\n};\nvar defaultDimValueGetters;\nfunction getIndicesCtor(rawCount) {\n // The possible max value in this._indicies is always this._rawCount despite of filtering.\n return rawCount > 65535 ? CtorUint32Array : CtorUint16Array;\n}\n;\nfunction getInitialExtent() {\n return [Infinity, -Infinity];\n}\n;\nfunction cloneChunk(originalChunk) {\n var Ctor = originalChunk.constructor;\n // Only shallow clone is enough when Array.\n return Ctor === Array ? originalChunk.slice() : new Ctor(originalChunk);\n}\nfunction prepareStore(store, dimIdx, dimType, end, append) {\n var DataCtor = dataCtors[dimType || 'float'];\n if (append) {\n var oldStore = store[dimIdx];\n var oldLen = oldStore && oldStore.length;\n if (!(oldLen === end)) {\n var newStore = new DataCtor(end);\n // The cost of the copy is probably inconsiderable\n // within the initial chunkSize.\n for (var j = 0; j < oldLen; j++) {\n newStore[j] = oldStore[j];\n }\n store[dimIdx] = newStore;\n }\n } else {\n store[dimIdx] = new DataCtor(end);\n }\n}\n;\n/**\n * Basically, DataStore API keep immutable.\n */\nvar DataStore = /** @class */function () {\n function DataStore() {\n this._chunks = [];\n // It will not be calculated until needed.\n this._rawExtent = [];\n this._extent = [];\n this._count = 0;\n this._rawCount = 0;\n this._calcDimNameToIdx = createHashMap();\n }\n /**\n * Initialize from data\n */\n DataStore.prototype.initData = function (provider, inputDimensions, dimValueGetter) {\n if (process.env.NODE_ENV !== 'production') {\n assert(isFunction(provider.getItem) && isFunction(provider.count), 'Invalid data provider.');\n }\n this._provider = provider;\n // Clear\n this._chunks = [];\n this._indices = null;\n this.getRawIndex = this._getRawIdxIdentity;\n var source = provider.getSource();\n var defaultGetter = this.defaultDimValueGetter = defaultDimValueGetters[source.sourceFormat];\n // Default dim value getter\n this._dimValueGetter = dimValueGetter || defaultGetter;\n // Reset raw extent.\n this._rawExtent = [];\n var willRetrieveDataByName = shouldRetrieveDataByName(source);\n this._dimensions = map(inputDimensions, function (dim) {\n if (process.env.NODE_ENV !== 'production') {\n if (willRetrieveDataByName) {\n assert(dim.property != null);\n }\n }\n return {\n // Only pick these two props. Not leak other properties like orderMeta.\n type: dim.type,\n property: dim.property\n };\n });\n this._initDataFromProvider(0, provider.count());\n };\n DataStore.prototype.getProvider = function () {\n return this._provider;\n };\n /**\n * Caution: even when a `source` instance owned by a series, the created data store\n * may still be shared by different sereis (the source hash does not use all `source`\n * props, see `sourceManager`). In this case, the `source` props that are not used in\n * hash (like `source.dimensionDefine`) probably only belongs to a certain series and\n * thus should not be fetch here.\n */\n DataStore.prototype.getSource = function () {\n return this._provider.getSource();\n };\n /**\n * @caution Only used in dataStack.\n */\n DataStore.prototype.ensureCalculationDimension = function (dimName, type) {\n var calcDimNameToIdx = this._calcDimNameToIdx;\n var dimensions = this._dimensions;\n var calcDimIdx = calcDimNameToIdx.get(dimName);\n if (calcDimIdx != null) {\n if (dimensions[calcDimIdx].type === type) {\n return calcDimIdx;\n }\n } else {\n calcDimIdx = dimensions.length;\n }\n dimensions[calcDimIdx] = {\n type: type\n };\n calcDimNameToIdx.set(dimName, calcDimIdx);\n this._chunks[calcDimIdx] = new dataCtors[type || 'float'](this._rawCount);\n this._rawExtent[calcDimIdx] = getInitialExtent();\n return calcDimIdx;\n };\n DataStore.prototype.collectOrdinalMeta = function (dimIdx, ordinalMeta) {\n var chunk = this._chunks[dimIdx];\n var dim = this._dimensions[dimIdx];\n var rawExtents = this._rawExtent;\n var offset = dim.ordinalOffset || 0;\n var len = chunk.length;\n if (offset === 0) {\n // We need to reset the rawExtent if collect is from start.\n // Because this dimension may be guessed as number and calcuating a wrong extent.\n rawExtents[dimIdx] = getInitialExtent();\n }\n var dimRawExtent = rawExtents[dimIdx];\n // Parse from previous data offset. len may be changed after appendData\n for (var i = offset; i < len; i++) {\n var val = chunk[i] = ordinalMeta.parseAndCollect(chunk[i]);\n if (!isNaN(val)) {\n dimRawExtent[0] = Math.min(val, dimRawExtent[0]);\n dimRawExtent[1] = Math.max(val, dimRawExtent[1]);\n }\n }\n dim.ordinalMeta = ordinalMeta;\n dim.ordinalOffset = len;\n dim.type = 'ordinal'; // Force to be ordinal\n };\n DataStore.prototype.getOrdinalMeta = function (dimIdx) {\n var dimInfo = this._dimensions[dimIdx];\n var ordinalMeta = dimInfo.ordinalMeta;\n return ordinalMeta;\n };\n DataStore.prototype.getDimensionProperty = function (dimIndex) {\n var item = this._dimensions[dimIndex];\n return item && item.property;\n };\n /**\n * Caution: Can be only called on raw data (before `this._indices` created).\n */\n DataStore.prototype.appendData = function (data) {\n if (process.env.NODE_ENV !== 'production') {\n assert(!this._indices, 'appendData can only be called on raw data.');\n }\n var provider = this._provider;\n var start = this.count();\n provider.appendData(data);\n var end = provider.count();\n if (!provider.persistent) {\n end += start;\n }\n if (start < end) {\n this._initDataFromProvider(start, end, true);\n }\n return [start, end];\n };\n DataStore.prototype.appendValues = function (values, minFillLen) {\n var chunks = this._chunks;\n var dimensions = this._dimensions;\n var dimLen = dimensions.length;\n var rawExtent = this._rawExtent;\n var start = this.count();\n var end = start + Math.max(values.length, minFillLen || 0);\n for (var i = 0; i < dimLen; i++) {\n var dim = dimensions[i];\n prepareStore(chunks, i, dim.type, end, true);\n }\n var emptyDataItem = [];\n for (var idx = start; idx < end; idx++) {\n var sourceIdx = idx - start;\n // Store the data by dimensions\n for (var dimIdx = 0; dimIdx < dimLen; dimIdx++) {\n var dim = dimensions[dimIdx];\n var val = defaultDimValueGetters.arrayRows.call(this, values[sourceIdx] || emptyDataItem, dim.property, sourceIdx, dimIdx);\n chunks[dimIdx][idx] = val;\n var dimRawExtent = rawExtent[dimIdx];\n val < dimRawExtent[0] && (dimRawExtent[0] = val);\n val > dimRawExtent[1] && (dimRawExtent[1] = val);\n }\n }\n this._rawCount = this._count = end;\n return {\n start: start,\n end: end\n };\n };\n DataStore.prototype._initDataFromProvider = function (start, end, append) {\n var provider = this._provider;\n var chunks = this._chunks;\n var dimensions = this._dimensions;\n var dimLen = dimensions.length;\n var rawExtent = this._rawExtent;\n var dimNames = map(dimensions, function (dim) {\n return dim.property;\n });\n for (var i = 0; i < dimLen; i++) {\n var dim = dimensions[i];\n if (!rawExtent[i]) {\n rawExtent[i] = getInitialExtent();\n }\n prepareStore(chunks, i, dim.type, end, append);\n }\n if (provider.fillStorage) {\n provider.fillStorage(start, end, chunks, rawExtent);\n } else {\n var dataItem = [];\n for (var idx = start; idx < end; idx++) {\n // NOTICE: Try not to write things into dataItem\n dataItem = provider.getItem(idx, dataItem);\n // Each data item is value\n // [1, 2]\n // 2\n // Bar chart, line chart which uses category axis\n // only gives the 'y' value. 'x' value is the indices of category\n // Use a tempValue to normalize the value to be a (x, y) value\n // Store the data by dimensions\n for (var dimIdx = 0; dimIdx < dimLen; dimIdx++) {\n var dimStorage = chunks[dimIdx];\n // PENDING NULL is empty or zero\n var val = this._dimValueGetter(dataItem, dimNames[dimIdx], idx, dimIdx);\n dimStorage[idx] = val;\n var dimRawExtent = rawExtent[dimIdx];\n val < dimRawExtent[0] && (dimRawExtent[0] = val);\n val > dimRawExtent[1] && (dimRawExtent[1] = val);\n }\n }\n }\n if (!provider.persistent && provider.clean) {\n // Clean unused data if data source is typed array.\n provider.clean();\n }\n this._rawCount = this._count = end;\n // Reset data extent\n this._extent = [];\n };\n DataStore.prototype.count = function () {\n return this._count;\n };\n /**\n * Get value. Return NaN if idx is out of range.\n */\n DataStore.prototype.get = function (dim, idx) {\n if (!(idx >= 0 && idx < this._count)) {\n return NaN;\n }\n var dimStore = this._chunks[dim];\n return dimStore ? dimStore[this.getRawIndex(idx)] : NaN;\n };\n DataStore.prototype.getValues = function (dimensions, idx) {\n var values = [];\n var dimArr = [];\n if (idx == null) {\n idx = dimensions;\n // TODO get all from store?\n dimensions = [];\n // All dimensions\n for (var i = 0; i < this._dimensions.length; i++) {\n dimArr.push(i);\n }\n } else {\n dimArr = dimensions;\n }\n for (var i = 0, len = dimArr.length; i < len; i++) {\n values.push(this.get(dimArr[i], idx));\n }\n return values;\n };\n /**\n * @param dim concrete dim\n */\n DataStore.prototype.getByRawIndex = function (dim, rawIdx) {\n if (!(rawIdx >= 0 && rawIdx < this._rawCount)) {\n return NaN;\n }\n var dimStore = this._chunks[dim];\n return dimStore ? dimStore[rawIdx] : NaN;\n };\n /**\n * Get sum of data in one dimension\n */\n DataStore.prototype.getSum = function (dim) {\n var dimData = this._chunks[dim];\n var sum = 0;\n if (dimData) {\n for (var i = 0, len = this.count(); i < len; i++) {\n var value = this.get(dim, i);\n if (!isNaN(value)) {\n sum += value;\n }\n }\n }\n return sum;\n };\n /**\n * Get median of data in one dimension\n */\n DataStore.prototype.getMedian = function (dim) {\n var dimDataArray = [];\n // map all data of one dimension\n this.each([dim], function (val) {\n if (!isNaN(val)) {\n dimDataArray.push(val);\n }\n });\n // TODO\n // Use quick select?\n var sortedDimDataArray = dimDataArray.sort(function (a, b) {\n return a - b;\n });\n var len = this.count();\n // calculate median\n return len === 0 ? 0 : len % 2 === 1 ? sortedDimDataArray[(len - 1) / 2] : (sortedDimDataArray[len / 2] + sortedDimDataArray[len / 2 - 1]) / 2;\n };\n /**\n * Retrieve the index with given raw data index.\n */\n DataStore.prototype.indexOfRawIndex = function (rawIndex) {\n if (rawIndex >= this._rawCount || rawIndex < 0) {\n return -1;\n }\n if (!this._indices) {\n return rawIndex;\n }\n // Indices are ascending\n var indices = this._indices;\n // If rawIndex === dataIndex\n var rawDataIndex = indices[rawIndex];\n if (rawDataIndex != null && rawDataIndex < this._count && rawDataIndex === rawIndex) {\n return rawIndex;\n }\n var left = 0;\n var right = this._count - 1;\n while (left <= right) {\n var mid = (left + right) / 2 | 0;\n if (indices[mid] < rawIndex) {\n left = mid + 1;\n } else if (indices[mid] > rawIndex) {\n right = mid - 1;\n } else {\n return mid;\n }\n }\n return -1;\n };\n /**\n * Retrieve the index of nearest value.\n * @param dim\n * @param value\n * @param [maxDistance=Infinity]\n * @return If and only if multiple indices have\n * the same value, they are put to the result.\n */\n DataStore.prototype.indicesOfNearest = function (dim, value, maxDistance) {\n var chunks = this._chunks;\n var dimData = chunks[dim];\n var nearestIndices = [];\n if (!dimData) {\n return nearestIndices;\n }\n if (maxDistance == null) {\n maxDistance = Infinity;\n }\n var minDist = Infinity;\n var minDiff = -1;\n var nearestIndicesLen = 0;\n // Check the test case of `test/ut/spec/data/SeriesData.js`.\n for (var i = 0, len = this.count(); i < len; i++) {\n var dataIndex = this.getRawIndex(i);\n var diff = value - dimData[dataIndex];\n var dist = Math.abs(diff);\n if (dist <= maxDistance) {\n // When the `value` is at the middle of `this.get(dim, i)` and `this.get(dim, i+1)`,\n // we'd better not push both of them to `nearestIndices`, otherwise it is easy to\n // get more than one item in `nearestIndices` (more specifically, in `tooltip`).\n // So we choose the one that `diff >= 0` in this case.\n // But if `this.get(dim, i)` and `this.get(dim, j)` get the same value, both of them\n // should be push to `nearestIndices`.\n if (dist < minDist || dist === minDist && diff >= 0 && minDiff < 0) {\n minDist = dist;\n minDiff = diff;\n nearestIndicesLen = 0;\n }\n if (diff === minDiff) {\n nearestIndices[nearestIndicesLen++] = i;\n }\n }\n }\n nearestIndices.length = nearestIndicesLen;\n return nearestIndices;\n };\n DataStore.prototype.getIndices = function () {\n var newIndices;\n var indices = this._indices;\n if (indices) {\n var Ctor = indices.constructor;\n var thisCount = this._count;\n // `new Array(a, b, c)` is different from `new Uint32Array(a, b, c)`.\n if (Ctor === Array) {\n newIndices = new Ctor(thisCount);\n for (var i = 0; i < thisCount; i++) {\n newIndices[i] = indices[i];\n }\n } else {\n newIndices = new Ctor(indices.buffer, 0, thisCount);\n }\n } else {\n var Ctor = getIndicesCtor(this._rawCount);\n newIndices = new Ctor(this.count());\n for (var i = 0; i < newIndices.length; i++) {\n newIndices[i] = i;\n }\n }\n return newIndices;\n };\n /**\n * Data filter.\n */\n DataStore.prototype.filter = function (dims, cb) {\n if (!this._count) {\n return this;\n }\n var newStore = this.clone();\n var count = newStore.count();\n var Ctor = getIndicesCtor(newStore._rawCount);\n var newIndices = new Ctor(count);\n var value = [];\n var dimSize = dims.length;\n var offset = 0;\n var dim0 = dims[0];\n var chunks = newStore._chunks;\n for (var i = 0; i < count; i++) {\n var keep = void 0;\n var rawIdx = newStore.getRawIndex(i);\n // Simple optimization\n if (dimSize === 0) {\n keep = cb(i);\n } else if (dimSize === 1) {\n var val = chunks[dim0][rawIdx];\n keep = cb(val, i);\n } else {\n var k = 0;\n for (; k < dimSize; k++) {\n value[k] = chunks[dims[k]][rawIdx];\n }\n value[k] = i;\n keep = cb.apply(null, value);\n }\n if (keep) {\n newIndices[offset++] = rawIdx;\n }\n }\n // Set indices after filtered.\n if (offset < count) {\n newStore._indices = newIndices;\n }\n newStore._count = offset;\n // Reset data extent\n newStore._extent = [];\n newStore._updateGetRawIdx();\n return newStore;\n };\n /**\n * Select data in range. (For optimization of filter)\n * (Manually inline code, support 5 million data filtering in data zoom.)\n */\n DataStore.prototype.selectRange = function (range) {\n var newStore = this.clone();\n var len = newStore._count;\n if (!len) {\n return this;\n }\n var dims = keys(range);\n var dimSize = dims.length;\n if (!dimSize) {\n return this;\n }\n var originalCount = newStore.count();\n var Ctor = getIndicesCtor(newStore._rawCount);\n var newIndices = new Ctor(originalCount);\n var offset = 0;\n var dim0 = dims[0];\n var min = range[dim0][0];\n var max = range[dim0][1];\n var storeArr = newStore._chunks;\n var quickFinished = false;\n if (!newStore._indices) {\n // Extreme optimization for common case. About 2x faster in chrome.\n var idx = 0;\n if (dimSize === 1) {\n var dimStorage = storeArr[dims[0]];\n for (var i = 0; i < len; i++) {\n var val = dimStorage[i];\n // NaN will not be filtered. Consider the case, in line chart, empty\n // value indicates the line should be broken. But for the case like\n // scatter plot, a data item with empty value will not be rendered,\n // but the axis extent may be effected if some other dim of the data\n // item has value. Fortunately it is not a significant negative effect.\n if (val >= min && val <= max || isNaN(val)) {\n newIndices[offset++] = idx;\n }\n idx++;\n }\n quickFinished = true;\n } else if (dimSize === 2) {\n var dimStorage = storeArr[dims[0]];\n var dimStorage2 = storeArr[dims[1]];\n var min2 = range[dims[1]][0];\n var max2 = range[dims[1]][1];\n for (var i = 0; i < len; i++) {\n var val = dimStorage[i];\n var val2 = dimStorage2[i];\n // Do not filter NaN, see comment above.\n if ((val >= min && val <= max || isNaN(val)) && (val2 >= min2 && val2 <= max2 || isNaN(val2))) {\n newIndices[offset++] = idx;\n }\n idx++;\n }\n quickFinished = true;\n }\n }\n if (!quickFinished) {\n if (dimSize === 1) {\n for (var i = 0; i < originalCount; i++) {\n var rawIndex = newStore.getRawIndex(i);\n var val = storeArr[dims[0]][rawIndex];\n // Do not filter NaN, see comment above.\n if (val >= min && val <= max || isNaN(val)) {\n newIndices[offset++] = rawIndex;\n }\n }\n } else {\n for (var i = 0; i < originalCount; i++) {\n var keep = true;\n var rawIndex = newStore.getRawIndex(i);\n for (var k = 0; k < dimSize; k++) {\n var dimk = dims[k];\n var val = storeArr[dimk][rawIndex];\n // Do not filter NaN, see comment above.\n if (val < range[dimk][0] || val > range[dimk][1]) {\n keep = false;\n }\n }\n if (keep) {\n newIndices[offset++] = newStore.getRawIndex(i);\n }\n }\n }\n }\n // Set indices after filtered.\n if (offset < originalCount) {\n newStore._indices = newIndices;\n }\n newStore._count = offset;\n // Reset data extent\n newStore._extent = [];\n newStore._updateGetRawIdx();\n return newStore;\n };\n // /**\n // * Data mapping to a plain array\n // */\n // mapArray(dims: DimensionIndex[], cb: MapArrayCb): any[] {\n // const result: any[] = [];\n // this.each(dims, function () {\n // result.push(cb && (cb as MapArrayCb).apply(null, arguments));\n // });\n // return result;\n // }\n /**\n * Data mapping to a new List with given dimensions\n */\n DataStore.prototype.map = function (dims, cb) {\n // TODO only clone picked chunks.\n var target = this.clone(dims);\n this._updateDims(target, dims, cb);\n return target;\n };\n /**\n * @caution Danger!! Only used in dataStack.\n */\n DataStore.prototype.modify = function (dims, cb) {\n this._updateDims(this, dims, cb);\n };\n DataStore.prototype._updateDims = function (target, dims, cb) {\n var targetChunks = target._chunks;\n var tmpRetValue = [];\n var dimSize = dims.length;\n var dataCount = target.count();\n var values = [];\n var rawExtent = target._rawExtent;\n for (var i = 0; i < dims.length; i++) {\n rawExtent[dims[i]] = getInitialExtent();\n }\n for (var dataIndex = 0; dataIndex < dataCount; dataIndex++) {\n var rawIndex = target.getRawIndex(dataIndex);\n for (var k = 0; k < dimSize; k++) {\n values[k] = targetChunks[dims[k]][rawIndex];\n }\n values[dimSize] = dataIndex;\n var retValue = cb && cb.apply(null, values);\n if (retValue != null) {\n // a number or string (in oridinal dimension)?\n if (typeof retValue !== 'object') {\n tmpRetValue[0] = retValue;\n retValue = tmpRetValue;\n }\n for (var i = 0; i < retValue.length; i++) {\n var dim = dims[i];\n var val = retValue[i];\n var rawExtentOnDim = rawExtent[dim];\n var dimStore = targetChunks[dim];\n if (dimStore) {\n dimStore[rawIndex] = val;\n }\n if (val < rawExtentOnDim[0]) {\n rawExtentOnDim[0] = val;\n }\n if (val > rawExtentOnDim[1]) {\n rawExtentOnDim[1] = val;\n }\n }\n }\n }\n };\n /**\n * Large data down sampling using largest-triangle-three-buckets\n * @param {string} valueDimension\n * @param {number} targetCount\n */\n DataStore.prototype.lttbDownSample = function (valueDimension, rate) {\n var target = this.clone([valueDimension], true);\n var targetStorage = target._chunks;\n var dimStore = targetStorage[valueDimension];\n var len = this.count();\n var sampledIndex = 0;\n var frameSize = Math.floor(1 / rate);\n var currentRawIndex = this.getRawIndex(0);\n var maxArea;\n var area;\n var nextRawIndex;\n var newIndices = new (getIndicesCtor(this._rawCount))(Math.min((Math.ceil(len / frameSize) + 2) * 2, len));\n // First frame use the first data.\n newIndices[sampledIndex++] = currentRawIndex;\n for (var i = 1; i < len - 1; i += frameSize) {\n var nextFrameStart = Math.min(i + frameSize, len - 1);\n var nextFrameEnd = Math.min(i + frameSize * 2, len);\n var avgX = (nextFrameEnd + nextFrameStart) / 2;\n var avgY = 0;\n for (var idx = nextFrameStart; idx < nextFrameEnd; idx++) {\n var rawIndex = this.getRawIndex(idx);\n var y = dimStore[rawIndex];\n if (isNaN(y)) {\n continue;\n }\n avgY += y;\n }\n avgY /= nextFrameEnd - nextFrameStart;\n var frameStart = i;\n var frameEnd = Math.min(i + frameSize, len);\n var pointAX = i - 1;\n var pointAY = dimStore[currentRawIndex];\n maxArea = -1;\n nextRawIndex = frameStart;\n var firstNaNIndex = -1;\n var countNaN = 0;\n // Find a point from current frame that construct a triangle with largest area with previous selected point\n // And the average of next frame.\n for (var idx = frameStart; idx < frameEnd; idx++) {\n var rawIndex = this.getRawIndex(idx);\n var y = dimStore[rawIndex];\n if (isNaN(y)) {\n countNaN++;\n if (firstNaNIndex < 0) {\n firstNaNIndex = rawIndex;\n }\n continue;\n }\n // Calculate triangle area over three buckets\n area = Math.abs((pointAX - avgX) * (y - pointAY) - (pointAX - idx) * (avgY - pointAY));\n if (area > maxArea) {\n maxArea = area;\n nextRawIndex = rawIndex; // Next a is this b\n }\n }\n if (countNaN > 0 && countNaN < frameEnd - frameStart) {\n // Append first NaN point in every bucket.\n // It is necessary to ensure the correct order of indices.\n newIndices[sampledIndex++] = Math.min(firstNaNIndex, nextRawIndex);\n nextRawIndex = Math.max(firstNaNIndex, nextRawIndex);\n }\n newIndices[sampledIndex++] = nextRawIndex;\n currentRawIndex = nextRawIndex; // This a is the next a (chosen b)\n }\n // First frame use the last data.\n newIndices[sampledIndex++] = this.getRawIndex(len - 1);\n target._count = sampledIndex;\n target._indices = newIndices;\n target.getRawIndex = this._getRawIdx;\n return target;\n };\n /**\n * Large data down sampling on given dimension\n * @param sampleIndex Sample index for name and id\n */\n DataStore.prototype.downSample = function (dimension, rate, sampleValue, sampleIndex) {\n var target = this.clone([dimension], true);\n var targetStorage = target._chunks;\n var frameValues = [];\n var frameSize = Math.floor(1 / rate);\n var dimStore = targetStorage[dimension];\n var len = this.count();\n var rawExtentOnDim = target._rawExtent[dimension] = getInitialExtent();\n var newIndices = new (getIndicesCtor(this._rawCount))(Math.ceil(len / frameSize));\n var offset = 0;\n for (var i = 0; i < len; i += frameSize) {\n // Last frame\n if (frameSize > len - i) {\n frameSize = len - i;\n frameValues.length = frameSize;\n }\n for (var k = 0; k < frameSize; k++) {\n var dataIdx = this.getRawIndex(i + k);\n frameValues[k] = dimStore[dataIdx];\n }\n var value = sampleValue(frameValues);\n var sampleFrameIdx = this.getRawIndex(Math.min(i + sampleIndex(frameValues, value) || 0, len - 1));\n // Only write value on the filtered data\n dimStore[sampleFrameIdx] = value;\n if (value < rawExtentOnDim[0]) {\n rawExtentOnDim[0] = value;\n }\n if (value > rawExtentOnDim[1]) {\n rawExtentOnDim[1] = value;\n }\n newIndices[offset++] = sampleFrameIdx;\n }\n target._count = offset;\n target._indices = newIndices;\n target._updateGetRawIdx();\n return target;\n };\n /**\n * Data iteration\n * @param ctx default this\n * @example\n * list.each('x', function (x, idx) {});\n * list.each(['x', 'y'], function (x, y, idx) {});\n * list.each(function (idx) {})\n */\n DataStore.prototype.each = function (dims, cb) {\n if (!this._count) {\n return;\n }\n var dimSize = dims.length;\n var chunks = this._chunks;\n for (var i = 0, len = this.count(); i < len; i++) {\n var rawIdx = this.getRawIndex(i);\n // Simple optimization\n switch (dimSize) {\n case 0:\n cb(i);\n break;\n case 1:\n cb(chunks[dims[0]][rawIdx], i);\n break;\n case 2:\n cb(chunks[dims[0]][rawIdx], chunks[dims[1]][rawIdx], i);\n break;\n default:\n var k = 0;\n var value = [];\n for (; k < dimSize; k++) {\n value[k] = chunks[dims[k]][rawIdx];\n }\n // Index\n value[k] = i;\n cb.apply(null, value);\n }\n }\n };\n /**\n * Get extent of data in one dimension\n */\n DataStore.prototype.getDataExtent = function (dim) {\n // Make sure use concrete dim as cache name.\n var dimData = this._chunks[dim];\n var initialExtent = getInitialExtent();\n if (!dimData) {\n return initialExtent;\n }\n // Make more strict checkings to ensure hitting cache.\n var currEnd = this.count();\n // Consider the most cases when using data zoom, `getDataExtent`\n // happened before filtering. We cache raw extent, which is not\n // necessary to be cleared and recalculated when restore data.\n var useRaw = !this._indices;\n var dimExtent;\n if (useRaw) {\n return this._rawExtent[dim].slice();\n }\n dimExtent = this._extent[dim];\n if (dimExtent) {\n return dimExtent.slice();\n }\n dimExtent = initialExtent;\n var min = dimExtent[0];\n var max = dimExtent[1];\n for (var i = 0; i < currEnd; i++) {\n var rawIdx = this.getRawIndex(i);\n var value = dimData[rawIdx];\n value < min && (min = value);\n value > max && (max = value);\n }\n dimExtent = [min, max];\n this._extent[dim] = dimExtent;\n return dimExtent;\n };\n /**\n * Get raw data item\n */\n DataStore.prototype.getRawDataItem = function (idx) {\n var rawIdx = this.getRawIndex(idx);\n if (!this._provider.persistent) {\n var val = [];\n var chunks = this._chunks;\n for (var i = 0; i < chunks.length; i++) {\n val.push(chunks[i][rawIdx]);\n }\n return val;\n } else {\n return this._provider.getItem(rawIdx);\n }\n };\n /**\n * Clone shallow.\n *\n * @param clonedDims Determine which dims to clone. Will share the data if not specified.\n */\n DataStore.prototype.clone = function (clonedDims, ignoreIndices) {\n var target = new DataStore();\n var chunks = this._chunks;\n var clonedDimsMap = clonedDims && reduce(clonedDims, function (obj, dimIdx) {\n obj[dimIdx] = true;\n return obj;\n }, {});\n if (clonedDimsMap) {\n for (var i = 0; i < chunks.length; i++) {\n // Not clone if dim is not picked.\n target._chunks[i] = !clonedDimsMap[i] ? chunks[i] : cloneChunk(chunks[i]);\n }\n } else {\n target._chunks = chunks;\n }\n this._copyCommonProps(target);\n if (!ignoreIndices) {\n target._indices = this._cloneIndices();\n }\n target._updateGetRawIdx();\n return target;\n };\n DataStore.prototype._copyCommonProps = function (target) {\n target._count = this._count;\n target._rawCount = this._rawCount;\n target._provider = this._provider;\n target._dimensions = this._dimensions;\n target._extent = clone(this._extent);\n target._rawExtent = clone(this._rawExtent);\n };\n DataStore.prototype._cloneIndices = function () {\n if (this._indices) {\n var Ctor = this._indices.constructor;\n var indices = void 0;\n if (Ctor === Array) {\n var thisCount = this._indices.length;\n indices = new Ctor(thisCount);\n for (var i = 0; i < thisCount; i++) {\n indices[i] = this._indices[i];\n }\n } else {\n indices = new Ctor(this._indices);\n }\n return indices;\n }\n return null;\n };\n DataStore.prototype._getRawIdxIdentity = function (idx) {\n return idx;\n };\n DataStore.prototype._getRawIdx = function (idx) {\n if (idx < this._count && idx >= 0) {\n return this._indices[idx];\n }\n return -1;\n };\n DataStore.prototype._updateGetRawIdx = function () {\n this.getRawIndex = this._indices ? this._getRawIdx : this._getRawIdxIdentity;\n };\n DataStore.internalField = function () {\n function getDimValueSimply(dataItem, property, dataIndex, dimIndex) {\n return parseDataValue(dataItem[dimIndex], this._dimensions[dimIndex]);\n }\n defaultDimValueGetters = {\n arrayRows: getDimValueSimply,\n objectRows: function (dataItem, property, dataIndex, dimIndex) {\n return parseDataValue(dataItem[property], this._dimensions[dimIndex]);\n },\n keyedColumns: getDimValueSimply,\n original: function (dataItem, property, dataIndex, dimIndex) {\n // Performance sensitive, do not use modelUtil.getDataItemValue.\n // If dataItem is an plain object with no value field, the let `value`\n // will be assigned with the object, but it will be tread correctly\n // in the `convertValue`.\n var value = dataItem && (dataItem.value == null ? dataItem : dataItem.value);\n return parseDataValue(value instanceof Array ? value[dimIndex]\n // If value is a single number or something else not array.\n : value, this._dimensions[dimIndex]);\n },\n typedArray: function (dataItem, property, dataIndex, dimIndex) {\n return dataItem[dimIndex];\n }\n };\n }();\n return DataStore;\n}();\nexport default DataStore;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { setAsPrimitive, map, isTypedArray, assert, each, retrieve2 } from 'zrender/lib/core/util.js';\nimport { createSource, cloneSourceShallow } from '../Source.js';\nimport { SOURCE_FORMAT_TYPED_ARRAY, SOURCE_FORMAT_ORIGINAL } from '../../util/types.js';\nimport { querySeriesUpstreamDatasetModel, queryDatasetUpstreamDatasetModels } from './sourceHelper.js';\nimport { applyDataTransform } from './transform.js';\nimport DataStore from '../DataStore.js';\nimport { DefaultDataProvider } from './dataProvider.js';\n/**\n * [REQUIREMENT_MEMO]:\n * (0) `metaRawOption` means `dimensions`/`sourceHeader`/`seriesLayoutBy` in raw option.\n * (1) Keep support the feature: `metaRawOption` can be specified both on `series` and\n * `root-dataset`. Them on `series` has higher priority.\n * (2) Do not support to set `metaRawOption` on a `non-root-dataset`, because it might\n * confuse users: whether those props indicate how to visit the upstream source or visit\n * the transform result source, and some transforms has nothing to do with these props,\n * and some transforms might have multiple upstream.\n * (3) Transforms should specify `metaRawOption` in each output, just like they can be\n * declared in `root-dataset`.\n * (4) At present only support visit source in `SERIES_LAYOUT_BY_COLUMN` in transforms.\n * That is for reducing complexity in transforms.\n * PENDING: Whether to provide transposition transform?\n *\n * [IMPLEMENTAION_MEMO]:\n * \"sourceVisitConfig\" are calculated from `metaRawOption` and `data`.\n * They will not be calculated until `source` is about to be visited (to prevent from\n * duplicate calcuation). `source` is visited only in series and input to transforms.\n *\n * [DIMENSION_INHERIT_RULE]:\n * By default the dimensions are inherited from ancestors, unless a transform return\n * a new dimensions definition.\n * Consider the case:\n * ```js\n * dataset: [{\n * source: [ ['Product', 'Sales', 'Prise'], ['Cookies', 321, 44.21], ...]\n * }, {\n * transform: { type: 'filter', ... }\n * }]\n * dataset: [{\n * dimension: ['Product', 'Sales', 'Prise'],\n * source: [ ['Cookies', 321, 44.21], ...]\n * }, {\n * transform: { type: 'filter', ... }\n * }]\n * ```\n * The two types of option should have the same behavior after transform.\n *\n *\n * [SCENARIO]:\n * (1) Provide source data directly:\n * ```js\n * series: {\n * encode: {...},\n * dimensions: [...]\n * seriesLayoutBy: 'row',\n * data: [[...]]\n * }\n * ```\n * (2) Series refer to dataset.\n * ```js\n * series: [{\n * encode: {...}\n * // Ignore datasetIndex means `datasetIndex: 0`\n * // and the dimensions defination in dataset is used\n * }, {\n * encode: {...},\n * seriesLayoutBy: 'column',\n * datasetIndex: 1\n * }]\n * ```\n * (3) dataset transform\n * ```js\n * dataset: [{\n * source: [...]\n * }, {\n * source: [...]\n * }, {\n * // By default from 0.\n * transform: { type: 'filter', config: {...} }\n * }, {\n * // Piped.\n * transform: [\n * { type: 'filter', config: {...} },\n * { type: 'sort', config: {...} }\n * ]\n * }, {\n * id: 'regressionData',\n * fromDatasetIndex: 1,\n * // Third-party transform\n * transform: { type: 'ecStat:regression', config: {...} }\n * }, {\n * // retrieve the extra result.\n * id: 'regressionFormula',\n * fromDatasetId: 'regressionData',\n * fromTransformResult: 1\n * }]\n * ```\n */\nvar SourceManager = /** @class */function () {\n function SourceManager(sourceHost) {\n // Cached source. Do not repeat calculating if not dirty.\n this._sourceList = [];\n this._storeList = [];\n // version sign of each upstream source manager.\n this._upstreamSignList = [];\n this._versionSignBase = 0;\n this._dirty = true;\n this._sourceHost = sourceHost;\n }\n /**\n * Mark dirty.\n */\n SourceManager.prototype.dirty = function () {\n this._setLocalSource([], []);\n this._storeList = [];\n this._dirty = true;\n };\n SourceManager.prototype._setLocalSource = function (sourceList, upstreamSignList) {\n this._sourceList = sourceList;\n this._upstreamSignList = upstreamSignList;\n this._versionSignBase++;\n if (this._versionSignBase > 9e10) {\n this._versionSignBase = 0;\n }\n };\n /**\n * For detecting whether the upstream source is dirty, so that\n * the local cached source (in `_sourceList`) should be discarded.\n */\n SourceManager.prototype._getVersionSign = function () {\n return this._sourceHost.uid + '_' + this._versionSignBase;\n };\n /**\n * Always return a source instance. Otherwise throw error.\n */\n SourceManager.prototype.prepareSource = function () {\n // For the case that call `setOption` multiple time but no data changed,\n // cache the result source to prevent from repeating transform.\n if (this._isDirty()) {\n this._createSource();\n this._dirty = false;\n }\n };\n SourceManager.prototype._createSource = function () {\n this._setLocalSource([], []);\n var sourceHost = this._sourceHost;\n var upSourceMgrList = this._getUpstreamSourceManagers();\n var hasUpstream = !!upSourceMgrList.length;\n var resultSourceList;\n var upstreamSignList;\n if (isSeries(sourceHost)) {\n var seriesModel = sourceHost;\n var data = void 0;\n var sourceFormat = void 0;\n var upSource = void 0;\n // Has upstream dataset\n if (hasUpstream) {\n var upSourceMgr = upSourceMgrList[0];\n upSourceMgr.prepareSource();\n upSource = upSourceMgr.getSource();\n data = upSource.data;\n sourceFormat = upSource.sourceFormat;\n upstreamSignList = [upSourceMgr._getVersionSign()];\n }\n // Series data is from own.\n else {\n data = seriesModel.get('data', true);\n sourceFormat = isTypedArray(data) ? SOURCE_FORMAT_TYPED_ARRAY : SOURCE_FORMAT_ORIGINAL;\n upstreamSignList = [];\n }\n // See [REQUIREMENT_MEMO], merge settings on series and parent dataset if it is root.\n var newMetaRawOption = this._getSourceMetaRawOption() || {};\n var upMetaRawOption = upSource && upSource.metaRawOption || {};\n var seriesLayoutBy = retrieve2(newMetaRawOption.seriesLayoutBy, upMetaRawOption.seriesLayoutBy) || null;\n var sourceHeader = retrieve2(newMetaRawOption.sourceHeader, upMetaRawOption.sourceHeader);\n // Note here we should not use `upSource.dimensionsDefine`. Consider the case:\n // `upSource.dimensionsDefine` is detected by `seriesLayoutBy: 'column'`,\n // but series need `seriesLayoutBy: 'row'`.\n var dimensions = retrieve2(newMetaRawOption.dimensions, upMetaRawOption.dimensions);\n // We share source with dataset as much as possible\n // to avoid extra memory cost of high dimensional data.\n var needsCreateSource = seriesLayoutBy !== upMetaRawOption.seriesLayoutBy || !!sourceHeader !== !!upMetaRawOption.sourceHeader || dimensions;\n resultSourceList = needsCreateSource ? [createSource(data, {\n seriesLayoutBy: seriesLayoutBy,\n sourceHeader: sourceHeader,\n dimensions: dimensions\n }, sourceFormat)] : [];\n } else {\n var datasetModel = sourceHost;\n // Has upstream dataset.\n if (hasUpstream) {\n var result = this._applyTransform(upSourceMgrList);\n resultSourceList = result.sourceList;\n upstreamSignList = result.upstreamSignList;\n }\n // Is root dataset.\n else {\n var sourceData = datasetModel.get('source', true);\n resultSourceList = [createSource(sourceData, this._getSourceMetaRawOption(), null)];\n upstreamSignList = [];\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n assert(resultSourceList && upstreamSignList);\n }\n this._setLocalSource(resultSourceList, upstreamSignList);\n };\n SourceManager.prototype._applyTransform = function (upMgrList) {\n var datasetModel = this._sourceHost;\n var transformOption = datasetModel.get('transform', true);\n var fromTransformResult = datasetModel.get('fromTransformResult', true);\n if (process.env.NODE_ENV !== 'production') {\n assert(fromTransformResult != null || transformOption != null);\n }\n if (fromTransformResult != null) {\n var errMsg = '';\n if (upMgrList.length !== 1) {\n if (process.env.NODE_ENV !== 'production') {\n errMsg = 'When using `fromTransformResult`, there should be only one upstream dataset';\n }\n doThrow(errMsg);\n }\n }\n var sourceList;\n var upSourceList = [];\n var upstreamSignList = [];\n each(upMgrList, function (upMgr) {\n upMgr.prepareSource();\n var upSource = upMgr.getSource(fromTransformResult || 0);\n var errMsg = '';\n if (fromTransformResult != null && !upSource) {\n if (process.env.NODE_ENV !== 'production') {\n errMsg = 'Can not retrieve result by `fromTransformResult`: ' + fromTransformResult;\n }\n doThrow(errMsg);\n }\n upSourceList.push(upSource);\n upstreamSignList.push(upMgr._getVersionSign());\n });\n if (transformOption) {\n sourceList = applyDataTransform(transformOption, upSourceList, {\n datasetIndex: datasetModel.componentIndex\n });\n } else if (fromTransformResult != null) {\n sourceList = [cloneSourceShallow(upSourceList[0])];\n }\n return {\n sourceList: sourceList,\n upstreamSignList: upstreamSignList\n };\n };\n SourceManager.prototype._isDirty = function () {\n if (this._dirty) {\n return true;\n }\n // All sourceList is from the some upstream.\n var upSourceMgrList = this._getUpstreamSourceManagers();\n for (var i = 0; i < upSourceMgrList.length; i++) {\n var upSrcMgr = upSourceMgrList[i];\n if (\n // Consider the case that there is ancestor diry, call it recursively.\n // The performance is probably not an issue because usually the chain is not long.\n upSrcMgr._isDirty() || this._upstreamSignList[i] !== upSrcMgr._getVersionSign()) {\n return true;\n }\n }\n };\n /**\n * @param sourceIndex By default 0, means \"main source\".\n * In most cases there is only one source.\n */\n SourceManager.prototype.getSource = function (sourceIndex) {\n sourceIndex = sourceIndex || 0;\n var source = this._sourceList[sourceIndex];\n if (!source) {\n // Series may share source instance with dataset.\n var upSourceMgrList = this._getUpstreamSourceManagers();\n return upSourceMgrList[0] && upSourceMgrList[0].getSource(sourceIndex);\n }\n return source;\n };\n /**\n *\n * Get a data store which can be shared across series.\n * Only available for series.\n *\n * @param seriesDimRequest Dimensions that are generated in series.\n * Should have been sorted by `storeDimIndex` asc.\n */\n SourceManager.prototype.getSharedDataStore = function (seriesDimRequest) {\n if (process.env.NODE_ENV !== 'production') {\n assert(isSeries(this._sourceHost), 'Can only call getDataStore on series source manager.');\n }\n var schema = seriesDimRequest.makeStoreSchema();\n return this._innerGetDataStore(schema.dimensions, seriesDimRequest.source, schema.hash);\n };\n SourceManager.prototype._innerGetDataStore = function (storeDims, seriesSource, sourceReadKey) {\n // TODO Can use other sourceIndex?\n var sourceIndex = 0;\n var storeList = this._storeList;\n var cachedStoreMap = storeList[sourceIndex];\n if (!cachedStoreMap) {\n cachedStoreMap = storeList[sourceIndex] = {};\n }\n var cachedStore = cachedStoreMap[sourceReadKey];\n if (!cachedStore) {\n var upSourceMgr = this._getUpstreamSourceManagers()[0];\n if (isSeries(this._sourceHost) && upSourceMgr) {\n cachedStore = upSourceMgr._innerGetDataStore(storeDims, seriesSource, sourceReadKey);\n } else {\n cachedStore = new DataStore();\n // Always create store from source of series.\n cachedStore.initData(new DefaultDataProvider(seriesSource, storeDims.length), storeDims);\n }\n cachedStoreMap[sourceReadKey] = cachedStore;\n }\n return cachedStore;\n };\n /**\n * PENDING: Is it fast enough?\n * If no upstream, return empty array.\n */\n SourceManager.prototype._getUpstreamSourceManagers = function () {\n // Always get the relationship from the raw option.\n // Do not cache the link of the dependency graph, so that\n // there is no need to update them when change happens.\n var sourceHost = this._sourceHost;\n if (isSeries(sourceHost)) {\n var datasetModel = querySeriesUpstreamDatasetModel(sourceHost);\n return !datasetModel ? [] : [datasetModel.getSourceManager()];\n } else {\n return map(queryDatasetUpstreamDatasetModels(sourceHost), function (datasetModel) {\n return datasetModel.getSourceManager();\n });\n }\n };\n SourceManager.prototype._getSourceMetaRawOption = function () {\n var sourceHost = this._sourceHost;\n var seriesLayoutBy;\n var sourceHeader;\n var dimensions;\n if (isSeries(sourceHost)) {\n seriesLayoutBy = sourceHost.get('seriesLayoutBy', true);\n sourceHeader = sourceHost.get('sourceHeader', true);\n dimensions = sourceHost.get('dimensions', true);\n }\n // See [REQUIREMENT_MEMO], `non-root-dataset` do not support them.\n else if (!this._getUpstreamSourceManagers().length) {\n var model = sourceHost;\n seriesLayoutBy = model.get('seriesLayoutBy', true);\n sourceHeader = model.get('sourceHeader', true);\n dimensions = model.get('dimensions', true);\n }\n return {\n seriesLayoutBy: seriesLayoutBy,\n sourceHeader: sourceHeader,\n dimensions: dimensions\n };\n };\n return SourceManager;\n}();\nexport { SourceManager };\n// Call this method after `super.init` and `super.mergeOption` to\n// disable the transform merge, but do not disable transform clone from rawOption.\nexport function disableTransformOptionMerge(datasetModel) {\n var transformOption = datasetModel.option.transform;\n transformOption && setAsPrimitive(datasetModel.option.transform);\n}\nfunction isSeries(sourceHost) {\n // Avoid circular dependency with Series.ts\n return sourceHost.mainType === 'series';\n}\nfunction doThrow(errMsg) {\n throw new Error(errMsg);\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { getTooltipMarker, encodeHTML, makeValueReadable, convertToColorString } from '../../util/format.js';\nimport { isString, each, hasOwn, isArray, map, assert, extend } from 'zrender/lib/core/util.js';\nimport { SortOrderComparator } from '../../data/helper/dataValueHelper.js';\nimport { getRandomIdBase } from '../../util/number.js';\nvar TOOLTIP_LINE_HEIGHT_CSS = 'line-height:1';\n// TODO: more textStyle option\nfunction getTooltipTextStyle(textStyle, renderMode) {\n var nameFontColor = textStyle.color || '#6e7079';\n var nameFontSize = textStyle.fontSize || 12;\n var nameFontWeight = textStyle.fontWeight || '400';\n var valueFontColor = textStyle.color || '#464646';\n var valueFontSize = textStyle.fontSize || 14;\n var valueFontWeight = textStyle.fontWeight || '900';\n if (renderMode === 'html') {\n // `textStyle` is probably from user input, should be encoded to reduce security risk.\n return {\n // eslint-disable-next-line max-len\n nameStyle: \"font-size:\" + encodeHTML(nameFontSize + '') + \"px;color:\" + encodeHTML(nameFontColor) + \";font-weight:\" + encodeHTML(nameFontWeight + ''),\n // eslint-disable-next-line max-len\n valueStyle: \"font-size:\" + encodeHTML(valueFontSize + '') + \"px;color:\" + encodeHTML(valueFontColor) + \";font-weight:\" + encodeHTML(valueFontWeight + '')\n };\n } else {\n return {\n nameStyle: {\n fontSize: nameFontSize,\n fill: nameFontColor,\n fontWeight: nameFontWeight\n },\n valueStyle: {\n fontSize: valueFontSize,\n fill: valueFontColor,\n fontWeight: valueFontWeight\n }\n };\n }\n}\n// See `TooltipMarkupLayoutIntent['innerGapLevel']`.\n// (value from UI design)\nvar HTML_GAPS = [0, 10, 20, 30];\nvar RICH_TEXT_GAPS = ['', '\\n', '\\n\\n', '\\n\\n\\n'];\n// eslint-disable-next-line max-len\nexport function createTooltipMarkup(type, option) {\n option.type = type;\n return option;\n}\nfunction isSectionFragment(frag) {\n return frag.type === 'section';\n}\nfunction getBuilder(frag) {\n return isSectionFragment(frag) ? buildSection : buildNameValue;\n}\nfunction getBlockGapLevel(frag) {\n if (isSectionFragment(frag)) {\n var gapLevel_1 = 0;\n var subBlockLen = frag.blocks.length;\n var hasInnerGap_1 = subBlockLen > 1 || subBlockLen > 0 && !frag.noHeader;\n each(frag.blocks, function (subBlock) {\n var subGapLevel = getBlockGapLevel(subBlock);\n // If the some of the sub-blocks have some gaps (like 10px) inside, this block\n // should use a larger gap (like 20px) to distinguish those sub-blocks.\n if (subGapLevel >= gapLevel_1) {\n gapLevel_1 = subGapLevel + +(hasInnerGap_1 && (\n // 0 always can not be readable gap level.\n !subGapLevel\n // If no header, always keep the sub gap level. Otherwise\n // look weird in case `multipleSeries`.\n || isSectionFragment(subBlock) && !subBlock.noHeader));\n }\n });\n return gapLevel_1;\n }\n return 0;\n}\nfunction buildSection(ctx, fragment, topMarginForOuterGap, toolTipTextStyle) {\n var noHeader = fragment.noHeader;\n var gaps = getGap(getBlockGapLevel(fragment));\n var subMarkupTextList = [];\n var subBlocks = fragment.blocks || [];\n assert(!subBlocks || isArray(subBlocks));\n subBlocks = subBlocks || [];\n var orderMode = ctx.orderMode;\n if (fragment.sortBlocks && orderMode) {\n subBlocks = subBlocks.slice();\n var orderMap = {\n valueAsc: 'asc',\n valueDesc: 'desc'\n };\n if (hasOwn(orderMap, orderMode)) {\n var comparator_1 = new SortOrderComparator(orderMap[orderMode], null);\n subBlocks.sort(function (a, b) {\n return comparator_1.evaluate(a.sortParam, b.sortParam);\n });\n }\n // FIXME 'seriesDesc' necessary?\n else if (orderMode === 'seriesDesc') {\n subBlocks.reverse();\n }\n }\n each(subBlocks, function (subBlock, idx) {\n var valueFormatter = fragment.valueFormatter;\n var subMarkupText = getBuilder(subBlock)(\n // Inherit valueFormatter\n valueFormatter ? extend(extend({}, ctx), {\n valueFormatter: valueFormatter\n }) : ctx, subBlock, idx > 0 ? gaps.html : 0, toolTipTextStyle);\n subMarkupText != null && subMarkupTextList.push(subMarkupText);\n });\n var subMarkupText = ctx.renderMode === 'richText' ? subMarkupTextList.join(gaps.richText) : wrapBlockHTML(subMarkupTextList.join(''), noHeader ? topMarginForOuterGap : gaps.html);\n if (noHeader) {\n return subMarkupText;\n }\n var displayableHeader = makeValueReadable(fragment.header, 'ordinal', ctx.useUTC);\n var nameStyle = getTooltipTextStyle(toolTipTextStyle, ctx.renderMode).nameStyle;\n if (ctx.renderMode === 'richText') {\n return wrapInlineNameRichText(ctx, displayableHeader, nameStyle) + gaps.richText + subMarkupText;\n } else {\n return wrapBlockHTML(\"
\" + encodeHTML(displayableHeader) + '
' + subMarkupText, topMarginForOuterGap);\n }\n}\nfunction buildNameValue(ctx, fragment, topMarginForOuterGap, toolTipTextStyle) {\n var renderMode = ctx.renderMode;\n var noName = fragment.noName;\n var noValue = fragment.noValue;\n var noMarker = !fragment.markerType;\n var name = fragment.name;\n var useUTC = ctx.useUTC;\n var valueFormatter = fragment.valueFormatter || ctx.valueFormatter || function (value) {\n value = isArray(value) ? value : [value];\n return map(value, function (val, idx) {\n return makeValueReadable(val, isArray(valueTypeOption) ? valueTypeOption[idx] : valueTypeOption, useUTC);\n });\n };\n if (noName && noValue) {\n return;\n }\n var markerStr = noMarker ? '' : ctx.markupStyleCreator.makeTooltipMarker(fragment.markerType, fragment.markerColor || '#333', renderMode);\n var readableName = noName ? '' : makeValueReadable(name, 'ordinal', useUTC);\n var valueTypeOption = fragment.valueType;\n var readableValueList = noValue ? [] : valueFormatter(fragment.value, fragment.dataIndex);\n var valueAlignRight = !noMarker || !noName;\n // It little weird if only value next to marker but far from marker.\n var valueCloseToMarker = !noMarker && noName;\n var _a = getTooltipTextStyle(toolTipTextStyle, renderMode),\n nameStyle = _a.nameStyle,\n valueStyle = _a.valueStyle;\n return renderMode === 'richText' ? (noMarker ? '' : markerStr) + (noName ? '' : wrapInlineNameRichText(ctx, readableName, nameStyle))\n // Value has commas inside, so use ' ' as delimiter for multiple values.\n + (noValue ? '' : wrapInlineValueRichText(ctx, readableValueList, valueAlignRight, valueCloseToMarker, valueStyle)) : wrapBlockHTML((noMarker ? '' : markerStr) + (noName ? '' : wrapInlineNameHTML(readableName, !noMarker, nameStyle)) + (noValue ? '' : wrapInlineValueHTML(readableValueList, valueAlignRight, valueCloseToMarker, valueStyle)), topMarginForOuterGap);\n}\n/**\n * @return markupText. null/undefined means no content.\n */\nexport function buildTooltipMarkup(fragment, markupStyleCreator, renderMode, orderMode, useUTC, toolTipTextStyle) {\n if (!fragment) {\n return;\n }\n var builder = getBuilder(fragment);\n var ctx = {\n useUTC: useUTC,\n renderMode: renderMode,\n orderMode: orderMode,\n markupStyleCreator: markupStyleCreator,\n valueFormatter: fragment.valueFormatter\n };\n return builder(ctx, fragment, 0, toolTipTextStyle);\n}\nfunction getGap(gapLevel) {\n return {\n html: HTML_GAPS[gapLevel],\n richText: RICH_TEXT_GAPS[gapLevel]\n };\n}\nfunction wrapBlockHTML(encodedContent, topGap) {\n var clearfix = '
';\n var marginCSS = \"margin: \" + topGap + \"px 0 0\";\n return \"
\" + encodedContent + clearfix + '
';\n}\nfunction wrapInlineNameHTML(name, leftHasMarker, style) {\n var marginCss = leftHasMarker ? 'margin-left:2px' : '';\n return \"\" + encodeHTML(name) + '';\n}\nfunction wrapInlineValueHTML(valueList, alignRight, valueCloseToMarker, style) {\n // Do not too close to marker, considering there are multiple values separated by spaces.\n var paddingStr = valueCloseToMarker ? '10px' : '20px';\n var alignCSS = alignRight ? \"float:right;margin-left:\" + paddingStr : '';\n valueList = isArray(valueList) ? valueList : [valueList];\n return \"\"\n // Value has commas inside, so use ' ' as delimiter for multiple values.\n + map(valueList, function (value) {\n return encodeHTML(value);\n }).join('  ') + '';\n}\nfunction wrapInlineNameRichText(ctx, name, style) {\n return ctx.markupStyleCreator.wrapRichTextStyle(name, style);\n}\nfunction wrapInlineValueRichText(ctx, values, alignRight, valueCloseToMarker, style) {\n var styles = [style];\n var paddingLeft = valueCloseToMarker ? 10 : 20;\n alignRight && styles.push({\n padding: [0, 0, 0, paddingLeft],\n align: 'right'\n });\n // Value has commas inside, so use ' ' as delimiter for multiple values.\n return ctx.markupStyleCreator.wrapRichTextStyle(isArray(values) ? values.join(' ') : values, styles);\n}\nexport function retrieveVisualColorForTooltipMarker(series, dataIndex) {\n var style = series.getData().getItemVisual(dataIndex, 'style');\n var color = style[series.visualDrawType];\n return convertToColorString(color);\n}\nexport function getPaddingFromTooltipModel(model, renderMode) {\n var padding = model.get('padding');\n return padding != null ? padding\n // We give slightly different to look pretty.\n : renderMode === 'richText' ? [8, 10] : 10;\n}\n/**\n * The major feature is generate styles for `renderMode: 'richText'`.\n * But it also serves `renderMode: 'html'` to provide\n * \"renderMode-independent\" API.\n */\nvar TooltipMarkupStyleCreator = /** @class */function () {\n function TooltipMarkupStyleCreator() {\n this.richTextStyles = {};\n // Notice that \"generate a style name\" usually happens repeatedly when mouse is moving and\n // a tooltip is displayed. So we put the `_nextStyleNameId` as a member of each creator\n // rather than static shared by all creators (which will cause it increase to fast).\n this._nextStyleNameId = getRandomIdBase();\n }\n TooltipMarkupStyleCreator.prototype._generateStyleName = function () {\n return '__EC_aUTo_' + this._nextStyleNameId++;\n };\n TooltipMarkupStyleCreator.prototype.makeTooltipMarker = function (markerType, colorStr, renderMode) {\n var markerId = renderMode === 'richText' ? this._generateStyleName() : null;\n var marker = getTooltipMarker({\n color: colorStr,\n type: markerType,\n renderMode: renderMode,\n markerId: markerId\n });\n if (isString(marker)) {\n return marker;\n } else {\n if (process.env.NODE_ENV !== 'production') {\n assert(markerId);\n }\n this.richTextStyles[markerId] = marker.style;\n return marker.content;\n }\n };\n /**\n * @usage\n * ```ts\n * const styledText = markupStyleCreator.wrapRichTextStyle([\n * // The styles will be auto merged.\n * {\n * fontSize: 12,\n * color: 'blue'\n * },\n * {\n * padding: 20\n * }\n * ]);\n * ```\n */\n TooltipMarkupStyleCreator.prototype.wrapRichTextStyle = function (text, styles) {\n var finalStl = {};\n if (isArray(styles)) {\n each(styles, function (stl) {\n return extend(finalStl, stl);\n });\n } else {\n extend(finalStl, styles);\n }\n var styleName = this._generateStyleName();\n this.richTextStyles[styleName] = finalStl;\n return \"{\" + styleName + \"|\" + text + \"}\";\n };\n return TooltipMarkupStyleCreator;\n}();\nexport { TooltipMarkupStyleCreator };","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { trim, isArray, each, reduce } from 'zrender/lib/core/util.js';\nimport { retrieveVisualColorForTooltipMarker, createTooltipMarkup } from './tooltipMarkup.js';\nimport { retrieveRawValue } from '../../data/helper/dataProvider.js';\nimport { isNameSpecified } from '../../util/model.js';\nexport function defaultSeriesFormatTooltip(opt) {\n var series = opt.series;\n var dataIndex = opt.dataIndex;\n var multipleSeries = opt.multipleSeries;\n var data = series.getData();\n var tooltipDims = data.mapDimensionsAll('defaultedTooltip');\n var tooltipDimLen = tooltipDims.length;\n var value = series.getRawValue(dataIndex);\n var isValueArr = isArray(value);\n var markerColor = retrieveVisualColorForTooltipMarker(series, dataIndex);\n // Complicated rule for pretty tooltip.\n var inlineValue;\n var inlineValueType;\n var subBlocks;\n var sortParam;\n if (tooltipDimLen > 1 || isValueArr && !tooltipDimLen) {\n var formatArrResult = formatTooltipArrayValue(value, series, dataIndex, tooltipDims, markerColor);\n inlineValue = formatArrResult.inlineValues;\n inlineValueType = formatArrResult.inlineValueTypes;\n subBlocks = formatArrResult.blocks;\n // Only support tooltip sort by the first inline value. It's enough in most cases.\n sortParam = formatArrResult.inlineValues[0];\n } else if (tooltipDimLen) {\n var dimInfo = data.getDimensionInfo(tooltipDims[0]);\n sortParam = inlineValue = retrieveRawValue(data, dataIndex, tooltipDims[0]);\n inlineValueType = dimInfo.type;\n } else {\n sortParam = inlineValue = isValueArr ? value[0] : value;\n }\n // Do not show generated series name. It might not be readable.\n var seriesNameSpecified = isNameSpecified(series);\n var seriesName = seriesNameSpecified && series.name || '';\n var itemName = data.getName(dataIndex);\n var inlineName = multipleSeries ? seriesName : itemName;\n return createTooltipMarkup('section', {\n header: seriesName,\n // When series name is not specified, do not show a header line with only '-'.\n // This case always happens in tooltip.trigger: 'item'.\n noHeader: multipleSeries || !seriesNameSpecified,\n sortParam: sortParam,\n blocks: [createTooltipMarkup('nameValue', {\n markerType: 'item',\n markerColor: markerColor,\n // Do not mix display seriesName and itemName in one tooltip,\n // which might confuses users.\n name: inlineName,\n // name dimension might be auto assigned, where the name might\n // be not readable. So we check trim here.\n noName: !trim(inlineName),\n value: inlineValue,\n valueType: inlineValueType,\n dataIndex: dataIndex\n })].concat(subBlocks || [])\n });\n}\nfunction formatTooltipArrayValue(value, series, dataIndex, tooltipDims, colorStr) {\n // check: category-no-encode-has-axis-data in dataset.html\n var data = series.getData();\n var isValueMultipleLine = reduce(value, function (isValueMultipleLine, val, idx) {\n var dimItem = data.getDimensionInfo(idx);\n return isValueMultipleLine = isValueMultipleLine || dimItem && dimItem.tooltip !== false && dimItem.displayName != null;\n }, false);\n var inlineValues = [];\n var inlineValueTypes = [];\n var blocks = [];\n tooltipDims.length ? each(tooltipDims, function (dim) {\n setEachItem(retrieveRawValue(data, dataIndex, dim), dim);\n })\n // By default, all dims is used on tooltip.\n : each(value, setEachItem);\n function setEachItem(val, dim) {\n var dimInfo = data.getDimensionInfo(dim);\n // If `dimInfo.tooltip` is not set, show tooltip.\n if (!dimInfo || dimInfo.otherDims.tooltip === false) {\n return;\n }\n if (isValueMultipleLine) {\n blocks.push(createTooltipMarkup('nameValue', {\n markerType: 'subItem',\n markerColor: colorStr,\n name: dimInfo.displayName,\n value: val,\n valueType: dimInfo.type\n }));\n } else {\n inlineValues.push(val);\n inlineValueTypes.push(dimInfo.type);\n }\n }\n return {\n inlineValues: inlineValues,\n inlineValueTypes: inlineValueTypes,\n blocks: blocks\n };\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport env from 'zrender/lib/core/env.js';\nimport * as modelUtil from '../util/model.js';\nimport ComponentModel from './Component.js';\nimport { PaletteMixin } from './mixin/palette.js';\nimport { DataFormatMixin } from '../model/mixin/dataFormat.js';\nimport { getLayoutParams, mergeLayoutParam, fetchLayoutMode } from '../util/layout.js';\nimport { createTask } from '../core/task.js';\nimport { mountExtend } from '../util/clazz.js';\nimport { SourceManager } from '../data/helper/sourceManager.js';\nimport { defaultSeriesFormatTooltip } from '../component/tooltip/seriesFormatTooltip.js';\nvar inner = modelUtil.makeInner();\nfunction getSelectionKey(data, dataIndex) {\n return data.getName(dataIndex) || data.getId(dataIndex);\n}\nexport var SERIES_UNIVERSAL_TRANSITION_PROP = '__universalTransitionEnabled';\nvar SeriesModel = /** @class */function (_super) {\n __extends(SeriesModel, _super);\n function SeriesModel() {\n // [Caution]: Because this class or desecendants can be used as `XXX.extend(subProto)`,\n // the class members must not be initialized in constructor or declaration place.\n // Otherwise there is bad case:\n // class A {xxx = 1;}\n // enableClassExtend(A);\n // class B extends A {}\n // var C = B.extend({xxx: 5});\n // var c = new C();\n // console.log(c.xxx); // expect 5 but always 1.\n var _this = _super !== null && _super.apply(this, arguments) || this;\n // ---------------------------------------\n // Props about data selection\n // ---------------------------------------\n _this._selectedDataIndicesMap = {};\n return _this;\n }\n SeriesModel.prototype.init = function (option, parentModel, ecModel) {\n this.seriesIndex = this.componentIndex;\n this.dataTask = createTask({\n count: dataTaskCount,\n reset: dataTaskReset\n });\n this.dataTask.context = {\n model: this\n };\n this.mergeDefaultAndTheme(option, ecModel);\n var sourceManager = inner(this).sourceManager = new SourceManager(this);\n sourceManager.prepareSource();\n var data = this.getInitialData(option, ecModel);\n wrapData(data, this);\n this.dataTask.context.data = data;\n if (process.env.NODE_ENV !== 'production') {\n zrUtil.assert(data, 'getInitialData returned invalid data.');\n }\n inner(this).dataBeforeProcessed = data;\n // If we reverse the order (make data firstly, and then make\n // dataBeforeProcessed by cloneShallow), cloneShallow will\n // cause data.graph.data !== data when using\n // module:echarts/data/Graph or module:echarts/data/Tree.\n // See module:echarts/data/helper/linkSeriesData\n // Theoretically, it is unreasonable to call `seriesModel.getData()` in the model\n // init or merge stage, because the data can be restored. So we do not `restoreData`\n // and `setData` here, which forbids calling `seriesModel.getData()` in this stage.\n // Call `seriesModel.getRawData()` instead.\n // this.restoreData();\n autoSeriesName(this);\n this._initSelectedMapFromData(data);\n };\n /**\n * Util for merge default and theme to option\n */\n SeriesModel.prototype.mergeDefaultAndTheme = function (option, ecModel) {\n var layoutMode = fetchLayoutMode(this);\n var inputPositionParams = layoutMode ? getLayoutParams(option) : {};\n // Backward compat: using subType on theme.\n // But if name duplicate between series subType\n // (for example: parallel) add component mainType,\n // add suffix 'Series'.\n var themeSubType = this.subType;\n if (ComponentModel.hasClass(themeSubType)) {\n themeSubType += 'Series';\n }\n zrUtil.merge(option, ecModel.getTheme().get(this.subType));\n zrUtil.merge(option, this.getDefaultOption());\n // Default label emphasis `show`\n modelUtil.defaultEmphasis(option, 'label', ['show']);\n this.fillDataTextStyle(option.data);\n if (layoutMode) {\n mergeLayoutParam(option, inputPositionParams, layoutMode);\n }\n };\n SeriesModel.prototype.mergeOption = function (newSeriesOption, ecModel) {\n // this.settingTask.dirty();\n newSeriesOption = zrUtil.merge(this.option, newSeriesOption, true);\n this.fillDataTextStyle(newSeriesOption.data);\n var layoutMode = fetchLayoutMode(this);\n if (layoutMode) {\n mergeLayoutParam(this.option, newSeriesOption, layoutMode);\n }\n var sourceManager = inner(this).sourceManager;\n sourceManager.dirty();\n sourceManager.prepareSource();\n var data = this.getInitialData(newSeriesOption, ecModel);\n wrapData(data, this);\n this.dataTask.dirty();\n this.dataTask.context.data = data;\n inner(this).dataBeforeProcessed = data;\n autoSeriesName(this);\n this._initSelectedMapFromData(data);\n };\n SeriesModel.prototype.fillDataTextStyle = function (data) {\n // Default data label emphasis `show`\n // FIXME Tree structure data ?\n // FIXME Performance ?\n if (data && !zrUtil.isTypedArray(data)) {\n var props = ['show'];\n for (var i = 0; i < data.length; i++) {\n if (data[i] && data[i].label) {\n modelUtil.defaultEmphasis(data[i], 'label', props);\n }\n }\n }\n };\n /**\n * Init a data structure from data related option in series\n * Must be overridden.\n */\n SeriesModel.prototype.getInitialData = function (option, ecModel) {\n return;\n };\n /**\n * Append data to list\n */\n SeriesModel.prototype.appendData = function (params) {\n // FIXME ???\n // (1) If data from dataset, forbidden append.\n // (2) support append data of dataset.\n var data = this.getRawData();\n data.appendData(params.data);\n };\n /**\n * Consider some method like `filter`, `map` need make new data,\n * We should make sure that `seriesModel.getData()` get correct\n * data in the stream procedure. So we fetch data from upstream\n * each time `task.perform` called.\n */\n SeriesModel.prototype.getData = function (dataType) {\n var task = getCurrentTask(this);\n if (task) {\n var data = task.context.data;\n return dataType == null || !data.getLinkedData ? data : data.getLinkedData(dataType);\n } else {\n // When series is not alive (that may happen when click toolbox\n // restore or setOption with not merge mode), series data may\n // be still need to judge animation or something when graphic\n // elements want to know whether fade out.\n return inner(this).data;\n }\n };\n SeriesModel.prototype.getAllData = function () {\n var mainData = this.getData();\n return mainData && mainData.getLinkedDataAll ? mainData.getLinkedDataAll() : [{\n data: mainData\n }];\n };\n SeriesModel.prototype.setData = function (data) {\n var task = getCurrentTask(this);\n if (task) {\n var context = task.context;\n // Consider case: filter, data sample.\n // FIXME:TS never used, so comment it\n // if (context.data !== data && task.modifyOutputEnd) {\n // task.setOutputEnd(data.count());\n // }\n context.outputData = data;\n // Caution: setData should update context.data,\n // Because getData may be called multiply in a\n // single stage and expect to get the data just\n // set. (For example, AxisProxy, x y both call\n // getData and setDate sequentially).\n // So the context.data should be fetched from\n // upstream each time when a stage starts to be\n // performed.\n if (task !== this.dataTask) {\n context.data = data;\n }\n }\n inner(this).data = data;\n };\n SeriesModel.prototype.getEncode = function () {\n var encode = this.get('encode', true);\n if (encode) {\n return zrUtil.createHashMap(encode);\n }\n };\n SeriesModel.prototype.getSourceManager = function () {\n return inner(this).sourceManager;\n };\n SeriesModel.prototype.getSource = function () {\n return this.getSourceManager().getSource();\n };\n /**\n * Get data before processed\n */\n SeriesModel.prototype.getRawData = function () {\n return inner(this).dataBeforeProcessed;\n };\n SeriesModel.prototype.getColorBy = function () {\n var colorBy = this.get('colorBy');\n return colorBy || 'series';\n };\n SeriesModel.prototype.isColorBySeries = function () {\n return this.getColorBy() === 'series';\n };\n /**\n * Get base axis if has coordinate system and has axis.\n * By default use coordSys.getBaseAxis();\n * Can be overridden for some chart.\n * @return {type} description\n */\n SeriesModel.prototype.getBaseAxis = function () {\n var coordSys = this.coordinateSystem;\n // @ts-ignore\n return coordSys && coordSys.getBaseAxis && coordSys.getBaseAxis();\n };\n /**\n * Default tooltip formatter\n *\n * @param dataIndex\n * @param multipleSeries\n * @param dataType\n * @param renderMode valid values: 'html'(by default) and 'richText'.\n * 'html' is used for rendering tooltip in extra DOM form, and the result\n * string is used as DOM HTML content.\n * 'richText' is used for rendering tooltip in rich text form, for those where\n * DOM operation is not supported.\n * @return formatted tooltip with `html` and `markers`\n * Notice: The override method can also return string\n */\n SeriesModel.prototype.formatTooltip = function (dataIndex, multipleSeries, dataType) {\n return defaultSeriesFormatTooltip({\n series: this,\n dataIndex: dataIndex,\n multipleSeries: multipleSeries\n });\n };\n SeriesModel.prototype.isAnimationEnabled = function () {\n var ecModel = this.ecModel;\n // Disable animation if using echarts in node but not give ssr flag.\n // In ssr mode, renderToString will generate svg with css animation.\n if (env.node && !(ecModel && ecModel.ssr)) {\n return false;\n }\n var animationEnabled = this.getShallow('animation');\n if (animationEnabled) {\n if (this.getData().count() > this.getShallow('animationThreshold')) {\n animationEnabled = false;\n }\n }\n return !!animationEnabled;\n };\n SeriesModel.prototype.restoreData = function () {\n this.dataTask.dirty();\n };\n SeriesModel.prototype.getColorFromPalette = function (name, scope, requestColorNum) {\n var ecModel = this.ecModel;\n // PENDING\n var color = PaletteMixin.prototype.getColorFromPalette.call(this, name, scope, requestColorNum);\n if (!color) {\n color = ecModel.getColorFromPalette(name, scope, requestColorNum);\n }\n return color;\n };\n /**\n * Use `data.mapDimensionsAll(coordDim)` instead.\n * @deprecated\n */\n SeriesModel.prototype.coordDimToDataDim = function (coordDim) {\n return this.getRawData().mapDimensionsAll(coordDim);\n };\n /**\n * Get progressive rendering count each step\n */\n SeriesModel.prototype.getProgressive = function () {\n return this.get('progressive');\n };\n /**\n * Get progressive rendering count each step\n */\n SeriesModel.prototype.getProgressiveThreshold = function () {\n return this.get('progressiveThreshold');\n };\n // PENGING If selectedMode is null ?\n SeriesModel.prototype.select = function (innerDataIndices, dataType) {\n this._innerSelect(this.getData(dataType), innerDataIndices);\n };\n SeriesModel.prototype.unselect = function (innerDataIndices, dataType) {\n var selectedMap = this.option.selectedMap;\n if (!selectedMap) {\n return;\n }\n var selectedMode = this.option.selectedMode;\n var data = this.getData(dataType);\n if (selectedMode === 'series' || selectedMap === 'all') {\n this.option.selectedMap = {};\n this._selectedDataIndicesMap = {};\n return;\n }\n for (var i = 0; i < innerDataIndices.length; i++) {\n var dataIndex = innerDataIndices[i];\n var nameOrId = getSelectionKey(data, dataIndex);\n selectedMap[nameOrId] = false;\n this._selectedDataIndicesMap[nameOrId] = -1;\n }\n };\n SeriesModel.prototype.toggleSelect = function (innerDataIndices, dataType) {\n var tmpArr = [];\n for (var i = 0; i < innerDataIndices.length; i++) {\n tmpArr[0] = innerDataIndices[i];\n this.isSelected(innerDataIndices[i], dataType) ? this.unselect(tmpArr, dataType) : this.select(tmpArr, dataType);\n }\n };\n SeriesModel.prototype.getSelectedDataIndices = function () {\n if (this.option.selectedMap === 'all') {\n return [].slice.call(this.getData().getIndices());\n }\n var selectedDataIndicesMap = this._selectedDataIndicesMap;\n var nameOrIds = zrUtil.keys(selectedDataIndicesMap);\n var dataIndices = [];\n for (var i = 0; i < nameOrIds.length; i++) {\n var dataIndex = selectedDataIndicesMap[nameOrIds[i]];\n if (dataIndex >= 0) {\n dataIndices.push(dataIndex);\n }\n }\n return dataIndices;\n };\n SeriesModel.prototype.isSelected = function (dataIndex, dataType) {\n var selectedMap = this.option.selectedMap;\n if (!selectedMap) {\n return false;\n }\n var data = this.getData(dataType);\n return (selectedMap === 'all' || selectedMap[getSelectionKey(data, dataIndex)]) && !data.getItemModel(dataIndex).get(['select', 'disabled']);\n };\n SeriesModel.prototype.isUniversalTransitionEnabled = function () {\n if (this[SERIES_UNIVERSAL_TRANSITION_PROP]) {\n return true;\n }\n var universalTransitionOpt = this.option.universalTransition;\n // Quick reject\n if (!universalTransitionOpt) {\n return false;\n }\n if (universalTransitionOpt === true) {\n return true;\n }\n // Can be simply 'universalTransition: true'\n return universalTransitionOpt && universalTransitionOpt.enabled;\n };\n SeriesModel.prototype._innerSelect = function (data, innerDataIndices) {\n var _a, _b;\n var option = this.option;\n var selectedMode = option.selectedMode;\n var len = innerDataIndices.length;\n if (!selectedMode || !len) {\n return;\n }\n if (selectedMode === 'series') {\n option.selectedMap = 'all';\n } else if (selectedMode === 'multiple') {\n if (!zrUtil.isObject(option.selectedMap)) {\n option.selectedMap = {};\n }\n var selectedMap = option.selectedMap;\n for (var i = 0; i < len; i++) {\n var dataIndex = innerDataIndices[i];\n // TODO different types of data share same object.\n var nameOrId = getSelectionKey(data, dataIndex);\n selectedMap[nameOrId] = true;\n this._selectedDataIndicesMap[nameOrId] = data.getRawIndex(dataIndex);\n }\n } else if (selectedMode === 'single' || selectedMode === true) {\n var lastDataIndex = innerDataIndices[len - 1];\n var nameOrId = getSelectionKey(data, lastDataIndex);\n option.selectedMap = (_a = {}, _a[nameOrId] = true, _a);\n this._selectedDataIndicesMap = (_b = {}, _b[nameOrId] = data.getRawIndex(lastDataIndex), _b);\n }\n };\n SeriesModel.prototype._initSelectedMapFromData = function (data) {\n // Ignore select info in data if selectedMap exists.\n // NOTE It's only for legacy usage. edge data is not supported.\n if (this.option.selectedMap) {\n return;\n }\n var dataIndices = [];\n if (data.hasItemOption) {\n data.each(function (idx) {\n var rawItem = data.getRawDataItem(idx);\n if (rawItem && rawItem.selected) {\n dataIndices.push(idx);\n }\n });\n }\n if (dataIndices.length > 0) {\n this._innerSelect(data, dataIndices);\n }\n };\n // /**\n // * @see {module:echarts/stream/Scheduler}\n // */\n // abstract pipeTask: null\n SeriesModel.registerClass = function (clz) {\n return ComponentModel.registerClass(clz);\n };\n SeriesModel.protoInitialize = function () {\n var proto = SeriesModel.prototype;\n proto.type = 'series.__base__';\n proto.seriesIndex = 0;\n proto.ignoreStyleOnData = false;\n proto.hasSymbolVisual = false;\n proto.defaultSymbol = 'circle';\n // Make sure the values can be accessed!\n proto.visualStyleAccessPath = 'itemStyle';\n proto.visualDrawType = 'fill';\n }();\n return SeriesModel;\n}(ComponentModel);\nzrUtil.mixin(SeriesModel, DataFormatMixin);\nzrUtil.mixin(SeriesModel, PaletteMixin);\nmountExtend(SeriesModel, ComponentModel);\n/**\n * MUST be called after `prepareSource` called\n * Here we need to make auto series, especially for auto legend. But we\n * do not modify series.name in option to avoid side effects.\n */\nfunction autoSeriesName(seriesModel) {\n // User specified name has higher priority, otherwise it may cause\n // series can not be queried unexpectedly.\n var name = seriesModel.name;\n if (!modelUtil.isNameSpecified(seriesModel)) {\n seriesModel.name = getSeriesAutoName(seriesModel) || name;\n }\n}\nfunction getSeriesAutoName(seriesModel) {\n var data = seriesModel.getRawData();\n var dataDims = data.mapDimensionsAll('seriesName');\n var nameArr = [];\n zrUtil.each(dataDims, function (dataDim) {\n var dimInfo = data.getDimensionInfo(dataDim);\n dimInfo.displayName && nameArr.push(dimInfo.displayName);\n });\n return nameArr.join(' ');\n}\nfunction dataTaskCount(context) {\n return context.model.getRawData().count();\n}\nfunction dataTaskReset(context) {\n var seriesModel = context.model;\n seriesModel.setData(seriesModel.getRawData().cloneShallow());\n return dataTaskProgress;\n}\nfunction dataTaskProgress(param, context) {\n // Avoid repeat cloneShallow when data just created in reset.\n if (context.outputData && param.end > context.outputData.count()) {\n context.model.getRawData().cloneShallow(context.outputData);\n }\n}\n// TODO refactor\nfunction wrapData(data, seriesModel) {\n zrUtil.each(zrUtil.concatArray(data.CHANGABLE_METHODS, data.DOWNSAMPLE_METHODS), function (methodName) {\n data.wrapMethod(methodName, zrUtil.curry(onDataChange, seriesModel));\n });\n}\nfunction onDataChange(seriesModel, newList) {\n var task = getCurrentTask(seriesModel);\n if (task) {\n // Consider case: filter, selectRange\n task.setOutputEnd((newList || this).count());\n }\n return newList;\n}\nfunction getCurrentTask(seriesModel) {\n var scheduler = (seriesModel.ecModel || {}).scheduler;\n var pipeline = scheduler && scheduler.getPipeline(seriesModel.uid);\n if (pipeline) {\n // When pipline finished, the currrentTask keep the last\n // task (renderTask).\n var task = pipeline.currentTask;\n if (task) {\n var agentStubMap = task.agentStubMap;\n if (agentStubMap) {\n task = agentStubMap.get(seriesModel.uid);\n }\n }\n return task;\n }\n}\nexport default SeriesModel;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport Group from 'zrender/lib/graphic/Group.js';\nimport * as componentUtil from '../util/component.js';\nimport * as clazzUtil from '../util/clazz.js';\nvar ComponentView = /** @class */function () {\n function ComponentView() {\n this.group = new Group();\n this.uid = componentUtil.getUID('viewComponent');\n }\n ComponentView.prototype.init = function (ecModel, api) {};\n ComponentView.prototype.render = function (model, ecModel, api, payload) {};\n ComponentView.prototype.dispose = function (ecModel, api) {};\n ComponentView.prototype.updateView = function (model, ecModel, api, payload) {\n // Do nothing;\n };\n ComponentView.prototype.updateLayout = function (model, ecModel, api, payload) {\n // Do nothing;\n };\n ComponentView.prototype.updateVisual = function (model, ecModel, api, payload) {\n // Do nothing;\n };\n /**\n * Hook for toggle blur target series.\n * Can be used in marker for blur or leave blur the markers\n */\n ComponentView.prototype.toggleBlurSeries = function (seriesModels, isBlur, ecModel) {\n // Do nothing;\n };\n /**\n * Traverse the new rendered elements.\n *\n * It will traverse the new added element in progressive rendering.\n * And traverse all in normal rendering.\n */\n ComponentView.prototype.eachRendered = function (cb) {\n var group = this.group;\n if (group) {\n group.traverse(cb);\n }\n };\n return ComponentView;\n}();\n;\nclazzUtil.enableClassExtend(ComponentView);\nclazzUtil.enableClassManagement(ComponentView);\nexport default ComponentView;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { makeInner } from '../../util/model.js';\n/**\n * @return {string} If large mode changed, return string 'reset';\n */\nexport default function createRenderPlanner() {\n var inner = makeInner();\n return function (seriesModel) {\n var fields = inner(seriesModel);\n var pipelineContext = seriesModel.pipelineContext;\n var originalLarge = !!fields.large;\n var originalProgressive = !!fields.progressiveRender;\n // FIXME: if the planner works on a filtered series, `pipelineContext` does not\n // exists. See #11611 . Probably we need to modify this structure, see the comment\n // on `performRawSeries` in `Schedular.js`.\n var large = fields.large = !!(pipelineContext && pipelineContext.large);\n var progressive = fields.progressiveRender = !!(pipelineContext && pipelineContext.progressiveRender);\n return !!(originalLarge !== large || originalProgressive !== progressive) && 'reset';\n };\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { each } from 'zrender/lib/core/util.js';\nimport Group from 'zrender/lib/graphic/Group.js';\nimport * as componentUtil from '../util/component.js';\nimport * as clazzUtil from '../util/clazz.js';\nimport * as modelUtil from '../util/model.js';\nimport { enterEmphasis, leaveEmphasis, getHighlightDigit, isHighDownDispatcher } from '../util/states.js';\nimport { createTask } from '../core/task.js';\nimport createRenderPlanner from '../chart/helper/createRenderPlanner.js';\nimport { traverseElements } from '../util/graphic.js';\nimport { error } from '../util/log.js';\nvar inner = modelUtil.makeInner();\nvar renderPlanner = createRenderPlanner();\nvar ChartView = /** @class */function () {\n function ChartView() {\n this.group = new Group();\n this.uid = componentUtil.getUID('viewChart');\n this.renderTask = createTask({\n plan: renderTaskPlan,\n reset: renderTaskReset\n });\n this.renderTask.context = {\n view: this\n };\n }\n ChartView.prototype.init = function (ecModel, api) {};\n ChartView.prototype.render = function (seriesModel, ecModel, api, payload) {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error('render method must been implemented');\n }\n };\n /**\n * Highlight series or specified data item.\n */\n ChartView.prototype.highlight = function (seriesModel, ecModel, api, payload) {\n var data = seriesModel.getData(payload && payload.dataType);\n if (!data) {\n if (process.env.NODE_ENV !== 'production') {\n error(\"Unknown dataType \" + payload.dataType);\n }\n return;\n }\n toggleHighlight(data, payload, 'emphasis');\n };\n /**\n * Downplay series or specified data item.\n */\n ChartView.prototype.downplay = function (seriesModel, ecModel, api, payload) {\n var data = seriesModel.getData(payload && payload.dataType);\n if (!data) {\n if (process.env.NODE_ENV !== 'production') {\n error(\"Unknown dataType \" + payload.dataType);\n }\n return;\n }\n toggleHighlight(data, payload, 'normal');\n };\n /**\n * Remove self.\n */\n ChartView.prototype.remove = function (ecModel, api) {\n this.group.removeAll();\n };\n /**\n * Dispose self.\n */\n ChartView.prototype.dispose = function (ecModel, api) {};\n ChartView.prototype.updateView = function (seriesModel, ecModel, api, payload) {\n this.render(seriesModel, ecModel, api, payload);\n };\n // FIXME never used?\n ChartView.prototype.updateLayout = function (seriesModel, ecModel, api, payload) {\n this.render(seriesModel, ecModel, api, payload);\n };\n // FIXME never used?\n ChartView.prototype.updateVisual = function (seriesModel, ecModel, api, payload) {\n this.render(seriesModel, ecModel, api, payload);\n };\n /**\n * Traverse the new rendered elements.\n *\n * It will traverse the new added element in progressive rendering.\n * And traverse all in normal rendering.\n */\n ChartView.prototype.eachRendered = function (cb) {\n traverseElements(this.group, cb);\n };\n ChartView.markUpdateMethod = function (payload, methodName) {\n inner(payload).updateMethod = methodName;\n };\n ChartView.protoInitialize = function () {\n var proto = ChartView.prototype;\n proto.type = 'chart';\n }();\n return ChartView;\n}();\n;\n/**\n * Set state of single element\n */\nfunction elSetState(el, state, highlightDigit) {\n if (el && isHighDownDispatcher(el)) {\n (state === 'emphasis' ? enterEmphasis : leaveEmphasis)(el, highlightDigit);\n }\n}\nfunction toggleHighlight(data, payload, state) {\n var dataIndex = modelUtil.queryDataIndex(data, payload);\n var highlightDigit = payload && payload.highlightKey != null ? getHighlightDigit(payload.highlightKey) : null;\n if (dataIndex != null) {\n each(modelUtil.normalizeToArray(dataIndex), function (dataIdx) {\n elSetState(data.getItemGraphicEl(dataIdx), state, highlightDigit);\n });\n } else {\n data.eachItemGraphicEl(function (el) {\n elSetState(el, state, highlightDigit);\n });\n }\n}\nclazzUtil.enableClassExtend(ChartView, ['dispose']);\nclazzUtil.enableClassManagement(ChartView);\nfunction renderTaskPlan(context) {\n return renderPlanner(context.model);\n}\nfunction renderTaskReset(context) {\n var seriesModel = context.model;\n var ecModel = context.ecModel;\n var api = context.api;\n var payload = context.payload;\n // FIXME: remove updateView updateVisual\n var progressiveRender = seriesModel.pipelineContext.progressiveRender;\n var view = context.view;\n var updateMethod = payload && inner(payload).updateMethod;\n var methodName = progressiveRender ? 'incrementalPrepareRender' : updateMethod && view[updateMethod] ? updateMethod\n // `appendData` is also supported when data amount\n // is less than progressive threshold.\n : 'render';\n if (methodName !== 'render') {\n view[methodName](seriesModel, ecModel, api, payload);\n }\n return progressMethodMap[methodName];\n}\nvar progressMethodMap = {\n incrementalPrepareRender: {\n progress: function (params, context) {\n context.view.incrementalRender(params, context.model, context.ecModel, context.api, context.payload);\n }\n },\n render: {\n // Put view.render in `progress` to support appendData. But in this case\n // view.render should not be called in reset, otherwise it will be called\n // twise. Use `forceFirstProgress` to make sure that view.render is called\n // in any cases.\n forceFirstProgress: true,\n progress: function (params, context) {\n context.view.render(context.model, context.ecModel, context.api, context.payload);\n }\n }\n};\nexport default ChartView;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar ORIGIN_METHOD = '\\0__throttleOriginMethod';\nvar RATE = '\\0__throttleRate';\nvar THROTTLE_TYPE = '\\0__throttleType';\n;\n/**\n * @public\n * @param {(Function)} fn\n * @param {number} [delay=0] Unit: ms.\n * @param {boolean} [debounce=false]\n * true: If call interval less than `delay`, only the last call works.\n * false: If call interval less than `delay, call works on fixed rate.\n * @return {(Function)} throttled fn.\n */\nexport function throttle(fn, delay, debounce) {\n var currCall;\n var lastCall = 0;\n var lastExec = 0;\n var timer = null;\n var diff;\n var scope;\n var args;\n var debounceNextCall;\n delay = delay || 0;\n function exec() {\n lastExec = new Date().getTime();\n timer = null;\n fn.apply(scope, args || []);\n }\n var cb = function () {\n var cbArgs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n cbArgs[_i] = arguments[_i];\n }\n currCall = new Date().getTime();\n scope = this;\n args = cbArgs;\n var thisDelay = debounceNextCall || delay;\n var thisDebounce = debounceNextCall || debounce;\n debounceNextCall = null;\n diff = currCall - (thisDebounce ? lastCall : lastExec) - thisDelay;\n clearTimeout(timer);\n // Here we should make sure that: the `exec` SHOULD NOT be called later\n // than a new call of `cb`, that is, preserving the command order. Consider\n // calculating \"scale rate\" when roaming as an example. When a call of `cb`\n // happens, either the `exec` is called dierectly, or the call is delayed.\n // But the delayed call should never be later than next call of `cb`. Under\n // this assurance, we can simply update view state each time `dispatchAction`\n // triggered by user roaming, but not need to add extra code to avoid the\n // state being \"rolled-back\".\n if (thisDebounce) {\n timer = setTimeout(exec, thisDelay);\n } else {\n if (diff >= 0) {\n exec();\n } else {\n timer = setTimeout(exec, -diff);\n }\n }\n lastCall = currCall;\n };\n /**\n * Clear throttle.\n * @public\n */\n cb.clear = function () {\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n };\n /**\n * Enable debounce once.\n */\n cb.debounceNextCall = function (debounceDelay) {\n debounceNextCall = debounceDelay;\n };\n return cb;\n}\n/**\n * Create throttle method or update throttle rate.\n *\n * @example\n * ComponentView.prototype.render = function () {\n * ...\n * throttle.createOrUpdate(\n * this,\n * '_dispatchAction',\n * this.model.get('throttle'),\n * 'fixRate'\n * );\n * };\n * ComponentView.prototype.remove = function () {\n * throttle.clear(this, '_dispatchAction');\n * };\n * ComponentView.prototype.dispose = function () {\n * throttle.clear(this, '_dispatchAction');\n * };\n *\n */\nexport function createOrUpdate(obj, fnAttr, rate, throttleType) {\n var fn = obj[fnAttr];\n if (!fn) {\n return;\n }\n var originFn = fn[ORIGIN_METHOD] || fn;\n var lastThrottleType = fn[THROTTLE_TYPE];\n var lastRate = fn[RATE];\n if (lastRate !== rate || lastThrottleType !== throttleType) {\n if (rate == null || !throttleType) {\n return obj[fnAttr] = originFn;\n }\n fn = obj[fnAttr] = throttle(originFn, rate, throttleType === 'debounce');\n fn[ORIGIN_METHOD] = originFn;\n fn[THROTTLE_TYPE] = throttleType;\n fn[RATE] = rate;\n }\n return fn;\n}\n/**\n * Clear throttle. Example see throttle.createOrUpdate.\n */\nexport function clear(obj, fnAttr) {\n var fn = obj[fnAttr];\n if (fn && fn[ORIGIN_METHOD]) {\n // Clear throttle\n fn.clear && fn.clear();\n obj[fnAttr] = fn[ORIGIN_METHOD];\n }\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { isFunction, extend, createHashMap } from 'zrender/lib/core/util.js';\nimport makeStyleMapper from '../model/mixin/makeStyleMapper.js';\nimport { ITEM_STYLE_KEY_MAP } from '../model/mixin/itemStyle.js';\nimport { LINE_STYLE_KEY_MAP } from '../model/mixin/lineStyle.js';\nimport Model from '../model/Model.js';\nimport { makeInner } from '../util/model.js';\nvar inner = makeInner();\nvar defaultStyleMappers = {\n itemStyle: makeStyleMapper(ITEM_STYLE_KEY_MAP, true),\n lineStyle: makeStyleMapper(LINE_STYLE_KEY_MAP, true)\n};\nvar defaultColorKey = {\n lineStyle: 'stroke',\n itemStyle: 'fill'\n};\nfunction getStyleMapper(seriesModel, stylePath) {\n var styleMapper = seriesModel.visualStyleMapper || defaultStyleMappers[stylePath];\n if (!styleMapper) {\n console.warn(\"Unknown style type '\" + stylePath + \"'.\");\n return defaultStyleMappers.itemStyle;\n }\n return styleMapper;\n}\nfunction getDefaultColorKey(seriesModel, stylePath) {\n // return defaultColorKey[stylePath] ||\n var colorKey = seriesModel.visualDrawType || defaultColorKey[stylePath];\n if (!colorKey) {\n console.warn(\"Unknown style type '\" + stylePath + \"'.\");\n return 'fill';\n }\n return colorKey;\n}\nvar seriesStyleTask = {\n createOnAllSeries: true,\n performRawSeries: true,\n reset: function (seriesModel, ecModel) {\n var data = seriesModel.getData();\n var stylePath = seriesModel.visualStyleAccessPath || 'itemStyle';\n // Set in itemStyle\n var styleModel = seriesModel.getModel(stylePath);\n var getStyle = getStyleMapper(seriesModel, stylePath);\n var globalStyle = getStyle(styleModel);\n var decalOption = styleModel.getShallow('decal');\n if (decalOption) {\n data.setVisual('decal', decalOption);\n decalOption.dirty = true;\n }\n // TODO\n var colorKey = getDefaultColorKey(seriesModel, stylePath);\n var color = globalStyle[colorKey];\n // TODO style callback\n var colorCallback = isFunction(color) ? color : null;\n var hasAutoColor = globalStyle.fill === 'auto' || globalStyle.stroke === 'auto';\n // Get from color palette by default.\n if (!globalStyle[colorKey] || colorCallback || hasAutoColor) {\n // Note: If some series has color specified (e.g., by itemStyle.color), we DO NOT\n // make it effect palette. Because some scenarios users need to make some series\n // transparent or as background, which should better not effect the palette.\n var colorPalette = seriesModel.getColorFromPalette(\n // TODO series count changed.\n seriesModel.name, null, ecModel.getSeriesCount());\n if (!globalStyle[colorKey]) {\n globalStyle[colorKey] = colorPalette;\n data.setVisual('colorFromPalette', true);\n }\n globalStyle.fill = globalStyle.fill === 'auto' || isFunction(globalStyle.fill) ? colorPalette : globalStyle.fill;\n globalStyle.stroke = globalStyle.stroke === 'auto' || isFunction(globalStyle.stroke) ? colorPalette : globalStyle.stroke;\n }\n data.setVisual('style', globalStyle);\n data.setVisual('drawType', colorKey);\n // Only visible series has each data be visual encoded\n if (!ecModel.isSeriesFiltered(seriesModel) && colorCallback) {\n data.setVisual('colorFromPalette', false);\n return {\n dataEach: function (data, idx) {\n var dataParams = seriesModel.getDataParams(idx);\n var itemStyle = extend({}, globalStyle);\n itemStyle[colorKey] = colorCallback(dataParams);\n data.setItemVisual(idx, 'style', itemStyle);\n }\n };\n }\n }\n};\nvar sharedModel = new Model();\nvar dataStyleTask = {\n createOnAllSeries: true,\n performRawSeries: true,\n reset: function (seriesModel, ecModel) {\n if (seriesModel.ignoreStyleOnData || ecModel.isSeriesFiltered(seriesModel)) {\n return;\n }\n var data = seriesModel.getData();\n var stylePath = seriesModel.visualStyleAccessPath || 'itemStyle';\n // Set in itemStyle\n var getStyle = getStyleMapper(seriesModel, stylePath);\n var colorKey = data.getVisual('drawType');\n return {\n dataEach: data.hasItemOption ? function (data, idx) {\n // Not use getItemModel for performance considuration\n var rawItem = data.getRawDataItem(idx);\n if (rawItem && rawItem[stylePath]) {\n sharedModel.option = rawItem[stylePath];\n var style = getStyle(sharedModel);\n var existsStyle = data.ensureUniqueItemVisual(idx, 'style');\n extend(existsStyle, style);\n if (sharedModel.option.decal) {\n data.setItemVisual(idx, 'decal', sharedModel.option.decal);\n sharedModel.option.decal.dirty = true;\n }\n if (colorKey in style) {\n data.setItemVisual(idx, 'colorFromPalette', false);\n }\n }\n } : null\n };\n }\n};\n// Pick color from palette for the data which has not been set with color yet.\n// Note: do not support stream rendering. No such cases yet.\nvar dataColorPaletteTask = {\n performRawSeries: true,\n overallReset: function (ecModel) {\n // Each type of series uses one scope.\n // Pie and funnel are using different scopes.\n var paletteScopeGroupByType = createHashMap();\n ecModel.eachSeries(function (seriesModel) {\n var colorBy = seriesModel.getColorBy();\n if (seriesModel.isColorBySeries()) {\n return;\n }\n var key = seriesModel.type + '-' + colorBy;\n var colorScope = paletteScopeGroupByType.get(key);\n if (!colorScope) {\n colorScope = {};\n paletteScopeGroupByType.set(key, colorScope);\n }\n inner(seriesModel).scope = colorScope;\n });\n ecModel.eachSeries(function (seriesModel) {\n if (seriesModel.isColorBySeries() || ecModel.isSeriesFiltered(seriesModel)) {\n return;\n }\n var dataAll = seriesModel.getRawData();\n var idxMap = {};\n var data = seriesModel.getData();\n var colorScope = inner(seriesModel).scope;\n var stylePath = seriesModel.visualStyleAccessPath || 'itemStyle';\n var colorKey = getDefaultColorKey(seriesModel, stylePath);\n data.each(function (idx) {\n var rawIdx = data.getRawIndex(idx);\n idxMap[rawIdx] = idx;\n });\n // Iterate on data before filtered. To make sure color from palette can be\n // Consistent when toggling legend.\n dataAll.each(function (rawIdx) {\n var idx = idxMap[rawIdx];\n var fromPalette = data.getItemVisual(idx, 'colorFromPalette');\n // Get color from palette for each data only when the color is inherited from series color, which is\n // also picked from color palette. So following situation is not in the case:\n // 1. series.itemStyle.color is set\n // 2. color is encoded by visualMap\n if (fromPalette) {\n var itemStyle = data.ensureUniqueItemVisual(idx, 'style');\n var name_1 = dataAll.getName(rawIdx) || rawIdx + '';\n var dataCount = dataAll.count();\n itemStyle[colorKey] = seriesModel.getColorFromPalette(name_1, colorScope, dataCount);\n }\n });\n });\n }\n};\nexport { seriesStyleTask, dataStyleTask, dataColorPaletteTask };","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as graphic from '../util/graphic.js';\nvar PI = Math.PI;\n/**\n * @param {module:echarts/ExtensionAPI} api\n * @param {Object} [opts]\n * @param {string} [opts.text]\n * @param {string} [opts.color]\n * @param {string} [opts.textColor]\n * @return {module:zrender/Element}\n */\nexport default function defaultLoading(api, opts) {\n opts = opts || {};\n zrUtil.defaults(opts, {\n text: 'loading',\n textColor: '#000',\n fontSize: 12,\n fontWeight: 'normal',\n fontStyle: 'normal',\n fontFamily: 'sans-serif',\n maskColor: 'rgba(255, 255, 255, 0.8)',\n showSpinner: true,\n color: '#5470c6',\n spinnerRadius: 10,\n lineWidth: 5,\n zlevel: 0\n });\n var group = new graphic.Group();\n var mask = new graphic.Rect({\n style: {\n fill: opts.maskColor\n },\n zlevel: opts.zlevel,\n z: 10000\n });\n group.add(mask);\n var textContent = new graphic.Text({\n style: {\n text: opts.text,\n fill: opts.textColor,\n fontSize: opts.fontSize,\n fontWeight: opts.fontWeight,\n fontStyle: opts.fontStyle,\n fontFamily: opts.fontFamily\n },\n zlevel: opts.zlevel,\n z: 10001\n });\n var labelRect = new graphic.Rect({\n style: {\n fill: 'none'\n },\n textContent: textContent,\n textConfig: {\n position: 'right',\n distance: 10\n },\n zlevel: opts.zlevel,\n z: 10001\n });\n group.add(labelRect);\n var arc;\n if (opts.showSpinner) {\n arc = new graphic.Arc({\n shape: {\n startAngle: -PI / 2,\n endAngle: -PI / 2 + 0.1,\n r: opts.spinnerRadius\n },\n style: {\n stroke: opts.color,\n lineCap: 'round',\n lineWidth: opts.lineWidth\n },\n zlevel: opts.zlevel,\n z: 10001\n });\n arc.animateShape(true).when(1000, {\n endAngle: PI * 3 / 2\n }).start('circularInOut');\n arc.animateShape(true).when(1000, {\n startAngle: PI * 3 / 2\n }).delay(300).start('circularInOut');\n group.add(arc);\n }\n // Inject resize\n group.resize = function () {\n var textWidth = textContent.getBoundingRect().width;\n var r = opts.showSpinner ? opts.spinnerRadius : 0;\n // cx = (containerWidth - arcDiameter - textDistance - textWidth) / 2\n // textDistance needs to be calculated when both animation and text exist\n var cx = (api.getWidth() - r * 2 - (opts.showSpinner && textWidth ? 10 : 0) - textWidth) / 2 - (opts.showSpinner && textWidth ? 0 : 5 + textWidth / 2)\n // only show the text\n + (opts.showSpinner ? 0 : textWidth / 2)\n // only show the spinner\n + (textWidth ? 0 : r);\n var cy = api.getHeight() / 2;\n opts.showSpinner && arc.setShape({\n cx: cx,\n cy: cy\n });\n labelRect.setShape({\n x: cx - r,\n y: cy - r,\n width: r * 2,\n height: r * 2\n });\n mask.setShape({\n x: 0,\n y: 0,\n width: api.getWidth(),\n height: api.getHeight()\n });\n };\n group.resize();\n return group;\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { each, map, isFunction, createHashMap, noop, assert } from 'zrender/lib/core/util.js';\nimport { createTask } from './task.js';\nimport { getUID } from '../util/component.js';\nimport GlobalModel from '../model/Global.js';\nimport ExtensionAPI from './ExtensionAPI.js';\nimport { normalizeToArray } from '../util/model.js';\n;\nvar Scheduler = /** @class */function () {\n function Scheduler(ecInstance, api, dataProcessorHandlers, visualHandlers) {\n // key: handlerUID\n this._stageTaskMap = createHashMap();\n this.ecInstance = ecInstance;\n this.api = api;\n // Fix current processors in case that in some rear cases that\n // processors might be registered after echarts instance created.\n // Register processors incrementally for a echarts instance is\n // not supported by this stream architecture.\n dataProcessorHandlers = this._dataProcessorHandlers = dataProcessorHandlers.slice();\n visualHandlers = this._visualHandlers = visualHandlers.slice();\n this._allHandlers = dataProcessorHandlers.concat(visualHandlers);\n }\n Scheduler.prototype.restoreData = function (ecModel, payload) {\n // TODO: Only restore needed series and components, but not all components.\n // Currently `restoreData` of all of the series and component will be called.\n // But some independent components like `title`, `legend`, `graphic`, `toolbox`,\n // `tooltip`, `axisPointer`, etc, do not need series refresh when `setOption`,\n // and some components like coordinate system, axes, dataZoom, visualMap only\n // need their target series refresh.\n // (1) If we are implementing this feature some day, we should consider these cases:\n // if a data processor depends on a component (e.g., dataZoomProcessor depends\n // on the settings of `dataZoom`), it should be re-performed if the component\n // is modified by `setOption`.\n // (2) If a processor depends on sevral series, speicified by its `getTargetSeries`,\n // it should be re-performed when the result array of `getTargetSeries` changed.\n // We use `dependencies` to cover these issues.\n // (3) How to update target series when coordinate system related components modified.\n // TODO: simply the dirty mechanism? Check whether only the case here can set tasks dirty,\n // and this case all of the tasks will be set as dirty.\n ecModel.restoreData(payload);\n // Theoretically an overall task not only depends on each of its target series, but also\n // depends on all of the series.\n // The overall task is not in pipeline, and `ecModel.restoreData` only set pipeline tasks\n // dirty. If `getTargetSeries` of an overall task returns nothing, we should also ensure\n // that the overall task is set as dirty and to be performed, otherwise it probably cause\n // state chaos. So we have to set dirty of all of the overall tasks manually, otherwise it\n // probably cause state chaos (consider `dataZoomProcessor`).\n this._stageTaskMap.each(function (taskRecord) {\n var overallTask = taskRecord.overallTask;\n overallTask && overallTask.dirty();\n });\n };\n // If seriesModel provided, incremental threshold is check by series data.\n Scheduler.prototype.getPerformArgs = function (task, isBlock) {\n // For overall task\n if (!task.__pipeline) {\n return;\n }\n var pipeline = this._pipelineMap.get(task.__pipeline.id);\n var pCtx = pipeline.context;\n var incremental = !isBlock && pipeline.progressiveEnabled && (!pCtx || pCtx.progressiveRender) && task.__idxInPipeline > pipeline.blockIndex;\n var step = incremental ? pipeline.step : null;\n var modDataCount = pCtx && pCtx.modDataCount;\n var modBy = modDataCount != null ? Math.ceil(modDataCount / step) : null;\n return {\n step: step,\n modBy: modBy,\n modDataCount: modDataCount\n };\n };\n Scheduler.prototype.getPipeline = function (pipelineId) {\n return this._pipelineMap.get(pipelineId);\n };\n /**\n * Current, progressive rendering starts from visual and layout.\n * Always detect render mode in the same stage, avoiding that incorrect\n * detection caused by data filtering.\n * Caution:\n * `updateStreamModes` use `seriesModel.getData()`.\n */\n Scheduler.prototype.updateStreamModes = function (seriesModel, view) {\n var pipeline = this._pipelineMap.get(seriesModel.uid);\n var data = seriesModel.getData();\n var dataLen = data.count();\n // `progressiveRender` means that can render progressively in each\n // animation frame. Note that some types of series do not provide\n // `view.incrementalPrepareRender` but support `chart.appendData`. We\n // use the term `incremental` but not `progressive` to describe the\n // case that `chart.appendData`.\n var progressiveRender = pipeline.progressiveEnabled && view.incrementalPrepareRender && dataLen >= pipeline.threshold;\n var large = seriesModel.get('large') && dataLen >= seriesModel.get('largeThreshold');\n // TODO: modDataCount should not updated if `appendData`, otherwise cause whole repaint.\n // see `test/candlestick-large3.html`\n var modDataCount = seriesModel.get('progressiveChunkMode') === 'mod' ? dataLen : null;\n seriesModel.pipelineContext = pipeline.context = {\n progressiveRender: progressiveRender,\n modDataCount: modDataCount,\n large: large\n };\n };\n Scheduler.prototype.restorePipelines = function (ecModel) {\n var scheduler = this;\n var pipelineMap = scheduler._pipelineMap = createHashMap();\n ecModel.eachSeries(function (seriesModel) {\n var progressive = seriesModel.getProgressive();\n var pipelineId = seriesModel.uid;\n pipelineMap.set(pipelineId, {\n id: pipelineId,\n head: null,\n tail: null,\n threshold: seriesModel.getProgressiveThreshold(),\n progressiveEnabled: progressive && !(seriesModel.preventIncremental && seriesModel.preventIncremental()),\n blockIndex: -1,\n step: Math.round(progressive || 700),\n count: 0\n });\n scheduler._pipe(seriesModel, seriesModel.dataTask);\n });\n };\n Scheduler.prototype.prepareStageTasks = function () {\n var stageTaskMap = this._stageTaskMap;\n var ecModel = this.api.getModel();\n var api = this.api;\n each(this._allHandlers, function (handler) {\n var record = stageTaskMap.get(handler.uid) || stageTaskMap.set(handler.uid, {});\n var errMsg = '';\n if (process.env.NODE_ENV !== 'production') {\n // Currently do not need to support to sepecify them both.\n errMsg = '\"reset\" and \"overallReset\" must not be both specified.';\n }\n assert(!(handler.reset && handler.overallReset), errMsg);\n handler.reset && this._createSeriesStageTask(handler, record, ecModel, api);\n handler.overallReset && this._createOverallStageTask(handler, record, ecModel, api);\n }, this);\n };\n Scheduler.prototype.prepareView = function (view, model, ecModel, api) {\n var renderTask = view.renderTask;\n var context = renderTask.context;\n context.model = model;\n context.ecModel = ecModel;\n context.api = api;\n renderTask.__block = !view.incrementalPrepareRender;\n this._pipe(model, renderTask);\n };\n Scheduler.prototype.performDataProcessorTasks = function (ecModel, payload) {\n // If we do not use `block` here, it should be considered when to update modes.\n this._performStageTasks(this._dataProcessorHandlers, ecModel, payload, {\n block: true\n });\n };\n Scheduler.prototype.performVisualTasks = function (ecModel, payload, opt) {\n this._performStageTasks(this._visualHandlers, ecModel, payload, opt);\n };\n Scheduler.prototype._performStageTasks = function (stageHandlers, ecModel, payload, opt) {\n opt = opt || {};\n var unfinished = false;\n var scheduler = this;\n each(stageHandlers, function (stageHandler, idx) {\n if (opt.visualType && opt.visualType !== stageHandler.visualType) {\n return;\n }\n var stageHandlerRecord = scheduler._stageTaskMap.get(stageHandler.uid);\n var seriesTaskMap = stageHandlerRecord.seriesTaskMap;\n var overallTask = stageHandlerRecord.overallTask;\n if (overallTask) {\n var overallNeedDirty_1;\n var agentStubMap = overallTask.agentStubMap;\n agentStubMap.each(function (stub) {\n if (needSetDirty(opt, stub)) {\n stub.dirty();\n overallNeedDirty_1 = true;\n }\n });\n overallNeedDirty_1 && overallTask.dirty();\n scheduler.updatePayload(overallTask, payload);\n var performArgs_1 = scheduler.getPerformArgs(overallTask, opt.block);\n // Execute stubs firstly, which may set the overall task dirty,\n // then execute the overall task. And stub will call seriesModel.setData,\n // which ensures that in the overallTask seriesModel.getData() will not\n // return incorrect data.\n agentStubMap.each(function (stub) {\n stub.perform(performArgs_1);\n });\n if (overallTask.perform(performArgs_1)) {\n unfinished = true;\n }\n } else if (seriesTaskMap) {\n seriesTaskMap.each(function (task, pipelineId) {\n if (needSetDirty(opt, task)) {\n task.dirty();\n }\n var performArgs = scheduler.getPerformArgs(task, opt.block);\n // FIXME\n // if intending to declare `performRawSeries` in handlers, only\n // stream-independent (specifically, data item independent) operations can be\n // performed. Because if a series is filtered, most of the tasks will not\n // be performed. A stream-dependent operation probably cause wrong biz logic.\n // Perhaps we should not provide a separate callback for this case instead\n // of providing the config `performRawSeries`. The stream-dependent operations\n // and stream-independent operations should better not be mixed.\n performArgs.skip = !stageHandler.performRawSeries && ecModel.isSeriesFiltered(task.context.model);\n scheduler.updatePayload(task, payload);\n if (task.perform(performArgs)) {\n unfinished = true;\n }\n });\n }\n });\n function needSetDirty(opt, task) {\n return opt.setDirty && (!opt.dirtyMap || opt.dirtyMap.get(task.__pipeline.id));\n }\n this.unfinished = unfinished || this.unfinished;\n };\n Scheduler.prototype.performSeriesTasks = function (ecModel) {\n var unfinished;\n ecModel.eachSeries(function (seriesModel) {\n // Progress to the end for dataInit and dataRestore.\n unfinished = seriesModel.dataTask.perform() || unfinished;\n });\n this.unfinished = unfinished || this.unfinished;\n };\n Scheduler.prototype.plan = function () {\n // Travel pipelines, check block.\n this._pipelineMap.each(function (pipeline) {\n var task = pipeline.tail;\n do {\n if (task.__block) {\n pipeline.blockIndex = task.__idxInPipeline;\n break;\n }\n task = task.getUpstream();\n } while (task);\n });\n };\n Scheduler.prototype.updatePayload = function (task, payload) {\n payload !== 'remain' && (task.context.payload = payload);\n };\n Scheduler.prototype._createSeriesStageTask = function (stageHandler, stageHandlerRecord, ecModel, api) {\n var scheduler = this;\n var oldSeriesTaskMap = stageHandlerRecord.seriesTaskMap;\n // The count of stages are totally about only several dozen, so\n // do not need to reuse the map.\n var newSeriesTaskMap = stageHandlerRecord.seriesTaskMap = createHashMap();\n var seriesType = stageHandler.seriesType;\n var getTargetSeries = stageHandler.getTargetSeries;\n // If a stageHandler should cover all series, `createOnAllSeries` should be declared mandatorily,\n // to avoid some typo or abuse. Otherwise if an extension do not specify a `seriesType`,\n // it works but it may cause other irrelevant charts blocked.\n if (stageHandler.createOnAllSeries) {\n ecModel.eachRawSeries(create);\n } else if (seriesType) {\n ecModel.eachRawSeriesByType(seriesType, create);\n } else if (getTargetSeries) {\n getTargetSeries(ecModel, api).each(create);\n }\n function create(seriesModel) {\n var pipelineId = seriesModel.uid;\n // Init tasks for each seriesModel only once.\n // Reuse original task instance.\n var task = newSeriesTaskMap.set(pipelineId, oldSeriesTaskMap && oldSeriesTaskMap.get(pipelineId) || createTask({\n plan: seriesTaskPlan,\n reset: seriesTaskReset,\n count: seriesTaskCount\n }));\n task.context = {\n model: seriesModel,\n ecModel: ecModel,\n api: api,\n // PENDING: `useClearVisual` not used?\n useClearVisual: stageHandler.isVisual && !stageHandler.isLayout,\n plan: stageHandler.plan,\n reset: stageHandler.reset,\n scheduler: scheduler\n };\n scheduler._pipe(seriesModel, task);\n }\n };\n Scheduler.prototype._createOverallStageTask = function (stageHandler, stageHandlerRecord, ecModel, api) {\n var scheduler = this;\n var overallTask = stageHandlerRecord.overallTask = stageHandlerRecord.overallTask\n // For overall task, the function only be called on reset stage.\n || createTask({\n reset: overallTaskReset\n });\n overallTask.context = {\n ecModel: ecModel,\n api: api,\n overallReset: stageHandler.overallReset,\n scheduler: scheduler\n };\n var oldAgentStubMap = overallTask.agentStubMap;\n // The count of stages are totally about only several dozen, so\n // do not need to reuse the map.\n var newAgentStubMap = overallTask.agentStubMap = createHashMap();\n var seriesType = stageHandler.seriesType;\n var getTargetSeries = stageHandler.getTargetSeries;\n var overallProgress = true;\n var shouldOverallTaskDirty = false;\n // FIXME:TS never used, so comment it\n // let modifyOutputEnd = stageHandler.modifyOutputEnd;\n // An overall task with seriesType detected or has `getTargetSeries`, we add\n // stub in each pipelines, it will set the overall task dirty when the pipeline\n // progress. Moreover, to avoid call the overall task each frame (too frequent),\n // we set the pipeline block.\n var errMsg = '';\n if (process.env.NODE_ENV !== 'production') {\n errMsg = '\"createOnAllSeries\" is not supported for \"overallReset\", ' + 'because it will block all streams.';\n }\n assert(!stageHandler.createOnAllSeries, errMsg);\n if (seriesType) {\n ecModel.eachRawSeriesByType(seriesType, createStub);\n } else if (getTargetSeries) {\n getTargetSeries(ecModel, api).each(createStub);\n }\n // Otherwise, (usually it is legacy case), the overall task will only be\n // executed when upstream is dirty. Otherwise the progressive rendering of all\n // pipelines will be disabled unexpectedly. But it still needs stubs to receive\n // dirty info from upstream.\n else {\n overallProgress = false;\n each(ecModel.getSeries(), createStub);\n }\n function createStub(seriesModel) {\n var pipelineId = seriesModel.uid;\n var stub = newAgentStubMap.set(pipelineId, oldAgentStubMap && oldAgentStubMap.get(pipelineId) || (\n // When the result of `getTargetSeries` changed, the overallTask\n // should be set as dirty and re-performed.\n shouldOverallTaskDirty = true, createTask({\n reset: stubReset,\n onDirty: stubOnDirty\n })));\n stub.context = {\n model: seriesModel,\n overallProgress: overallProgress\n // FIXME:TS never used, so comment it\n // modifyOutputEnd: modifyOutputEnd\n };\n stub.agent = overallTask;\n stub.__block = overallProgress;\n scheduler._pipe(seriesModel, stub);\n }\n if (shouldOverallTaskDirty) {\n overallTask.dirty();\n }\n };\n Scheduler.prototype._pipe = function (seriesModel, task) {\n var pipelineId = seriesModel.uid;\n var pipeline = this._pipelineMap.get(pipelineId);\n !pipeline.head && (pipeline.head = task);\n pipeline.tail && pipeline.tail.pipe(task);\n pipeline.tail = task;\n task.__idxInPipeline = pipeline.count++;\n task.__pipeline = pipeline;\n };\n Scheduler.wrapStageHandler = function (stageHandler, visualType) {\n if (isFunction(stageHandler)) {\n stageHandler = {\n overallReset: stageHandler,\n seriesType: detectSeriseType(stageHandler)\n };\n }\n stageHandler.uid = getUID('stageHandler');\n visualType && (stageHandler.visualType = visualType);\n return stageHandler;\n };\n ;\n return Scheduler;\n}();\nfunction overallTaskReset(context) {\n context.overallReset(context.ecModel, context.api, context.payload);\n}\nfunction stubReset(context) {\n return context.overallProgress && stubProgress;\n}\nfunction stubProgress() {\n this.agent.dirty();\n this.getDownstream().dirty();\n}\nfunction stubOnDirty() {\n this.agent && this.agent.dirty();\n}\nfunction seriesTaskPlan(context) {\n return context.plan ? context.plan(context.model, context.ecModel, context.api, context.payload) : null;\n}\nfunction seriesTaskReset(context) {\n if (context.useClearVisual) {\n context.data.clearAllVisual();\n }\n var resetDefines = context.resetDefines = normalizeToArray(context.reset(context.model, context.ecModel, context.api, context.payload));\n return resetDefines.length > 1 ? map(resetDefines, function (v, idx) {\n return makeSeriesTaskProgress(idx);\n }) : singleSeriesTaskProgress;\n}\nvar singleSeriesTaskProgress = makeSeriesTaskProgress(0);\nfunction makeSeriesTaskProgress(resetDefineIdx) {\n return function (params, context) {\n var data = context.data;\n var resetDefine = context.resetDefines[resetDefineIdx];\n if (resetDefine && resetDefine.dataEach) {\n for (var i = params.start; i < params.end; i++) {\n resetDefine.dataEach(data, i);\n }\n } else if (resetDefine && resetDefine.progress) {\n resetDefine.progress(params, data);\n }\n };\n}\nfunction seriesTaskCount(context) {\n return context.data.count();\n}\n/**\n * Only some legacy stage handlers (usually in echarts extensions) are pure function.\n * To ensure that they can work normally, they should work in block mode, that is,\n * they should not be started util the previous tasks finished. So they cause the\n * progressive rendering disabled. We try to detect the series type, to narrow down\n * the block range to only the series type they concern, but not all series.\n */\nfunction detectSeriseType(legacyFunc) {\n seriesType = null;\n try {\n // Assume there is no async when calling `eachSeriesByType`.\n legacyFunc(ecModelMock, apiMock);\n } catch (e) {}\n return seriesType;\n}\nvar ecModelMock = {};\nvar apiMock = {};\nvar seriesType;\nmockMethods(ecModelMock, GlobalModel);\nmockMethods(apiMock, ExtensionAPI);\necModelMock.eachSeriesByType = ecModelMock.eachRawSeriesByType = function (type) {\n seriesType = type;\n};\necModelMock.eachComponent = function (cond) {\n if (cond.mainType === 'series' && cond.subType) {\n seriesType = cond.subType;\n }\n};\nfunction mockMethods(target, Clz) {\n /* eslint-disable */\n for (var name_1 in Clz.prototype) {\n // Do not use hasOwnProperty\n target[name_1] = noop;\n }\n /* eslint-enable */\n}\nexport default Scheduler;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar colorAll = ['#37A2DA', '#32C5E9', '#67E0E3', '#9FE6B8', '#FFDB5C', '#ff9f7f', '#fb7293', '#E062AE', '#E690D1', '#e7bcf3', '#9d96f5', '#8378EA', '#96BFFF'];\nexport default {\n color: colorAll,\n colorLayer: [['#37A2DA', '#ffd85c', '#fd7b5f'], ['#37A2DA', '#67E0E3', '#FFDB5C', '#ff9f7f', '#E062AE', '#9d96f5'], ['#37A2DA', '#32C5E9', '#9FE6B8', '#FFDB5C', '#ff9f7f', '#fb7293', '#e7bcf3', '#8378EA', '#96BFFF'], colorAll]\n};","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar contrastColor = '#B9B8CE';\nvar backgroundColor = '#100C2A';\nvar axisCommon = function () {\n return {\n axisLine: {\n lineStyle: {\n color: contrastColor\n }\n },\n splitLine: {\n lineStyle: {\n color: '#484753'\n }\n },\n splitArea: {\n areaStyle: {\n color: ['rgba(255,255,255,0.02)', 'rgba(255,255,255,0.05)']\n }\n },\n minorSplitLine: {\n lineStyle: {\n color: '#20203B'\n }\n }\n };\n};\nvar colorPalette = ['#4992ff', '#7cffb2', '#fddd60', '#ff6e76', '#58d9f9', '#05c091', '#ff8a45', '#8d48e3', '#dd79ff'];\nvar theme = {\n darkMode: true,\n color: colorPalette,\n backgroundColor: backgroundColor,\n axisPointer: {\n lineStyle: {\n color: '#817f91'\n },\n crossStyle: {\n color: '#817f91'\n },\n label: {\n // TODO Contrast of label backgorundColor\n color: '#fff'\n }\n },\n legend: {\n textStyle: {\n color: contrastColor\n }\n },\n textStyle: {\n color: contrastColor\n },\n title: {\n textStyle: {\n color: '#EEF1FA'\n },\n subtextStyle: {\n color: '#B9B8CE'\n }\n },\n toolbox: {\n iconStyle: {\n borderColor: contrastColor\n }\n },\n dataZoom: {\n borderColor: '#71708A',\n textStyle: {\n color: contrastColor\n },\n brushStyle: {\n color: 'rgba(135,163,206,0.3)'\n },\n handleStyle: {\n color: '#353450',\n borderColor: '#C5CBE3'\n },\n moveHandleStyle: {\n color: '#B0B6C3',\n opacity: 0.3\n },\n fillerColor: 'rgba(135,163,206,0.2)',\n emphasis: {\n handleStyle: {\n borderColor: '#91B7F2',\n color: '#4D587D'\n },\n moveHandleStyle: {\n color: '#636D9A',\n opacity: 0.7\n }\n },\n dataBackground: {\n lineStyle: {\n color: '#71708A',\n width: 1\n },\n areaStyle: {\n color: '#71708A'\n }\n },\n selectedDataBackground: {\n lineStyle: {\n color: '#87A3CE'\n },\n areaStyle: {\n color: '#87A3CE'\n }\n }\n },\n visualMap: {\n textStyle: {\n color: contrastColor\n }\n },\n timeline: {\n lineStyle: {\n color: contrastColor\n },\n label: {\n color: contrastColor\n },\n controlStyle: {\n color: contrastColor,\n borderColor: contrastColor\n }\n },\n calendar: {\n itemStyle: {\n color: backgroundColor\n },\n dayLabel: {\n color: contrastColor\n },\n monthLabel: {\n color: contrastColor\n },\n yearLabel: {\n color: contrastColor\n }\n },\n timeAxis: axisCommon(),\n logAxis: axisCommon(),\n valueAxis: axisCommon(),\n categoryAxis: axisCommon(),\n line: {\n symbol: 'circle'\n },\n graph: {\n color: colorPalette\n },\n gauge: {\n title: {\n color: contrastColor\n },\n axisLine: {\n lineStyle: {\n color: [[1, 'rgba(207,212,219,0.2)']]\n }\n },\n axisLabel: {\n color: contrastColor\n },\n detail: {\n color: '#EEF1FA'\n }\n },\n candlestick: {\n itemStyle: {\n color: '#f64e56',\n color0: '#54ea92',\n borderColor: '#f64e56',\n borderColor0: '#54ea92'\n // borderColor: '#ca2824',\n // borderColor0: '#09a443'\n }\n }\n};\ntheme.categoryAxis.splitLine.show = false;\nexport default theme;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { parseClassType } from './clazz.js';\n/**\n * Usage of query:\n * `chart.on('click', query, handler);`\n * The `query` can be:\n * + The component type query string, only `mainType` or `mainType.subType`,\n * like: 'xAxis', 'series', 'xAxis.category' or 'series.line'.\n * + The component query object, like:\n * `{seriesIndex: 2}`, `{seriesName: 'xx'}`, `{seriesId: 'some'}`,\n * `{xAxisIndex: 2}`, `{xAxisName: 'xx'}`, `{xAxisId: 'some'}`.\n * + The data query object, like:\n * `{dataIndex: 123}`, `{dataType: 'link'}`, `{name: 'some'}`.\n * + The other query object (cmponent customized query), like:\n * `{element: 'some'}` (only available in custom series).\n *\n * Caveat: If a prop in the `query` object is `null/undefined`, it is the\n * same as there is no such prop in the `query` object.\n */\nvar ECEventProcessor = /** @class */function () {\n function ECEventProcessor() {}\n ECEventProcessor.prototype.normalizeQuery = function (query) {\n var cptQuery = {};\n var dataQuery = {};\n var otherQuery = {};\n // `query` is `mainType` or `mainType.subType` of component.\n if (zrUtil.isString(query)) {\n var condCptType = parseClassType(query);\n // `.main` and `.sub` may be ''.\n cptQuery.mainType = condCptType.main || null;\n cptQuery.subType = condCptType.sub || null;\n }\n // `query` is an object, convert to {mainType, index, name, id}.\n else {\n // `xxxIndex`, `xxxName`, `xxxId`, `name`, `dataIndex`, `dataType` is reserved,\n // can not be used in `compomentModel.filterForExposedEvent`.\n var suffixes_1 = ['Index', 'Name', 'Id'];\n var dataKeys_1 = {\n name: 1,\n dataIndex: 1,\n dataType: 1\n };\n zrUtil.each(query, function (val, key) {\n var reserved = false;\n for (var i = 0; i < suffixes_1.length; i++) {\n var propSuffix = suffixes_1[i];\n var suffixPos = key.lastIndexOf(propSuffix);\n if (suffixPos > 0 && suffixPos === key.length - propSuffix.length) {\n var mainType = key.slice(0, suffixPos);\n // Consider `dataIndex`.\n if (mainType !== 'data') {\n cptQuery.mainType = mainType;\n cptQuery[propSuffix.toLowerCase()] = val;\n reserved = true;\n }\n }\n }\n if (dataKeys_1.hasOwnProperty(key)) {\n dataQuery[key] = val;\n reserved = true;\n }\n if (!reserved) {\n otherQuery[key] = val;\n }\n });\n }\n return {\n cptQuery: cptQuery,\n dataQuery: dataQuery,\n otherQuery: otherQuery\n };\n };\n ECEventProcessor.prototype.filter = function (eventType, query) {\n // They should be assigned before each trigger call.\n var eventInfo = this.eventInfo;\n if (!eventInfo) {\n return true;\n }\n var targetEl = eventInfo.targetEl;\n var packedEvent = eventInfo.packedEvent;\n var model = eventInfo.model;\n var view = eventInfo.view;\n // For event like 'globalout'.\n if (!model || !view) {\n return true;\n }\n var cptQuery = query.cptQuery;\n var dataQuery = query.dataQuery;\n return check(cptQuery, model, 'mainType') && check(cptQuery, model, 'subType') && check(cptQuery, model, 'index', 'componentIndex') && check(cptQuery, model, 'name') && check(cptQuery, model, 'id') && check(dataQuery, packedEvent, 'name') && check(dataQuery, packedEvent, 'dataIndex') && check(dataQuery, packedEvent, 'dataType') && (!view.filterForExposedEvent || view.filterForExposedEvent(eventType, query.otherQuery, targetEl, packedEvent));\n function check(query, host, prop, propOnHost) {\n return query[prop] == null || host[propOnHost || prop] === query[prop];\n }\n };\n ECEventProcessor.prototype.afterTrigger = function () {\n // Make sure the eventInfo won't be used in next trigger.\n this.eventInfo = null;\n };\n return ECEventProcessor;\n}();\nexport { ECEventProcessor };\n;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { extend, isFunction, keys } from 'zrender/lib/core/util.js';\nvar SYMBOL_PROPS_WITH_CB = ['symbol', 'symbolSize', 'symbolRotate', 'symbolOffset'];\nvar SYMBOL_PROPS = SYMBOL_PROPS_WITH_CB.concat(['symbolKeepAspect']);\n// Encoding visual for all series include which is filtered for legend drawing\nvar seriesSymbolTask = {\n createOnAllSeries: true,\n // For legend.\n performRawSeries: true,\n reset: function (seriesModel, ecModel) {\n var data = seriesModel.getData();\n if (seriesModel.legendIcon) {\n data.setVisual('legendIcon', seriesModel.legendIcon);\n }\n if (!seriesModel.hasSymbolVisual) {\n return;\n }\n var symbolOptions = {};\n var symbolOptionsCb = {};\n var hasCallback = false;\n for (var i = 0; i < SYMBOL_PROPS_WITH_CB.length; i++) {\n var symbolPropName = SYMBOL_PROPS_WITH_CB[i];\n var val = seriesModel.get(symbolPropName);\n if (isFunction(val)) {\n hasCallback = true;\n symbolOptionsCb[symbolPropName] = val;\n } else {\n symbolOptions[symbolPropName] = val;\n }\n }\n symbolOptions.symbol = symbolOptions.symbol || seriesModel.defaultSymbol;\n data.setVisual(extend({\n legendIcon: seriesModel.legendIcon || symbolOptions.symbol,\n symbolKeepAspect: seriesModel.get('symbolKeepAspect')\n }, symbolOptions));\n // Only visible series has each data be visual encoded\n if (ecModel.isSeriesFiltered(seriesModel)) {\n return;\n }\n var symbolPropsCb = keys(symbolOptionsCb);\n function dataEach(data, idx) {\n var rawValue = seriesModel.getRawValue(idx);\n var params = seriesModel.getDataParams(idx);\n for (var i = 0; i < symbolPropsCb.length; i++) {\n var symbolPropName = symbolPropsCb[i];\n data.setItemVisual(idx, symbolPropName, symbolOptionsCb[symbolPropName](rawValue, params));\n }\n }\n return {\n dataEach: hasCallback ? dataEach : null\n };\n }\n};\nvar dataSymbolTask = {\n createOnAllSeries: true,\n // For legend.\n performRawSeries: true,\n reset: function (seriesModel, ecModel) {\n if (!seriesModel.hasSymbolVisual) {\n return;\n }\n // Only visible series has each data be visual encoded\n if (ecModel.isSeriesFiltered(seriesModel)) {\n return;\n }\n var data = seriesModel.getData();\n function dataEach(data, idx) {\n var itemModel = data.getItemModel(idx);\n for (var i = 0; i < SYMBOL_PROPS.length; i++) {\n var symbolPropName = SYMBOL_PROPS[i];\n var val = itemModel.getShallow(symbolPropName, true);\n if (val != null) {\n data.setItemVisual(idx, symbolPropName, val);\n }\n }\n }\n return {\n dataEach: data.hasItemOption ? dataEach : null\n };\n }\n};\nexport { seriesSymbolTask, dataSymbolTask };","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nexport function getItemVisualFromData(data, dataIndex, key) {\n switch (key) {\n case 'color':\n var style = data.getItemVisual(dataIndex, 'style');\n return style[data.getVisual('drawType')];\n case 'opacity':\n return data.getItemVisual(dataIndex, 'style').opacity;\n case 'symbol':\n case 'symbolSize':\n case 'liftZ':\n return data.getItemVisual(dataIndex, key);\n default:\n if (process.env.NODE_ENV !== 'production') {\n console.warn(\"Unknown visual type \" + key);\n }\n }\n}\nexport function getVisualFromData(data, key) {\n switch (key) {\n case 'color':\n var style = data.getVisual('style');\n return style[data.getVisual('drawType')];\n case 'opacity':\n return data.getVisual('style').opacity;\n case 'symbol':\n case 'symbolSize':\n case 'liftZ':\n return data.getVisual(key);\n default:\n if (process.env.NODE_ENV !== 'production') {\n console.warn(\"Unknown visual type \" + key);\n }\n }\n}\nexport function setItemVisualFromData(data, dataIndex, key, value) {\n switch (key) {\n case 'color':\n // Make sure not sharing style object.\n var style = data.ensureUniqueItemVisual(dataIndex, 'style');\n style[data.getVisual('drawType')] = value;\n // Mark the color has been changed, not from palette anymore\n data.setItemVisual(dataIndex, 'colorFromPalette', false);\n break;\n case 'opacity':\n data.ensureUniqueItemVisual(dataIndex, 'style').opacity = value;\n break;\n case 'symbol':\n case 'symbolSize':\n case 'liftZ':\n data.setItemVisual(dataIndex, key, value);\n break;\n default:\n if (process.env.NODE_ENV !== 'production') {\n console.warn(\"Unknown visual type \" + key);\n }\n }\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { extend, each, isArray, isString } from 'zrender/lib/core/util.js';\nimport { deprecateReplaceLog, deprecateLog } from '../util/log.js';\nimport { queryDataIndex } from '../util/model.js';\n// Legacy data selection action.\n// Includes: pieSelect, pieUnSelect, pieToggleSelect, mapSelect, mapUnSelect, mapToggleSelect\nexport function createLegacyDataSelectAction(seriesType, ecRegisterAction) {\n function getSeriesIndices(ecModel, payload) {\n var seriesIndices = [];\n ecModel.eachComponent({\n mainType: 'series',\n subType: seriesType,\n query: payload\n }, function (seriesModel) {\n seriesIndices.push(seriesModel.seriesIndex);\n });\n return seriesIndices;\n }\n each([[seriesType + 'ToggleSelect', 'toggleSelect'], [seriesType + 'Select', 'select'], [seriesType + 'UnSelect', 'unselect']], function (eventsMap) {\n ecRegisterAction(eventsMap[0], function (payload, ecModel, api) {\n payload = extend({}, payload);\n if (process.env.NODE_ENV !== 'production') {\n deprecateReplaceLog(payload.type, eventsMap[1]);\n }\n api.dispatchAction(extend(payload, {\n type: eventsMap[1],\n seriesIndex: getSeriesIndices(ecModel, payload)\n }));\n });\n });\n}\nfunction handleSeriesLegacySelectEvents(type, eventPostfix, ecIns, ecModel, payload) {\n var legacyEventName = type + eventPostfix;\n if (!ecIns.isSilent(legacyEventName)) {\n if (process.env.NODE_ENV !== 'production') {\n deprecateLog(\"event \" + legacyEventName + \" is deprecated.\");\n }\n ecModel.eachComponent({\n mainType: 'series',\n subType: 'pie'\n }, function (seriesModel) {\n var seriesIndex = seriesModel.seriesIndex;\n var selectedMap = seriesModel.option.selectedMap;\n var selected = payload.selected;\n for (var i = 0; i < selected.length; i++) {\n if (selected[i].seriesIndex === seriesIndex) {\n var data = seriesModel.getData();\n var dataIndex = queryDataIndex(data, payload.fromActionPayload);\n ecIns.trigger(legacyEventName, {\n type: legacyEventName,\n seriesId: seriesModel.id,\n name: isArray(dataIndex) ? data.getName(dataIndex[0]) : data.getName(dataIndex),\n selected: isString(selectedMap) ? selectedMap : extend({}, selectedMap)\n });\n }\n }\n });\n }\n}\nexport function handleLegacySelectEvents(messageCenter, ecIns, api) {\n messageCenter.on('selectchanged', function (params) {\n var ecModel = api.getModel();\n if (params.isFromClick) {\n handleSeriesLegacySelectEvents('map', 'selectchanged', ecIns, ecModel, params);\n handleSeriesLegacySelectEvents('pie', 'selectchanged', ecIns, ecModel, params);\n } else if (params.fromAction === 'select') {\n handleSeriesLegacySelectEvents('map', 'selected', ecIns, ecModel, params);\n handleSeriesLegacySelectEvents('pie', 'selected', ecIns, ecModel, params);\n } else if (params.fromAction === 'unselect') {\n handleSeriesLegacySelectEvents('map', 'unselected', ecIns, ecModel, params);\n handleSeriesLegacySelectEvents('pie', 'unselected', ecIns, ecModel, params);\n }\n });\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nexport function findEventDispatcher(target, det, returnFirstMatch) {\n var found;\n while (target) {\n if (det(target)) {\n found = target;\n if (returnFirstMatch) {\n break;\n }\n }\n target = target.__hostTarget || target.parent;\n }\n return found;\n}","var wmUniqueIndex = Math.round(Math.random() * 9);\nvar supportDefineProperty = typeof Object.defineProperty === 'function';\nvar WeakMap = function () {\n function WeakMap() {\n this._id = '__ec_inner_' + wmUniqueIndex++;\n }\n WeakMap.prototype.get = function (key) {\n return this._guard(key)[this._id];\n };\n WeakMap.prototype.set = function (key, value) {\n var target = this._guard(key);\n if (supportDefineProperty) {\n Object.defineProperty(target, this._id, {\n value: value,\n enumerable: false,\n configurable: true\n });\n } else {\n target[this._id] = value;\n }\n return this;\n };\n WeakMap.prototype[\"delete\"] = function (key) {\n if (this.has(key)) {\n delete this._guard(key)[this._id];\n return true;\n }\n return false;\n };\n WeakMap.prototype.has = function (key) {\n return !!this._guard(key)[this._id];\n };\n WeakMap.prototype._guard = function (key) {\n if (key !== Object(key)) {\n throw TypeError('Value of WeakMap is not a non-null object.');\n }\n return key;\n };\n return WeakMap;\n}();\nexport default WeakMap;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// Symbol factory\nimport { each, isArray, retrieve2 } from 'zrender/lib/core/util.js';\nimport * as graphic from './graphic.js';\nimport BoundingRect from 'zrender/lib/core/BoundingRect.js';\nimport { calculateTextPosition } from 'zrender/lib/contain/text.js';\nimport { parsePercent } from './number.js';\n/**\n * Triangle shape\n * @inner\n */\nvar Triangle = graphic.Path.extend({\n type: 'triangle',\n shape: {\n cx: 0,\n cy: 0,\n width: 0,\n height: 0\n },\n buildPath: function (path, shape) {\n var cx = shape.cx;\n var cy = shape.cy;\n var width = shape.width / 2;\n var height = shape.height / 2;\n path.moveTo(cx, cy - height);\n path.lineTo(cx + width, cy + height);\n path.lineTo(cx - width, cy + height);\n path.closePath();\n }\n});\n/**\n * Diamond shape\n * @inner\n */\nvar Diamond = graphic.Path.extend({\n type: 'diamond',\n shape: {\n cx: 0,\n cy: 0,\n width: 0,\n height: 0\n },\n buildPath: function (path, shape) {\n var cx = shape.cx;\n var cy = shape.cy;\n var width = shape.width / 2;\n var height = shape.height / 2;\n path.moveTo(cx, cy - height);\n path.lineTo(cx + width, cy);\n path.lineTo(cx, cy + height);\n path.lineTo(cx - width, cy);\n path.closePath();\n }\n});\n/**\n * Pin shape\n * @inner\n */\nvar Pin = graphic.Path.extend({\n type: 'pin',\n shape: {\n // x, y on the cusp\n x: 0,\n y: 0,\n width: 0,\n height: 0\n },\n buildPath: function (path, shape) {\n var x = shape.x;\n var y = shape.y;\n var w = shape.width / 5 * 3;\n // Height must be larger than width\n var h = Math.max(w, shape.height);\n var r = w / 2;\n // Dist on y with tangent point and circle center\n var dy = r * r / (h - r);\n var cy = y - h + r + dy;\n var angle = Math.asin(dy / r);\n // Dist on x with tangent point and circle center\n var dx = Math.cos(angle) * r;\n var tanX = Math.sin(angle);\n var tanY = Math.cos(angle);\n var cpLen = r * 0.6;\n var cpLen2 = r * 0.7;\n path.moveTo(x - dx, cy + dy);\n path.arc(x, cy, r, Math.PI - angle, Math.PI * 2 + angle);\n path.bezierCurveTo(x + dx - tanX * cpLen, cy + dy + tanY * cpLen, x, y - cpLen2, x, y);\n path.bezierCurveTo(x, y - cpLen2, x - dx + tanX * cpLen, cy + dy + tanY * cpLen, x - dx, cy + dy);\n path.closePath();\n }\n});\n/**\n * Arrow shape\n * @inner\n */\nvar Arrow = graphic.Path.extend({\n type: 'arrow',\n shape: {\n x: 0,\n y: 0,\n width: 0,\n height: 0\n },\n buildPath: function (ctx, shape) {\n var height = shape.height;\n var width = shape.width;\n var x = shape.x;\n var y = shape.y;\n var dx = width / 3 * 2;\n ctx.moveTo(x, y);\n ctx.lineTo(x + dx, y + height);\n ctx.lineTo(x, y + height / 4 * 3);\n ctx.lineTo(x - dx, y + height);\n ctx.lineTo(x, y);\n ctx.closePath();\n }\n});\n/**\n * Map of path constructors\n */\n// TODO Use function to build symbol path.\nvar symbolCtors = {\n line: graphic.Line,\n rect: graphic.Rect,\n roundRect: graphic.Rect,\n square: graphic.Rect,\n circle: graphic.Circle,\n diamond: Diamond,\n pin: Pin,\n arrow: Arrow,\n triangle: Triangle\n};\nvar symbolShapeMakers = {\n line: function (x, y, w, h, shape) {\n shape.x1 = x;\n shape.y1 = y + h / 2;\n shape.x2 = x + w;\n shape.y2 = y + h / 2;\n },\n rect: function (x, y, w, h, shape) {\n shape.x = x;\n shape.y = y;\n shape.width = w;\n shape.height = h;\n },\n roundRect: function (x, y, w, h, shape) {\n shape.x = x;\n shape.y = y;\n shape.width = w;\n shape.height = h;\n shape.r = Math.min(w, h) / 4;\n },\n square: function (x, y, w, h, shape) {\n var size = Math.min(w, h);\n shape.x = x;\n shape.y = y;\n shape.width = size;\n shape.height = size;\n },\n circle: function (x, y, w, h, shape) {\n // Put circle in the center of square\n shape.cx = x + w / 2;\n shape.cy = y + h / 2;\n shape.r = Math.min(w, h) / 2;\n },\n diamond: function (x, y, w, h, shape) {\n shape.cx = x + w / 2;\n shape.cy = y + h / 2;\n shape.width = w;\n shape.height = h;\n },\n pin: function (x, y, w, h, shape) {\n shape.x = x + w / 2;\n shape.y = y + h / 2;\n shape.width = w;\n shape.height = h;\n },\n arrow: function (x, y, w, h, shape) {\n shape.x = x + w / 2;\n shape.y = y + h / 2;\n shape.width = w;\n shape.height = h;\n },\n triangle: function (x, y, w, h, shape) {\n shape.cx = x + w / 2;\n shape.cy = y + h / 2;\n shape.width = w;\n shape.height = h;\n }\n};\nexport var symbolBuildProxies = {};\neach(symbolCtors, function (Ctor, name) {\n symbolBuildProxies[name] = new Ctor();\n});\nvar SymbolClz = graphic.Path.extend({\n type: 'symbol',\n shape: {\n symbolType: '',\n x: 0,\n y: 0,\n width: 0,\n height: 0\n },\n calculateTextPosition: function (out, config, rect) {\n var res = calculateTextPosition(out, config, rect);\n var shape = this.shape;\n if (shape && shape.symbolType === 'pin' && config.position === 'inside') {\n res.y = rect.y + rect.height * 0.4;\n }\n return res;\n },\n buildPath: function (ctx, shape, inBundle) {\n var symbolType = shape.symbolType;\n if (symbolType !== 'none') {\n var proxySymbol = symbolBuildProxies[symbolType];\n if (!proxySymbol) {\n // Default rect\n symbolType = 'rect';\n proxySymbol = symbolBuildProxies[symbolType];\n }\n symbolShapeMakers[symbolType](shape.x, shape.y, shape.width, shape.height, proxySymbol.shape);\n proxySymbol.buildPath(ctx, proxySymbol.shape, inBundle);\n }\n }\n});\n// Provide setColor helper method to avoid determine if set the fill or stroke outside\nfunction symbolPathSetColor(color, innerColor) {\n if (this.type !== 'image') {\n var symbolStyle = this.style;\n if (this.__isEmptyBrush) {\n symbolStyle.stroke = color;\n symbolStyle.fill = innerColor || '#fff';\n // TODO Same width with lineStyle in LineView\n symbolStyle.lineWidth = 2;\n } else if (this.shape.symbolType === 'line') {\n symbolStyle.stroke = color;\n } else {\n symbolStyle.fill = color;\n }\n this.markRedraw();\n }\n}\n/**\n * Create a symbol element with given symbol configuration: shape, x, y, width, height, color\n */\nexport function createSymbol(symbolType, x, y, w, h, color,\n// whether to keep the ratio of w/h,\nkeepAspect) {\n // TODO Support image object, DynamicImage.\n var isEmpty = symbolType.indexOf('empty') === 0;\n if (isEmpty) {\n symbolType = symbolType.substr(5, 1).toLowerCase() + symbolType.substr(6);\n }\n var symbolPath;\n if (symbolType.indexOf('image://') === 0) {\n symbolPath = graphic.makeImage(symbolType.slice(8), new BoundingRect(x, y, w, h), keepAspect ? 'center' : 'cover');\n } else if (symbolType.indexOf('path://') === 0) {\n symbolPath = graphic.makePath(symbolType.slice(7), {}, new BoundingRect(x, y, w, h), keepAspect ? 'center' : 'cover');\n } else {\n symbolPath = new SymbolClz({\n shape: {\n symbolType: symbolType,\n x: x,\n y: y,\n width: w,\n height: h\n }\n });\n }\n symbolPath.__isEmptyBrush = isEmpty;\n // TODO Should deprecate setColor\n symbolPath.setColor = symbolPathSetColor;\n if (color) {\n symbolPath.setColor(color);\n }\n return symbolPath;\n}\nexport function normalizeSymbolSize(symbolSize) {\n if (!isArray(symbolSize)) {\n symbolSize = [+symbolSize, +symbolSize];\n }\n return [symbolSize[0] || 0, symbolSize[1] || 0];\n}\nexport function normalizeSymbolOffset(symbolOffset, symbolSize) {\n if (symbolOffset == null) {\n return;\n }\n if (!isArray(symbolOffset)) {\n symbolOffset = [symbolOffset, symbolOffset];\n }\n return [parsePercent(symbolOffset[0], symbolSize[0]) || 0, parsePercent(retrieve2(symbolOffset[1], symbolOffset[0]), symbolSize[1]) || 0];\n}","function isSafeNum(num) {\n return isFinite(num);\n}\nexport function createLinearGradient(ctx, obj, rect) {\n var x = obj.x == null ? 0 : obj.x;\n var x2 = obj.x2 == null ? 1 : obj.x2;\n var y = obj.y == null ? 0 : obj.y;\n var y2 = obj.y2 == null ? 0 : obj.y2;\n if (!obj.global) {\n x = x * rect.width + rect.x;\n x2 = x2 * rect.width + rect.x;\n y = y * rect.height + rect.y;\n y2 = y2 * rect.height + rect.y;\n }\n x = isSafeNum(x) ? x : 0;\n x2 = isSafeNum(x2) ? x2 : 1;\n y = isSafeNum(y) ? y : 0;\n y2 = isSafeNum(y2) ? y2 : 0;\n var canvasGradient = ctx.createLinearGradient(x, y, x2, y2);\n return canvasGradient;\n}\nexport function createRadialGradient(ctx, obj, rect) {\n var width = rect.width;\n var height = rect.height;\n var min = Math.min(width, height);\n var x = obj.x == null ? 0.5 : obj.x;\n var y = obj.y == null ? 0.5 : obj.y;\n var r = obj.r == null ? 0.5 : obj.r;\n if (!obj.global) {\n x = x * width + rect.x;\n y = y * height + rect.y;\n r = r * min;\n }\n x = isSafeNum(x) ? x : 0.5;\n y = isSafeNum(y) ? y : 0.5;\n r = r >= 0 && isSafeNum(r) ? r : 0.5;\n var canvasGradient = ctx.createRadialGradient(x, y, 0, x, y, r);\n return canvasGradient;\n}\nexport function getCanvasGradient(ctx, obj, rect) {\n var canvasGradient = obj.type === 'radial' ? createRadialGradient(ctx, obj, rect) : createLinearGradient(ctx, obj, rect);\n var colorStops = obj.colorStops;\n for (var i = 0; i < colorStops.length; i++) {\n canvasGradient.addColorStop(colorStops[i].offset, colorStops[i].color);\n }\n return canvasGradient;\n}\nexport function isClipPathChanged(clipPaths, prevClipPaths) {\n if (clipPaths === prevClipPaths || !clipPaths && !prevClipPaths) {\n return false;\n }\n if (!clipPaths || !prevClipPaths || clipPaths.length !== prevClipPaths.length) {\n return true;\n }\n for (var i = 0; i < clipPaths.length; i++) {\n if (clipPaths[i] !== prevClipPaths[i]) {\n return true;\n }\n }\n return false;\n}\nfunction parseInt10(val) {\n return parseInt(val, 10);\n}\nexport function getSize(root, whIdx, opts) {\n var wh = ['width', 'height'][whIdx];\n var cwh = ['clientWidth', 'clientHeight'][whIdx];\n var plt = ['paddingLeft', 'paddingTop'][whIdx];\n var prb = ['paddingRight', 'paddingBottom'][whIdx];\n if (opts[wh] != null && opts[wh] !== 'auto') {\n return parseFloat(opts[wh]);\n }\n var stl = document.defaultView.getComputedStyle(root);\n return (root[cwh] || parseInt10(stl[wh]) || parseInt10(root.style[wh])) - (parseInt10(stl[plt]) || 0) - (parseInt10(stl[prb]) || 0) | 0;\n}","import { isArray, isNumber, map } from '../core/util.js';\nexport function normalizeLineDash(lineType, lineWidth) {\n if (!lineType || lineType === 'solid' || !(lineWidth > 0)) {\n return null;\n }\n return lineType === 'dashed' ? [4 * lineWidth, 2 * lineWidth] : lineType === 'dotted' ? [lineWidth] : isNumber(lineType) ? [lineType] : isArray(lineType) ? lineType : null;\n}\nexport function getLineDash(el) {\n var style = el.style;\n var lineDash = style.lineDash && style.lineWidth > 0 && normalizeLineDash(style.lineDash, style.lineWidth);\n var lineDashOffset = style.lineDashOffset;\n if (lineDash) {\n var lineScale_1 = style.strokeNoScale && el.getLineScale ? el.getLineScale() : 1;\n if (lineScale_1 && lineScale_1 !== 1) {\n lineDash = map(lineDash, function (rawVal) {\n return rawVal / lineScale_1;\n });\n lineDashOffset /= lineScale_1;\n }\n }\n return [lineDash, lineDashOffset];\n}","import { DEFAULT_COMMON_STYLE } from '../graphic/Displayable.js';\nimport PathProxy from '../core/PathProxy.js';\nimport { createOrUpdateImage, isImageReady } from '../graphic/helper/image.js';\nimport { getCanvasGradient, isClipPathChanged } from './helper.js';\nimport Path from '../graphic/Path.js';\nimport ZRImage from '../graphic/Image.js';\nimport TSpan from '../graphic/TSpan.js';\nimport { RADIAN_TO_DEGREE } from '../core/util.js';\nimport { getLineDash } from './dashStyle.js';\nimport { REDRAW_BIT, SHAPE_CHANGED_BIT } from '../graphic/constants.js';\nimport { DEFAULT_FONT } from '../core/platform.js';\nvar pathProxyForDraw = new PathProxy(true);\nfunction styleHasStroke(style) {\n var stroke = style.stroke;\n return !(stroke == null || stroke === 'none' || !(style.lineWidth > 0));\n}\nfunction isValidStrokeFillStyle(strokeOrFill) {\n return typeof strokeOrFill === 'string' && strokeOrFill !== 'none';\n}\nfunction styleHasFill(style) {\n var fill = style.fill;\n return fill != null && fill !== 'none';\n}\nfunction doFillPath(ctx, style) {\n if (style.fillOpacity != null && style.fillOpacity !== 1) {\n var originalGlobalAlpha = ctx.globalAlpha;\n ctx.globalAlpha = style.fillOpacity * style.opacity;\n ctx.fill();\n ctx.globalAlpha = originalGlobalAlpha;\n } else {\n ctx.fill();\n }\n}\nfunction doStrokePath(ctx, style) {\n if (style.strokeOpacity != null && style.strokeOpacity !== 1) {\n var originalGlobalAlpha = ctx.globalAlpha;\n ctx.globalAlpha = style.strokeOpacity * style.opacity;\n ctx.stroke();\n ctx.globalAlpha = originalGlobalAlpha;\n } else {\n ctx.stroke();\n }\n}\nexport function createCanvasPattern(ctx, pattern, el) {\n var image = createOrUpdateImage(pattern.image, pattern.__image, el);\n if (isImageReady(image)) {\n var canvasPattern = ctx.createPattern(image, pattern.repeat || 'repeat');\n if (typeof DOMMatrix === 'function' && canvasPattern && canvasPattern.setTransform) {\n var matrix = new DOMMatrix();\n matrix.translateSelf(pattern.x || 0, pattern.y || 0);\n matrix.rotateSelf(0, 0, (pattern.rotation || 0) * RADIAN_TO_DEGREE);\n matrix.scaleSelf(pattern.scaleX || 1, pattern.scaleY || 1);\n canvasPattern.setTransform(matrix);\n }\n return canvasPattern;\n }\n}\nfunction brushPath(ctx, el, style, inBatch) {\n var _a;\n var hasStroke = styleHasStroke(style);\n var hasFill = styleHasFill(style);\n var strokePercent = style.strokePercent;\n var strokePart = strokePercent < 1;\n var firstDraw = !el.path;\n if ((!el.silent || strokePart) && firstDraw) {\n el.createPathProxy();\n }\n var path = el.path || pathProxyForDraw;\n var dirtyFlag = el.__dirty;\n if (!inBatch) {\n var fill = style.fill;\n var stroke = style.stroke;\n var hasFillGradient = hasFill && !!fill.colorStops;\n var hasStrokeGradient = hasStroke && !!stroke.colorStops;\n var hasFillPattern = hasFill && !!fill.image;\n var hasStrokePattern = hasStroke && !!stroke.image;\n var fillGradient = void 0;\n var strokeGradient = void 0;\n var fillPattern = void 0;\n var strokePattern = void 0;\n var rect = void 0;\n if (hasFillGradient || hasStrokeGradient) {\n rect = el.getBoundingRect();\n }\n if (hasFillGradient) {\n fillGradient = dirtyFlag ? getCanvasGradient(ctx, fill, rect) : el.__canvasFillGradient;\n el.__canvasFillGradient = fillGradient;\n }\n if (hasStrokeGradient) {\n strokeGradient = dirtyFlag ? getCanvasGradient(ctx, stroke, rect) : el.__canvasStrokeGradient;\n el.__canvasStrokeGradient = strokeGradient;\n }\n if (hasFillPattern) {\n fillPattern = dirtyFlag || !el.__canvasFillPattern ? createCanvasPattern(ctx, fill, el) : el.__canvasFillPattern;\n el.__canvasFillPattern = fillPattern;\n }\n if (hasStrokePattern) {\n strokePattern = dirtyFlag || !el.__canvasStrokePattern ? createCanvasPattern(ctx, stroke, el) : el.__canvasStrokePattern;\n el.__canvasStrokePattern = fillPattern;\n }\n if (hasFillGradient) {\n ctx.fillStyle = fillGradient;\n } else if (hasFillPattern) {\n if (fillPattern) {\n ctx.fillStyle = fillPattern;\n } else {\n hasFill = false;\n }\n }\n if (hasStrokeGradient) {\n ctx.strokeStyle = strokeGradient;\n } else if (hasStrokePattern) {\n if (strokePattern) {\n ctx.strokeStyle = strokePattern;\n } else {\n hasStroke = false;\n }\n }\n }\n var scale = el.getGlobalScale();\n path.setScale(scale[0], scale[1], el.segmentIgnoreThreshold);\n var lineDash;\n var lineDashOffset;\n if (ctx.setLineDash && style.lineDash) {\n _a = getLineDash(el), lineDash = _a[0], lineDashOffset = _a[1];\n }\n var needsRebuild = true;\n if (firstDraw || dirtyFlag & SHAPE_CHANGED_BIT) {\n path.setDPR(ctx.dpr);\n if (strokePart) {\n path.setContext(null);\n } else {\n path.setContext(ctx);\n needsRebuild = false;\n }\n path.reset();\n el.buildPath(path, el.shape, inBatch);\n path.toStatic();\n el.pathUpdated();\n }\n if (needsRebuild) {\n path.rebuildPath(ctx, strokePart ? strokePercent : 1);\n }\n if (lineDash) {\n ctx.setLineDash(lineDash);\n ctx.lineDashOffset = lineDashOffset;\n }\n if (!inBatch) {\n if (style.strokeFirst) {\n if (hasStroke) {\n doStrokePath(ctx, style);\n }\n if (hasFill) {\n doFillPath(ctx, style);\n }\n } else {\n if (hasFill) {\n doFillPath(ctx, style);\n }\n if (hasStroke) {\n doStrokePath(ctx, style);\n }\n }\n }\n if (lineDash) {\n ctx.setLineDash([]);\n }\n}\nfunction brushImage(ctx, el, style) {\n var image = el.__image = createOrUpdateImage(style.image, el.__image, el, el.onload);\n if (!image || !isImageReady(image)) {\n return;\n }\n var x = style.x || 0;\n var y = style.y || 0;\n var width = el.getWidth();\n var height = el.getHeight();\n var aspect = image.width / image.height;\n if (width == null && height != null) {\n width = height * aspect;\n } else if (height == null && width != null) {\n height = width / aspect;\n } else if (width == null && height == null) {\n width = image.width;\n height = image.height;\n }\n if (style.sWidth && style.sHeight) {\n var sx = style.sx || 0;\n var sy = style.sy || 0;\n ctx.drawImage(image, sx, sy, style.sWidth, style.sHeight, x, y, width, height);\n } else if (style.sx && style.sy) {\n var sx = style.sx;\n var sy = style.sy;\n var sWidth = width - sx;\n var sHeight = height - sy;\n ctx.drawImage(image, sx, sy, sWidth, sHeight, x, y, width, height);\n } else {\n ctx.drawImage(image, x, y, width, height);\n }\n}\nfunction brushText(ctx, el, style) {\n var _a;\n var text = style.text;\n text != null && (text += '');\n if (text) {\n ctx.font = style.font || DEFAULT_FONT;\n ctx.textAlign = style.textAlign;\n ctx.textBaseline = style.textBaseline;\n var lineDash = void 0;\n var lineDashOffset = void 0;\n if (ctx.setLineDash && style.lineDash) {\n _a = getLineDash(el), lineDash = _a[0], lineDashOffset = _a[1];\n }\n if (lineDash) {\n ctx.setLineDash(lineDash);\n ctx.lineDashOffset = lineDashOffset;\n }\n if (style.strokeFirst) {\n if (styleHasStroke(style)) {\n ctx.strokeText(text, style.x, style.y);\n }\n if (styleHasFill(style)) {\n ctx.fillText(text, style.x, style.y);\n }\n } else {\n if (styleHasFill(style)) {\n ctx.fillText(text, style.x, style.y);\n }\n if (styleHasStroke(style)) {\n ctx.strokeText(text, style.x, style.y);\n }\n }\n if (lineDash) {\n ctx.setLineDash([]);\n }\n }\n}\nvar SHADOW_NUMBER_PROPS = ['shadowBlur', 'shadowOffsetX', 'shadowOffsetY'];\nvar STROKE_PROPS = [['lineCap', 'butt'], ['lineJoin', 'miter'], ['miterLimit', 10]];\nfunction bindCommonProps(ctx, style, prevStyle, forceSetAll, scope) {\n var styleChanged = false;\n if (!forceSetAll) {\n prevStyle = prevStyle || {};\n if (style === prevStyle) {\n return false;\n }\n }\n if (forceSetAll || style.opacity !== prevStyle.opacity) {\n flushPathDrawn(ctx, scope);\n styleChanged = true;\n var opacity = Math.max(Math.min(style.opacity, 1), 0);\n ctx.globalAlpha = isNaN(opacity) ? DEFAULT_COMMON_STYLE.opacity : opacity;\n }\n if (forceSetAll || style.blend !== prevStyle.blend) {\n if (!styleChanged) {\n flushPathDrawn(ctx, scope);\n styleChanged = true;\n }\n ctx.globalCompositeOperation = style.blend || DEFAULT_COMMON_STYLE.blend;\n }\n for (var i = 0; i < SHADOW_NUMBER_PROPS.length; i++) {\n var propName = SHADOW_NUMBER_PROPS[i];\n if (forceSetAll || style[propName] !== prevStyle[propName]) {\n if (!styleChanged) {\n flushPathDrawn(ctx, scope);\n styleChanged = true;\n }\n ctx[propName] = ctx.dpr * (style[propName] || 0);\n }\n }\n if (forceSetAll || style.shadowColor !== prevStyle.shadowColor) {\n if (!styleChanged) {\n flushPathDrawn(ctx, scope);\n styleChanged = true;\n }\n ctx.shadowColor = style.shadowColor || DEFAULT_COMMON_STYLE.shadowColor;\n }\n return styleChanged;\n}\nfunction bindPathAndTextCommonStyle(ctx, el, prevEl, forceSetAll, scope) {\n var style = getStyle(el, scope.inHover);\n var prevStyle = forceSetAll ? null : prevEl && getStyle(prevEl, scope.inHover) || {};\n if (style === prevStyle) {\n return false;\n }\n var styleChanged = bindCommonProps(ctx, style, prevStyle, forceSetAll, scope);\n if (forceSetAll || style.fill !== prevStyle.fill) {\n if (!styleChanged) {\n flushPathDrawn(ctx, scope);\n styleChanged = true;\n }\n isValidStrokeFillStyle(style.fill) && (ctx.fillStyle = style.fill);\n }\n if (forceSetAll || style.stroke !== prevStyle.stroke) {\n if (!styleChanged) {\n flushPathDrawn(ctx, scope);\n styleChanged = true;\n }\n isValidStrokeFillStyle(style.stroke) && (ctx.strokeStyle = style.stroke);\n }\n if (forceSetAll || style.opacity !== prevStyle.opacity) {\n if (!styleChanged) {\n flushPathDrawn(ctx, scope);\n styleChanged = true;\n }\n ctx.globalAlpha = style.opacity == null ? 1 : style.opacity;\n }\n if (el.hasStroke()) {\n var lineWidth = style.lineWidth;\n var newLineWidth = lineWidth / (style.strokeNoScale && el.getLineScale ? el.getLineScale() : 1);\n if (ctx.lineWidth !== newLineWidth) {\n if (!styleChanged) {\n flushPathDrawn(ctx, scope);\n styleChanged = true;\n }\n ctx.lineWidth = newLineWidth;\n }\n }\n for (var i = 0; i < STROKE_PROPS.length; i++) {\n var prop = STROKE_PROPS[i];\n var propName = prop[0];\n if (forceSetAll || style[propName] !== prevStyle[propName]) {\n if (!styleChanged) {\n flushPathDrawn(ctx, scope);\n styleChanged = true;\n }\n ctx[propName] = style[propName] || prop[1];\n }\n }\n return styleChanged;\n}\nfunction bindImageStyle(ctx, el, prevEl, forceSetAll, scope) {\n return bindCommonProps(ctx, getStyle(el, scope.inHover), prevEl && getStyle(prevEl, scope.inHover), forceSetAll, scope);\n}\nfunction setContextTransform(ctx, el) {\n var m = el.transform;\n var dpr = ctx.dpr || 1;\n if (m) {\n ctx.setTransform(dpr * m[0], dpr * m[1], dpr * m[2], dpr * m[3], dpr * m[4], dpr * m[5]);\n } else {\n ctx.setTransform(dpr, 0, 0, dpr, 0, 0);\n }\n}\nfunction updateClipStatus(clipPaths, ctx, scope) {\n var allClipped = false;\n for (var i = 0; i < clipPaths.length; i++) {\n var clipPath = clipPaths[i];\n allClipped = allClipped || clipPath.isZeroArea();\n setContextTransform(ctx, clipPath);\n ctx.beginPath();\n clipPath.buildPath(ctx, clipPath.shape);\n ctx.clip();\n }\n scope.allClipped = allClipped;\n}\nfunction isTransformChanged(m0, m1) {\n if (m0 && m1) {\n return m0[0] !== m1[0] || m0[1] !== m1[1] || m0[2] !== m1[2] || m0[3] !== m1[3] || m0[4] !== m1[4] || m0[5] !== m1[5];\n } else if (!m0 && !m1) {\n return false;\n }\n return true;\n}\nvar DRAW_TYPE_PATH = 1;\nvar DRAW_TYPE_IMAGE = 2;\nvar DRAW_TYPE_TEXT = 3;\nvar DRAW_TYPE_INCREMENTAL = 4;\nfunction canPathBatch(style) {\n var hasFill = styleHasFill(style);\n var hasStroke = styleHasStroke(style);\n return !(style.lineDash || !(+hasFill ^ +hasStroke) || hasFill && typeof style.fill !== 'string' || hasStroke && typeof style.stroke !== 'string' || style.strokePercent < 1 || style.strokeOpacity < 1 || style.fillOpacity < 1);\n}\nfunction flushPathDrawn(ctx, scope) {\n scope.batchFill && ctx.fill();\n scope.batchStroke && ctx.stroke();\n scope.batchFill = '';\n scope.batchStroke = '';\n}\nfunction getStyle(el, inHover) {\n return inHover ? el.__hoverStyle || el.style : el.style;\n}\nexport function brushSingle(ctx, el) {\n brush(ctx, el, {\n inHover: false,\n viewWidth: 0,\n viewHeight: 0\n }, true);\n}\nexport function brush(ctx, el, scope, isLast) {\n var m = el.transform;\n if (!el.shouldBePainted(scope.viewWidth, scope.viewHeight, false, false)) {\n el.__dirty &= ~REDRAW_BIT;\n el.__isRendered = false;\n return;\n }\n var clipPaths = el.__clipPaths;\n var prevElClipPaths = scope.prevElClipPaths;\n var forceSetTransform = false;\n var forceSetStyle = false;\n if (!prevElClipPaths || isClipPathChanged(clipPaths, prevElClipPaths)) {\n if (prevElClipPaths && prevElClipPaths.length) {\n flushPathDrawn(ctx, scope);\n ctx.restore();\n forceSetStyle = forceSetTransform = true;\n scope.prevElClipPaths = null;\n scope.allClipped = false;\n scope.prevEl = null;\n }\n if (clipPaths && clipPaths.length) {\n flushPathDrawn(ctx, scope);\n ctx.save();\n updateClipStatus(clipPaths, ctx, scope);\n forceSetTransform = true;\n }\n scope.prevElClipPaths = clipPaths;\n }\n if (scope.allClipped) {\n el.__isRendered = false;\n return;\n }\n el.beforeBrush && el.beforeBrush();\n el.innerBeforeBrush();\n var prevEl = scope.prevEl;\n if (!prevEl) {\n forceSetStyle = forceSetTransform = true;\n }\n var canBatchPath = el instanceof Path && el.autoBatch && canPathBatch(el.style);\n if (forceSetTransform || isTransformChanged(m, prevEl.transform)) {\n flushPathDrawn(ctx, scope);\n setContextTransform(ctx, el);\n } else if (!canBatchPath) {\n flushPathDrawn(ctx, scope);\n }\n var style = getStyle(el, scope.inHover);\n if (el instanceof Path) {\n if (scope.lastDrawType !== DRAW_TYPE_PATH) {\n forceSetStyle = true;\n scope.lastDrawType = DRAW_TYPE_PATH;\n }\n bindPathAndTextCommonStyle(ctx, el, prevEl, forceSetStyle, scope);\n if (!canBatchPath || !scope.batchFill && !scope.batchStroke) {\n ctx.beginPath();\n }\n brushPath(ctx, el, style, canBatchPath);\n if (canBatchPath) {\n scope.batchFill = style.fill || '';\n scope.batchStroke = style.stroke || '';\n }\n } else {\n if (el instanceof TSpan) {\n if (scope.lastDrawType !== DRAW_TYPE_TEXT) {\n forceSetStyle = true;\n scope.lastDrawType = DRAW_TYPE_TEXT;\n }\n bindPathAndTextCommonStyle(ctx, el, prevEl, forceSetStyle, scope);\n brushText(ctx, el, style);\n } else if (el instanceof ZRImage) {\n if (scope.lastDrawType !== DRAW_TYPE_IMAGE) {\n forceSetStyle = true;\n scope.lastDrawType = DRAW_TYPE_IMAGE;\n }\n bindImageStyle(ctx, el, prevEl, forceSetStyle, scope);\n brushImage(ctx, el, style);\n } else if (el.getTemporalDisplayables) {\n if (scope.lastDrawType !== DRAW_TYPE_INCREMENTAL) {\n forceSetStyle = true;\n scope.lastDrawType = DRAW_TYPE_INCREMENTAL;\n }\n brushIncremental(ctx, el, scope);\n }\n }\n if (canBatchPath && isLast) {\n flushPathDrawn(ctx, scope);\n }\n el.innerAfterBrush();\n el.afterBrush && el.afterBrush();\n scope.prevEl = el;\n el.__dirty = 0;\n el.__isRendered = true;\n}\nfunction brushIncremental(ctx, el, scope) {\n var displayables = el.getDisplayables();\n var temporalDisplayables = el.getTemporalDisplayables();\n ctx.save();\n var innerScope = {\n prevElClipPaths: null,\n prevEl: null,\n allClipped: false,\n viewWidth: scope.viewWidth,\n viewHeight: scope.viewHeight,\n inHover: scope.inHover\n };\n var i;\n var len;\n for (i = el.getCursor(), len = displayables.length; i < len; i++) {\n var displayable = displayables[i];\n displayable.beforeBrush && displayable.beforeBrush();\n displayable.innerBeforeBrush();\n brush(ctx, displayable, innerScope, i === len - 1);\n displayable.innerAfterBrush();\n displayable.afterBrush && displayable.afterBrush();\n innerScope.prevEl = displayable;\n }\n for (var i_1 = 0, len_1 = temporalDisplayables.length; i_1 < len_1; i_1++) {\n var displayable = temporalDisplayables[i_1];\n displayable.beforeBrush && displayable.beforeBrush();\n displayable.innerBeforeBrush();\n brush(ctx, displayable, innerScope, i_1 === len_1 - 1);\n displayable.innerAfterBrush();\n displayable.afterBrush && displayable.afterBrush();\n innerScope.prevEl = displayable;\n }\n el.clearTemporalDisplayables();\n el.notClear = true;\n ctx.restore();\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport WeakMap from 'zrender/lib/core/WeakMap.js';\nimport LRU from 'zrender/lib/core/LRU.js';\nimport { defaults, map, isArray, isString, isNumber } from 'zrender/lib/core/util.js';\nimport { getLeastCommonMultiple } from './number.js';\nimport { createSymbol } from './symbol.js';\nimport { brushSingle } from 'zrender/lib/canvas/graphic.js';\nimport { platformApi } from 'zrender/lib/core/platform.js';\nvar decalMap = new WeakMap();\nvar decalCache = new LRU(100);\nvar decalKeys = ['symbol', 'symbolSize', 'symbolKeepAspect', 'color', 'backgroundColor', 'dashArrayX', 'dashArrayY', 'maxTileWidth', 'maxTileHeight'];\n/**\n * Create or update pattern image from decal options\n *\n * @param {InnerDecalObject | 'none'} decalObject decal options, 'none' if no decal\n * @return {Pattern} pattern with generated image, null if no decal\n */\nexport function createOrUpdatePatternFromDecal(decalObject, api) {\n if (decalObject === 'none') {\n return null;\n }\n var dpr = api.getDevicePixelRatio();\n var zr = api.getZr();\n var isSVG = zr.painter.type === 'svg';\n if (decalObject.dirty) {\n decalMap[\"delete\"](decalObject);\n }\n var oldPattern = decalMap.get(decalObject);\n if (oldPattern) {\n return oldPattern;\n }\n var decalOpt = defaults(decalObject, {\n symbol: 'rect',\n symbolSize: 1,\n symbolKeepAspect: true,\n color: 'rgba(0, 0, 0, 0.2)',\n backgroundColor: null,\n dashArrayX: 5,\n dashArrayY: 5,\n rotation: 0,\n maxTileWidth: 512,\n maxTileHeight: 512\n });\n if (decalOpt.backgroundColor === 'none') {\n decalOpt.backgroundColor = null;\n }\n var pattern = {\n repeat: 'repeat'\n };\n setPatternnSource(pattern);\n pattern.rotation = decalOpt.rotation;\n pattern.scaleX = pattern.scaleY = isSVG ? 1 : 1 / dpr;\n decalMap.set(decalObject, pattern);\n decalObject.dirty = false;\n return pattern;\n function setPatternnSource(pattern) {\n var keys = [dpr];\n var isValidKey = true;\n for (var i = 0; i < decalKeys.length; ++i) {\n var value = decalOpt[decalKeys[i]];\n if (value != null && !isArray(value) && !isString(value) && !isNumber(value) && typeof value !== 'boolean') {\n isValidKey = false;\n break;\n }\n keys.push(value);\n }\n var cacheKey;\n if (isValidKey) {\n cacheKey = keys.join(',') + (isSVG ? '-svg' : '');\n var cache = decalCache.get(cacheKey);\n if (cache) {\n isSVG ? pattern.svgElement = cache : pattern.image = cache;\n }\n }\n var dashArrayX = normalizeDashArrayX(decalOpt.dashArrayX);\n var dashArrayY = normalizeDashArrayY(decalOpt.dashArrayY);\n var symbolArray = normalizeSymbolArray(decalOpt.symbol);\n var lineBlockLengthsX = getLineBlockLengthX(dashArrayX);\n var lineBlockLengthY = getLineBlockLengthY(dashArrayY);\n var canvas = !isSVG && platformApi.createCanvas();\n var svgRoot = isSVG && {\n tag: 'g',\n attrs: {},\n key: 'dcl',\n children: []\n };\n var pSize = getPatternSize();\n var ctx;\n if (canvas) {\n canvas.width = pSize.width * dpr;\n canvas.height = pSize.height * dpr;\n ctx = canvas.getContext('2d');\n }\n brushDecal();\n if (isValidKey) {\n decalCache.put(cacheKey, canvas || svgRoot);\n }\n pattern.image = canvas;\n pattern.svgElement = svgRoot;\n pattern.svgWidth = pSize.width;\n pattern.svgHeight = pSize.height;\n /**\n * Get minimum length that can make a repeatable pattern.\n *\n * @return {Object} pattern width and height\n */\n function getPatternSize() {\n /**\n * For example, if dash is [[3, 2], [2, 1]] for X, it looks like\n * |--- --- --- --- --- ...\n * |-- -- -- -- -- -- -- -- ...\n * |--- --- --- --- --- ...\n * |-- -- -- -- -- -- -- -- ...\n * So the minimum length of X is 15,\n * which is the least common multiple of `3 + 2` and `2 + 1`\n * |--- --- --- |--- --- ...\n * |-- -- -- -- -- |-- -- -- ...\n */\n var width = 1;\n for (var i = 0, xlen = lineBlockLengthsX.length; i < xlen; ++i) {\n width = getLeastCommonMultiple(width, lineBlockLengthsX[i]);\n }\n var symbolRepeats = 1;\n for (var i = 0, xlen = symbolArray.length; i < xlen; ++i) {\n symbolRepeats = getLeastCommonMultiple(symbolRepeats, symbolArray[i].length);\n }\n width *= symbolRepeats;\n var height = lineBlockLengthY * lineBlockLengthsX.length * symbolArray.length;\n if (process.env.NODE_ENV !== 'production') {\n var warn = function (attrName) {\n /* eslint-disable-next-line */\n console.warn(\"Calculated decal size is greater than \" + attrName + \" due to decal option settings so \" + attrName + \" is used for the decal size. Please consider changing the decal option to make a smaller decal or set \" + attrName + \" to be larger to avoid incontinuity.\");\n };\n if (width > decalOpt.maxTileWidth) {\n warn('maxTileWidth');\n }\n if (height > decalOpt.maxTileHeight) {\n warn('maxTileHeight');\n }\n }\n return {\n width: Math.max(1, Math.min(width, decalOpt.maxTileWidth)),\n height: Math.max(1, Math.min(height, decalOpt.maxTileHeight))\n };\n }\n function brushDecal() {\n if (ctx) {\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n if (decalOpt.backgroundColor) {\n ctx.fillStyle = decalOpt.backgroundColor;\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n }\n }\n var ySum = 0;\n for (var i = 0; i < dashArrayY.length; ++i) {\n ySum += dashArrayY[i];\n }\n if (ySum <= 0) {\n // dashArrayY is 0, draw nothing\n return;\n }\n var y = -lineBlockLengthY;\n var yId = 0;\n var yIdTotal = 0;\n var xId0 = 0;\n while (y < pSize.height) {\n if (yId % 2 === 0) {\n var symbolYId = yIdTotal / 2 % symbolArray.length;\n var x = 0;\n var xId1 = 0;\n var xId1Total = 0;\n while (x < pSize.width * 2) {\n var xSum = 0;\n for (var i = 0; i < dashArrayX[xId0].length; ++i) {\n xSum += dashArrayX[xId0][i];\n }\n if (xSum <= 0) {\n // Skip empty line\n break;\n }\n // E.g., [15, 5, 20, 5] draws only for 15 and 20\n if (xId1 % 2 === 0) {\n var size = (1 - decalOpt.symbolSize) * 0.5;\n var left = x + dashArrayX[xId0][xId1] * size;\n var top_1 = y + dashArrayY[yId] * size;\n var width = dashArrayX[xId0][xId1] * decalOpt.symbolSize;\n var height = dashArrayY[yId] * decalOpt.symbolSize;\n var symbolXId = xId1Total / 2 % symbolArray[symbolYId].length;\n brushSymbol(left, top_1, width, height, symbolArray[symbolYId][symbolXId]);\n }\n x += dashArrayX[xId0][xId1];\n ++xId1Total;\n ++xId1;\n if (xId1 === dashArrayX[xId0].length) {\n xId1 = 0;\n }\n }\n ++xId0;\n if (xId0 === dashArrayX.length) {\n xId0 = 0;\n }\n }\n y += dashArrayY[yId];\n ++yIdTotal;\n ++yId;\n if (yId === dashArrayY.length) {\n yId = 0;\n }\n }\n function brushSymbol(x, y, width, height, symbolType) {\n var scale = isSVG ? 1 : dpr;\n var symbol = createSymbol(symbolType, x * scale, y * scale, width * scale, height * scale, decalOpt.color, decalOpt.symbolKeepAspect);\n if (isSVG) {\n var symbolVNode = zr.painter.renderOneToVNode(symbol);\n if (symbolVNode) {\n svgRoot.children.push(symbolVNode);\n }\n } else {\n // Paint to canvas for all other renderers.\n brushSingle(ctx, symbol);\n }\n }\n }\n }\n}\n/**\n * Convert symbol array into normalized array\n *\n * @param {string | (string | string[])[]} symbol symbol input\n * @return {string[][]} normolized symbol array\n */\nfunction normalizeSymbolArray(symbol) {\n if (!symbol || symbol.length === 0) {\n return [['rect']];\n }\n if (isString(symbol)) {\n return [[symbol]];\n }\n var isAllString = true;\n for (var i = 0; i < symbol.length; ++i) {\n if (!isString(symbol[i])) {\n isAllString = false;\n break;\n }\n }\n if (isAllString) {\n return normalizeSymbolArray([symbol]);\n }\n var result = [];\n for (var i = 0; i < symbol.length; ++i) {\n if (isString(symbol[i])) {\n result.push([symbol[i]]);\n } else {\n result.push(symbol[i]);\n }\n }\n return result;\n}\n/**\n * Convert dash input into dashArray\n *\n * @param {DecalDashArrayX} dash dash input\n * @return {number[][]} normolized dash array\n */\nfunction normalizeDashArrayX(dash) {\n if (!dash || dash.length === 0) {\n return [[0, 0]];\n }\n if (isNumber(dash)) {\n var dashValue = Math.ceil(dash);\n return [[dashValue, dashValue]];\n }\n /**\n * [20, 5] should be normalized into [[20, 5]],\n * while [20, [5, 10]] should be normalized into [[20, 20], [5, 10]]\n */\n var isAllNumber = true;\n for (var i = 0; i < dash.length; ++i) {\n if (!isNumber(dash[i])) {\n isAllNumber = false;\n break;\n }\n }\n if (isAllNumber) {\n return normalizeDashArrayX([dash]);\n }\n var result = [];\n for (var i = 0; i < dash.length; ++i) {\n if (isNumber(dash[i])) {\n var dashValue = Math.ceil(dash[i]);\n result.push([dashValue, dashValue]);\n } else {\n var dashValue = map(dash[i], function (n) {\n return Math.ceil(n);\n });\n if (dashValue.length % 2 === 1) {\n // [4, 2, 1] means |---- - -- |---- - -- |\n // so normalize it to be [4, 2, 1, 4, 2, 1]\n result.push(dashValue.concat(dashValue));\n } else {\n result.push(dashValue);\n }\n }\n }\n return result;\n}\n/**\n * Convert dash input into dashArray\n *\n * @param {DecalDashArrayY} dash dash input\n * @return {number[]} normolized dash array\n */\nfunction normalizeDashArrayY(dash) {\n if (!dash || typeof dash === 'object' && dash.length === 0) {\n return [0, 0];\n }\n if (isNumber(dash)) {\n var dashValue_1 = Math.ceil(dash);\n return [dashValue_1, dashValue_1];\n }\n var dashValue = map(dash, function (n) {\n return Math.ceil(n);\n });\n return dash.length % 2 ? dashValue.concat(dashValue) : dashValue;\n}\n/**\n * Get block length of each line. A block is the length of dash line and space.\n * For example, a line with [4, 1] has a dash line of 4 and a space of 1 after\n * that, so the block length of this line is 5.\n *\n * @param {number[][]} dash dash array of X or Y\n * @return {number[]} block length of each line\n */\nfunction getLineBlockLengthX(dash) {\n return map(dash, function (line) {\n return getLineBlockLengthY(line);\n });\n}\nfunction getLineBlockLengthY(dash) {\n var blockLength = 0;\n for (var i = 0; i < dash.length; ++i) {\n blockLength += dash[i];\n }\n if (dash.length % 2 === 1) {\n // [4, 2, 1] means |---- - -- |---- - -- |\n // So total length is (4 + 2 + 1) * 2\n return blockLength * 2;\n }\n return blockLength;\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { createOrUpdatePatternFromDecal } from '../util/decal.js';\nexport default function decalVisual(ecModel, api) {\n ecModel.eachRawSeries(function (seriesModel) {\n if (ecModel.isSeriesFiltered(seriesModel)) {\n return;\n }\n var data = seriesModel.getData();\n if (data.hasItemVisual()) {\n data.each(function (idx) {\n var decal = data.getItemVisual(idx, 'decal');\n if (decal) {\n var itemStyle = data.ensureUniqueItemVisual(idx, 'style');\n itemStyle.decal = createOrUpdatePatternFromDecal(decal, api);\n }\n });\n }\n var decal = data.getVisual('decal');\n if (decal) {\n var style = data.getVisual('style');\n style.decal = createOrUpdatePatternFromDecal(decal, api);\n }\n });\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport Eventful from 'zrender/lib/core/Eventful.js';\n;\nvar lifecycle = new Eventful();\nexport default lifecycle;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { error } from '../util/log.js';\n// Implementation of exported APIs. For example registerMap, getMap.\n// The implementations will be registered when installing the component.\n// Avoid these code being bundled to the core module.\nvar implsStore = {};\n// TODO Type\nexport function registerImpl(name, impl) {\n if (process.env.NODE_ENV !== 'production') {\n if (implsStore[name]) {\n error(\"Already has an implementation of \" + name + \".\");\n }\n }\n implsStore[name] = impl;\n}\nexport function getImpl(name) {\n if (process.env.NODE_ENV !== 'production') {\n if (!implsStore[name]) {\n error(\"Implementation of \" + name + \" doesn't exists.\");\n }\n }\n return implsStore[name];\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\nimport { __extends } from \"tslib\";\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrender from 'zrender/lib/zrender.js';\nimport { assert, each, isFunction, isObject, indexOf, bind, clone, setAsPrimitive, extend, createHashMap, map, defaults, isDom, isArray, noop, isString, retrieve2 } from 'zrender/lib/core/util.js';\nimport env from 'zrender/lib/core/env.js';\nimport timsort from 'zrender/lib/core/timsort.js';\nimport Eventful from 'zrender/lib/core/Eventful.js';\nimport GlobalModel from '../model/Global.js';\nimport ExtensionAPI from './ExtensionAPI.js';\nimport CoordinateSystemManager from './CoordinateSystem.js';\nimport OptionManager from '../model/OptionManager.js';\nimport backwardCompat from '../preprocessor/backwardCompat.js';\nimport dataStack from '../processor/dataStack.js';\nimport SeriesModel from '../model/Series.js';\nimport ComponentView from '../view/Component.js';\nimport ChartView from '../view/Chart.js';\nimport * as graphic from '../util/graphic.js';\nimport { getECData } from '../util/innerStore.js';\nimport { isHighDownDispatcher, HOVER_STATE_EMPHASIS, HOVER_STATE_BLUR, blurSeriesFromHighlightPayload, toggleSelectionFromPayload, updateSeriesElementSelection, getAllSelectedIndices, isSelectChangePayload, isHighDownPayload, HIGHLIGHT_ACTION_TYPE, DOWNPLAY_ACTION_TYPE, SELECT_ACTION_TYPE, UNSELECT_ACTION_TYPE, TOGGLE_SELECT_ACTION_TYPE, savePathStates, enterEmphasis, leaveEmphasis, leaveBlur, enterSelect, leaveSelect, enterBlur, allLeaveBlur, findComponentHighDownDispatchers, blurComponent, handleGlobalMouseOverForHighDown, handleGlobalMouseOutForHighDown } from '../util/states.js';\nimport * as modelUtil from '../util/model.js';\nimport { throttle } from '../util/throttle.js';\nimport { seriesStyleTask, dataStyleTask, dataColorPaletteTask } from '../visual/style.js';\nimport loadingDefault from '../loading/default.js';\nimport Scheduler from './Scheduler.js';\nimport lightTheme from '../theme/light.js';\nimport darkTheme from '../theme/dark.js';\nimport { parseClassType } from '../util/clazz.js';\nimport { ECEventProcessor } from '../util/ECEventProcessor.js';\nimport { seriesSymbolTask, dataSymbolTask } from '../visual/symbol.js';\nimport { getVisualFromData, getItemVisualFromData } from '../visual/helper.js';\nimport { deprecateLog, deprecateReplaceLog, error, warn } from '../util/log.js';\nimport { handleLegacySelectEvents } from '../legacy/dataSelectAction.js';\nimport { registerExternalTransform } from '../data/helper/transform.js';\nimport { createLocaleObject, SYSTEM_LANG } from './locale.js';\nimport { findEventDispatcher } from '../util/event.js';\nimport decal from '../visual/decal.js';\nimport lifecycle from './lifecycle.js';\nimport { platformApi, setPlatformAPI } from 'zrender/lib/core/platform.js';\nimport { getImpl } from './impl.js';\nexport var version = '5.5.1';\nexport var dependencies = {\n zrender: '5.6.0'\n};\nvar TEST_FRAME_REMAIN_TIME = 1;\nvar PRIORITY_PROCESSOR_SERIES_FILTER = 800;\n// Some data processors depends on the stack result dimension (to calculate data extent).\n// So data stack stage should be in front of data processing stage.\nvar PRIORITY_PROCESSOR_DATASTACK = 900;\n// \"Data filter\" will block the stream, so it should be\n// put at the beginning of data processing.\nvar PRIORITY_PROCESSOR_FILTER = 1000;\nvar PRIORITY_PROCESSOR_DEFAULT = 2000;\nvar PRIORITY_PROCESSOR_STATISTIC = 5000;\nvar PRIORITY_VISUAL_LAYOUT = 1000;\nvar PRIORITY_VISUAL_PROGRESSIVE_LAYOUT = 1100;\nvar PRIORITY_VISUAL_GLOBAL = 2000;\nvar PRIORITY_VISUAL_CHART = 3000;\nvar PRIORITY_VISUAL_COMPONENT = 4000;\n// Visual property in data. Greater than `PRIORITY_VISUAL_COMPONENT` to enable to\n// overwrite the viusal result of component (like `visualMap`)\n// using data item specific setting (like itemStyle.xxx on data item)\nvar PRIORITY_VISUAL_CHART_DATA_CUSTOM = 4500;\n// Greater than `PRIORITY_VISUAL_CHART_DATA_CUSTOM` to enable to layout based on\n// visual result like `symbolSize`.\nvar PRIORITY_VISUAL_POST_CHART_LAYOUT = 4600;\nvar PRIORITY_VISUAL_BRUSH = 5000;\nvar PRIORITY_VISUAL_ARIA = 6000;\nvar PRIORITY_VISUAL_DECAL = 7000;\nexport var PRIORITY = {\n PROCESSOR: {\n FILTER: PRIORITY_PROCESSOR_FILTER,\n SERIES_FILTER: PRIORITY_PROCESSOR_SERIES_FILTER,\n STATISTIC: PRIORITY_PROCESSOR_STATISTIC\n },\n VISUAL: {\n LAYOUT: PRIORITY_VISUAL_LAYOUT,\n PROGRESSIVE_LAYOUT: PRIORITY_VISUAL_PROGRESSIVE_LAYOUT,\n GLOBAL: PRIORITY_VISUAL_GLOBAL,\n CHART: PRIORITY_VISUAL_CHART,\n POST_CHART_LAYOUT: PRIORITY_VISUAL_POST_CHART_LAYOUT,\n COMPONENT: PRIORITY_VISUAL_COMPONENT,\n BRUSH: PRIORITY_VISUAL_BRUSH,\n CHART_ITEM: PRIORITY_VISUAL_CHART_DATA_CUSTOM,\n ARIA: PRIORITY_VISUAL_ARIA,\n DECAL: PRIORITY_VISUAL_DECAL\n }\n};\n// Main process have three entries: `setOption`, `dispatchAction` and `resize`,\n// where they must not be invoked nestedly, except the only case: invoke\n// dispatchAction with updateMethod \"none\" in main process.\n// This flag is used to carry out this rule.\n// All events will be triggered out side main process (i.e. when !this[IN_MAIN_PROCESS]).\nvar IN_MAIN_PROCESS_KEY = '__flagInMainProcess';\nvar PENDING_UPDATE = '__pendingUpdate';\nvar STATUS_NEEDS_UPDATE_KEY = '__needsUpdateStatus';\nvar ACTION_REG = /^[a-zA-Z0-9_]+$/;\nvar CONNECT_STATUS_KEY = '__connectUpdateStatus';\nvar CONNECT_STATUS_PENDING = 0;\nvar CONNECT_STATUS_UPDATING = 1;\nvar CONNECT_STATUS_UPDATED = 2;\n;\n;\nfunction createRegisterEventWithLowercaseECharts(method) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (this.isDisposed()) {\n disposedWarning(this.id);\n return;\n }\n return toLowercaseNameAndCallEventful(this, method, args);\n };\n}\nfunction createRegisterEventWithLowercaseMessageCenter(method) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return toLowercaseNameAndCallEventful(this, method, args);\n };\n}\nfunction toLowercaseNameAndCallEventful(host, method, args) {\n // `args[0]` is event name. Event name is all lowercase.\n args[0] = args[0] && args[0].toLowerCase();\n return Eventful.prototype[method].apply(host, args);\n}\nvar MessageCenter = /** @class */function (_super) {\n __extends(MessageCenter, _super);\n function MessageCenter() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return MessageCenter;\n}(Eventful);\nvar messageCenterProto = MessageCenter.prototype;\nmessageCenterProto.on = createRegisterEventWithLowercaseMessageCenter('on');\nmessageCenterProto.off = createRegisterEventWithLowercaseMessageCenter('off');\n// ---------------------------------------\n// Internal method names for class ECharts\n// ---------------------------------------\nvar prepare;\nvar prepareView;\nvar updateDirectly;\nvar updateMethods;\nvar doConvertPixel;\nvar updateStreamModes;\nvar doDispatchAction;\nvar flushPendingActions;\nvar triggerUpdatedEvent;\nvar bindRenderedEvent;\nvar bindMouseEvent;\nvar render;\nvar renderComponents;\nvar renderSeries;\nvar createExtensionAPI;\nvar enableConnect;\nvar markStatusToUpdate;\nvar applyChangedStates;\nvar ECharts = /** @class */function (_super) {\n __extends(ECharts, _super);\n function ECharts(dom,\n // Theme name or themeOption.\n theme, opts) {\n var _this = _super.call(this, new ECEventProcessor()) || this;\n _this._chartsViews = [];\n _this._chartsMap = {};\n _this._componentsViews = [];\n _this._componentsMap = {};\n // Can't dispatch action during rendering procedure\n _this._pendingActions = [];\n opts = opts || {};\n // Get theme by name\n if (isString(theme)) {\n theme = themeStorage[theme];\n }\n _this._dom = dom;\n var defaultRenderer = 'canvas';\n var defaultCoarsePointer = 'auto';\n var defaultUseDirtyRect = false;\n if (process.env.NODE_ENV !== 'production') {\n var root = /* eslint-disable-next-line */\n env.hasGlobalWindow ? window : global;\n if (root) {\n defaultRenderer = retrieve2(root.__ECHARTS__DEFAULT__RENDERER__, defaultRenderer);\n defaultCoarsePointer = retrieve2(root.__ECHARTS__DEFAULT__COARSE_POINTER, defaultCoarsePointer);\n defaultUseDirtyRect = retrieve2(root.__ECHARTS__DEFAULT__USE_DIRTY_RECT__, defaultUseDirtyRect);\n }\n }\n if (opts.ssr) {\n zrender.registerSSRDataGetter(function (el) {\n var ecData = getECData(el);\n var dataIndex = ecData.dataIndex;\n if (dataIndex == null) {\n return;\n }\n var hashMap = createHashMap();\n hashMap.set('series_index', ecData.seriesIndex);\n hashMap.set('data_index', dataIndex);\n ecData.ssrType && hashMap.set('ssr_type', ecData.ssrType);\n return hashMap;\n });\n }\n var zr = _this._zr = zrender.init(dom, {\n renderer: opts.renderer || defaultRenderer,\n devicePixelRatio: opts.devicePixelRatio,\n width: opts.width,\n height: opts.height,\n ssr: opts.ssr,\n useDirtyRect: retrieve2(opts.useDirtyRect, defaultUseDirtyRect),\n useCoarsePointer: retrieve2(opts.useCoarsePointer, defaultCoarsePointer),\n pointerSize: opts.pointerSize\n });\n _this._ssr = opts.ssr;\n // Expect 60 fps.\n _this._throttledZrFlush = throttle(bind(zr.flush, zr), 17);\n theme = clone(theme);\n theme && backwardCompat(theme, true);\n _this._theme = theme;\n _this._locale = createLocaleObject(opts.locale || SYSTEM_LANG);\n _this._coordSysMgr = new CoordinateSystemManager();\n var api = _this._api = createExtensionAPI(_this);\n // Sort on demand\n function prioritySortFunc(a, b) {\n return a.__prio - b.__prio;\n }\n timsort(visualFuncs, prioritySortFunc);\n timsort(dataProcessorFuncs, prioritySortFunc);\n _this._scheduler = new Scheduler(_this, api, dataProcessorFuncs, visualFuncs);\n _this._messageCenter = new MessageCenter();\n // Init mouse events\n _this._initEvents();\n // In case some people write `window.onresize = chart.resize`\n _this.resize = bind(_this.resize, _this);\n zr.animation.on('frame', _this._onframe, _this);\n bindRenderedEvent(zr, _this);\n bindMouseEvent(zr, _this);\n // ECharts instance can be used as value.\n setAsPrimitive(_this);\n return _this;\n }\n ECharts.prototype._onframe = function () {\n if (this._disposed) {\n return;\n }\n applyChangedStates(this);\n var scheduler = this._scheduler;\n // Lazy update\n if (this[PENDING_UPDATE]) {\n var silent = this[PENDING_UPDATE].silent;\n this[IN_MAIN_PROCESS_KEY] = true;\n try {\n prepare(this);\n updateMethods.update.call(this, null, this[PENDING_UPDATE].updateParams);\n } catch (e) {\n this[IN_MAIN_PROCESS_KEY] = false;\n this[PENDING_UPDATE] = null;\n throw e;\n }\n // At present, in each frame, zrender performs:\n // (1) animation step forward.\n // (2) trigger('frame') (where this `_onframe` is called)\n // (3) zrender flush (render).\n // If we do nothing here, since we use `setToFinal: true`, the step (3) above\n // will render the final state of the elements before the real animation started.\n this._zr.flush();\n this[IN_MAIN_PROCESS_KEY] = false;\n this[PENDING_UPDATE] = null;\n flushPendingActions.call(this, silent);\n triggerUpdatedEvent.call(this, silent);\n }\n // Avoid do both lazy update and progress in one frame.\n else if (scheduler.unfinished) {\n // Stream progress.\n var remainTime = TEST_FRAME_REMAIN_TIME;\n var ecModel = this._model;\n var api = this._api;\n scheduler.unfinished = false;\n do {\n var startTime = +new Date();\n scheduler.performSeriesTasks(ecModel);\n // Currently dataProcessorFuncs do not check threshold.\n scheduler.performDataProcessorTasks(ecModel);\n updateStreamModes(this, ecModel);\n // Do not update coordinate system here. Because that coord system update in\n // each frame is not a good user experience. So we follow the rule that\n // the extent of the coordinate system is determined in the first frame (the\n // frame is executed immediately after task reset.\n // this._coordSysMgr.update(ecModel, api);\n // console.log('--- ec frame visual ---', remainTime);\n scheduler.performVisualTasks(ecModel);\n renderSeries(this, this._model, api, 'remain', {});\n remainTime -= +new Date() - startTime;\n } while (remainTime > 0 && scheduler.unfinished);\n // Call flush explicitly for trigger finished event.\n if (!scheduler.unfinished) {\n this._zr.flush();\n }\n // Else, zr flushing be ensue within the same frame,\n // because zr flushing is after onframe event.\n }\n };\n ECharts.prototype.getDom = function () {\n return this._dom;\n };\n ECharts.prototype.getId = function () {\n return this.id;\n };\n ECharts.prototype.getZr = function () {\n return this._zr;\n };\n ECharts.prototype.isSSR = function () {\n return this._ssr;\n };\n /* eslint-disable-next-line */\n ECharts.prototype.setOption = function (option, notMerge, lazyUpdate) {\n if (this[IN_MAIN_PROCESS_KEY]) {\n if (process.env.NODE_ENV !== 'production') {\n error('`setOption` should not be called during main process.');\n }\n return;\n }\n if (this._disposed) {\n disposedWarning(this.id);\n return;\n }\n var silent;\n var replaceMerge;\n var transitionOpt;\n if (isObject(notMerge)) {\n lazyUpdate = notMerge.lazyUpdate;\n silent = notMerge.silent;\n replaceMerge = notMerge.replaceMerge;\n transitionOpt = notMerge.transition;\n notMerge = notMerge.notMerge;\n }\n this[IN_MAIN_PROCESS_KEY] = true;\n if (!this._model || notMerge) {\n var optionManager = new OptionManager(this._api);\n var theme = this._theme;\n var ecModel = this._model = new GlobalModel();\n ecModel.scheduler = this._scheduler;\n ecModel.ssr = this._ssr;\n ecModel.init(null, null, null, theme, this._locale, optionManager);\n }\n this._model.setOption(option, {\n replaceMerge: replaceMerge\n }, optionPreprocessorFuncs);\n var updateParams = {\n seriesTransition: transitionOpt,\n optionChanged: true\n };\n if (lazyUpdate) {\n this[PENDING_UPDATE] = {\n silent: silent,\n updateParams: updateParams\n };\n this[IN_MAIN_PROCESS_KEY] = false;\n // `setOption(option, {lazyMode: true})` may be called when zrender has been slept.\n // It should wake it up to make sure zrender start to render at the next frame.\n this.getZr().wakeUp();\n } else {\n try {\n prepare(this);\n updateMethods.update.call(this, null, updateParams);\n } catch (e) {\n this[PENDING_UPDATE] = null;\n this[IN_MAIN_PROCESS_KEY] = false;\n throw e;\n }\n // Ensure zr refresh sychronously, and then pixel in canvas can be\n // fetched after `setOption`.\n if (!this._ssr) {\n // not use flush when using ssr mode.\n this._zr.flush();\n }\n this[PENDING_UPDATE] = null;\n this[IN_MAIN_PROCESS_KEY] = false;\n flushPendingActions.call(this, silent);\n triggerUpdatedEvent.call(this, silent);\n }\n };\n /**\n * @deprecated\n */\n ECharts.prototype.setTheme = function () {\n deprecateLog('ECharts#setTheme() is DEPRECATED in ECharts 3.0');\n };\n // We don't want developers to use getModel directly.\n ECharts.prototype.getModel = function () {\n return this._model;\n };\n ECharts.prototype.getOption = function () {\n return this._model && this._model.getOption();\n };\n ECharts.prototype.getWidth = function () {\n return this._zr.getWidth();\n };\n ECharts.prototype.getHeight = function () {\n return this._zr.getHeight();\n };\n ECharts.prototype.getDevicePixelRatio = function () {\n return this._zr.painter.dpr\n /* eslint-disable-next-line */ || env.hasGlobalWindow && window.devicePixelRatio || 1;\n };\n /**\n * Get canvas which has all thing rendered\n * @deprecated Use renderToCanvas instead.\n */\n ECharts.prototype.getRenderedCanvas = function (opts) {\n if (process.env.NODE_ENV !== 'production') {\n deprecateReplaceLog('getRenderedCanvas', 'renderToCanvas');\n }\n return this.renderToCanvas(opts);\n };\n ECharts.prototype.renderToCanvas = function (opts) {\n opts = opts || {};\n var painter = this._zr.painter;\n if (process.env.NODE_ENV !== 'production') {\n if (painter.type !== 'canvas') {\n throw new Error('renderToCanvas can only be used in the canvas renderer.');\n }\n }\n return painter.getRenderedCanvas({\n backgroundColor: opts.backgroundColor || this._model.get('backgroundColor'),\n pixelRatio: opts.pixelRatio || this.getDevicePixelRatio()\n });\n };\n ECharts.prototype.renderToSVGString = function (opts) {\n opts = opts || {};\n var painter = this._zr.painter;\n if (process.env.NODE_ENV !== 'production') {\n if (painter.type !== 'svg') {\n throw new Error('renderToSVGString can only be used in the svg renderer.');\n }\n }\n return painter.renderToString({\n useViewBox: opts.useViewBox\n });\n };\n /**\n * Get svg data url\n */\n ECharts.prototype.getSvgDataURL = function () {\n if (!env.svgSupported) {\n return;\n }\n var zr = this._zr;\n var list = zr.storage.getDisplayList();\n // Stop animations\n each(list, function (el) {\n el.stopAnimation(null, true);\n });\n return zr.painter.toDataURL();\n };\n ECharts.prototype.getDataURL = function (opts) {\n if (this._disposed) {\n disposedWarning(this.id);\n return;\n }\n opts = opts || {};\n var excludeComponents = opts.excludeComponents;\n var ecModel = this._model;\n var excludesComponentViews = [];\n var self = this;\n each(excludeComponents, function (componentType) {\n ecModel.eachComponent({\n mainType: componentType\n }, function (component) {\n var view = self._componentsMap[component.__viewId];\n if (!view.group.ignore) {\n excludesComponentViews.push(view);\n view.group.ignore = true;\n }\n });\n });\n var url = this._zr.painter.getType() === 'svg' ? this.getSvgDataURL() : this.renderToCanvas(opts).toDataURL('image/' + (opts && opts.type || 'png'));\n each(excludesComponentViews, function (view) {\n view.group.ignore = false;\n });\n return url;\n };\n ECharts.prototype.getConnectedDataURL = function (opts) {\n if (this._disposed) {\n disposedWarning(this.id);\n return;\n }\n var isSvg = opts.type === 'svg';\n var groupId = this.group;\n var mathMin = Math.min;\n var mathMax = Math.max;\n var MAX_NUMBER = Infinity;\n if (connectedGroups[groupId]) {\n var left_1 = MAX_NUMBER;\n var top_1 = MAX_NUMBER;\n var right_1 = -MAX_NUMBER;\n var bottom_1 = -MAX_NUMBER;\n var canvasList_1 = [];\n var dpr_1 = opts && opts.pixelRatio || this.getDevicePixelRatio();\n each(instances, function (chart, id) {\n if (chart.group === groupId) {\n var canvas = isSvg ? chart.getZr().painter.getSvgDom().innerHTML : chart.renderToCanvas(clone(opts));\n var boundingRect = chart.getDom().getBoundingClientRect();\n left_1 = mathMin(boundingRect.left, left_1);\n top_1 = mathMin(boundingRect.top, top_1);\n right_1 = mathMax(boundingRect.right, right_1);\n bottom_1 = mathMax(boundingRect.bottom, bottom_1);\n canvasList_1.push({\n dom: canvas,\n left: boundingRect.left,\n top: boundingRect.top\n });\n }\n });\n left_1 *= dpr_1;\n top_1 *= dpr_1;\n right_1 *= dpr_1;\n bottom_1 *= dpr_1;\n var width = right_1 - left_1;\n var height = bottom_1 - top_1;\n var targetCanvas = platformApi.createCanvas();\n var zr_1 = zrender.init(targetCanvas, {\n renderer: isSvg ? 'svg' : 'canvas'\n });\n zr_1.resize({\n width: width,\n height: height\n });\n if (isSvg) {\n var content_1 = '';\n each(canvasList_1, function (item) {\n var x = item.left - left_1;\n var y = item.top - top_1;\n content_1 += '' + item.dom + '';\n });\n zr_1.painter.getSvgRoot().innerHTML = content_1;\n if (opts.connectedBackgroundColor) {\n zr_1.painter.setBackgroundColor(opts.connectedBackgroundColor);\n }\n zr_1.refreshImmediately();\n return zr_1.painter.toDataURL();\n } else {\n // Background between the charts\n if (opts.connectedBackgroundColor) {\n zr_1.add(new graphic.Rect({\n shape: {\n x: 0,\n y: 0,\n width: width,\n height: height\n },\n style: {\n fill: opts.connectedBackgroundColor\n }\n }));\n }\n each(canvasList_1, function (item) {\n var img = new graphic.Image({\n style: {\n x: item.left * dpr_1 - left_1,\n y: item.top * dpr_1 - top_1,\n image: item.dom\n }\n });\n zr_1.add(img);\n });\n zr_1.refreshImmediately();\n return targetCanvas.toDataURL('image/' + (opts && opts.type || 'png'));\n }\n } else {\n return this.getDataURL(opts);\n }\n };\n ECharts.prototype.convertToPixel = function (finder, value) {\n return doConvertPixel(this, 'convertToPixel', finder, value);\n };\n ECharts.prototype.convertFromPixel = function (finder, value) {\n return doConvertPixel(this, 'convertFromPixel', finder, value);\n };\n /**\n * Is the specified coordinate systems or components contain the given pixel point.\n * @param {Array|number} value\n * @return {boolean} result\n */\n ECharts.prototype.containPixel = function (finder, value) {\n if (this._disposed) {\n disposedWarning(this.id);\n return;\n }\n var ecModel = this._model;\n var result;\n var findResult = modelUtil.parseFinder(ecModel, finder);\n each(findResult, function (models, key) {\n key.indexOf('Models') >= 0 && each(models, function (model) {\n var coordSys = model.coordinateSystem;\n if (coordSys && coordSys.containPoint) {\n result = result || !!coordSys.containPoint(value);\n } else if (key === 'seriesModels') {\n var view = this._chartsMap[model.__viewId];\n if (view && view.containPoint) {\n result = result || view.containPoint(value, model);\n } else {\n if (process.env.NODE_ENV !== 'production') {\n warn(key + ': ' + (view ? 'The found component do not support containPoint.' : 'No view mapping to the found component.'));\n }\n }\n } else {\n if (process.env.NODE_ENV !== 'production') {\n warn(key + ': containPoint is not supported');\n }\n }\n }, this);\n }, this);\n return !!result;\n };\n /**\n * Get visual from series or data.\n * @param finder\n * If string, e.g., 'series', means {seriesIndex: 0}.\n * If Object, could contain some of these properties below:\n * {\n * seriesIndex / seriesId / seriesName,\n * dataIndex / dataIndexInside\n * }\n * If dataIndex is not specified, series visual will be fetched,\n * but not data item visual.\n * If all of seriesIndex, seriesId, seriesName are not specified,\n * visual will be fetched from first series.\n * @param visualType 'color', 'symbol', 'symbolSize'\n */\n ECharts.prototype.getVisual = function (finder, visualType) {\n var ecModel = this._model;\n var parsedFinder = modelUtil.parseFinder(ecModel, finder, {\n defaultMainType: 'series'\n });\n var seriesModel = parsedFinder.seriesModel;\n if (process.env.NODE_ENV !== 'production') {\n if (!seriesModel) {\n warn('There is no specified series model');\n }\n }\n var data = seriesModel.getData();\n var dataIndexInside = parsedFinder.hasOwnProperty('dataIndexInside') ? parsedFinder.dataIndexInside : parsedFinder.hasOwnProperty('dataIndex') ? data.indexOfRawIndex(parsedFinder.dataIndex) : null;\n return dataIndexInside != null ? getItemVisualFromData(data, dataIndexInside, visualType) : getVisualFromData(data, visualType);\n };\n /**\n * Get view of corresponding component model\n */\n ECharts.prototype.getViewOfComponentModel = function (componentModel) {\n return this._componentsMap[componentModel.__viewId];\n };\n /**\n * Get view of corresponding series model\n */\n ECharts.prototype.getViewOfSeriesModel = function (seriesModel) {\n return this._chartsMap[seriesModel.__viewId];\n };\n ECharts.prototype._initEvents = function () {\n var _this = this;\n each(MOUSE_EVENT_NAMES, function (eveName) {\n var handler = function (e) {\n var ecModel = _this.getModel();\n var el = e.target;\n var params;\n var isGlobalOut = eveName === 'globalout';\n // no e.target when 'globalout'.\n if (isGlobalOut) {\n params = {};\n } else {\n el && findEventDispatcher(el, function (parent) {\n var ecData = getECData(parent);\n if (ecData && ecData.dataIndex != null) {\n var dataModel = ecData.dataModel || ecModel.getSeriesByIndex(ecData.seriesIndex);\n params = dataModel && dataModel.getDataParams(ecData.dataIndex, ecData.dataType, el) || {};\n return true;\n }\n // If element has custom eventData of components\n else if (ecData.eventData) {\n params = extend({}, ecData.eventData);\n return true;\n }\n }, true);\n }\n // Contract: if params prepared in mouse event,\n // these properties must be specified:\n // {\n // componentType: string (component main type)\n // componentIndex: number\n // }\n // Otherwise event query can not work.\n if (params) {\n var componentType = params.componentType;\n var componentIndex = params.componentIndex;\n // Special handling for historic reason: when trigger by\n // markLine/markPoint/markArea, the componentType is\n // 'markLine'/'markPoint'/'markArea', but we should better\n // enable them to be queried by seriesIndex, since their\n // option is set in each series.\n if (componentType === 'markLine' || componentType === 'markPoint' || componentType === 'markArea') {\n componentType = 'series';\n componentIndex = params.seriesIndex;\n }\n var model = componentType && componentIndex != null && ecModel.getComponent(componentType, componentIndex);\n var view = model && _this[model.mainType === 'series' ? '_chartsMap' : '_componentsMap'][model.__viewId];\n if (process.env.NODE_ENV !== 'production') {\n // `event.componentType` and `event[componentTpype + 'Index']` must not\n // be missed, otherwise there is no way to distinguish source component.\n // See `dataFormat.getDataParams`.\n if (!isGlobalOut && !(model && view)) {\n warn('model or view can not be found by params');\n }\n }\n params.event = e;\n params.type = eveName;\n _this._$eventProcessor.eventInfo = {\n targetEl: el,\n packedEvent: params,\n model: model,\n view: view\n };\n _this.trigger(eveName, params);\n }\n };\n // Consider that some component (like tooltip, brush, ...)\n // register zr event handler, but user event handler might\n // do anything, such as call `setOption` or `dispatchAction`,\n // which probably update any of the content and probably\n // cause problem if it is called previous other inner handlers.\n handler.zrEventfulCallAtLast = true;\n _this._zr.on(eveName, handler, _this);\n });\n each(eventActionMap, function (actionType, eventType) {\n _this._messageCenter.on(eventType, function (event) {\n this.trigger(eventType, event);\n }, _this);\n });\n // Extra events\n // TODO register?\n each(['selectchanged'], function (eventType) {\n _this._messageCenter.on(eventType, function (event) {\n this.trigger(eventType, event);\n }, _this);\n });\n handleLegacySelectEvents(this._messageCenter, this, this._api);\n };\n ECharts.prototype.isDisposed = function () {\n return this._disposed;\n };\n ECharts.prototype.clear = function () {\n if (this._disposed) {\n disposedWarning(this.id);\n return;\n }\n this.setOption({\n series: []\n }, true);\n };\n ECharts.prototype.dispose = function () {\n if (this._disposed) {\n disposedWarning(this.id);\n return;\n }\n this._disposed = true;\n var dom = this.getDom();\n if (dom) {\n modelUtil.setAttribute(this.getDom(), DOM_ATTRIBUTE_KEY, '');\n }\n var chart = this;\n var api = chart._api;\n var ecModel = chart._model;\n each(chart._componentsViews, function (component) {\n component.dispose(ecModel, api);\n });\n each(chart._chartsViews, function (chart) {\n chart.dispose(ecModel, api);\n });\n // Dispose after all views disposed\n chart._zr.dispose();\n // Set properties to null.\n // To reduce the memory cost in case the top code still holds this instance unexpectedly.\n chart._dom = chart._model = chart._chartsMap = chart._componentsMap = chart._chartsViews = chart._componentsViews = chart._scheduler = chart._api = chart._zr = chart._throttledZrFlush = chart._theme = chart._coordSysMgr = chart._messageCenter = null;\n delete instances[chart.id];\n };\n /**\n * Resize the chart\n */\n ECharts.prototype.resize = function (opts) {\n if (this[IN_MAIN_PROCESS_KEY]) {\n if (process.env.NODE_ENV !== 'production') {\n error('`resize` should not be called during main process.');\n }\n return;\n }\n if (this._disposed) {\n disposedWarning(this.id);\n return;\n }\n this._zr.resize(opts);\n var ecModel = this._model;\n // Resize loading effect\n this._loadingFX && this._loadingFX.resize();\n if (!ecModel) {\n return;\n }\n var needPrepare = ecModel.resetOption('media');\n var silent = opts && opts.silent;\n // There is some real cases that:\n // chart.setOption(option, { lazyUpdate: true });\n // chart.resize();\n if (this[PENDING_UPDATE]) {\n if (silent == null) {\n silent = this[PENDING_UPDATE].silent;\n }\n needPrepare = true;\n this[PENDING_UPDATE] = null;\n }\n this[IN_MAIN_PROCESS_KEY] = true;\n try {\n needPrepare && prepare(this);\n updateMethods.update.call(this, {\n type: 'resize',\n animation: extend({\n // Disable animation\n duration: 0\n }, opts && opts.animation)\n });\n } catch (e) {\n this[IN_MAIN_PROCESS_KEY] = false;\n throw e;\n }\n this[IN_MAIN_PROCESS_KEY] = false;\n flushPendingActions.call(this, silent);\n triggerUpdatedEvent.call(this, silent);\n };\n ECharts.prototype.showLoading = function (name, cfg) {\n if (this._disposed) {\n disposedWarning(this.id);\n return;\n }\n if (isObject(name)) {\n cfg = name;\n name = '';\n }\n name = name || 'default';\n this.hideLoading();\n if (!loadingEffects[name]) {\n if (process.env.NODE_ENV !== 'production') {\n warn('Loading effects ' + name + ' not exists.');\n }\n return;\n }\n var el = loadingEffects[name](this._api, cfg);\n var zr = this._zr;\n this._loadingFX = el;\n zr.add(el);\n };\n /**\n * Hide loading effect\n */\n ECharts.prototype.hideLoading = function () {\n if (this._disposed) {\n disposedWarning(this.id);\n return;\n }\n this._loadingFX && this._zr.remove(this._loadingFX);\n this._loadingFX = null;\n };\n ECharts.prototype.makeActionFromEvent = function (eventObj) {\n var payload = extend({}, eventObj);\n payload.type = eventActionMap[eventObj.type];\n return payload;\n };\n /**\n * @param opt If pass boolean, means opt.silent\n * @param opt.silent Default `false`. Whether trigger events.\n * @param opt.flush Default `undefined`.\n * true: Flush immediately, and then pixel in canvas can be fetched\n * immediately. Caution: it might affect performance.\n * false: Not flush.\n * undefined: Auto decide whether perform flush.\n */\n ECharts.prototype.dispatchAction = function (payload, opt) {\n if (this._disposed) {\n disposedWarning(this.id);\n return;\n }\n if (!isObject(opt)) {\n opt = {\n silent: !!opt\n };\n }\n if (!actions[payload.type]) {\n return;\n }\n // Avoid dispatch action before setOption. Especially in `connect`.\n if (!this._model) {\n return;\n }\n // May dispatchAction in rendering procedure\n if (this[IN_MAIN_PROCESS_KEY]) {\n this._pendingActions.push(payload);\n return;\n }\n var silent = opt.silent;\n doDispatchAction.call(this, payload, silent);\n var flush = opt.flush;\n if (flush) {\n this._zr.flush();\n } else if (flush !== false && env.browser.weChat) {\n // In WeChat embedded browser, `requestAnimationFrame` and `setInterval`\n // hang when sliding page (on touch event), which cause that zr does not\n // refresh until user interaction finished, which is not expected.\n // But `dispatchAction` may be called too frequently when pan on touch\n // screen, which impacts performance if do not throttle them.\n this._throttledZrFlush();\n }\n flushPendingActions.call(this, silent);\n triggerUpdatedEvent.call(this, silent);\n };\n ECharts.prototype.updateLabelLayout = function () {\n lifecycle.trigger('series:layoutlabels', this._model, this._api, {\n // Not adding series labels.\n // TODO\n updatedSeries: []\n });\n };\n ECharts.prototype.appendData = function (params) {\n if (this._disposed) {\n disposedWarning(this.id);\n return;\n }\n var seriesIndex = params.seriesIndex;\n var ecModel = this.getModel();\n var seriesModel = ecModel.getSeriesByIndex(seriesIndex);\n if (process.env.NODE_ENV !== 'production') {\n assert(params.data && seriesModel);\n }\n seriesModel.appendData(params);\n // Note: `appendData` does not support that update extent of coordinate\n // system, util some scenario require that. In the expected usage of\n // `appendData`, the initial extent of coordinate system should better\n // be fixed by axis `min`/`max` setting or initial data, otherwise if\n // the extent changed while `appendData`, the location of the painted\n // graphic elements have to be changed, which make the usage of\n // `appendData` meaningless.\n this._scheduler.unfinished = true;\n this.getZr().wakeUp();\n };\n // A work around for no `internal` modifier in ts yet but\n // need to strictly hide private methods to JS users.\n ECharts.internalField = function () {\n prepare = function (ecIns) {\n var scheduler = ecIns._scheduler;\n scheduler.restorePipelines(ecIns._model);\n scheduler.prepareStageTasks();\n prepareView(ecIns, true);\n prepareView(ecIns, false);\n scheduler.plan();\n };\n /**\n * Prepare view instances of charts and components\n */\n prepareView = function (ecIns, isComponent) {\n var ecModel = ecIns._model;\n var scheduler = ecIns._scheduler;\n var viewList = isComponent ? ecIns._componentsViews : ecIns._chartsViews;\n var viewMap = isComponent ? ecIns._componentsMap : ecIns._chartsMap;\n var zr = ecIns._zr;\n var api = ecIns._api;\n for (var i = 0; i < viewList.length; i++) {\n viewList[i].__alive = false;\n }\n isComponent ? ecModel.eachComponent(function (componentType, model) {\n componentType !== 'series' && doPrepare(model);\n }) : ecModel.eachSeries(doPrepare);\n function doPrepare(model) {\n // By default view will be reused if possible for the case that `setOption` with \"notMerge\"\n // mode and need to enable transition animation. (Usually, when they have the same id, or\n // especially no id but have the same type & name & index. See the `model.id` generation\n // rule in `makeIdAndName` and `viewId` generation rule here).\n // But in `replaceMerge` mode, this feature should be able to disabled when it is clear that\n // the new model has nothing to do with the old model.\n var requireNewView = model.__requireNewView;\n // This command should not work twice.\n model.__requireNewView = false;\n // Consider: id same and type changed.\n var viewId = '_ec_' + model.id + '_' + model.type;\n var view = !requireNewView && viewMap[viewId];\n if (!view) {\n var classType = parseClassType(model.type);\n var Clazz = isComponent ? ComponentView.getClass(classType.main, classType.sub) :\n // FIXME:TS\n // (ChartView as ChartViewConstructor).getClass('series', classType.sub)\n // For backward compat, still support a chart type declared as only subType\n // like \"liquidfill\", but recommend \"series.liquidfill\"\n // But need a base class to make a type series.\n ChartView.getClass(classType.sub);\n if (process.env.NODE_ENV !== 'production') {\n assert(Clazz, classType.sub + ' does not exist.');\n }\n view = new Clazz();\n view.init(ecModel, api);\n viewMap[viewId] = view;\n viewList.push(view);\n zr.add(view.group);\n }\n model.__viewId = view.__id = viewId;\n view.__alive = true;\n view.__model = model;\n view.group.__ecComponentInfo = {\n mainType: model.mainType,\n index: model.componentIndex\n };\n !isComponent && scheduler.prepareView(view, model, ecModel, api);\n }\n for (var i = 0; i < viewList.length;) {\n var view = viewList[i];\n if (!view.__alive) {\n !isComponent && view.renderTask.dispose();\n zr.remove(view.group);\n view.dispose(ecModel, api);\n viewList.splice(i, 1);\n if (viewMap[view.__id] === view) {\n delete viewMap[view.__id];\n }\n view.__id = view.group.__ecComponentInfo = null;\n } else {\n i++;\n }\n }\n };\n updateDirectly = function (ecIns, method, payload, mainType, subType) {\n var ecModel = ecIns._model;\n ecModel.setUpdatePayload(payload);\n // broadcast\n if (!mainType) {\n // FIXME\n // Chart will not be update directly here, except set dirty.\n // But there is no such scenario now.\n each([].concat(ecIns._componentsViews).concat(ecIns._chartsViews), callView);\n return;\n }\n var query = {};\n query[mainType + 'Id'] = payload[mainType + 'Id'];\n query[mainType + 'Index'] = payload[mainType + 'Index'];\n query[mainType + 'Name'] = payload[mainType + 'Name'];\n var condition = {\n mainType: mainType,\n query: query\n };\n subType && (condition.subType = subType); // subType may be '' by parseClassType;\n var excludeSeriesId = payload.excludeSeriesId;\n var excludeSeriesIdMap;\n if (excludeSeriesId != null) {\n excludeSeriesIdMap = createHashMap();\n each(modelUtil.normalizeToArray(excludeSeriesId), function (id) {\n var modelId = modelUtil.convertOptionIdName(id, null);\n if (modelId != null) {\n excludeSeriesIdMap.set(modelId, true);\n }\n });\n }\n // If dispatchAction before setOption, do nothing.\n ecModel && ecModel.eachComponent(condition, function (model) {\n var isExcluded = excludeSeriesIdMap && excludeSeriesIdMap.get(model.id) != null;\n if (isExcluded) {\n return;\n }\n ;\n if (isHighDownPayload(payload)) {\n if (model instanceof SeriesModel) {\n if (payload.type === HIGHLIGHT_ACTION_TYPE && !payload.notBlur && !model.get(['emphasis', 'disabled'])) {\n blurSeriesFromHighlightPayload(model, payload, ecIns._api);\n }\n } else {\n var _a = findComponentHighDownDispatchers(model.mainType, model.componentIndex, payload.name, ecIns._api),\n focusSelf = _a.focusSelf,\n dispatchers = _a.dispatchers;\n if (payload.type === HIGHLIGHT_ACTION_TYPE && focusSelf && !payload.notBlur) {\n blurComponent(model.mainType, model.componentIndex, ecIns._api);\n }\n // PENDING:\n // Whether to put this \"enter emphasis\" code in `ComponentView`,\n // which will be the same as `ChartView` but might be not necessary\n // and will be far from this logic.\n if (dispatchers) {\n each(dispatchers, function (dispatcher) {\n payload.type === HIGHLIGHT_ACTION_TYPE ? enterEmphasis(dispatcher) : leaveEmphasis(dispatcher);\n });\n }\n }\n } else if (isSelectChangePayload(payload)) {\n // TODO geo\n if (model instanceof SeriesModel) {\n toggleSelectionFromPayload(model, payload, ecIns._api);\n updateSeriesElementSelection(model);\n markStatusToUpdate(ecIns);\n }\n }\n }, ecIns);\n ecModel && ecModel.eachComponent(condition, function (model) {\n var isExcluded = excludeSeriesIdMap && excludeSeriesIdMap.get(model.id) != null;\n if (isExcluded) {\n return;\n }\n ;\n callView(ecIns[mainType === 'series' ? '_chartsMap' : '_componentsMap'][model.__viewId]);\n }, ecIns);\n function callView(view) {\n view && view.__alive && view[method] && view[method](view.__model, ecModel, ecIns._api, payload);\n }\n };\n updateMethods = {\n prepareAndUpdate: function (payload) {\n prepare(this);\n updateMethods.update.call(this, payload, {\n // Needs to mark option changed if newOption is given.\n // It's from MagicType.\n // TODO If use a separate flag optionChanged in payload?\n optionChanged: payload.newOption != null\n });\n },\n update: function (payload, updateParams) {\n var ecModel = this._model;\n var api = this._api;\n var zr = this._zr;\n var coordSysMgr = this._coordSysMgr;\n var scheduler = this._scheduler;\n // update before setOption\n if (!ecModel) {\n return;\n }\n ecModel.setUpdatePayload(payload);\n scheduler.restoreData(ecModel, payload);\n scheduler.performSeriesTasks(ecModel);\n // TODO\n // Save total ecModel here for undo/redo (after restoring data and before processing data).\n // Undo (restoration of total ecModel) can be carried out in 'action' or outside API call.\n // Create new coordinate system each update\n // In LineView may save the old coordinate system and use it to get the original point.\n coordSysMgr.create(ecModel, api);\n scheduler.performDataProcessorTasks(ecModel, payload);\n // Current stream render is not supported in data process. So we can update\n // stream modes after data processing, where the filtered data is used to\n // determine whether to use progressive rendering.\n updateStreamModes(this, ecModel);\n // We update stream modes before coordinate system updated, then the modes info\n // can be fetched when coord sys updating (consider the barGrid extent fix). But\n // the drawback is the full coord info can not be fetched. Fortunately this full\n // coord is not required in stream mode updater currently.\n coordSysMgr.update(ecModel, api);\n clearColorPalette(ecModel);\n scheduler.performVisualTasks(ecModel, payload);\n render(this, ecModel, api, payload, updateParams);\n // Set background\n var backgroundColor = ecModel.get('backgroundColor') || 'transparent';\n var darkMode = ecModel.get('darkMode');\n zr.setBackgroundColor(backgroundColor);\n // Force set dark mode.\n if (darkMode != null && darkMode !== 'auto') {\n zr.setDarkMode(darkMode);\n }\n lifecycle.trigger('afterupdate', ecModel, api);\n },\n updateTransform: function (payload) {\n var _this = this;\n var ecModel = this._model;\n var api = this._api;\n // update before setOption\n if (!ecModel) {\n return;\n }\n ecModel.setUpdatePayload(payload);\n // ChartView.markUpdateMethod(payload, 'updateTransform');\n var componentDirtyList = [];\n ecModel.eachComponent(function (componentType, componentModel) {\n if (componentType === 'series') {\n return;\n }\n var componentView = _this.getViewOfComponentModel(componentModel);\n if (componentView && componentView.__alive) {\n if (componentView.updateTransform) {\n var result = componentView.updateTransform(componentModel, ecModel, api, payload);\n result && result.update && componentDirtyList.push(componentView);\n } else {\n componentDirtyList.push(componentView);\n }\n }\n });\n var seriesDirtyMap = createHashMap();\n ecModel.eachSeries(function (seriesModel) {\n var chartView = _this._chartsMap[seriesModel.__viewId];\n if (chartView.updateTransform) {\n var result = chartView.updateTransform(seriesModel, ecModel, api, payload);\n result && result.update && seriesDirtyMap.set(seriesModel.uid, 1);\n } else {\n seriesDirtyMap.set(seriesModel.uid, 1);\n }\n });\n clearColorPalette(ecModel);\n // Keep pipe to the exist pipeline because it depends on the render task of the full pipeline.\n // this._scheduler.performVisualTasks(ecModel, payload, 'layout', true);\n this._scheduler.performVisualTasks(ecModel, payload, {\n setDirty: true,\n dirtyMap: seriesDirtyMap\n });\n // Currently, not call render of components. Geo render cost a lot.\n // renderComponents(ecIns, ecModel, api, payload, componentDirtyList);\n renderSeries(this, ecModel, api, payload, {}, seriesDirtyMap);\n lifecycle.trigger('afterupdate', ecModel, api);\n },\n updateView: function (payload) {\n var ecModel = this._model;\n // update before setOption\n if (!ecModel) {\n return;\n }\n ecModel.setUpdatePayload(payload);\n ChartView.markUpdateMethod(payload, 'updateView');\n clearColorPalette(ecModel);\n // Keep pipe to the exist pipeline because it depends on the render task of the full pipeline.\n this._scheduler.performVisualTasks(ecModel, payload, {\n setDirty: true\n });\n render(this, ecModel, this._api, payload, {});\n lifecycle.trigger('afterupdate', ecModel, this._api);\n },\n updateVisual: function (payload) {\n // updateMethods.update.call(this, payload);\n var _this = this;\n var ecModel = this._model;\n // update before setOption\n if (!ecModel) {\n return;\n }\n ecModel.setUpdatePayload(payload);\n // clear all visual\n ecModel.eachSeries(function (seriesModel) {\n seriesModel.getData().clearAllVisual();\n });\n // Perform visual\n ChartView.markUpdateMethod(payload, 'updateVisual');\n clearColorPalette(ecModel);\n // Keep pipe to the exist pipeline because it depends on the render task of the full pipeline.\n this._scheduler.performVisualTasks(ecModel, payload, {\n visualType: 'visual',\n setDirty: true\n });\n ecModel.eachComponent(function (componentType, componentModel) {\n if (componentType !== 'series') {\n var componentView = _this.getViewOfComponentModel(componentModel);\n componentView && componentView.__alive && componentView.updateVisual(componentModel, ecModel, _this._api, payload);\n }\n });\n ecModel.eachSeries(function (seriesModel) {\n var chartView = _this._chartsMap[seriesModel.__viewId];\n chartView.updateVisual(seriesModel, ecModel, _this._api, payload);\n });\n lifecycle.trigger('afterupdate', ecModel, this._api);\n },\n updateLayout: function (payload) {\n updateMethods.update.call(this, payload);\n }\n };\n doConvertPixel = function (ecIns, methodName, finder, value) {\n if (ecIns._disposed) {\n disposedWarning(ecIns.id);\n return;\n }\n var ecModel = ecIns._model;\n var coordSysList = ecIns._coordSysMgr.getCoordinateSystems();\n var result;\n var parsedFinder = modelUtil.parseFinder(ecModel, finder);\n for (var i = 0; i < coordSysList.length; i++) {\n var coordSys = coordSysList[i];\n if (coordSys[methodName] && (result = coordSys[methodName](ecModel, parsedFinder, value)) != null) {\n return result;\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n warn('No coordinate system that supports ' + methodName + ' found by the given finder.');\n }\n };\n updateStreamModes = function (ecIns, ecModel) {\n var chartsMap = ecIns._chartsMap;\n var scheduler = ecIns._scheduler;\n ecModel.eachSeries(function (seriesModel) {\n scheduler.updateStreamModes(seriesModel, chartsMap[seriesModel.__viewId]);\n });\n };\n doDispatchAction = function (payload, silent) {\n var _this = this;\n var ecModel = this.getModel();\n var payloadType = payload.type;\n var escapeConnect = payload.escapeConnect;\n var actionWrap = actions[payloadType];\n var actionInfo = actionWrap.actionInfo;\n var cptTypeTmp = (actionInfo.update || 'update').split(':');\n var updateMethod = cptTypeTmp.pop();\n var cptType = cptTypeTmp[0] != null && parseClassType(cptTypeTmp[0]);\n this[IN_MAIN_PROCESS_KEY] = true;\n var payloads = [payload];\n var batched = false;\n // Batch action\n if (payload.batch) {\n batched = true;\n payloads = map(payload.batch, function (item) {\n item = defaults(extend({}, item), payload);\n item.batch = null;\n return item;\n });\n }\n var eventObjBatch = [];\n var eventObj;\n var isSelectChange = isSelectChangePayload(payload);\n var isHighDown = isHighDownPayload(payload);\n // Only leave blur once if there are multiple batches.\n if (isHighDown) {\n allLeaveBlur(this._api);\n }\n each(payloads, function (batchItem) {\n // Action can specify the event by return it.\n eventObj = actionWrap.action(batchItem, _this._model, _this._api);\n // Emit event outside\n eventObj = eventObj || extend({}, batchItem);\n // Convert type to eventType\n eventObj.type = actionInfo.event || eventObj.type;\n eventObjBatch.push(eventObj);\n // light update does not perform data process, layout and visual.\n if (isHighDown) {\n var _a = modelUtil.preParseFinder(payload),\n queryOptionMap = _a.queryOptionMap,\n mainTypeSpecified = _a.mainTypeSpecified;\n var componentMainType = mainTypeSpecified ? queryOptionMap.keys()[0] : 'series';\n updateDirectly(_this, updateMethod, batchItem, componentMainType);\n markStatusToUpdate(_this);\n } else if (isSelectChange) {\n // At present `dispatchAction({ type: 'select', ... })` is not supported on components.\n // geo still use 'geoselect'.\n updateDirectly(_this, updateMethod, batchItem, 'series');\n markStatusToUpdate(_this);\n } else if (cptType) {\n updateDirectly(_this, updateMethod, batchItem, cptType.main, cptType.sub);\n }\n });\n if (updateMethod !== 'none' && !isHighDown && !isSelectChange && !cptType) {\n try {\n // Still dirty\n if (this[PENDING_UPDATE]) {\n prepare(this);\n updateMethods.update.call(this, payload);\n this[PENDING_UPDATE] = null;\n } else {\n updateMethods[updateMethod].call(this, payload);\n }\n } catch (e) {\n this[IN_MAIN_PROCESS_KEY] = false;\n throw e;\n }\n }\n // Follow the rule of action batch\n if (batched) {\n eventObj = {\n type: actionInfo.event || payloadType,\n escapeConnect: escapeConnect,\n batch: eventObjBatch\n };\n } else {\n eventObj = eventObjBatch[0];\n }\n this[IN_MAIN_PROCESS_KEY] = false;\n if (!silent) {\n var messageCenter = this._messageCenter;\n messageCenter.trigger(eventObj.type, eventObj);\n // Extra triggered 'selectchanged' event\n if (isSelectChange) {\n var newObj = {\n type: 'selectchanged',\n escapeConnect: escapeConnect,\n selected: getAllSelectedIndices(ecModel),\n isFromClick: payload.isFromClick || false,\n fromAction: payload.type,\n fromActionPayload: payload\n };\n messageCenter.trigger(newObj.type, newObj);\n }\n }\n };\n flushPendingActions = function (silent) {\n var pendingActions = this._pendingActions;\n while (pendingActions.length) {\n var payload = pendingActions.shift();\n doDispatchAction.call(this, payload, silent);\n }\n };\n triggerUpdatedEvent = function (silent) {\n !silent && this.trigger('updated');\n };\n /**\n * Event `rendered` is triggered when zr\n * rendered. It is useful for realtime\n * snapshot (reflect animation).\n *\n * Event `finished` is triggered when:\n * (1) zrender rendering finished.\n * (2) initial animation finished.\n * (3) progressive rendering finished.\n * (4) no pending action.\n * (5) no delayed setOption needs to be processed.\n */\n bindRenderedEvent = function (zr, ecIns) {\n zr.on('rendered', function (params) {\n ecIns.trigger('rendered', params);\n // The `finished` event should not be triggered repeatedly,\n // so it should only be triggered when rendering indeed happens\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n if (\n // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[PENDING_UPDATE] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n };\n bindMouseEvent = function (zr, ecIns) {\n zr.on('mouseover', function (e) {\n var el = e.target;\n var dispatcher = findEventDispatcher(el, isHighDownDispatcher);\n if (dispatcher) {\n handleGlobalMouseOverForHighDown(dispatcher, e, ecIns._api);\n markStatusToUpdate(ecIns);\n }\n }).on('mouseout', function (e) {\n var el = e.target;\n var dispatcher = findEventDispatcher(el, isHighDownDispatcher);\n if (dispatcher) {\n handleGlobalMouseOutForHighDown(dispatcher, e, ecIns._api);\n markStatusToUpdate(ecIns);\n }\n }).on('click', function (e) {\n var el = e.target;\n var dispatcher = findEventDispatcher(el, function (target) {\n return getECData(target).dataIndex != null;\n }, true);\n if (dispatcher) {\n var actionType = dispatcher.selected ? 'unselect' : 'select';\n var ecData = getECData(dispatcher);\n ecIns._api.dispatchAction({\n type: actionType,\n dataType: ecData.dataType,\n dataIndexInside: ecData.dataIndex,\n seriesIndex: ecData.seriesIndex,\n isFromClick: true\n });\n }\n });\n };\n function clearColorPalette(ecModel) {\n ecModel.clearColorPalette();\n ecModel.eachSeries(function (seriesModel) {\n seriesModel.clearColorPalette();\n });\n }\n ;\n // Allocate zlevels for series and components\n function allocateZlevels(ecModel) {\n ;\n var componentZLevels = [];\n var seriesZLevels = [];\n var hasSeparateZLevel = false;\n ecModel.eachComponent(function (componentType, componentModel) {\n var zlevel = componentModel.get('zlevel') || 0;\n var z = componentModel.get('z') || 0;\n var zlevelKey = componentModel.getZLevelKey();\n hasSeparateZLevel = hasSeparateZLevel || !!zlevelKey;\n (componentType === 'series' ? seriesZLevels : componentZLevels).push({\n zlevel: zlevel,\n z: z,\n idx: componentModel.componentIndex,\n type: componentType,\n key: zlevelKey\n });\n });\n if (hasSeparateZLevel) {\n // Series after component\n var zLevels = componentZLevels.concat(seriesZLevels);\n var lastSeriesZLevel_1;\n var lastSeriesKey_1;\n timsort(zLevels, function (a, b) {\n if (a.zlevel === b.zlevel) {\n return a.z - b.z;\n }\n return a.zlevel - b.zlevel;\n });\n each(zLevels, function (item) {\n var componentModel = ecModel.getComponent(item.type, item.idx);\n var zlevel = item.zlevel;\n var key = item.key;\n if (lastSeriesZLevel_1 != null) {\n zlevel = Math.max(lastSeriesZLevel_1, zlevel);\n }\n if (key) {\n if (zlevel === lastSeriesZLevel_1 && key !== lastSeriesKey_1) {\n zlevel++;\n }\n lastSeriesKey_1 = key;\n } else if (lastSeriesKey_1) {\n if (zlevel === lastSeriesZLevel_1) {\n zlevel++;\n }\n lastSeriesKey_1 = '';\n }\n lastSeriesZLevel_1 = zlevel;\n componentModel.setZLevel(zlevel);\n });\n }\n }\n render = function (ecIns, ecModel, api, payload, updateParams) {\n allocateZlevels(ecModel);\n renderComponents(ecIns, ecModel, api, payload, updateParams);\n each(ecIns._chartsViews, function (chart) {\n chart.__alive = false;\n });\n renderSeries(ecIns, ecModel, api, payload, updateParams);\n // Remove groups of unrendered charts\n each(ecIns._chartsViews, function (chart) {\n if (!chart.__alive) {\n chart.remove(ecModel, api);\n }\n });\n };\n renderComponents = function (ecIns, ecModel, api, payload, updateParams, dirtyList) {\n each(dirtyList || ecIns._componentsViews, function (componentView) {\n var componentModel = componentView.__model;\n clearStates(componentModel, componentView);\n componentView.render(componentModel, ecModel, api, payload);\n updateZ(componentModel, componentView);\n updateStates(componentModel, componentView);\n });\n };\n /**\n * Render each chart and component\n */\n renderSeries = function (ecIns, ecModel, api, payload, updateParams, dirtyMap) {\n // Render all charts\n var scheduler = ecIns._scheduler;\n updateParams = extend(updateParams || {}, {\n updatedSeries: ecModel.getSeries()\n });\n // TODO progressive?\n lifecycle.trigger('series:beforeupdate', ecModel, api, updateParams);\n var unfinished = false;\n ecModel.eachSeries(function (seriesModel) {\n var chartView = ecIns._chartsMap[seriesModel.__viewId];\n chartView.__alive = true;\n var renderTask = chartView.renderTask;\n scheduler.updatePayload(renderTask, payload);\n // TODO states on marker.\n clearStates(seriesModel, chartView);\n if (dirtyMap && dirtyMap.get(seriesModel.uid)) {\n renderTask.dirty();\n }\n if (renderTask.perform(scheduler.getPerformArgs(renderTask))) {\n unfinished = true;\n }\n chartView.group.silent = !!seriesModel.get('silent');\n // Should not call markRedraw on group, because it will disable zrender\n // incremental render (always render from the __startIndex each frame)\n // chartView.group.markRedraw();\n updateBlend(seriesModel, chartView);\n updateSeriesElementSelection(seriesModel);\n });\n scheduler.unfinished = unfinished || scheduler.unfinished;\n lifecycle.trigger('series:layoutlabels', ecModel, api, updateParams);\n // transition after label is layouted.\n lifecycle.trigger('series:transition', ecModel, api, updateParams);\n ecModel.eachSeries(function (seriesModel) {\n var chartView = ecIns._chartsMap[seriesModel.__viewId];\n // Update Z after labels updated. Before applying states.\n updateZ(seriesModel, chartView);\n // NOTE: Update states after label is updated.\n // label should be in normal status when layouting.\n updateStates(seriesModel, chartView);\n });\n // If use hover layer\n updateHoverLayerStatus(ecIns, ecModel);\n lifecycle.trigger('series:afterupdate', ecModel, api, updateParams);\n };\n markStatusToUpdate = function (ecIns) {\n ecIns[STATUS_NEEDS_UPDATE_KEY] = true;\n // Wake up zrender if it's sleep. Let it update states in the next frame.\n ecIns.getZr().wakeUp();\n };\n applyChangedStates = function (ecIns) {\n if (!ecIns[STATUS_NEEDS_UPDATE_KEY]) {\n return;\n }\n ecIns.getZr().storage.traverse(function (el) {\n // Not applied on removed elements, it may still in fading.\n if (graphic.isElementRemoved(el)) {\n return;\n }\n applyElementStates(el);\n });\n ecIns[STATUS_NEEDS_UPDATE_KEY] = false;\n };\n function applyElementStates(el) {\n var newStates = [];\n var oldStates = el.currentStates;\n // Keep other states.\n for (var i = 0; i < oldStates.length; i++) {\n var stateName = oldStates[i];\n if (!(stateName === 'emphasis' || stateName === 'blur' || stateName === 'select')) {\n newStates.push(stateName);\n }\n }\n // Only use states when it's exists.\n if (el.selected && el.states.select) {\n newStates.push('select');\n }\n if (el.hoverState === HOVER_STATE_EMPHASIS && el.states.emphasis) {\n newStates.push('emphasis');\n } else if (el.hoverState === HOVER_STATE_BLUR && el.states.blur) {\n newStates.push('blur');\n }\n el.useStates(newStates);\n }\n function updateHoverLayerStatus(ecIns, ecModel) {\n var zr = ecIns._zr;\n var storage = zr.storage;\n var elCount = 0;\n storage.traverse(function (el) {\n if (!el.isGroup) {\n elCount++;\n }\n });\n if (elCount > ecModel.get('hoverLayerThreshold') && !env.node && !env.worker) {\n ecModel.eachSeries(function (seriesModel) {\n if (seriesModel.preventUsingHoverLayer) {\n return;\n }\n var chartView = ecIns._chartsMap[seriesModel.__viewId];\n if (chartView.__alive) {\n chartView.eachRendered(function (el) {\n if (el.states.emphasis) {\n el.states.emphasis.hoverLayer = true;\n }\n });\n }\n });\n }\n }\n ;\n /**\n * Update chart and blend.\n */\n function updateBlend(seriesModel, chartView) {\n var blendMode = seriesModel.get('blendMode') || null;\n chartView.eachRendered(function (el) {\n // FIXME marker and other components\n if (!el.isGroup) {\n // DON'T mark the element dirty. In case element is incremental and don't want to rerender.\n el.style.blend = blendMode;\n }\n });\n }\n ;\n function updateZ(model, view) {\n if (model.preventAutoZ) {\n return;\n }\n var z = model.get('z') || 0;\n var zlevel = model.get('zlevel') || 0;\n // Set z and zlevel\n view.eachRendered(function (el) {\n doUpdateZ(el, z, zlevel, -Infinity);\n // Don't traverse the children because it has been traversed in _updateZ.\n return true;\n });\n }\n ;\n function doUpdateZ(el, z, zlevel, maxZ2) {\n // Group may also have textContent\n var label = el.getTextContent();\n var labelLine = el.getTextGuideLine();\n var isGroup = el.isGroup;\n if (isGroup) {\n // set z & zlevel of children elements of Group\n var children = el.childrenRef();\n for (var i = 0; i < children.length; i++) {\n maxZ2 = Math.max(doUpdateZ(children[i], z, zlevel, maxZ2), maxZ2);\n }\n } else {\n // not Group\n el.z = z;\n el.zlevel = zlevel;\n maxZ2 = Math.max(el.z2, maxZ2);\n }\n // always set z and zlevel if label/labelLine exists\n if (label) {\n label.z = z;\n label.zlevel = zlevel;\n // lift z2 of text content\n // TODO if el.emphasis.z2 is spcefied, what about textContent.\n isFinite(maxZ2) && (label.z2 = maxZ2 + 2);\n }\n if (labelLine) {\n var textGuideLineConfig = el.textGuideLineConfig;\n labelLine.z = z;\n labelLine.zlevel = zlevel;\n isFinite(maxZ2) && (labelLine.z2 = maxZ2 + (textGuideLineConfig && textGuideLineConfig.showAbove ? 1 : -1));\n }\n return maxZ2;\n }\n // Clear states without animation.\n // TODO States on component.\n function clearStates(model, view) {\n view.eachRendered(function (el) {\n // Not applied on removed elements, it may still in fading.\n if (graphic.isElementRemoved(el)) {\n return;\n }\n var textContent = el.getTextContent();\n var textGuide = el.getTextGuideLine();\n if (el.stateTransition) {\n el.stateTransition = null;\n }\n if (textContent && textContent.stateTransition) {\n textContent.stateTransition = null;\n }\n if (textGuide && textGuide.stateTransition) {\n textGuide.stateTransition = null;\n }\n // TODO If el is incremental.\n if (el.hasState()) {\n el.prevStates = el.currentStates;\n el.clearStates();\n } else if (el.prevStates) {\n el.prevStates = null;\n }\n });\n }\n function updateStates(model, view) {\n var stateAnimationModel = model.getModel('stateAnimation');\n var enableAnimation = model.isAnimationEnabled();\n var duration = stateAnimationModel.get('duration');\n var stateTransition = duration > 0 ? {\n duration: duration,\n delay: stateAnimationModel.get('delay'),\n easing: stateAnimationModel.get('easing')\n // additive: stateAnimationModel.get('additive')\n } : null;\n view.eachRendered(function (el) {\n if (el.states && el.states.emphasis) {\n // Not applied on removed elements, it may still in fading.\n if (graphic.isElementRemoved(el)) {\n return;\n }\n if (el instanceof graphic.Path) {\n savePathStates(el);\n }\n // Only updated on changed element. In case element is incremental and don't want to rerender.\n // TODO, a more proper way?\n if (el.__dirty) {\n var prevStates = el.prevStates;\n // Restore states without animation\n if (prevStates) {\n el.useStates(prevStates);\n }\n }\n // Update state transition and enable animation again.\n if (enableAnimation) {\n el.stateTransition = stateTransition;\n var textContent = el.getTextContent();\n var textGuide = el.getTextGuideLine();\n // TODO Is it necessary to animate label?\n if (textContent) {\n textContent.stateTransition = stateTransition;\n }\n if (textGuide) {\n textGuide.stateTransition = stateTransition;\n }\n }\n // Use highlighted and selected flag to toggle states.\n if (el.__dirty) {\n applyElementStates(el);\n }\n }\n });\n }\n ;\n createExtensionAPI = function (ecIns) {\n return new (/** @class */function (_super) {\n __extends(class_1, _super);\n function class_1() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n class_1.prototype.getCoordinateSystems = function () {\n return ecIns._coordSysMgr.getCoordinateSystems();\n };\n class_1.prototype.getComponentByElement = function (el) {\n while (el) {\n var modelInfo = el.__ecComponentInfo;\n if (modelInfo != null) {\n return ecIns._model.getComponent(modelInfo.mainType, modelInfo.index);\n }\n el = el.parent;\n }\n };\n class_1.prototype.enterEmphasis = function (el, highlightDigit) {\n enterEmphasis(el, highlightDigit);\n markStatusToUpdate(ecIns);\n };\n class_1.prototype.leaveEmphasis = function (el, highlightDigit) {\n leaveEmphasis(el, highlightDigit);\n markStatusToUpdate(ecIns);\n };\n class_1.prototype.enterBlur = function (el) {\n enterBlur(el);\n markStatusToUpdate(ecIns);\n };\n class_1.prototype.leaveBlur = function (el) {\n leaveBlur(el);\n markStatusToUpdate(ecIns);\n };\n class_1.prototype.enterSelect = function (el) {\n enterSelect(el);\n markStatusToUpdate(ecIns);\n };\n class_1.prototype.leaveSelect = function (el) {\n leaveSelect(el);\n markStatusToUpdate(ecIns);\n };\n class_1.prototype.getModel = function () {\n return ecIns.getModel();\n };\n class_1.prototype.getViewOfComponentModel = function (componentModel) {\n return ecIns.getViewOfComponentModel(componentModel);\n };\n class_1.prototype.getViewOfSeriesModel = function (seriesModel) {\n return ecIns.getViewOfSeriesModel(seriesModel);\n };\n return class_1;\n }(ExtensionAPI))(ecIns);\n };\n enableConnect = function (chart) {\n function updateConnectedChartsStatus(charts, status) {\n for (var i = 0; i < charts.length; i++) {\n var otherChart = charts[i];\n otherChart[CONNECT_STATUS_KEY] = status;\n }\n }\n each(eventActionMap, function (actionType, eventType) {\n chart._messageCenter.on(eventType, function (event) {\n if (connectedGroups[chart.group] && chart[CONNECT_STATUS_KEY] !== CONNECT_STATUS_PENDING) {\n if (event && event.escapeConnect) {\n return;\n }\n var action_1 = chart.makeActionFromEvent(event);\n var otherCharts_1 = [];\n each(instances, function (otherChart) {\n if (otherChart !== chart && otherChart.group === chart.group) {\n otherCharts_1.push(otherChart);\n }\n });\n updateConnectedChartsStatus(otherCharts_1, CONNECT_STATUS_PENDING);\n each(otherCharts_1, function (otherChart) {\n if (otherChart[CONNECT_STATUS_KEY] !== CONNECT_STATUS_UPDATING) {\n otherChart.dispatchAction(action_1);\n }\n });\n updateConnectedChartsStatus(otherCharts_1, CONNECT_STATUS_UPDATED);\n }\n });\n });\n };\n }();\n return ECharts;\n}(Eventful);\nvar echartsProto = ECharts.prototype;\nechartsProto.on = createRegisterEventWithLowercaseECharts('on');\nechartsProto.off = createRegisterEventWithLowercaseECharts('off');\n/**\n * @deprecated\n */\n// @ts-ignore\nechartsProto.one = function (eventName, cb, ctx) {\n var self = this;\n deprecateLog('ECharts#one is deprecated.');\n function wrapped() {\n var args2 = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args2[_i] = arguments[_i];\n }\n cb && cb.apply && cb.apply(this, args2);\n // @ts-ignore\n self.off(eventName, wrapped);\n }\n ;\n // @ts-ignore\n this.on.call(this, eventName, wrapped, ctx);\n};\nvar MOUSE_EVENT_NAMES = ['click', 'dblclick', 'mouseover', 'mouseout', 'mousemove', 'mousedown', 'mouseup', 'globalout', 'contextmenu'];\nfunction disposedWarning(id) {\n if (process.env.NODE_ENV !== 'production') {\n warn('Instance ' + id + ' has been disposed');\n }\n}\nvar actions = {};\n/**\n * Map eventType to actionType\n */\nvar eventActionMap = {};\nvar dataProcessorFuncs = [];\nvar optionPreprocessorFuncs = [];\nvar visualFuncs = [];\nvar themeStorage = {};\nvar loadingEffects = {};\nvar instances = {};\nvar connectedGroups = {};\nvar idBase = +new Date() - 0;\nvar groupIdBase = +new Date() - 0;\nvar DOM_ATTRIBUTE_KEY = '_echarts_instance_';\n/**\n * @param opts.devicePixelRatio Use window.devicePixelRatio by default\n * @param opts.renderer Can choose 'canvas' or 'svg' to render the chart.\n * @param opts.width Use clientWidth of the input `dom` by default.\n * Can be 'auto' (the same as null/undefined)\n * @param opts.height Use clientHeight of the input `dom` by default.\n * Can be 'auto' (the same as null/undefined)\n * @param opts.locale Specify the locale.\n * @param opts.useDirtyRect Enable dirty rectangle rendering or not.\n */\nexport function init(dom, theme, opts) {\n var isClient = !(opts && opts.ssr);\n if (isClient) {\n if (process.env.NODE_ENV !== 'production') {\n if (!dom) {\n throw new Error('Initialize failed: invalid dom.');\n }\n }\n var existInstance = getInstanceByDom(dom);\n if (existInstance) {\n if (process.env.NODE_ENV !== 'production') {\n warn('There is a chart instance already initialized on the dom.');\n }\n return existInstance;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (isDom(dom) && dom.nodeName.toUpperCase() !== 'CANVAS' && (!dom.clientWidth && (!opts || opts.width == null) || !dom.clientHeight && (!opts || opts.height == null))) {\n warn('Can\\'t get DOM width or height. Please check ' + 'dom.clientWidth and dom.clientHeight. They should not be 0.' + 'For example, you may need to call this in the callback ' + 'of window.onload.');\n }\n }\n }\n var chart = new ECharts(dom, theme, opts);\n chart.id = 'ec_' + idBase++;\n instances[chart.id] = chart;\n isClient && modelUtil.setAttribute(dom, DOM_ATTRIBUTE_KEY, chart.id);\n enableConnect(chart);\n lifecycle.trigger('afterinit', chart);\n return chart;\n}\n/**\n * @usage\n * (A)\n * ```js\n * let chart1 = echarts.init(dom1);\n * let chart2 = echarts.init(dom2);\n * chart1.group = 'xxx';\n * chart2.group = 'xxx';\n * echarts.connect('xxx');\n * ```\n * (B)\n * ```js\n * let chart1 = echarts.init(dom1);\n * let chart2 = echarts.init(dom2);\n * echarts.connect('xxx', [chart1, chart2]);\n * ```\n */\nexport function connect(groupId) {\n // Is array of charts\n if (isArray(groupId)) {\n var charts = groupId;\n groupId = null;\n // If any chart has group\n each(charts, function (chart) {\n if (chart.group != null) {\n groupId = chart.group;\n }\n });\n groupId = groupId || 'g_' + groupIdBase++;\n each(charts, function (chart) {\n chart.group = groupId;\n });\n }\n connectedGroups[groupId] = true;\n return groupId;\n}\nexport function disconnect(groupId) {\n connectedGroups[groupId] = false;\n}\n/**\n * Alias and backward compatibility\n * @deprecated\n */\nexport var disConnect = disconnect;\n/**\n * Dispose a chart instance\n */\nexport function dispose(chart) {\n if (isString(chart)) {\n chart = instances[chart];\n } else if (!(chart instanceof ECharts)) {\n // Try to treat as dom\n chart = getInstanceByDom(chart);\n }\n if (chart instanceof ECharts && !chart.isDisposed()) {\n chart.dispose();\n }\n}\nexport function getInstanceByDom(dom) {\n return instances[modelUtil.getAttribute(dom, DOM_ATTRIBUTE_KEY)];\n}\nexport function getInstanceById(key) {\n return instances[key];\n}\n/**\n * Register theme\n */\nexport function registerTheme(name, theme) {\n themeStorage[name] = theme;\n}\n/**\n * Register option preprocessor\n */\nexport function registerPreprocessor(preprocessorFunc) {\n if (indexOf(optionPreprocessorFuncs, preprocessorFunc) < 0) {\n optionPreprocessorFuncs.push(preprocessorFunc);\n }\n}\nexport function registerProcessor(priority, processor) {\n normalizeRegister(dataProcessorFuncs, priority, processor, PRIORITY_PROCESSOR_DEFAULT);\n}\n/**\n * Register postIniter\n * @param {Function} postInitFunc\n */\nexport function registerPostInit(postInitFunc) {\n registerUpdateLifecycle('afterinit', postInitFunc);\n}\n/**\n * Register postUpdater\n * @param {Function} postUpdateFunc\n */\nexport function registerPostUpdate(postUpdateFunc) {\n registerUpdateLifecycle('afterupdate', postUpdateFunc);\n}\nexport function registerUpdateLifecycle(name, cb) {\n lifecycle.on(name, cb);\n}\nexport function registerAction(actionInfo, eventName, action) {\n if (isFunction(eventName)) {\n action = eventName;\n eventName = '';\n }\n var actionType = isObject(actionInfo) ? actionInfo.type : [actionInfo, actionInfo = {\n event: eventName\n }][0];\n // Event name is all lowercase\n actionInfo.event = (actionInfo.event || actionType).toLowerCase();\n eventName = actionInfo.event;\n if (eventActionMap[eventName]) {\n // Already registered.\n return;\n }\n // Validate action type and event name.\n assert(ACTION_REG.test(actionType) && ACTION_REG.test(eventName));\n if (!actions[actionType]) {\n actions[actionType] = {\n action: action,\n actionInfo: actionInfo\n };\n }\n eventActionMap[eventName] = actionType;\n}\nexport function registerCoordinateSystem(type, coordSysCreator) {\n CoordinateSystemManager.register(type, coordSysCreator);\n}\n/**\n * Get dimensions of specified coordinate system.\n * @param {string} type\n * @return {Array.}\n */\nexport function getCoordinateSystemDimensions(type) {\n var coordSysCreator = CoordinateSystemManager.get(type);\n if (coordSysCreator) {\n return coordSysCreator.getDimensionsInfo ? coordSysCreator.getDimensionsInfo() : coordSysCreator.dimensions.slice();\n }\n}\nexport { registerLocale } from './locale.js';\nfunction registerLayout(priority, layoutTask) {\n normalizeRegister(visualFuncs, priority, layoutTask, PRIORITY_VISUAL_LAYOUT, 'layout');\n}\nfunction registerVisual(priority, visualTask) {\n normalizeRegister(visualFuncs, priority, visualTask, PRIORITY_VISUAL_CHART, 'visual');\n}\nexport { registerLayout, registerVisual };\nvar registeredTasks = [];\nfunction normalizeRegister(targetList, priority, fn, defaultPriority, visualType) {\n if (isFunction(priority) || isObject(priority)) {\n fn = priority;\n priority = defaultPriority;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (isNaN(priority) || priority == null) {\n throw new Error('Illegal priority');\n }\n // Check duplicate\n each(targetList, function (wrap) {\n assert(wrap.__raw !== fn);\n });\n }\n // Already registered\n if (indexOf(registeredTasks, fn) >= 0) {\n return;\n }\n registeredTasks.push(fn);\n var stageHandler = Scheduler.wrapStageHandler(fn, visualType);\n stageHandler.__prio = priority;\n stageHandler.__raw = fn;\n targetList.push(stageHandler);\n}\nexport function registerLoading(name, loadingFx) {\n loadingEffects[name] = loadingFx;\n}\n/**\n * ZRender need a canvas context to do measureText.\n * But in node environment canvas may be created by node-canvas.\n * So we need to specify how to create a canvas instead of using document.createElement('canvas')\n *\n *\n * @deprecated use setPlatformAPI({ createCanvas }) instead.\n *\n * @example\n * let Canvas = require('canvas');\n * let echarts = require('echarts');\n * echarts.setCanvasCreator(function () {\n * // Small size is enough.\n * return new Canvas(32, 32);\n * });\n */\nexport function setCanvasCreator(creator) {\n if (process.env.NODE_ENV !== 'production') {\n deprecateLog('setCanvasCreator is deprecated. Use setPlatformAPI({ createCanvas }) instead.');\n }\n setPlatformAPI({\n createCanvas: creator\n });\n}\n/**\n * The parameters and usage: see `geoSourceManager.registerMap`.\n * Compatible with previous `echarts.registerMap`.\n */\nexport function registerMap(mapName, geoJson, specialAreas) {\n var registerMap = getImpl('registerMap');\n registerMap && registerMap(mapName, geoJson, specialAreas);\n}\nexport function getMap(mapName) {\n var getMap = getImpl('getMap');\n return getMap && getMap(mapName);\n}\nexport var registerTransform = registerExternalTransform;\n/**\n * Globa dispatchAction to a specified chart instance.\n */\n// export function dispatchAction(payload: { chartId: string } & Payload, opt?: Parameters[1]) {\n// if (!payload || !payload.chartId) {\n// // Must have chartId to find chart\n// return;\n// }\n// const chart = instances[payload.chartId];\n// if (chart) {\n// chart.dispatchAction(payload, opt);\n// }\n// }\n// Builtin global visual\nregisterVisual(PRIORITY_VISUAL_GLOBAL, seriesStyleTask);\nregisterVisual(PRIORITY_VISUAL_CHART_DATA_CUSTOM, dataStyleTask);\nregisterVisual(PRIORITY_VISUAL_CHART_DATA_CUSTOM, dataColorPaletteTask);\nregisterVisual(PRIORITY_VISUAL_GLOBAL, seriesSymbolTask);\nregisterVisual(PRIORITY_VISUAL_CHART_DATA_CUSTOM, dataSymbolTask);\nregisterVisual(PRIORITY_VISUAL_DECAL, decal);\nregisterPreprocessor(backwardCompat);\nregisterProcessor(PRIORITY_PROCESSOR_DATASTACK, dataStack);\nregisterLoading('default', loadingDefault);\n// Default actions\nregisterAction({\n type: HIGHLIGHT_ACTION_TYPE,\n event: HIGHLIGHT_ACTION_TYPE,\n update: HIGHLIGHT_ACTION_TYPE\n}, noop);\nregisterAction({\n type: DOWNPLAY_ACTION_TYPE,\n event: DOWNPLAY_ACTION_TYPE,\n update: DOWNPLAY_ACTION_TYPE\n}, noop);\nregisterAction({\n type: SELECT_ACTION_TYPE,\n event: SELECT_ACTION_TYPE,\n update: SELECT_ACTION_TYPE\n}, noop);\nregisterAction({\n type: UNSELECT_ACTION_TYPE,\n event: UNSELECT_ACTION_TYPE,\n update: UNSELECT_ACTION_TYPE\n}, noop);\nregisterAction({\n type: TOGGLE_SELECT_ACTION_TYPE,\n event: TOGGLE_SELECT_ACTION_TYPE,\n update: TOGGLE_SELECT_ACTION_TYPE\n}, noop);\n// Default theme\nregisterTheme('light', lightTheme);\nregisterTheme('dark', darkTheme);\n// For backward compatibility, where the namespace `dataTool` will\n// be mounted on `echarts` is the extension `dataTool` is imported.\nexport var dataTool = {};","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction dataIndexMapValueLength(valNumOrArrLengthMoreThan2) {\n return valNumOrArrLengthMoreThan2 == null ? 0 : valNumOrArrLengthMoreThan2.length || 1;\n}\nfunction defaultKeyGetter(item) {\n return item;\n}\nvar DataDiffer = /** @class */function () {\n /**\n * @param context Can be visited by this.context in callback.\n */\n function DataDiffer(oldArr, newArr, oldKeyGetter, newKeyGetter, context,\n // By default: 'oneToOne'.\n diffMode) {\n this._old = oldArr;\n this._new = newArr;\n this._oldKeyGetter = oldKeyGetter || defaultKeyGetter;\n this._newKeyGetter = newKeyGetter || defaultKeyGetter;\n // Visible in callback via `this.context`;\n this.context = context;\n this._diffModeMultiple = diffMode === 'multiple';\n }\n /**\n * Callback function when add a data\n */\n DataDiffer.prototype.add = function (func) {\n this._add = func;\n return this;\n };\n /**\n * Callback function when update a data\n */\n DataDiffer.prototype.update = function (func) {\n this._update = func;\n return this;\n };\n /**\n * Callback function when update a data and only work in `cbMode: 'byKey'`.\n */\n DataDiffer.prototype.updateManyToOne = function (func) {\n this._updateManyToOne = func;\n return this;\n };\n /**\n * Callback function when update a data and only work in `cbMode: 'byKey'`.\n */\n DataDiffer.prototype.updateOneToMany = function (func) {\n this._updateOneToMany = func;\n return this;\n };\n /**\n * Callback function when update a data and only work in `cbMode: 'byKey'`.\n */\n DataDiffer.prototype.updateManyToMany = function (func) {\n this._updateManyToMany = func;\n return this;\n };\n /**\n * Callback function when remove a data\n */\n DataDiffer.prototype.remove = function (func) {\n this._remove = func;\n return this;\n };\n DataDiffer.prototype.execute = function () {\n this[this._diffModeMultiple ? '_executeMultiple' : '_executeOneToOne']();\n };\n DataDiffer.prototype._executeOneToOne = function () {\n var oldArr = this._old;\n var newArr = this._new;\n var newDataIndexMap = {};\n var oldDataKeyArr = new Array(oldArr.length);\n var newDataKeyArr = new Array(newArr.length);\n this._initIndexMap(oldArr, null, oldDataKeyArr, '_oldKeyGetter');\n this._initIndexMap(newArr, newDataIndexMap, newDataKeyArr, '_newKeyGetter');\n for (var i = 0; i < oldArr.length; i++) {\n var oldKey = oldDataKeyArr[i];\n var newIdxMapVal = newDataIndexMap[oldKey];\n var newIdxMapValLen = dataIndexMapValueLength(newIdxMapVal);\n // idx can never be empty array here. see 'set null' logic below.\n if (newIdxMapValLen > 1) {\n // Consider there is duplicate key (for example, use dataItem.name as key).\n // We should make sure every item in newArr and oldArr can be visited.\n var newIdx = newIdxMapVal.shift();\n if (newIdxMapVal.length === 1) {\n newDataIndexMap[oldKey] = newIdxMapVal[0];\n }\n this._update && this._update(newIdx, i);\n } else if (newIdxMapValLen === 1) {\n newDataIndexMap[oldKey] = null;\n this._update && this._update(newIdxMapVal, i);\n } else {\n this._remove && this._remove(i);\n }\n }\n this._performRestAdd(newDataKeyArr, newDataIndexMap);\n };\n /**\n * For example, consider the case:\n * oldData: [o0, o1, o2, o3, o4, o5, o6, o7],\n * newData: [n0, n1, n2, n3, n4, n5, n6, n7, n8],\n * Where:\n * o0, o1, n0 has key 'a' (many to one)\n * o5, n4, n5, n6 has key 'b' (one to many)\n * o2, n1 has key 'c' (one to one)\n * n2, n3 has key 'd' (add)\n * o3, o4 has key 'e' (remove)\n * o6, o7, n7, n8 has key 'f' (many to many, treated as add and remove)\n * Then:\n * (The order of the following directives are not ensured.)\n * this._updateManyToOne(n0, [o0, o1]);\n * this._updateOneToMany([n4, n5, n6], o5);\n * this._update(n1, o2);\n * this._remove(o3);\n * this._remove(o4);\n * this._remove(o6);\n * this._remove(o7);\n * this._add(n2);\n * this._add(n3);\n * this._add(n7);\n * this._add(n8);\n */\n DataDiffer.prototype._executeMultiple = function () {\n var oldArr = this._old;\n var newArr = this._new;\n var oldDataIndexMap = {};\n var newDataIndexMap = {};\n var oldDataKeyArr = [];\n var newDataKeyArr = [];\n this._initIndexMap(oldArr, oldDataIndexMap, oldDataKeyArr, '_oldKeyGetter');\n this._initIndexMap(newArr, newDataIndexMap, newDataKeyArr, '_newKeyGetter');\n for (var i = 0; i < oldDataKeyArr.length; i++) {\n var oldKey = oldDataKeyArr[i];\n var oldIdxMapVal = oldDataIndexMap[oldKey];\n var newIdxMapVal = newDataIndexMap[oldKey];\n var oldIdxMapValLen = dataIndexMapValueLength(oldIdxMapVal);\n var newIdxMapValLen = dataIndexMapValueLength(newIdxMapVal);\n if (oldIdxMapValLen > 1 && newIdxMapValLen === 1) {\n this._updateManyToOne && this._updateManyToOne(newIdxMapVal, oldIdxMapVal);\n newDataIndexMap[oldKey] = null;\n } else if (oldIdxMapValLen === 1 && newIdxMapValLen > 1) {\n this._updateOneToMany && this._updateOneToMany(newIdxMapVal, oldIdxMapVal);\n newDataIndexMap[oldKey] = null;\n } else if (oldIdxMapValLen === 1 && newIdxMapValLen === 1) {\n this._update && this._update(newIdxMapVal, oldIdxMapVal);\n newDataIndexMap[oldKey] = null;\n } else if (oldIdxMapValLen > 1 && newIdxMapValLen > 1) {\n this._updateManyToMany && this._updateManyToMany(newIdxMapVal, oldIdxMapVal);\n newDataIndexMap[oldKey] = null;\n } else if (oldIdxMapValLen > 1) {\n for (var i_1 = 0; i_1 < oldIdxMapValLen; i_1++) {\n this._remove && this._remove(oldIdxMapVal[i_1]);\n }\n } else {\n this._remove && this._remove(oldIdxMapVal);\n }\n }\n this._performRestAdd(newDataKeyArr, newDataIndexMap);\n };\n DataDiffer.prototype._performRestAdd = function (newDataKeyArr, newDataIndexMap) {\n for (var i = 0; i < newDataKeyArr.length; i++) {\n var newKey = newDataKeyArr[i];\n var newIdxMapVal = newDataIndexMap[newKey];\n var idxMapValLen = dataIndexMapValueLength(newIdxMapVal);\n if (idxMapValLen > 1) {\n for (var j = 0; j < idxMapValLen; j++) {\n this._add && this._add(newIdxMapVal[j]);\n }\n } else if (idxMapValLen === 1) {\n this._add && this._add(newIdxMapVal);\n }\n // Support both `newDataKeyArr` are duplication removed or not removed.\n newDataIndexMap[newKey] = null;\n }\n };\n DataDiffer.prototype._initIndexMap = function (arr,\n // Can be null.\n map,\n // In 'byKey', the output `keyArr` is duplication removed.\n // In 'byIndex', the output `keyArr` is not duplication removed and\n // its indices are accurately corresponding to `arr`.\n keyArr, keyGetterName) {\n var cbModeMultiple = this._diffModeMultiple;\n for (var i = 0; i < arr.length; i++) {\n // Add prefix to avoid conflict with Object.prototype.\n var key = '_ec_' + this[keyGetterName](arr[i], i);\n if (!cbModeMultiple) {\n keyArr[i] = key;\n }\n if (!map) {\n continue;\n }\n var idxMapVal = map[key];\n var idxMapValLen = dataIndexMapValueLength(idxMapVal);\n if (idxMapValLen === 0) {\n // Simple optimize: in most cases, one index has one key,\n // do not need array.\n map[key] = i;\n if (cbModeMultiple) {\n keyArr.push(key);\n }\n } else if (idxMapValLen === 1) {\n map[key] = [idxMapVal, i];\n } else {\n idxMapVal.push(i);\n }\n }\n };\n return DataDiffer;\n}();\nexport default DataDiffer;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { each, createHashMap, assert, map } from 'zrender/lib/core/util.js';\nimport { VISUAL_DIMENSIONS } from '../../util/types.js';\nvar DimensionUserOuput = /** @class */function () {\n function DimensionUserOuput(encode, dimRequest) {\n this._encode = encode;\n this._schema = dimRequest;\n }\n DimensionUserOuput.prototype.get = function () {\n return {\n // Do not generate full dimension name until fist used.\n fullDimensions: this._getFullDimensionNames(),\n encode: this._encode\n };\n };\n /**\n * Get all data store dimension names.\n * Theoretically a series data store is defined both by series and used dataset (if any).\n * If some dimensions are omitted for performance reason in `this.dimensions`,\n * the dimension name may not be auto-generated if user does not specify a dimension name.\n * In this case, the dimension name is `null`/`undefined`.\n */\n DimensionUserOuput.prototype._getFullDimensionNames = function () {\n if (!this._cachedDimNames) {\n this._cachedDimNames = this._schema ? this._schema.makeOutputDimensionNames() : [];\n }\n return this._cachedDimNames;\n };\n return DimensionUserOuput;\n}();\n;\nexport function summarizeDimensions(data, schema) {\n var summary = {};\n var encode = summary.encode = {};\n var notExtraCoordDimMap = createHashMap();\n var defaultedLabel = [];\n var defaultedTooltip = [];\n var userOutputEncode = {};\n each(data.dimensions, function (dimName) {\n var dimItem = data.getDimensionInfo(dimName);\n var coordDim = dimItem.coordDim;\n if (coordDim) {\n if (process.env.NODE_ENV !== 'production') {\n assert(VISUAL_DIMENSIONS.get(coordDim) == null);\n }\n var coordDimIndex = dimItem.coordDimIndex;\n getOrCreateEncodeArr(encode, coordDim)[coordDimIndex] = dimName;\n if (!dimItem.isExtraCoord) {\n notExtraCoordDimMap.set(coordDim, 1);\n // Use the last coord dim (and label friendly) as default label,\n // because when dataset is used, it is hard to guess which dimension\n // can be value dimension. If both show x, y on label is not look good,\n // and conventionally y axis is focused more.\n if (mayLabelDimType(dimItem.type)) {\n defaultedLabel[0] = dimName;\n }\n // User output encode do not contain generated coords.\n // And it only has index. User can use index to retrieve value from the raw item array.\n getOrCreateEncodeArr(userOutputEncode, coordDim)[coordDimIndex] = data.getDimensionIndex(dimItem.name);\n }\n if (dimItem.defaultTooltip) {\n defaultedTooltip.push(dimName);\n }\n }\n VISUAL_DIMENSIONS.each(function (v, otherDim) {\n var encodeArr = getOrCreateEncodeArr(encode, otherDim);\n var dimIndex = dimItem.otherDims[otherDim];\n if (dimIndex != null && dimIndex !== false) {\n encodeArr[dimIndex] = dimItem.name;\n }\n });\n });\n var dataDimsOnCoord = [];\n var encodeFirstDimNotExtra = {};\n notExtraCoordDimMap.each(function (v, coordDim) {\n var dimArr = encode[coordDim];\n encodeFirstDimNotExtra[coordDim] = dimArr[0];\n // Not necessary to remove duplicate, because a data\n // dim canot on more than one coordDim.\n dataDimsOnCoord = dataDimsOnCoord.concat(dimArr);\n });\n summary.dataDimsOnCoord = dataDimsOnCoord;\n summary.dataDimIndicesOnCoord = map(dataDimsOnCoord, function (dimName) {\n return data.getDimensionInfo(dimName).storeDimIndex;\n });\n summary.encodeFirstDimNotExtra = encodeFirstDimNotExtra;\n var encodeLabel = encode.label;\n // FIXME `encode.label` is not recommended, because formatter cannot be set\n // in this way. Use label.formatter instead. Maybe remove this approach someday.\n if (encodeLabel && encodeLabel.length) {\n defaultedLabel = encodeLabel.slice();\n }\n var encodeTooltip = encode.tooltip;\n if (encodeTooltip && encodeTooltip.length) {\n defaultedTooltip = encodeTooltip.slice();\n } else if (!defaultedTooltip.length) {\n defaultedTooltip = defaultedLabel.slice();\n }\n encode.defaultedLabel = defaultedLabel;\n encode.defaultedTooltip = defaultedTooltip;\n summary.userOutput = new DimensionUserOuput(userOutputEncode, schema);\n return summary;\n}\nfunction getOrCreateEncodeArr(encode, dim) {\n if (!encode.hasOwnProperty(dim)) {\n encode[dim] = [];\n }\n return encode[dim];\n}\n// FIXME:TS should be type `AxisType`\nexport function getDimensionTypeByAxis(axisType) {\n return axisType === 'category' ? 'ordinal' : axisType === 'time' ? 'time' : 'float';\n}\nfunction mayLabelDimType(dimType) {\n // In most cases, ordinal and time do not suitable for label.\n // Ordinal info can be displayed on axis. Time is too long.\n return !(dimType === 'ordinal' || dimType === 'time');\n}\n// function findTheLastDimMayLabel(data) {\n// // Get last value dim\n// let dimensions = data.dimensions.slice();\n// let valueType;\n// let valueDim;\n// while (dimensions.length && (\n// valueDim = dimensions.pop(),\n// valueType = data.getDimensionInfo(valueDim).type,\n// valueType === 'ordinal' || valueType === 'time'\n// )) {} // jshint ignore:line\n// return valueDim;\n// }","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nvar SeriesDimensionDefine = /** @class */function () {\n /**\n * @param opt All of the fields will be shallow copied.\n */\n function SeriesDimensionDefine(opt) {\n /**\n * The format of `otherDims` is:\n * ```js\n * {\n * tooltip?: number\n * label?: number\n * itemName?: number\n * seriesName?: number\n * }\n * ```\n *\n * A `series.encode` can specified these fields:\n * ```js\n * encode: {\n * // \"3, 1, 5\" is the index of data dimension.\n * tooltip: [3, 1, 5],\n * label: [0, 3],\n * ...\n * }\n * ```\n * `otherDims` is the parse result of the `series.encode` above, like:\n * ```js\n * // Suppose the index of this data dimension is `3`.\n * this.otherDims = {\n * // `3` is at the index `0` of the `encode.tooltip`\n * tooltip: 0,\n * // `3` is at the index `1` of the `encode.label`\n * label: 1\n * };\n * ```\n *\n * This prop should never be `null`/`undefined` after initialized.\n */\n this.otherDims = {};\n if (opt != null) {\n zrUtil.extend(this, opt);\n }\n }\n return SeriesDimensionDefine;\n}();\n;\nexport default SeriesDimensionDefine;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { createHashMap, isObject, retrieve2 } from 'zrender/lib/core/util.js';\nimport { makeInner } from '../../util/model.js';\nimport { shouldRetrieveDataByName } from '../Source.js';\nvar inner = makeInner();\nvar dimTypeShort = {\n float: 'f',\n int: 'i',\n ordinal: 'o',\n number: 'n',\n time: 't'\n};\n/**\n * Represents the dimension requirement of a series.\n *\n * NOTICE:\n * When there are too many dimensions in dataset and many series, only the used dimensions\n * (i.e., used by coord sys and declared in `series.encode`) are add to `dimensionDefineList`.\n * But users may query data by other unused dimension names.\n * In this case, users can only query data if and only if they have defined dimension names\n * via ec option, so we provide `getDimensionIndexFromSource`, which only query them from\n * `source` dimensions.\n */\nvar SeriesDataSchema = /** @class */function () {\n function SeriesDataSchema(opt) {\n this.dimensions = opt.dimensions;\n this._dimOmitted = opt.dimensionOmitted;\n this.source = opt.source;\n this._fullDimCount = opt.fullDimensionCount;\n this._updateDimOmitted(opt.dimensionOmitted);\n }\n SeriesDataSchema.prototype.isDimensionOmitted = function () {\n return this._dimOmitted;\n };\n SeriesDataSchema.prototype._updateDimOmitted = function (dimensionOmitted) {\n this._dimOmitted = dimensionOmitted;\n if (!dimensionOmitted) {\n return;\n }\n if (!this._dimNameMap) {\n this._dimNameMap = ensureSourceDimNameMap(this.source);\n }\n };\n /**\n * @caution Can only be used when `dimensionOmitted: true`.\n *\n * Get index by user defined dimension name (i.e., not internal generate name).\n * That is, get index from `dimensionsDefine`.\n * If no `dimensionsDefine`, or no name get, return -1.\n */\n SeriesDataSchema.prototype.getSourceDimensionIndex = function (dimName) {\n return retrieve2(this._dimNameMap.get(dimName), -1);\n };\n /**\n * @caution Can only be used when `dimensionOmitted: true`.\n *\n * Notice: may return `null`/`undefined` if user not specify dimension names.\n */\n SeriesDataSchema.prototype.getSourceDimension = function (dimIndex) {\n var dimensionsDefine = this.source.dimensionsDefine;\n if (dimensionsDefine) {\n return dimensionsDefine[dimIndex];\n }\n };\n SeriesDataSchema.prototype.makeStoreSchema = function () {\n var dimCount = this._fullDimCount;\n var willRetrieveDataByName = shouldRetrieveDataByName(this.source);\n var makeHashStrict = !shouldOmitUnusedDimensions(dimCount);\n // If source don't have dimensions or series don't omit unsed dimensions.\n // Generate from seriesDimList directly\n var dimHash = '';\n var dims = [];\n for (var fullDimIdx = 0, seriesDimIdx = 0; fullDimIdx < dimCount; fullDimIdx++) {\n var property = void 0;\n var type = void 0;\n var ordinalMeta = void 0;\n var seriesDimDef = this.dimensions[seriesDimIdx];\n // The list has been sorted by `storeDimIndex` asc.\n if (seriesDimDef && seriesDimDef.storeDimIndex === fullDimIdx) {\n property = willRetrieveDataByName ? seriesDimDef.name : null;\n type = seriesDimDef.type;\n ordinalMeta = seriesDimDef.ordinalMeta;\n seriesDimIdx++;\n } else {\n var sourceDimDef = this.getSourceDimension(fullDimIdx);\n if (sourceDimDef) {\n property = willRetrieveDataByName ? sourceDimDef.name : null;\n type = sourceDimDef.type;\n }\n }\n dims.push({\n property: property,\n type: type,\n ordinalMeta: ordinalMeta\n });\n // If retrieving data by index,\n // use to determine whether data can be shared.\n // (Because in this case there might be no dimension name defined in dataset, but indices always exists).\n // (Indices are always 0, 1, 2, ..., so we can ignore them to shorten the hash).\n // Otherwise if retrieving data by property name (like `data: [{aa: 123, bb: 765}, ...]`),\n // use in hash.\n if (willRetrieveDataByName && property != null\n // For data stack, we have make sure each series has its own dim on this store.\n // So we do not add property to hash to make sure they can share this store.\n && (!seriesDimDef || !seriesDimDef.isCalculationCoord)) {\n dimHash += makeHashStrict\n // Use escape character '`' in case that property name contains '$'.\n ? property.replace(/\\`/g, '`1').replace(/\\$/g, '`2')\n // For better performance, when there are large dimensions, tolerant this defects that hardly meet.\n : property;\n }\n dimHash += '$';\n dimHash += dimTypeShort[type] || 'f';\n if (ordinalMeta) {\n dimHash += ordinalMeta.uid;\n }\n dimHash += '$';\n }\n // Source from endpoint(usually series) will be read differently\n // when seriesLayoutBy or startIndex(which is affected by sourceHeader) are different.\n // So we use this three props as key.\n var source = this.source;\n var hash = [source.seriesLayoutBy, source.startIndex, dimHash].join('$$');\n return {\n dimensions: dims,\n hash: hash\n };\n };\n SeriesDataSchema.prototype.makeOutputDimensionNames = function () {\n var result = [];\n for (var fullDimIdx = 0, seriesDimIdx = 0; fullDimIdx < this._fullDimCount; fullDimIdx++) {\n var name_1 = void 0;\n var seriesDimDef = this.dimensions[seriesDimIdx];\n // The list has been sorted by `storeDimIndex` asc.\n if (seriesDimDef && seriesDimDef.storeDimIndex === fullDimIdx) {\n if (!seriesDimDef.isCalculationCoord) {\n name_1 = seriesDimDef.name;\n }\n seriesDimIdx++;\n } else {\n var sourceDimDef = this.getSourceDimension(fullDimIdx);\n if (sourceDimDef) {\n name_1 = sourceDimDef.name;\n }\n }\n result.push(name_1);\n }\n return result;\n };\n SeriesDataSchema.prototype.appendCalculationDimension = function (dimDef) {\n this.dimensions.push(dimDef);\n dimDef.isCalculationCoord = true;\n this._fullDimCount++;\n // If append dimension on a data store, consider the store\n // might be shared by different series, series dimensions not\n // really map to store dimensions.\n this._updateDimOmitted(true);\n };\n return SeriesDataSchema;\n}();\nexport { SeriesDataSchema };\nexport function isSeriesDataSchema(schema) {\n return schema instanceof SeriesDataSchema;\n}\nexport function createDimNameMap(dimsDef) {\n var dataDimNameMap = createHashMap();\n for (var i = 0; i < (dimsDef || []).length; i++) {\n var dimDefItemRaw = dimsDef[i];\n var userDimName = isObject(dimDefItemRaw) ? dimDefItemRaw.name : dimDefItemRaw;\n if (userDimName != null && dataDimNameMap.get(userDimName) == null) {\n dataDimNameMap.set(userDimName, i);\n }\n }\n return dataDimNameMap;\n}\nexport function ensureSourceDimNameMap(source) {\n var innerSource = inner(source);\n return innerSource.dimNameMap || (innerSource.dimNameMap = createDimNameMap(source.dimensionsDefine));\n}\nexport function shouldOmitUnusedDimensions(dimCount) {\n return dimCount > 30;\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/* global Int32Array */\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport Model from '../model/Model.js';\nimport DataDiffer from './DataDiffer.js';\nimport { DefaultDataProvider } from './helper/dataProvider.js';\nimport { summarizeDimensions } from './helper/dimensionHelper.js';\nimport SeriesDimensionDefine from './SeriesDimensionDefine.js';\nimport { SOURCE_FORMAT_TYPED_ARRAY, SOURCE_FORMAT_ORIGINAL } from '../util/types.js';\nimport { convertOptionIdName, isDataItemOption } from '../util/model.js';\nimport { setCommonECData } from '../util/innerStore.js';\nimport { isSourceInstance } from './Source.js';\nimport DataStore from './DataStore.js';\nimport { isSeriesDataSchema } from './helper/SeriesDataSchema.js';\nvar isObject = zrUtil.isObject;\nvar map = zrUtil.map;\nvar CtorInt32Array = typeof Int32Array === 'undefined' ? Array : Int32Array;\n// Use prefix to avoid index to be the same as otherIdList[idx],\n// which will cause weird update animation.\nvar ID_PREFIX = 'e\\0\\0';\nvar INDEX_NOT_FOUND = -1;\n// type SeriesDimensionIndex = DimensionIndex;\nvar TRANSFERABLE_PROPERTIES = ['hasItemOption', '_nameList', '_idList', '_invertedIndicesMap', '_dimSummary', 'userOutput', '_rawData', '_dimValueGetter', '_nameDimIdx', '_idDimIdx', '_nameRepeatCount'];\nvar CLONE_PROPERTIES = ['_approximateExtent'];\n// -----------------------------\n// Internal method declarations:\n// -----------------------------\nvar prepareInvertedIndex;\nvar getId;\nvar getIdNameFromStore;\nvar normalizeDimensions;\nvar transferProperties;\nvar cloneListForMapAndSample;\nvar makeIdFromName;\nvar SeriesData = /** @class */function () {\n /**\n * @param dimensionsInput.dimensions\n * For example, ['someDimName', {name: 'someDimName', type: 'someDimType'}, ...].\n * Dimensions should be concrete names like x, y, z, lng, lat, angle, radius\n */\n function SeriesData(dimensionsInput, hostModel) {\n this.type = 'list';\n this._dimOmitted = false;\n this._nameList = [];\n this._idList = [];\n // Models of data option is stored sparse for optimizing memory cost\n // Never used yet (not used yet).\n // private _optionModels: Model[] = [];\n // Global visual properties after visual coding\n this._visual = {};\n // Global layout properties.\n this._layout = {};\n // Item visual properties after visual coding\n this._itemVisuals = [];\n // Item layout properties after layout\n this._itemLayouts = [];\n // Graphic elements\n this._graphicEls = [];\n // key: dim, value: extent\n this._approximateExtent = {};\n this._calculationInfo = {};\n // Having detected that there is data item is non primitive type\n // (in type `OptionDataItemObject`).\n // Like `data: [ { value: xx, itemStyle: {...} }, ...]`\n // At present it only happen in `SOURCE_FORMAT_ORIGINAL`.\n this.hasItemOption = false;\n // Methods that create a new list based on this list should be listed here.\n // Notice that those method should `RETURN` the new list.\n this.TRANSFERABLE_METHODS = ['cloneShallow', 'downSample', 'lttbDownSample', 'map'];\n // Methods that change indices of this list should be listed here.\n this.CHANGABLE_METHODS = ['filterSelf', 'selectRange'];\n this.DOWNSAMPLE_METHODS = ['downSample', 'lttbDownSample'];\n var dimensions;\n var assignStoreDimIdx = false;\n if (isSeriesDataSchema(dimensionsInput)) {\n dimensions = dimensionsInput.dimensions;\n this._dimOmitted = dimensionsInput.isDimensionOmitted();\n this._schema = dimensionsInput;\n } else {\n assignStoreDimIdx = true;\n dimensions = dimensionsInput;\n }\n dimensions = dimensions || ['x', 'y'];\n var dimensionInfos = {};\n var dimensionNames = [];\n var invertedIndicesMap = {};\n var needsHasOwn = false;\n var emptyObj = {};\n for (var i = 0; i < dimensions.length; i++) {\n // Use the original dimensions[i], where other flag props may exists.\n var dimInfoInput = dimensions[i];\n var dimensionInfo = zrUtil.isString(dimInfoInput) ? new SeriesDimensionDefine({\n name: dimInfoInput\n }) : !(dimInfoInput instanceof SeriesDimensionDefine) ? new SeriesDimensionDefine(dimInfoInput) : dimInfoInput;\n var dimensionName = dimensionInfo.name;\n dimensionInfo.type = dimensionInfo.type || 'float';\n if (!dimensionInfo.coordDim) {\n dimensionInfo.coordDim = dimensionName;\n dimensionInfo.coordDimIndex = 0;\n }\n var otherDims = dimensionInfo.otherDims = dimensionInfo.otherDims || {};\n dimensionNames.push(dimensionName);\n dimensionInfos[dimensionName] = dimensionInfo;\n if (emptyObj[dimensionName] != null) {\n needsHasOwn = true;\n }\n if (dimensionInfo.createInvertedIndices) {\n invertedIndicesMap[dimensionName] = [];\n }\n if (otherDims.itemName === 0) {\n this._nameDimIdx = i;\n }\n if (otherDims.itemId === 0) {\n this._idDimIdx = i;\n }\n if (process.env.NODE_ENV !== 'production') {\n zrUtil.assert(assignStoreDimIdx || dimensionInfo.storeDimIndex >= 0);\n }\n if (assignStoreDimIdx) {\n dimensionInfo.storeDimIndex = i;\n }\n }\n this.dimensions = dimensionNames;\n this._dimInfos = dimensionInfos;\n this._initGetDimensionInfo(needsHasOwn);\n this.hostModel = hostModel;\n this._invertedIndicesMap = invertedIndicesMap;\n if (this._dimOmitted) {\n var dimIdxToName_1 = this._dimIdxToName = zrUtil.createHashMap();\n zrUtil.each(dimensionNames, function (dimName) {\n dimIdxToName_1.set(dimensionInfos[dimName].storeDimIndex, dimName);\n });\n }\n }\n /**\n *\n * Get concrete dimension name by dimension name or dimension index.\n * If input a dimension name, do not validate whether the dimension name exits.\n *\n * @caution\n * @param dim Must make sure the dimension is `SeriesDimensionLoose`.\n * Because only those dimensions will have auto-generated dimension names if not\n * have a user-specified name, and other dimensions will get a return of null/undefined.\n *\n * @notice Because of this reason, should better use `getDimensionIndex` instead, for examples:\n * ```js\n * const val = data.getStore().get(data.getDimensionIndex(dim), dataIdx);\n * ```\n *\n * @return Concrete dim name.\n */\n SeriesData.prototype.getDimension = function (dim) {\n var dimIdx = this._recognizeDimIndex(dim);\n if (dimIdx == null) {\n return dim;\n }\n dimIdx = dim;\n if (!this._dimOmitted) {\n return this.dimensions[dimIdx];\n }\n // Retrieve from series dimension definition because it probably contains\n // generated dimension name (like 'x', 'y').\n var dimName = this._dimIdxToName.get(dimIdx);\n if (dimName != null) {\n return dimName;\n }\n var sourceDimDef = this._schema.getSourceDimension(dimIdx);\n if (sourceDimDef) {\n return sourceDimDef.name;\n }\n };\n /**\n * Get dimension index in data store. Return -1 if not found.\n * Can be used to index value from getRawValue.\n */\n SeriesData.prototype.getDimensionIndex = function (dim) {\n var dimIdx = this._recognizeDimIndex(dim);\n if (dimIdx != null) {\n return dimIdx;\n }\n if (dim == null) {\n return -1;\n }\n var dimInfo = this._getDimInfo(dim);\n return dimInfo ? dimInfo.storeDimIndex : this._dimOmitted ? this._schema.getSourceDimensionIndex(dim) : -1;\n };\n /**\n * The meanings of the input parameter `dim`:\n *\n * + If dim is a number (e.g., `1`), it means the index of the dimension.\n * For example, `getDimension(0)` will return 'x' or 'lng' or 'radius'.\n * + If dim is a number-like string (e.g., `\"1\"`):\n * + If there is the same concrete dim name defined in `series.dimensions` or `dataset.dimensions`,\n * it means that concrete name.\n * + If not, it will be converted to a number, which means the index of the dimension.\n * (why? because of the backward compatibility. We have been tolerating number-like string in\n * dimension setting, although now it seems that it is not a good idea.)\n * For example, `visualMap[i].dimension: \"1\"` is the same meaning as `visualMap[i].dimension: 1`,\n * if no dimension name is defined as `\"1\"`.\n * + If dim is a not-number-like string, it means the concrete dim name.\n * For example, it can be be default name `\"x\"`, `\"y\"`, `\"z\"`, `\"lng\"`, `\"lat\"`, `\"angle\"`, `\"radius\"`,\n * or customized in `dimensions` property of option like `\"age\"`.\n *\n * @return recognized `DimensionIndex`. Otherwise return null/undefined (means that dim is `DimensionName`).\n */\n SeriesData.prototype._recognizeDimIndex = function (dim) {\n if (zrUtil.isNumber(dim)\n // If being a number-like string but not being defined as a dimension name.\n || dim != null && !isNaN(dim) && !this._getDimInfo(dim) && (!this._dimOmitted || this._schema.getSourceDimensionIndex(dim) < 0)) {\n return +dim;\n }\n };\n SeriesData.prototype._getStoreDimIndex = function (dim) {\n var dimIdx = this.getDimensionIndex(dim);\n if (process.env.NODE_ENV !== 'production') {\n if (dimIdx == null) {\n throw new Error('Unknown dimension ' + dim);\n }\n }\n return dimIdx;\n };\n /**\n * Get type and calculation info of particular dimension\n * @param dim\n * Dimension can be concrete names like x, y, z, lng, lat, angle, radius\n * Or a ordinal number. For example getDimensionInfo(0) will return 'x' or 'lng' or 'radius'\n */\n SeriesData.prototype.getDimensionInfo = function (dim) {\n // Do not clone, because there may be categories in dimInfo.\n return this._getDimInfo(this.getDimension(dim));\n };\n SeriesData.prototype._initGetDimensionInfo = function (needsHasOwn) {\n var dimensionInfos = this._dimInfos;\n this._getDimInfo = needsHasOwn ? function (dimName) {\n return dimensionInfos.hasOwnProperty(dimName) ? dimensionInfos[dimName] : undefined;\n } : function (dimName) {\n return dimensionInfos[dimName];\n };\n };\n /**\n * concrete dimension name list on coord.\n */\n SeriesData.prototype.getDimensionsOnCoord = function () {\n return this._dimSummary.dataDimsOnCoord.slice();\n };\n SeriesData.prototype.mapDimension = function (coordDim, idx) {\n var dimensionsSummary = this._dimSummary;\n if (idx == null) {\n return dimensionsSummary.encodeFirstDimNotExtra[coordDim];\n }\n var dims = dimensionsSummary.encode[coordDim];\n return dims ? dims[idx] : null;\n };\n SeriesData.prototype.mapDimensionsAll = function (coordDim) {\n var dimensionsSummary = this._dimSummary;\n var dims = dimensionsSummary.encode[coordDim];\n return (dims || []).slice();\n };\n SeriesData.prototype.getStore = function () {\n return this._store;\n };\n /**\n * Initialize from data\n * @param data source or data or data store.\n * @param nameList The name of a datum is used on data diff and\n * default label/tooltip.\n * A name can be specified in encode.itemName,\n * or dataItem.name (only for series option data),\n * or provided in nameList from outside.\n */\n SeriesData.prototype.initData = function (data, nameList, dimValueGetter) {\n var _this = this;\n var store;\n if (data instanceof DataStore) {\n store = data;\n }\n if (!store) {\n var dimensions = this.dimensions;\n var provider = isSourceInstance(data) || zrUtil.isArrayLike(data) ? new DefaultDataProvider(data, dimensions.length) : data;\n store = new DataStore();\n var dimensionInfos = map(dimensions, function (dimName) {\n return {\n type: _this._dimInfos[dimName].type,\n property: dimName\n };\n });\n store.initData(provider, dimensionInfos, dimValueGetter);\n }\n this._store = store;\n // Reset\n this._nameList = (nameList || []).slice();\n this._idList = [];\n this._nameRepeatCount = {};\n this._doInit(0, store.count());\n // Cache summary info for fast visit. See \"dimensionHelper\".\n // Needs to be initialized after store is prepared.\n this._dimSummary = summarizeDimensions(this, this._schema);\n this.userOutput = this._dimSummary.userOutput;\n };\n /**\n * Caution: Can be only called on raw data (before `this._indices` created).\n */\n SeriesData.prototype.appendData = function (data) {\n var range = this._store.appendData(data);\n this._doInit(range[0], range[1]);\n };\n /**\n * Caution: Can be only called on raw data (before `this._indices` created).\n * This method does not modify `rawData` (`dataProvider`), but only\n * add values to store.\n *\n * The final count will be increased by `Math.max(values.length, names.length)`.\n *\n * @param values That is the SourceType: 'arrayRows', like\n * [\n * [12, 33, 44],\n * [NaN, 43, 1],\n * ['-', 'asdf', 0]\n * ]\n * Each item is exactly corresponding to a dimension.\n */\n SeriesData.prototype.appendValues = function (values, names) {\n var _a = this._store.appendValues(values, names.length),\n start = _a.start,\n end = _a.end;\n var shouldMakeIdFromName = this._shouldMakeIdFromName();\n this._updateOrdinalMeta();\n if (names) {\n for (var idx = start; idx < end; idx++) {\n var sourceIdx = idx - start;\n this._nameList[idx] = names[sourceIdx];\n if (shouldMakeIdFromName) {\n makeIdFromName(this, idx);\n }\n }\n }\n };\n SeriesData.prototype._updateOrdinalMeta = function () {\n var store = this._store;\n var dimensions = this.dimensions;\n for (var i = 0; i < dimensions.length; i++) {\n var dimInfo = this._dimInfos[dimensions[i]];\n if (dimInfo.ordinalMeta) {\n store.collectOrdinalMeta(dimInfo.storeDimIndex, dimInfo.ordinalMeta);\n }\n }\n };\n SeriesData.prototype._shouldMakeIdFromName = function () {\n var provider = this._store.getProvider();\n return this._idDimIdx == null && provider.getSource().sourceFormat !== SOURCE_FORMAT_TYPED_ARRAY && !provider.fillStorage;\n };\n SeriesData.prototype._doInit = function (start, end) {\n if (start >= end) {\n return;\n }\n var store = this._store;\n var provider = store.getProvider();\n this._updateOrdinalMeta();\n var nameList = this._nameList;\n var idList = this._idList;\n var sourceFormat = provider.getSource().sourceFormat;\n var isFormatOriginal = sourceFormat === SOURCE_FORMAT_ORIGINAL;\n // Each data item is value\n // [1, 2]\n // 2\n // Bar chart, line chart which uses category axis\n // only gives the 'y' value. 'x' value is the indices of category\n // Use a tempValue to normalize the value to be a (x, y) value\n // If dataItem is {name: ...} or {id: ...}, it has highest priority.\n // This kind of ids and names are always stored `_nameList` and `_idList`.\n if (isFormatOriginal && !provider.pure) {\n var sharedDataItem = [];\n for (var idx = start; idx < end; idx++) {\n // NOTICE: Try not to write things into dataItem\n var dataItem = provider.getItem(idx, sharedDataItem);\n if (!this.hasItemOption && isDataItemOption(dataItem)) {\n this.hasItemOption = true;\n }\n if (dataItem) {\n var itemName = dataItem.name;\n if (nameList[idx] == null && itemName != null) {\n nameList[idx] = convertOptionIdName(itemName, null);\n }\n var itemId = dataItem.id;\n if (idList[idx] == null && itemId != null) {\n idList[idx] = convertOptionIdName(itemId, null);\n }\n }\n }\n }\n if (this._shouldMakeIdFromName()) {\n for (var idx = start; idx < end; idx++) {\n makeIdFromName(this, idx);\n }\n }\n prepareInvertedIndex(this);\n };\n /**\n * PENDING: In fact currently this function is only used to short-circuit\n * the calling of `scale.unionExtentFromData` when data have been filtered by modules\n * like \"dataZoom\". `scale.unionExtentFromData` is used to calculate data extent for series on\n * an axis, but if a \"axis related data filter module\" is used, the extent of the axis have\n * been fixed and no need to calling `scale.unionExtentFromData` actually.\n * But if we add \"custom data filter\" in future, which is not \"axis related\", this method may\n * be still needed.\n *\n * Optimize for the scenario that data is filtered by a given extent.\n * Consider that if data amount is more than hundreds of thousand,\n * extent calculation will cost more than 10ms and the cache will\n * be erased because of the filtering.\n */\n SeriesData.prototype.getApproximateExtent = function (dim) {\n return this._approximateExtent[dim] || this._store.getDataExtent(this._getStoreDimIndex(dim));\n };\n /**\n * Calculate extent on a filtered data might be time consuming.\n * Approximate extent is only used for: calculate extent of filtered data outside.\n */\n SeriesData.prototype.setApproximateExtent = function (extent, dim) {\n dim = this.getDimension(dim);\n this._approximateExtent[dim] = extent.slice();\n };\n SeriesData.prototype.getCalculationInfo = function (key) {\n return this._calculationInfo[key];\n };\n SeriesData.prototype.setCalculationInfo = function (key, value) {\n isObject(key) ? zrUtil.extend(this._calculationInfo, key) : this._calculationInfo[key] = value;\n };\n /**\n * @return Never be null/undefined. `number` will be converted to string. Because:\n * In most cases, name is used in display, where returning a string is more convenient.\n * In other cases, name is used in query (see `indexOfName`), where we can keep the\n * rule that name `2` equals to name `'2'`.\n */\n SeriesData.prototype.getName = function (idx) {\n var rawIndex = this.getRawIndex(idx);\n var name = this._nameList[rawIndex];\n if (name == null && this._nameDimIdx != null) {\n name = getIdNameFromStore(this, this._nameDimIdx, rawIndex);\n }\n if (name == null) {\n name = '';\n }\n return name;\n };\n SeriesData.prototype._getCategory = function (dimIdx, idx) {\n var ordinal = this._store.get(dimIdx, idx);\n var ordinalMeta = this._store.getOrdinalMeta(dimIdx);\n if (ordinalMeta) {\n return ordinalMeta.categories[ordinal];\n }\n return ordinal;\n };\n /**\n * @return Never null/undefined. `number` will be converted to string. Because:\n * In all cases having encountered at present, id is used in making diff comparison, which\n * are usually based on hash map. We can keep the rule that the internal id are always string\n * (treat `2` is the same as `'2'`) to make the related logic simple.\n */\n SeriesData.prototype.getId = function (idx) {\n return getId(this, this.getRawIndex(idx));\n };\n SeriesData.prototype.count = function () {\n return this._store.count();\n };\n /**\n * Get value. Return NaN if idx is out of range.\n *\n * @notice Should better to use `data.getStore().get(dimIndex, dataIdx)` instead.\n */\n SeriesData.prototype.get = function (dim, idx) {\n var store = this._store;\n var dimInfo = this._dimInfos[dim];\n if (dimInfo) {\n return store.get(dimInfo.storeDimIndex, idx);\n }\n };\n /**\n * @notice Should better to use `data.getStore().getByRawIndex(dimIndex, dataIdx)` instead.\n */\n SeriesData.prototype.getByRawIndex = function (dim, rawIdx) {\n var store = this._store;\n var dimInfo = this._dimInfos[dim];\n if (dimInfo) {\n return store.getByRawIndex(dimInfo.storeDimIndex, rawIdx);\n }\n };\n SeriesData.prototype.getIndices = function () {\n return this._store.getIndices();\n };\n SeriesData.prototype.getDataExtent = function (dim) {\n return this._store.getDataExtent(this._getStoreDimIndex(dim));\n };\n SeriesData.prototype.getSum = function (dim) {\n return this._store.getSum(this._getStoreDimIndex(dim));\n };\n SeriesData.prototype.getMedian = function (dim) {\n return this._store.getMedian(this._getStoreDimIndex(dim));\n };\n SeriesData.prototype.getValues = function (dimensions, idx) {\n var _this = this;\n var store = this._store;\n return zrUtil.isArray(dimensions) ? store.getValues(map(dimensions, function (dim) {\n return _this._getStoreDimIndex(dim);\n }), idx) : store.getValues(dimensions);\n };\n /**\n * If value is NaN. Including '-'\n * Only check the coord dimensions.\n */\n SeriesData.prototype.hasValue = function (idx) {\n var dataDimIndicesOnCoord = this._dimSummary.dataDimIndicesOnCoord;\n for (var i = 0, len = dataDimIndicesOnCoord.length; i < len; i++) {\n // Ordinal type originally can be string or number.\n // But when an ordinal type is used on coord, it can\n // not be string but only number. So we can also use isNaN.\n if (isNaN(this._store.get(dataDimIndicesOnCoord[i], idx))) {\n return false;\n }\n }\n return true;\n };\n /**\n * Retrieve the index with given name\n */\n SeriesData.prototype.indexOfName = function (name) {\n for (var i = 0, len = this._store.count(); i < len; i++) {\n if (this.getName(i) === name) {\n return i;\n }\n }\n return -1;\n };\n SeriesData.prototype.getRawIndex = function (idx) {\n return this._store.getRawIndex(idx);\n };\n SeriesData.prototype.indexOfRawIndex = function (rawIndex) {\n return this._store.indexOfRawIndex(rawIndex);\n };\n /**\n * Only support the dimension which inverted index created.\n * Do not support other cases until required.\n * @param dim concrete dim\n * @param value ordinal index\n * @return rawIndex\n */\n SeriesData.prototype.rawIndexOf = function (dim, value) {\n var invertedIndices = dim && this._invertedIndicesMap[dim];\n if (process.env.NODE_ENV !== 'production') {\n if (!invertedIndices) {\n throw new Error('Do not supported yet');\n }\n }\n var rawIndex = invertedIndices[value];\n if (rawIndex == null || isNaN(rawIndex)) {\n return INDEX_NOT_FOUND;\n }\n return rawIndex;\n };\n /**\n * Retrieve the index of nearest value\n * @param dim\n * @param value\n * @param [maxDistance=Infinity]\n * @return If and only if multiple indices has\n * the same value, they are put to the result.\n */\n SeriesData.prototype.indicesOfNearest = function (dim, value, maxDistance) {\n return this._store.indicesOfNearest(this._getStoreDimIndex(dim), value, maxDistance);\n };\n SeriesData.prototype.each = function (dims, cb, ctx) {\n 'use strict';\n\n if (zrUtil.isFunction(dims)) {\n ctx = cb;\n cb = dims;\n dims = [];\n }\n // ctxCompat just for compat echarts3\n var fCtx = ctx || this;\n var dimIndices = map(normalizeDimensions(dims), this._getStoreDimIndex, this);\n this._store.each(dimIndices, fCtx ? zrUtil.bind(cb, fCtx) : cb);\n };\n SeriesData.prototype.filterSelf = function (dims, cb, ctx) {\n 'use strict';\n\n if (zrUtil.isFunction(dims)) {\n ctx = cb;\n cb = dims;\n dims = [];\n }\n // ctxCompat just for compat echarts3\n var fCtx = ctx || this;\n var dimIndices = map(normalizeDimensions(dims), this._getStoreDimIndex, this);\n this._store = this._store.filter(dimIndices, fCtx ? zrUtil.bind(cb, fCtx) : cb);\n return this;\n };\n /**\n * Select data in range. (For optimization of filter)\n * (Manually inline code, support 5 million data filtering in data zoom.)\n */\n SeriesData.prototype.selectRange = function (range) {\n 'use strict';\n\n var _this = this;\n var innerRange = {};\n var dims = zrUtil.keys(range);\n var dimIndices = [];\n zrUtil.each(dims, function (dim) {\n var dimIdx = _this._getStoreDimIndex(dim);\n innerRange[dimIdx] = range[dim];\n dimIndices.push(dimIdx);\n });\n this._store = this._store.selectRange(innerRange);\n return this;\n };\n /* eslint-enable max-len */\n SeriesData.prototype.mapArray = function (dims, cb, ctx) {\n 'use strict';\n\n if (zrUtil.isFunction(dims)) {\n ctx = cb;\n cb = dims;\n dims = [];\n }\n // ctxCompat just for compat echarts3\n ctx = ctx || this;\n var result = [];\n this.each(dims, function () {\n result.push(cb && cb.apply(this, arguments));\n }, ctx);\n return result;\n };\n SeriesData.prototype.map = function (dims, cb, ctx, ctxCompat) {\n 'use strict';\n\n // ctxCompat just for compat echarts3\n var fCtx = ctx || ctxCompat || this;\n var dimIndices = map(normalizeDimensions(dims), this._getStoreDimIndex, this);\n var list = cloneListForMapAndSample(this);\n list._store = this._store.map(dimIndices, fCtx ? zrUtil.bind(cb, fCtx) : cb);\n return list;\n };\n SeriesData.prototype.modify = function (dims, cb, ctx, ctxCompat) {\n var _this = this;\n // ctxCompat just for compat echarts3\n var fCtx = ctx || ctxCompat || this;\n if (process.env.NODE_ENV !== 'production') {\n zrUtil.each(normalizeDimensions(dims), function (dim) {\n var dimInfo = _this.getDimensionInfo(dim);\n if (!dimInfo.isCalculationCoord) {\n console.error('Danger: only stack dimension can be modified');\n }\n });\n }\n var dimIndices = map(normalizeDimensions(dims), this._getStoreDimIndex, this);\n // If do shallow clone here, if there are too many stacked series,\n // it still cost lots of memory, because `_store.dimensions` are not shared.\n // We should consider there probably be shallow clone happen in each series\n // in consequent filter/map.\n this._store.modify(dimIndices, fCtx ? zrUtil.bind(cb, fCtx) : cb);\n };\n /**\n * Large data down sampling on given dimension\n * @param sampleIndex Sample index for name and id\n */\n SeriesData.prototype.downSample = function (dimension, rate, sampleValue, sampleIndex) {\n var list = cloneListForMapAndSample(this);\n list._store = this._store.downSample(this._getStoreDimIndex(dimension), rate, sampleValue, sampleIndex);\n return list;\n };\n /**\n * Large data down sampling using largest-triangle-three-buckets\n * @param {string} valueDimension\n * @param {number} targetCount\n */\n SeriesData.prototype.lttbDownSample = function (valueDimension, rate) {\n var list = cloneListForMapAndSample(this);\n list._store = this._store.lttbDownSample(this._getStoreDimIndex(valueDimension), rate);\n return list;\n };\n SeriesData.prototype.getRawDataItem = function (idx) {\n return this._store.getRawDataItem(idx);\n };\n /**\n * Get model of one data item.\n */\n // TODO: Type of data item\n SeriesData.prototype.getItemModel = function (idx) {\n var hostModel = this.hostModel;\n var dataItem = this.getRawDataItem(idx);\n return new Model(dataItem, hostModel, hostModel && hostModel.ecModel);\n };\n /**\n * Create a data differ\n */\n SeriesData.prototype.diff = function (otherList) {\n var thisList = this;\n return new DataDiffer(otherList ? otherList.getStore().getIndices() : [], this.getStore().getIndices(), function (idx) {\n return getId(otherList, idx);\n }, function (idx) {\n return getId(thisList, idx);\n });\n };\n /**\n * Get visual property.\n */\n SeriesData.prototype.getVisual = function (key) {\n var visual = this._visual;\n return visual && visual[key];\n };\n SeriesData.prototype.setVisual = function (kvObj, val) {\n this._visual = this._visual || {};\n if (isObject(kvObj)) {\n zrUtil.extend(this._visual, kvObj);\n } else {\n this._visual[kvObj] = val;\n }\n };\n /**\n * Get visual property of single data item\n */\n // eslint-disable-next-line\n SeriesData.prototype.getItemVisual = function (idx, key) {\n var itemVisual = this._itemVisuals[idx];\n var val = itemVisual && itemVisual[key];\n if (val == null) {\n // Use global visual property\n return this.getVisual(key);\n }\n return val;\n };\n /**\n * If exists visual property of single data item\n */\n SeriesData.prototype.hasItemVisual = function () {\n return this._itemVisuals.length > 0;\n };\n /**\n * Make sure itemVisual property is unique\n */\n // TODO: use key to save visual to reduce memory.\n SeriesData.prototype.ensureUniqueItemVisual = function (idx, key) {\n var itemVisuals = this._itemVisuals;\n var itemVisual = itemVisuals[idx];\n if (!itemVisual) {\n itemVisual = itemVisuals[idx] = {};\n }\n var val = itemVisual[key];\n if (val == null) {\n val = this.getVisual(key);\n // TODO Performance?\n if (zrUtil.isArray(val)) {\n val = val.slice();\n } else if (isObject(val)) {\n val = zrUtil.extend({}, val);\n }\n itemVisual[key] = val;\n }\n return val;\n };\n // eslint-disable-next-line\n SeriesData.prototype.setItemVisual = function (idx, key, value) {\n var itemVisual = this._itemVisuals[idx] || {};\n this._itemVisuals[idx] = itemVisual;\n if (isObject(key)) {\n zrUtil.extend(itemVisual, key);\n } else {\n itemVisual[key] = value;\n }\n };\n /**\n * Clear itemVisuals and list visual.\n */\n SeriesData.prototype.clearAllVisual = function () {\n this._visual = {};\n this._itemVisuals = [];\n };\n SeriesData.prototype.setLayout = function (key, val) {\n isObject(key) ? zrUtil.extend(this._layout, key) : this._layout[key] = val;\n };\n /**\n * Get layout property.\n */\n SeriesData.prototype.getLayout = function (key) {\n return this._layout[key];\n };\n /**\n * Get layout of single data item\n */\n SeriesData.prototype.getItemLayout = function (idx) {\n return this._itemLayouts[idx];\n };\n /**\n * Set layout of single data item\n */\n SeriesData.prototype.setItemLayout = function (idx, layout, merge) {\n this._itemLayouts[idx] = merge ? zrUtil.extend(this._itemLayouts[idx] || {}, layout) : layout;\n };\n /**\n * Clear all layout of single data item\n */\n SeriesData.prototype.clearItemLayouts = function () {\n this._itemLayouts.length = 0;\n };\n /**\n * Set graphic element relative to data. It can be set as null\n */\n SeriesData.prototype.setItemGraphicEl = function (idx, el) {\n var seriesIndex = this.hostModel && this.hostModel.seriesIndex;\n setCommonECData(seriesIndex, this.dataType, idx, el);\n this._graphicEls[idx] = el;\n };\n SeriesData.prototype.getItemGraphicEl = function (idx) {\n return this._graphicEls[idx];\n };\n SeriesData.prototype.eachItemGraphicEl = function (cb, context) {\n zrUtil.each(this._graphicEls, function (el, idx) {\n if (el) {\n cb && cb.call(context, el, idx);\n }\n });\n };\n /**\n * Shallow clone a new list except visual and layout properties, and graph elements.\n * New list only change the indices.\n */\n SeriesData.prototype.cloneShallow = function (list) {\n if (!list) {\n list = new SeriesData(this._schema ? this._schema : map(this.dimensions, this._getDimInfo, this), this.hostModel);\n }\n transferProperties(list, this);\n list._store = this._store;\n return list;\n };\n /**\n * Wrap some method to add more feature\n */\n SeriesData.prototype.wrapMethod = function (methodName, injectFunction) {\n var originalMethod = this[methodName];\n if (!zrUtil.isFunction(originalMethod)) {\n return;\n }\n this.__wrappedMethods = this.__wrappedMethods || [];\n this.__wrappedMethods.push(methodName);\n this[methodName] = function () {\n var res = originalMethod.apply(this, arguments);\n return injectFunction.apply(this, [res].concat(zrUtil.slice(arguments)));\n };\n };\n // ----------------------------------------------------------\n // A work around for internal method visiting private member.\n // ----------------------------------------------------------\n SeriesData.internalField = function () {\n prepareInvertedIndex = function (data) {\n var invertedIndicesMap = data._invertedIndicesMap;\n zrUtil.each(invertedIndicesMap, function (invertedIndices, dim) {\n var dimInfo = data._dimInfos[dim];\n // Currently, only dimensions that has ordinalMeta can create inverted indices.\n var ordinalMeta = dimInfo.ordinalMeta;\n var store = data._store;\n if (ordinalMeta) {\n invertedIndices = invertedIndicesMap[dim] = new CtorInt32Array(ordinalMeta.categories.length);\n // The default value of TypedArray is 0. To avoid miss\n // mapping to 0, we should set it as INDEX_NOT_FOUND.\n for (var i = 0; i < invertedIndices.length; i++) {\n invertedIndices[i] = INDEX_NOT_FOUND;\n }\n for (var i = 0; i < store.count(); i++) {\n // Only support the case that all values are distinct.\n invertedIndices[store.get(dimInfo.storeDimIndex, i)] = i;\n }\n }\n });\n };\n getIdNameFromStore = function (data, dimIdx, idx) {\n return convertOptionIdName(data._getCategory(dimIdx, idx), null);\n };\n /**\n * @see the comment of `List['getId']`.\n */\n getId = function (data, rawIndex) {\n var id = data._idList[rawIndex];\n if (id == null && data._idDimIdx != null) {\n id = getIdNameFromStore(data, data._idDimIdx, rawIndex);\n }\n if (id == null) {\n id = ID_PREFIX + rawIndex;\n }\n return id;\n };\n normalizeDimensions = function (dimensions) {\n if (!zrUtil.isArray(dimensions)) {\n dimensions = dimensions != null ? [dimensions] : [];\n }\n return dimensions;\n };\n /**\n * Data in excludeDimensions is copied, otherwise transferred.\n */\n cloneListForMapAndSample = function (original) {\n var list = new SeriesData(original._schema ? original._schema : map(original.dimensions, original._getDimInfo, original), original.hostModel);\n // FIXME If needs stackedOn, value may already been stacked\n transferProperties(list, original);\n return list;\n };\n transferProperties = function (target, source) {\n zrUtil.each(TRANSFERABLE_PROPERTIES.concat(source.__wrappedMethods || []), function (propName) {\n if (source.hasOwnProperty(propName)) {\n target[propName] = source[propName];\n }\n });\n target.__wrappedMethods = source.__wrappedMethods;\n zrUtil.each(CLONE_PROPERTIES, function (propName) {\n target[propName] = zrUtil.clone(source[propName]);\n });\n target._calculationInfo = zrUtil.extend({}, source._calculationInfo);\n };\n makeIdFromName = function (data, idx) {\n var nameList = data._nameList;\n var idList = data._idList;\n var nameDimIdx = data._nameDimIdx;\n var idDimIdx = data._idDimIdx;\n var name = nameList[idx];\n var id = idList[idx];\n if (name == null && nameDimIdx != null) {\n nameList[idx] = name = getIdNameFromStore(data, nameDimIdx, idx);\n }\n if (id == null && idDimIdx != null) {\n idList[idx] = id = getIdNameFromStore(data, idDimIdx, idx);\n }\n if (id == null && name != null) {\n var nameRepeatCount = data._nameRepeatCount;\n var nmCnt = nameRepeatCount[name] = (nameRepeatCount[name] || 0) + 1;\n id = name;\n if (nmCnt > 1) {\n id += '__ec__' + nmCnt;\n }\n idList[idx] = id;\n }\n };\n }();\n return SeriesData;\n}();\nexport default SeriesData;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/**\n * This module exposes helper functions for developing extensions.\n */\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport createSeriesData from '../../chart/helper/createSeriesData.js';\n// import createGraphFromNodeEdge from './chart/helper/createGraphFromNodeEdge.js';\nimport * as axisHelper from '../../coord/axisHelper.js';\nimport { AxisModelCommonMixin } from '../../coord/axisModelCommonMixin.js';\nimport Model from '../../model/Model.js';\nimport { getLayoutRect } from '../../util/layout.js';\nimport { enableDataStack, isDimensionStacked, getStackedDimension } from '../../data/helper/dataStackHelper.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { createTextStyle as innerCreateTextStyle } from '../../label/labelStyle.js';\n/**\n * Create a multi dimension List structure from seriesModel.\n */\nexport function createList(seriesModel) {\n return createSeriesData(null, seriesModel);\n}\n// export function createGraph(seriesModel) {\n// let nodes = seriesModel.get('data');\n// let links = seriesModel.get('links');\n// return createGraphFromNodeEdge(nodes, links, seriesModel);\n// }\nexport { getLayoutRect };\nexport { createDimensions } from '../../data/helper/createDimensions.js';\nexport var dataStack = {\n isDimensionStacked: isDimensionStacked,\n enableDataStack: enableDataStack,\n getStackedDimension: getStackedDimension\n};\n/**\n * Create a symbol element with given symbol configuration: shape, x, y, width, height, color\n * @param {string} symbolDesc\n * @param {number} x\n * @param {number} y\n * @param {number} w\n * @param {number} h\n * @param {string} color\n */\nexport { createSymbol } from '../../util/symbol.js';\n/**\n * Create scale\n * @param {Array.} dataExtent\n * @param {Object|module:echarts/Model} option If `optoin.type`\n * is secified, it can only be `'value'` currently.\n */\nexport function createScale(dataExtent, option) {\n var axisModel = option;\n if (!(option instanceof Model)) {\n axisModel = new Model(option);\n // FIXME\n // Currently AxisModelCommonMixin has nothing to do with the\n // the requirements of `axisHelper.createScaleByModel`. For\n // example the methods `getCategories` and `getOrdinalMeta`\n // are required for `'category'` axis, and ecModel is required\n // for `'time'` axis. But occasionally echarts-gl happened\n // to only use `'value'` axis.\n // zrUtil.mixin(axisModel, AxisModelCommonMixin);\n }\n var scale = axisHelper.createScaleByModel(axisModel);\n scale.setExtent(dataExtent[0], dataExtent[1]);\n axisHelper.niceScaleExtent(scale, axisModel);\n return scale;\n}\n/**\n * Mixin common methods to axis model,\n *\n * Include methods\n * `getFormattedLabels() => Array.`\n * `getCategories() => Array.`\n * `getMin(origin: boolean) => number`\n * `getMax(origin: boolean) => number`\n * `getNeedCrossZero() => boolean`\n */\nexport function mixinAxisModelCommonMethods(Model) {\n zrUtil.mixin(Model, AxisModelCommonMixin);\n}\nexport { getECData };\nexport { enableHoverEmphasis } from '../../util/states.js';\nexport function createTextStyle(textStyleModel, opts) {\n opts = opts || {};\n return innerCreateTextStyle(textStyleModel, null, null, opts.state !== 'normal');\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { VISUAL_DIMENSIONS } from '../../util/types.js';\nimport SeriesDimensionDefine from '../SeriesDimensionDefine.js';\nimport { createHashMap, defaults, each, extend, isObject, isString } from 'zrender/lib/core/util.js';\nimport { createSourceFromSeriesDataOption, isSourceInstance } from '../Source.js';\nimport { CtorInt32Array } from '../DataStore.js';\nimport { normalizeToArray } from '../../util/model.js';\nimport { BE_ORDINAL, guessOrdinal } from './sourceHelper.js';\nimport { createDimNameMap, ensureSourceDimNameMap, SeriesDataSchema, shouldOmitUnusedDimensions } from './SeriesDataSchema.js';\n/**\n * For outside usage compat (like echarts-gl are using it).\n */\nexport function createDimensions(source, opt) {\n return prepareSeriesDataSchema(source, opt).dimensions;\n}\n/**\n * This method builds the relationship between:\n * + \"what the coord sys or series requires (see `coordDimensions`)\",\n * + \"what the user defines (in `encode` and `dimensions`, see `opt.dimensionsDefine` and `opt.encodeDefine`)\"\n * + \"what the data source provids (see `source`)\".\n *\n * Some guess strategy will be adapted if user does not define something.\n * If no 'value' dimension specified, the first no-named dimension will be\n * named as 'value'.\n *\n * @return The results are always sorted by `storeDimIndex` asc.\n */\nexport default function prepareSeriesDataSchema(\n// TODO: TYPE completeDimensions type\nsource, opt) {\n if (!isSourceInstance(source)) {\n source = createSourceFromSeriesDataOption(source);\n }\n opt = opt || {};\n var sysDims = opt.coordDimensions || [];\n var dimsDef = opt.dimensionsDefine || source.dimensionsDefine || [];\n var coordDimNameMap = createHashMap();\n var resultList = [];\n var dimCount = getDimCount(source, sysDims, dimsDef, opt.dimensionsCount);\n // Try to ignore unused dimensions if sharing a high dimension datastore\n // 30 is an experience value.\n var omitUnusedDimensions = opt.canOmitUnusedDimensions && shouldOmitUnusedDimensions(dimCount);\n var isUsingSourceDimensionsDef = dimsDef === source.dimensionsDefine;\n var dataDimNameMap = isUsingSourceDimensionsDef ? ensureSourceDimNameMap(source) : createDimNameMap(dimsDef);\n var encodeDef = opt.encodeDefine;\n if (!encodeDef && opt.encodeDefaulter) {\n encodeDef = opt.encodeDefaulter(source, dimCount);\n }\n var encodeDefMap = createHashMap(encodeDef);\n var indicesMap = new CtorInt32Array(dimCount);\n for (var i = 0; i < indicesMap.length; i++) {\n indicesMap[i] = -1;\n }\n function getResultItem(dimIdx) {\n var idx = indicesMap[dimIdx];\n if (idx < 0) {\n var dimDefItemRaw = dimsDef[dimIdx];\n var dimDefItem = isObject(dimDefItemRaw) ? dimDefItemRaw : {\n name: dimDefItemRaw\n };\n var resultItem = new SeriesDimensionDefine();\n var userDimName = dimDefItem.name;\n if (userDimName != null && dataDimNameMap.get(userDimName) != null) {\n // Only if `series.dimensions` is defined in option\n // displayName, will be set, and dimension will be displayed vertically in\n // tooltip by default.\n resultItem.name = resultItem.displayName = userDimName;\n }\n dimDefItem.type != null && (resultItem.type = dimDefItem.type);\n dimDefItem.displayName != null && (resultItem.displayName = dimDefItem.displayName);\n var newIdx = resultList.length;\n indicesMap[dimIdx] = newIdx;\n resultItem.storeDimIndex = dimIdx;\n resultList.push(resultItem);\n return resultItem;\n }\n return resultList[idx];\n }\n if (!omitUnusedDimensions) {\n for (var i = 0; i < dimCount; i++) {\n getResultItem(i);\n }\n }\n // Set `coordDim` and `coordDimIndex` by `encodeDefMap` and normalize `encodeDefMap`.\n encodeDefMap.each(function (dataDimsRaw, coordDim) {\n var dataDims = normalizeToArray(dataDimsRaw).slice();\n // Note: It is allowed that `dataDims.length` is `0`, e.g., options is\n // `{encode: {x: -1, y: 1}}`. Should not filter anything in\n // this case.\n if (dataDims.length === 1 && !isString(dataDims[0]) && dataDims[0] < 0) {\n encodeDefMap.set(coordDim, false);\n return;\n }\n var validDataDims = encodeDefMap.set(coordDim, []);\n each(dataDims, function (resultDimIdxOrName, idx) {\n // The input resultDimIdx can be dim name or index.\n var resultDimIdx = isString(resultDimIdxOrName) ? dataDimNameMap.get(resultDimIdxOrName) : resultDimIdxOrName;\n if (resultDimIdx != null && resultDimIdx < dimCount) {\n validDataDims[idx] = resultDimIdx;\n applyDim(getResultItem(resultDimIdx), coordDim, idx);\n }\n });\n });\n // Apply templates and default order from `sysDims`.\n var availDimIdx = 0;\n each(sysDims, function (sysDimItemRaw) {\n var coordDim;\n var sysDimItemDimsDef;\n var sysDimItemOtherDims;\n var sysDimItem;\n if (isString(sysDimItemRaw)) {\n coordDim = sysDimItemRaw;\n sysDimItem = {};\n } else {\n sysDimItem = sysDimItemRaw;\n coordDim = sysDimItem.name;\n var ordinalMeta = sysDimItem.ordinalMeta;\n sysDimItem.ordinalMeta = null;\n sysDimItem = extend({}, sysDimItem);\n sysDimItem.ordinalMeta = ordinalMeta;\n // `coordDimIndex` should not be set directly.\n sysDimItemDimsDef = sysDimItem.dimsDef;\n sysDimItemOtherDims = sysDimItem.otherDims;\n sysDimItem.name = sysDimItem.coordDim = sysDimItem.coordDimIndex = sysDimItem.dimsDef = sysDimItem.otherDims = null;\n }\n var dataDims = encodeDefMap.get(coordDim);\n // negative resultDimIdx means no need to mapping.\n if (dataDims === false) {\n return;\n }\n dataDims = normalizeToArray(dataDims);\n // dimensions provides default dim sequences.\n if (!dataDims.length) {\n for (var i = 0; i < (sysDimItemDimsDef && sysDimItemDimsDef.length || 1); i++) {\n while (availDimIdx < dimCount && getResultItem(availDimIdx).coordDim != null) {\n availDimIdx++;\n }\n availDimIdx < dimCount && dataDims.push(availDimIdx++);\n }\n }\n // Apply templates.\n each(dataDims, function (resultDimIdx, coordDimIndex) {\n var resultItem = getResultItem(resultDimIdx);\n // Coordinate system has a higher priority on dim type than source.\n if (isUsingSourceDimensionsDef && sysDimItem.type != null) {\n resultItem.type = sysDimItem.type;\n }\n applyDim(defaults(resultItem, sysDimItem), coordDim, coordDimIndex);\n if (resultItem.name == null && sysDimItemDimsDef) {\n var sysDimItemDimsDefItem = sysDimItemDimsDef[coordDimIndex];\n !isObject(sysDimItemDimsDefItem) && (sysDimItemDimsDefItem = {\n name: sysDimItemDimsDefItem\n });\n resultItem.name = resultItem.displayName = sysDimItemDimsDefItem.name;\n resultItem.defaultTooltip = sysDimItemDimsDefItem.defaultTooltip;\n }\n // FIXME refactor, currently only used in case: {otherDims: {tooltip: false}}\n sysDimItemOtherDims && defaults(resultItem.otherDims, sysDimItemOtherDims);\n });\n });\n function applyDim(resultItem, coordDim, coordDimIndex) {\n if (VISUAL_DIMENSIONS.get(coordDim) != null) {\n resultItem.otherDims[coordDim] = coordDimIndex;\n } else {\n resultItem.coordDim = coordDim;\n resultItem.coordDimIndex = coordDimIndex;\n coordDimNameMap.set(coordDim, true);\n }\n }\n // Make sure the first extra dim is 'value'.\n var generateCoord = opt.generateCoord;\n var generateCoordCount = opt.generateCoordCount;\n var fromZero = generateCoordCount != null;\n generateCoordCount = generateCoord ? generateCoordCount || 1 : 0;\n var extra = generateCoord || 'value';\n function ifNoNameFillWithCoordName(resultItem) {\n if (resultItem.name == null) {\n // Duplication will be removed in the next step.\n resultItem.name = resultItem.coordDim;\n }\n }\n // Set dim `name` and other `coordDim` and other props.\n if (!omitUnusedDimensions) {\n for (var resultDimIdx = 0; resultDimIdx < dimCount; resultDimIdx++) {\n var resultItem = getResultItem(resultDimIdx);\n var coordDim = resultItem.coordDim;\n if (coordDim == null) {\n // TODO no need to generate coordDim for isExtraCoord?\n resultItem.coordDim = genCoordDimName(extra, coordDimNameMap, fromZero);\n resultItem.coordDimIndex = 0;\n // Series specified generateCoord is using out.\n if (!generateCoord || generateCoordCount <= 0) {\n resultItem.isExtraCoord = true;\n }\n generateCoordCount--;\n }\n ifNoNameFillWithCoordName(resultItem);\n if (resultItem.type == null && (guessOrdinal(source, resultDimIdx) === BE_ORDINAL.Must\n // Consider the case:\n // {\n // dataset: {source: [\n // ['2001', 123],\n // ['2002', 456],\n // ...\n // ['The others', 987],\n // ]},\n // series: {type: 'pie'}\n // }\n // The first column should better be treated as a \"ordinal\" although it\n // might not be detected as an \"ordinal\" by `guessOrdinal`.\n || resultItem.isExtraCoord && (resultItem.otherDims.itemName != null || resultItem.otherDims.seriesName != null))) {\n resultItem.type = 'ordinal';\n }\n }\n } else {\n each(resultList, function (resultItem) {\n // PENDING: guessOrdinal or let user specify type: 'ordinal' manually?\n ifNoNameFillWithCoordName(resultItem);\n });\n // Sort dimensions: there are some rule that use the last dim as label,\n // and for some latter travel process easier.\n resultList.sort(function (item0, item1) {\n return item0.storeDimIndex - item1.storeDimIndex;\n });\n }\n removeDuplication(resultList);\n return new SeriesDataSchema({\n source: source,\n dimensions: resultList,\n fullDimensionCount: dimCount,\n dimensionOmitted: omitUnusedDimensions\n });\n}\nfunction removeDuplication(result) {\n var duplicationMap = createHashMap();\n for (var i = 0; i < result.length; i++) {\n var dim = result[i];\n var dimOriginalName = dim.name;\n var count = duplicationMap.get(dimOriginalName) || 0;\n if (count > 0) {\n // Starts from 0.\n dim.name = dimOriginalName + (count - 1);\n }\n count++;\n duplicationMap.set(dimOriginalName, count);\n }\n}\n// ??? TODO\n// Originally detect dimCount by data[0]. Should we\n// optimize it to only by sysDims and dimensions and encode.\n// So only necessary dims will be initialized.\n// But\n// (1) custom series should be considered. where other dims\n// may be visited.\n// (2) sometimes user need to calculate bubble size or use visualMap\n// on other dimensions besides coordSys needed.\n// So, dims that is not used by system, should be shared in data store?\nfunction getDimCount(source, sysDims, dimsDef, optDimCount) {\n // Note that the result dimCount should not small than columns count\n // of data, otherwise `dataDimNameMap` checking will be incorrect.\n var dimCount = Math.max(source.dimensionsDetectedCount || 1, sysDims.length, dimsDef.length, optDimCount || 0);\n each(sysDims, function (sysDimItem) {\n var sysDimItemDimsDef;\n if (isObject(sysDimItem) && (sysDimItemDimsDef = sysDimItem.dimsDef)) {\n dimCount = Math.max(dimCount, sysDimItemDimsDef.length);\n }\n });\n return dimCount;\n}\nfunction genCoordDimName(name, map, fromZero) {\n if (fromZero || map.hasKey(name)) {\n var i = 0;\n while (map.hasKey(name + i)) {\n i++;\n }\n name += i;\n }\n map.set(name, true);\n return name;\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/**\n * Helper for model references.\n * There are many manners to refer axis/coordSys.\n */\n// TODO\n// merge relevant logic to this file?\n// check: \"modelHelper\" of tooltip and \"BrushTargetManager\".\nimport { createHashMap, retrieve, each } from 'zrender/lib/core/util.js';\nimport { SINGLE_REFERRING } from '../util/model.js';\n/**\n * @class\n * For example:\n * {\n * coordSysName: 'cartesian2d',\n * coordSysDims: ['x', 'y', ...],\n * axisMap: HashMap({\n * x: xAxisModel,\n * y: yAxisModel\n * }),\n * categoryAxisMap: HashMap({\n * x: xAxisModel,\n * y: undefined\n * }),\n * // The index of the first category axis in `coordSysDims`.\n * // `null/undefined` means no category axis exists.\n * firstCategoryDimIndex: 1,\n * // To replace user specified encode.\n * }\n */\nvar CoordSysInfo = /** @class */function () {\n function CoordSysInfo(coordSysName) {\n this.coordSysDims = [];\n this.axisMap = createHashMap();\n this.categoryAxisMap = createHashMap();\n this.coordSysName = coordSysName;\n }\n return CoordSysInfo;\n}();\nexport function getCoordSysInfoBySeries(seriesModel) {\n var coordSysName = seriesModel.get('coordinateSystem');\n var result = new CoordSysInfo(coordSysName);\n var fetch = fetchers[coordSysName];\n if (fetch) {\n fetch(seriesModel, result, result.axisMap, result.categoryAxisMap);\n return result;\n }\n}\nvar fetchers = {\n cartesian2d: function (seriesModel, result, axisMap, categoryAxisMap) {\n var xAxisModel = seriesModel.getReferringComponents('xAxis', SINGLE_REFERRING).models[0];\n var yAxisModel = seriesModel.getReferringComponents('yAxis', SINGLE_REFERRING).models[0];\n if (process.env.NODE_ENV !== 'production') {\n if (!xAxisModel) {\n throw new Error('xAxis \"' + retrieve(seriesModel.get('xAxisIndex'), seriesModel.get('xAxisId'), 0) + '\" not found');\n }\n if (!yAxisModel) {\n throw new Error('yAxis \"' + retrieve(seriesModel.get('xAxisIndex'), seriesModel.get('yAxisId'), 0) + '\" not found');\n }\n }\n result.coordSysDims = ['x', 'y'];\n axisMap.set('x', xAxisModel);\n axisMap.set('y', yAxisModel);\n if (isCategory(xAxisModel)) {\n categoryAxisMap.set('x', xAxisModel);\n result.firstCategoryDimIndex = 0;\n }\n if (isCategory(yAxisModel)) {\n categoryAxisMap.set('y', yAxisModel);\n result.firstCategoryDimIndex == null && (result.firstCategoryDimIndex = 1);\n }\n },\n singleAxis: function (seriesModel, result, axisMap, categoryAxisMap) {\n var singleAxisModel = seriesModel.getReferringComponents('singleAxis', SINGLE_REFERRING).models[0];\n if (process.env.NODE_ENV !== 'production') {\n if (!singleAxisModel) {\n throw new Error('singleAxis should be specified.');\n }\n }\n result.coordSysDims = ['single'];\n axisMap.set('single', singleAxisModel);\n if (isCategory(singleAxisModel)) {\n categoryAxisMap.set('single', singleAxisModel);\n result.firstCategoryDimIndex = 0;\n }\n },\n polar: function (seriesModel, result, axisMap, categoryAxisMap) {\n var polarModel = seriesModel.getReferringComponents('polar', SINGLE_REFERRING).models[0];\n var radiusAxisModel = polarModel.findAxisModel('radiusAxis');\n var angleAxisModel = polarModel.findAxisModel('angleAxis');\n if (process.env.NODE_ENV !== 'production') {\n if (!angleAxisModel) {\n throw new Error('angleAxis option not found');\n }\n if (!radiusAxisModel) {\n throw new Error('radiusAxis option not found');\n }\n }\n result.coordSysDims = ['radius', 'angle'];\n axisMap.set('radius', radiusAxisModel);\n axisMap.set('angle', angleAxisModel);\n if (isCategory(radiusAxisModel)) {\n categoryAxisMap.set('radius', radiusAxisModel);\n result.firstCategoryDimIndex = 0;\n }\n if (isCategory(angleAxisModel)) {\n categoryAxisMap.set('angle', angleAxisModel);\n result.firstCategoryDimIndex == null && (result.firstCategoryDimIndex = 1);\n }\n },\n geo: function (seriesModel, result, axisMap, categoryAxisMap) {\n result.coordSysDims = ['lng', 'lat'];\n },\n parallel: function (seriesModel, result, axisMap, categoryAxisMap) {\n var ecModel = seriesModel.ecModel;\n var parallelModel = ecModel.getComponent('parallel', seriesModel.get('parallelIndex'));\n var coordSysDims = result.coordSysDims = parallelModel.dimensions.slice();\n each(parallelModel.parallelAxisIndex, function (axisIndex, index) {\n var axisModel = ecModel.getComponent('parallelAxis', axisIndex);\n var axisDim = coordSysDims[index];\n axisMap.set(axisDim, axisModel);\n if (isCategory(axisModel)) {\n categoryAxisMap.set(axisDim, axisModel);\n if (result.firstCategoryDimIndex == null) {\n result.firstCategoryDimIndex = index;\n }\n }\n });\n }\n};\nfunction isCategory(axisModel) {\n return axisModel.get('type') === 'category';\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { each, isString } from 'zrender/lib/core/util.js';\nimport { isSeriesDataSchema } from './SeriesDataSchema.js';\n/**\n * Note that it is too complicated to support 3d stack by value\n * (have to create two-dimension inverted index), so in 3d case\n * we just support that stacked by index.\n *\n * @param seriesModel\n * @param dimensionsInput The same as the input of .\n * The input will be modified.\n * @param opt\n * @param opt.stackedCoordDimension Specify a coord dimension if needed.\n * @param opt.byIndex=false\n * @return calculationInfo\n * {\n * stackedDimension: string\n * stackedByDimension: string\n * isStackedByIndex: boolean\n * stackedOverDimension: string\n * stackResultDimension: string\n * }\n */\nexport function enableDataStack(seriesModel, dimensionsInput, opt) {\n opt = opt || {};\n var byIndex = opt.byIndex;\n var stackedCoordDimension = opt.stackedCoordDimension;\n var dimensionDefineList;\n var schema;\n var store;\n if (isLegacyDimensionsInput(dimensionsInput)) {\n dimensionDefineList = dimensionsInput;\n } else {\n schema = dimensionsInput.schema;\n dimensionDefineList = schema.dimensions;\n store = dimensionsInput.store;\n }\n // Compatibal: when `stack` is set as '', do not stack.\n var mayStack = !!(seriesModel && seriesModel.get('stack'));\n var stackedByDimInfo;\n var stackedDimInfo;\n var stackResultDimension;\n var stackedOverDimension;\n each(dimensionDefineList, function (dimensionInfo, index) {\n if (isString(dimensionInfo)) {\n dimensionDefineList[index] = dimensionInfo = {\n name: dimensionInfo\n };\n }\n if (mayStack && !dimensionInfo.isExtraCoord) {\n // Find the first ordinal dimension as the stackedByDimInfo.\n if (!byIndex && !stackedByDimInfo && dimensionInfo.ordinalMeta) {\n stackedByDimInfo = dimensionInfo;\n }\n // Find the first stackable dimension as the stackedDimInfo.\n if (!stackedDimInfo && dimensionInfo.type !== 'ordinal' && dimensionInfo.type !== 'time' && (!stackedCoordDimension || stackedCoordDimension === dimensionInfo.coordDim)) {\n stackedDimInfo = dimensionInfo;\n }\n }\n });\n if (stackedDimInfo && !byIndex && !stackedByDimInfo) {\n // Compatible with previous design, value axis (time axis) only stack by index.\n // It may make sense if the user provides elaborately constructed data.\n byIndex = true;\n }\n // Add stack dimension, they can be both calculated by coordinate system in `unionExtent`.\n // That put stack logic in List is for using conveniently in echarts extensions, but it\n // might not be a good way.\n if (stackedDimInfo) {\n // Use a weird name that not duplicated with other names.\n // Also need to use seriesModel.id as postfix because different\n // series may share same data store. The stack dimension needs to be distinguished.\n stackResultDimension = '__\\0ecstackresult_' + seriesModel.id;\n stackedOverDimension = '__\\0ecstackedover_' + seriesModel.id;\n // Create inverted index to fast query index by value.\n if (stackedByDimInfo) {\n stackedByDimInfo.createInvertedIndices = true;\n }\n var stackedDimCoordDim_1 = stackedDimInfo.coordDim;\n var stackedDimType = stackedDimInfo.type;\n var stackedDimCoordIndex_1 = 0;\n each(dimensionDefineList, function (dimensionInfo) {\n if (dimensionInfo.coordDim === stackedDimCoordDim_1) {\n stackedDimCoordIndex_1++;\n }\n });\n var stackedOverDimensionDefine = {\n name: stackResultDimension,\n coordDim: stackedDimCoordDim_1,\n coordDimIndex: stackedDimCoordIndex_1,\n type: stackedDimType,\n isExtraCoord: true,\n isCalculationCoord: true,\n storeDimIndex: dimensionDefineList.length\n };\n var stackResultDimensionDefine = {\n name: stackedOverDimension,\n // This dimension contains stack base (generally, 0), so do not set it as\n // `stackedDimCoordDim` to avoid extent calculation, consider log scale.\n coordDim: stackedOverDimension,\n coordDimIndex: stackedDimCoordIndex_1 + 1,\n type: stackedDimType,\n isExtraCoord: true,\n isCalculationCoord: true,\n storeDimIndex: dimensionDefineList.length + 1\n };\n if (schema) {\n if (store) {\n stackedOverDimensionDefine.storeDimIndex = store.ensureCalculationDimension(stackedOverDimension, stackedDimType);\n stackResultDimensionDefine.storeDimIndex = store.ensureCalculationDimension(stackResultDimension, stackedDimType);\n }\n schema.appendCalculationDimension(stackedOverDimensionDefine);\n schema.appendCalculationDimension(stackResultDimensionDefine);\n } else {\n dimensionDefineList.push(stackedOverDimensionDefine);\n dimensionDefineList.push(stackResultDimensionDefine);\n }\n }\n return {\n stackedDimension: stackedDimInfo && stackedDimInfo.name,\n stackedByDimension: stackedByDimInfo && stackedByDimInfo.name,\n isStackedByIndex: byIndex,\n stackedOverDimension: stackedOverDimension,\n stackResultDimension: stackResultDimension\n };\n}\nfunction isLegacyDimensionsInput(dimensionsInput) {\n return !isSeriesDataSchema(dimensionsInput.schema);\n}\nexport function isDimensionStacked(data, stackedDim) {\n // Each single series only maps to one pair of axis. So we do not need to\n // check stackByDim, whatever stacked by a dimension or stacked by index.\n return !!stackedDim && stackedDim === data.getCalculationInfo('stackedDimension');\n}\nexport function getStackedDimension(data, targetDim) {\n return isDimensionStacked(data, targetDim) ? data.getCalculationInfo('stackResultDimension') : targetDim;\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport SeriesData from '../../data/SeriesData.js';\nimport prepareSeriesDataSchema from '../../data/helper/createDimensions.js';\nimport { getDimensionTypeByAxis } from '../../data/helper/dimensionHelper.js';\nimport { getDataItemValue } from '../../util/model.js';\nimport CoordinateSystem from '../../core/CoordinateSystem.js';\nimport { getCoordSysInfoBySeries } from '../../model/referHelper.js';\nimport { createSourceFromSeriesDataOption } from '../../data/Source.js';\nimport { enableDataStack } from '../../data/helper/dataStackHelper.js';\nimport { makeSeriesEncodeForAxisCoordSys } from '../../data/helper/sourceHelper.js';\nimport { SOURCE_FORMAT_ORIGINAL } from '../../util/types.js';\nfunction getCoordSysDimDefs(seriesModel, coordSysInfo) {\n var coordSysName = seriesModel.get('coordinateSystem');\n var registeredCoordSys = CoordinateSystem.get(coordSysName);\n var coordSysDimDefs;\n if (coordSysInfo && coordSysInfo.coordSysDims) {\n coordSysDimDefs = zrUtil.map(coordSysInfo.coordSysDims, function (dim) {\n var dimInfo = {\n name: dim\n };\n var axisModel = coordSysInfo.axisMap.get(dim);\n if (axisModel) {\n var axisType = axisModel.get('type');\n dimInfo.type = getDimensionTypeByAxis(axisType);\n }\n return dimInfo;\n });\n }\n if (!coordSysDimDefs) {\n // Get dimensions from registered coordinate system\n coordSysDimDefs = registeredCoordSys && (registeredCoordSys.getDimensionsInfo ? registeredCoordSys.getDimensionsInfo() : registeredCoordSys.dimensions.slice()) || ['x', 'y'];\n }\n return coordSysDimDefs;\n}\nfunction injectOrdinalMeta(dimInfoList, createInvertedIndices, coordSysInfo) {\n var firstCategoryDimIndex;\n var hasNameEncode;\n coordSysInfo && zrUtil.each(dimInfoList, function (dimInfo, dimIndex) {\n var coordDim = dimInfo.coordDim;\n var categoryAxisModel = coordSysInfo.categoryAxisMap.get(coordDim);\n if (categoryAxisModel) {\n if (firstCategoryDimIndex == null) {\n firstCategoryDimIndex = dimIndex;\n }\n dimInfo.ordinalMeta = categoryAxisModel.getOrdinalMeta();\n if (createInvertedIndices) {\n dimInfo.createInvertedIndices = true;\n }\n }\n if (dimInfo.otherDims.itemName != null) {\n hasNameEncode = true;\n }\n });\n if (!hasNameEncode && firstCategoryDimIndex != null) {\n dimInfoList[firstCategoryDimIndex].otherDims.itemName = 0;\n }\n return firstCategoryDimIndex;\n}\n/**\n * Caution: there are side effects to `sourceManager` in this method.\n * Should better only be called in `Series['getInitialData']`.\n */\nfunction createSeriesData(sourceRaw, seriesModel, opt) {\n opt = opt || {};\n var sourceManager = seriesModel.getSourceManager();\n var source;\n var isOriginalSource = false;\n if (sourceRaw) {\n isOriginalSource = true;\n source = createSourceFromSeriesDataOption(sourceRaw);\n } else {\n source = sourceManager.getSource();\n // Is series.data. not dataset.\n isOriginalSource = source.sourceFormat === SOURCE_FORMAT_ORIGINAL;\n }\n var coordSysInfo = getCoordSysInfoBySeries(seriesModel);\n var coordSysDimDefs = getCoordSysDimDefs(seriesModel, coordSysInfo);\n var useEncodeDefaulter = opt.useEncodeDefaulter;\n var encodeDefaulter = zrUtil.isFunction(useEncodeDefaulter) ? useEncodeDefaulter : useEncodeDefaulter ? zrUtil.curry(makeSeriesEncodeForAxisCoordSys, coordSysDimDefs, seriesModel) : null;\n var createDimensionOptions = {\n coordDimensions: coordSysDimDefs,\n generateCoord: opt.generateCoord,\n encodeDefine: seriesModel.getEncode(),\n encodeDefaulter: encodeDefaulter,\n canOmitUnusedDimensions: !isOriginalSource\n };\n var schema = prepareSeriesDataSchema(source, createDimensionOptions);\n var firstCategoryDimIndex = injectOrdinalMeta(schema.dimensions, opt.createInvertedIndices, coordSysInfo);\n var store = !isOriginalSource ? sourceManager.getSharedDataStore(schema) : null;\n var stackCalculationInfo = enableDataStack(seriesModel, {\n schema: schema,\n store: store\n });\n var data = new SeriesData(schema, seriesModel);\n data.setCalculationInfo(stackCalculationInfo);\n var dimValueGetter = firstCategoryDimIndex != null && isNeedCompleteOrdinalData(source) ? function (itemOpt, dimName, dataIndex, dimIndex) {\n // Use dataIndex as ordinal value in categoryAxis\n return dimIndex === firstCategoryDimIndex ? dataIndex : this.defaultDimValueGetter(itemOpt, dimName, dataIndex, dimIndex);\n } : null;\n data.hasItemOption = false;\n data.initData(\n // Try to reuse the data store in sourceManager if using dataset.\n isOriginalSource ? source : store, null, dimValueGetter);\n return data;\n}\nfunction isNeedCompleteOrdinalData(source) {\n if (source.sourceFormat === SOURCE_FORMAT_ORIGINAL) {\n var sampleItem = firstDataNotNull(source.data || []);\n return !zrUtil.isArray(getDataItemValue(sampleItem));\n }\n}\nfunction firstDataNotNull(arr) {\n var i = 0;\n while (i < arr.length && arr[i] == null) {\n i++;\n }\n return arr[i];\n}\nexport default createSeriesData;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as clazzUtil from '../util/clazz.js';\nvar Scale = /** @class */function () {\n function Scale(setting) {\n this._setting = setting || {};\n this._extent = [Infinity, -Infinity];\n }\n Scale.prototype.getSetting = function (name) {\n return this._setting[name];\n };\n /**\n * Set extent from data\n */\n Scale.prototype.unionExtent = function (other) {\n var extent = this._extent;\n other[0] < extent[0] && (extent[0] = other[0]);\n other[1] > extent[1] && (extent[1] = other[1]);\n // not setExtent because in log axis it may transformed to power\n // this.setExtent(extent[0], extent[1]);\n };\n /**\n * Set extent from data\n */\n Scale.prototype.unionExtentFromData = function (data, dim) {\n this.unionExtent(data.getApproximateExtent(dim));\n };\n /**\n * Get extent\n *\n * Extent is always in increase order.\n */\n Scale.prototype.getExtent = function () {\n return this._extent.slice();\n };\n /**\n * Set extent\n */\n Scale.prototype.setExtent = function (start, end) {\n var thisExtent = this._extent;\n if (!isNaN(start)) {\n thisExtent[0] = start;\n }\n if (!isNaN(end)) {\n thisExtent[1] = end;\n }\n };\n /**\n * If value is in extent range\n */\n Scale.prototype.isInExtentRange = function (value) {\n return this._extent[0] <= value && this._extent[1] >= value;\n };\n /**\n * When axis extent depends on data and no data exists,\n * axis ticks should not be drawn, which is named 'blank'.\n */\n Scale.prototype.isBlank = function () {\n return this._isBlank;\n };\n /**\n * When axis extent depends on data and no data exists,\n * axis ticks should not be drawn, which is named 'blank'.\n */\n Scale.prototype.setBlank = function (isBlank) {\n this._isBlank = isBlank;\n };\n return Scale;\n}();\nclazzUtil.enableClassManagement(Scale);\nexport default Scale;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { createHashMap, isObject, map, isString } from 'zrender/lib/core/util.js';\nvar uidBase = 0;\nvar OrdinalMeta = /** @class */function () {\n function OrdinalMeta(opt) {\n this.categories = opt.categories || [];\n this._needCollect = opt.needCollect;\n this._deduplication = opt.deduplication;\n this.uid = ++uidBase;\n }\n OrdinalMeta.createByAxisModel = function (axisModel) {\n var option = axisModel.option;\n var data = option.data;\n var categories = data && map(data, getName);\n return new OrdinalMeta({\n categories: categories,\n needCollect: !categories,\n // deduplication is default in axis.\n deduplication: option.dedplication !== false\n });\n };\n ;\n OrdinalMeta.prototype.getOrdinal = function (category) {\n // @ts-ignore\n return this._getOrCreateMap().get(category);\n };\n /**\n * @return The ordinal. If not found, return NaN.\n */\n OrdinalMeta.prototype.parseAndCollect = function (category) {\n var index;\n var needCollect = this._needCollect;\n // The value of category dim can be the index of the given category set.\n // This feature is only supported when !needCollect, because we should\n // consider a common case: a value is 2017, which is a number but is\n // expected to be tread as a category. This case usually happen in dataset,\n // where it happent to be no need of the index feature.\n if (!isString(category) && !needCollect) {\n return category;\n }\n // Optimize for the scenario:\n // category is ['2012-01-01', '2012-01-02', ...], where the input\n // data has been ensured not duplicate and is large data.\n // Notice, if a dataset dimension provide categroies, usually echarts\n // should remove duplication except user tell echarts dont do that\n // (set axis.deduplication = false), because echarts do not know whether\n // the values in the category dimension has duplication (consider the\n // parallel-aqi example)\n if (needCollect && !this._deduplication) {\n index = this.categories.length;\n this.categories[index] = category;\n return index;\n }\n var map = this._getOrCreateMap();\n // @ts-ignore\n index = map.get(category);\n if (index == null) {\n if (needCollect) {\n index = this.categories.length;\n this.categories[index] = category;\n // @ts-ignore\n map.set(category, index);\n } else {\n index = NaN;\n }\n }\n return index;\n };\n // Consider big data, do not create map until needed.\n OrdinalMeta.prototype._getOrCreateMap = function () {\n return this._map || (this._map = createHashMap(this.categories));\n };\n return OrdinalMeta;\n}();\nfunction getName(obj) {\n if (isObject(obj) && obj.value != null) {\n return obj.value;\n } else {\n return obj + '';\n }\n}\nexport default OrdinalMeta;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { getPrecision, round, nice, quantityExponent } from '../util/number.js';\nexport function isValueNice(val) {\n var exp10 = Math.pow(10, quantityExponent(Math.abs(val)));\n var f = Math.abs(val / exp10);\n return f === 0 || f === 1 || f === 2 || f === 3 || f === 5;\n}\nexport function isIntervalOrLogScale(scale) {\n return scale.type === 'interval' || scale.type === 'log';\n}\n/**\n * @param extent Both extent[0] and extent[1] should be valid number.\n * Should be extent[0] < extent[1].\n * @param splitNumber splitNumber should be >= 1.\n */\nexport function intervalScaleNiceTicks(extent, splitNumber, minInterval, maxInterval) {\n var result = {};\n var span = extent[1] - extent[0];\n var interval = result.interval = nice(span / splitNumber, true);\n if (minInterval != null && interval < minInterval) {\n interval = result.interval = minInterval;\n }\n if (maxInterval != null && interval > maxInterval) {\n interval = result.interval = maxInterval;\n }\n // Tow more digital for tick.\n var precision = result.intervalPrecision = getIntervalPrecision(interval);\n // Niced extent inside original extent\n var niceTickExtent = result.niceTickExtent = [round(Math.ceil(extent[0] / interval) * interval, precision), round(Math.floor(extent[1] / interval) * interval, precision)];\n fixExtent(niceTickExtent, extent);\n return result;\n}\nexport function increaseInterval(interval) {\n var exp10 = Math.pow(10, quantityExponent(interval));\n // Increase interval\n var f = interval / exp10;\n if (!f) {\n f = 1;\n } else if (f === 2) {\n f = 3;\n } else if (f === 3) {\n f = 5;\n } else {\n // f is 1 or 5\n f *= 2;\n }\n return round(f * exp10);\n}\n/**\n * @return interval precision\n */\nexport function getIntervalPrecision(interval) {\n // Tow more digital for tick.\n return getPrecision(interval) + 2;\n}\nfunction clamp(niceTickExtent, idx, extent) {\n niceTickExtent[idx] = Math.max(Math.min(niceTickExtent[idx], extent[1]), extent[0]);\n}\n// In some cases (e.g., splitNumber is 1), niceTickExtent may be out of extent.\nexport function fixExtent(niceTickExtent, extent) {\n !isFinite(niceTickExtent[0]) && (niceTickExtent[0] = extent[0]);\n !isFinite(niceTickExtent[1]) && (niceTickExtent[1] = extent[1]);\n clamp(niceTickExtent, 0, extent);\n clamp(niceTickExtent, 1, extent);\n if (niceTickExtent[0] > niceTickExtent[1]) {\n niceTickExtent[0] = niceTickExtent[1];\n }\n}\nexport function contain(val, extent) {\n return val >= extent[0] && val <= extent[1];\n}\nexport function normalize(val, extent) {\n if (extent[1] === extent[0]) {\n return 0.5;\n }\n return (val - extent[0]) / (extent[1] - extent[0]);\n}\nexport function scale(val, extent) {\n return val * (extent[1] - extent[0]) + extent[0];\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\n/**\n * Linear continuous scale\n * http://en.wikipedia.org/wiki/Level_of_measurement\n */\n// FIXME only one data\nimport Scale from './Scale.js';\nimport OrdinalMeta from '../data/OrdinalMeta.js';\nimport * as scaleHelper from './helper.js';\nimport { isArray, map, isObject, isString } from 'zrender/lib/core/util.js';\nvar OrdinalScale = /** @class */function (_super) {\n __extends(OrdinalScale, _super);\n function OrdinalScale(setting) {\n var _this = _super.call(this, setting) || this;\n _this.type = 'ordinal';\n var ordinalMeta = _this.getSetting('ordinalMeta');\n // Caution: Should not use instanceof, consider ec-extensions using\n // import approach to get OrdinalMeta class.\n if (!ordinalMeta) {\n ordinalMeta = new OrdinalMeta({});\n }\n if (isArray(ordinalMeta)) {\n ordinalMeta = new OrdinalMeta({\n categories: map(ordinalMeta, function (item) {\n return isObject(item) ? item.value : item;\n })\n });\n }\n _this._ordinalMeta = ordinalMeta;\n _this._extent = _this.getSetting('extent') || [0, ordinalMeta.categories.length - 1];\n return _this;\n }\n OrdinalScale.prototype.parse = function (val) {\n // Caution: Math.round(null) will return `0` rather than `NaN`\n if (val == null) {\n return NaN;\n }\n return isString(val) ? this._ordinalMeta.getOrdinal(val)\n // val might be float.\n : Math.round(val);\n };\n OrdinalScale.prototype.contain = function (rank) {\n rank = this.parse(rank);\n return scaleHelper.contain(rank, this._extent) && this._ordinalMeta.categories[rank] != null;\n };\n /**\n * Normalize given rank or name to linear [0, 1]\n * @param val raw ordinal number.\n * @return normalized value in [0, 1].\n */\n OrdinalScale.prototype.normalize = function (val) {\n val = this._getTickNumber(this.parse(val));\n return scaleHelper.normalize(val, this._extent);\n };\n /**\n * @param val normalized value in [0, 1].\n * @return raw ordinal number.\n */\n OrdinalScale.prototype.scale = function (val) {\n val = Math.round(scaleHelper.scale(val, this._extent));\n return this.getRawOrdinalNumber(val);\n };\n OrdinalScale.prototype.getTicks = function () {\n var ticks = [];\n var extent = this._extent;\n var rank = extent[0];\n while (rank <= extent[1]) {\n ticks.push({\n value: rank\n });\n rank++;\n }\n return ticks;\n };\n OrdinalScale.prototype.getMinorTicks = function (splitNumber) {\n // Not support.\n return;\n };\n /**\n * @see `Ordinal['_ordinalNumbersByTick']`\n */\n OrdinalScale.prototype.setSortInfo = function (info) {\n if (info == null) {\n this._ordinalNumbersByTick = this._ticksByOrdinalNumber = null;\n return;\n }\n var infoOrdinalNumbers = info.ordinalNumbers;\n var ordinalsByTick = this._ordinalNumbersByTick = [];\n var ticksByOrdinal = this._ticksByOrdinalNumber = [];\n // Unnecessary support negative tick in `realtimeSort`.\n var tickNum = 0;\n var allCategoryLen = this._ordinalMeta.categories.length;\n for (var len = Math.min(allCategoryLen, infoOrdinalNumbers.length); tickNum < len; ++tickNum) {\n var ordinalNumber = infoOrdinalNumbers[tickNum];\n ordinalsByTick[tickNum] = ordinalNumber;\n ticksByOrdinal[ordinalNumber] = tickNum;\n }\n // Handle that `series.data` only covers part of the `axis.category.data`.\n var unusedOrdinal = 0;\n for (; tickNum < allCategoryLen; ++tickNum) {\n while (ticksByOrdinal[unusedOrdinal] != null) {\n unusedOrdinal++;\n }\n ;\n ordinalsByTick.push(unusedOrdinal);\n ticksByOrdinal[unusedOrdinal] = tickNum;\n }\n };\n OrdinalScale.prototype._getTickNumber = function (ordinal) {\n var ticksByOrdinalNumber = this._ticksByOrdinalNumber;\n // also support ordinal out of range of `ordinalMeta.categories.length`,\n // where ordinal numbers are used as tick value directly.\n return ticksByOrdinalNumber && ordinal >= 0 && ordinal < ticksByOrdinalNumber.length ? ticksByOrdinalNumber[ordinal] : ordinal;\n };\n /**\n * @usage\n * ```js\n * const ordinalNumber = ordinalScale.getRawOrdinalNumber(tickVal);\n *\n * // case0\n * const rawOrdinalValue = axisModel.getCategories()[ordinalNumber];\n * // case1\n * const rawOrdinalValue = this._ordinalMeta.categories[ordinalNumber];\n * // case2\n * const coord = axis.dataToCoord(ordinalNumber);\n * ```\n *\n * @param {OrdinalNumber} tickNumber index of display\n */\n OrdinalScale.prototype.getRawOrdinalNumber = function (tickNumber) {\n var ordinalNumbersByTick = this._ordinalNumbersByTick;\n // tickNumber may be out of range, e.g., when axis max is larger than `ordinalMeta.categories.length`.,\n // where ordinal numbers are used as tick value directly.\n return ordinalNumbersByTick && tickNumber >= 0 && tickNumber < ordinalNumbersByTick.length ? ordinalNumbersByTick[tickNumber] : tickNumber;\n };\n /**\n * Get item on tick\n */\n OrdinalScale.prototype.getLabel = function (tick) {\n if (!this.isBlank()) {\n var ordinalNumber = this.getRawOrdinalNumber(tick.value);\n var cateogry = this._ordinalMeta.categories[ordinalNumber];\n // Note that if no data, ordinalMeta.categories is an empty array.\n // Return empty if it's not exist.\n return cateogry == null ? '' : cateogry + '';\n }\n };\n OrdinalScale.prototype.count = function () {\n return this._extent[1] - this._extent[0] + 1;\n };\n OrdinalScale.prototype.unionExtentFromData = function (data, dim) {\n this.unionExtent(data.getApproximateExtent(dim));\n };\n /**\n * @override\n * If value is in extent range\n */\n OrdinalScale.prototype.isInExtentRange = function (value) {\n value = this._getTickNumber(value);\n return this._extent[0] <= value && this._extent[1] >= value;\n };\n OrdinalScale.prototype.getOrdinalMeta = function () {\n return this._ordinalMeta;\n };\n OrdinalScale.prototype.calcNiceTicks = function () {};\n OrdinalScale.prototype.calcNiceExtent = function () {};\n OrdinalScale.type = 'ordinal';\n return OrdinalScale;\n}(Scale);\nScale.registerClass(OrdinalScale);\nexport default OrdinalScale;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as numberUtil from '../util/number.js';\nimport * as formatUtil from '../util/format.js';\nimport Scale from './Scale.js';\nimport * as helper from './helper.js';\nvar roundNumber = numberUtil.round;\nvar IntervalScale = /** @class */function (_super) {\n __extends(IntervalScale, _super);\n function IntervalScale() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'interval';\n // Step is calculated in adjustExtent.\n _this._interval = 0;\n _this._intervalPrecision = 2;\n return _this;\n }\n IntervalScale.prototype.parse = function (val) {\n return val;\n };\n IntervalScale.prototype.contain = function (val) {\n return helper.contain(val, this._extent);\n };\n IntervalScale.prototype.normalize = function (val) {\n return helper.normalize(val, this._extent);\n };\n IntervalScale.prototype.scale = function (val) {\n return helper.scale(val, this._extent);\n };\n IntervalScale.prototype.setExtent = function (start, end) {\n var thisExtent = this._extent;\n // start,end may be a Number like '25',so...\n if (!isNaN(start)) {\n thisExtent[0] = parseFloat(start);\n }\n if (!isNaN(end)) {\n thisExtent[1] = parseFloat(end);\n }\n };\n IntervalScale.prototype.unionExtent = function (other) {\n var extent = this._extent;\n other[0] < extent[0] && (extent[0] = other[0]);\n other[1] > extent[1] && (extent[1] = other[1]);\n // unionExtent may called by it's sub classes\n this.setExtent(extent[0], extent[1]);\n };\n IntervalScale.prototype.getInterval = function () {\n return this._interval;\n };\n IntervalScale.prototype.setInterval = function (interval) {\n this._interval = interval;\n // Dropped auto calculated niceExtent and use user-set extent.\n // We assume user wants to set both interval, min, max to get a better result.\n this._niceExtent = this._extent.slice();\n this._intervalPrecision = helper.getIntervalPrecision(interval);\n };\n /**\n * @param expandToNicedExtent Whether expand the ticks to niced extent.\n */\n IntervalScale.prototype.getTicks = function (expandToNicedExtent) {\n var interval = this._interval;\n var extent = this._extent;\n var niceTickExtent = this._niceExtent;\n var intervalPrecision = this._intervalPrecision;\n var ticks = [];\n // If interval is 0, return [];\n if (!interval) {\n return ticks;\n }\n // Consider this case: using dataZoom toolbox, zoom and zoom.\n var safeLimit = 10000;\n if (extent[0] < niceTickExtent[0]) {\n if (expandToNicedExtent) {\n ticks.push({\n value: roundNumber(niceTickExtent[0] - interval, intervalPrecision)\n });\n } else {\n ticks.push({\n value: extent[0]\n });\n }\n }\n var tick = niceTickExtent[0];\n while (tick <= niceTickExtent[1]) {\n ticks.push({\n value: tick\n });\n // Avoid rounding error\n tick = roundNumber(tick + interval, intervalPrecision);\n if (tick === ticks[ticks.length - 1].value) {\n // Consider out of safe float point, e.g.,\n // -3711126.9907707 + 2e-10 === -3711126.9907707\n break;\n }\n if (ticks.length > safeLimit) {\n return [];\n }\n }\n // Consider this case: the last item of ticks is smaller\n // than niceTickExtent[1] and niceTickExtent[1] === extent[1].\n var lastNiceTick = ticks.length ? ticks[ticks.length - 1].value : niceTickExtent[1];\n if (extent[1] > lastNiceTick) {\n if (expandToNicedExtent) {\n ticks.push({\n value: roundNumber(lastNiceTick + interval, intervalPrecision)\n });\n } else {\n ticks.push({\n value: extent[1]\n });\n }\n }\n return ticks;\n };\n IntervalScale.prototype.getMinorTicks = function (splitNumber) {\n var ticks = this.getTicks(true);\n var minorTicks = [];\n var extent = this.getExtent();\n for (var i = 1; i < ticks.length; i++) {\n var nextTick = ticks[i];\n var prevTick = ticks[i - 1];\n var count = 0;\n var minorTicksGroup = [];\n var interval = nextTick.value - prevTick.value;\n var minorInterval = interval / splitNumber;\n while (count < splitNumber - 1) {\n var minorTick = roundNumber(prevTick.value + (count + 1) * minorInterval);\n // For the first and last interval. The count may be less than splitNumber.\n if (minorTick > extent[0] && minorTick < extent[1]) {\n minorTicksGroup.push(minorTick);\n }\n count++;\n }\n minorTicks.push(minorTicksGroup);\n }\n return minorTicks;\n };\n /**\n * @param opt.precision If 'auto', use nice presision.\n * @param opt.pad returns 1.50 but not 1.5 if precision is 2.\n */\n IntervalScale.prototype.getLabel = function (data, opt) {\n if (data == null) {\n return '';\n }\n var precision = opt && opt.precision;\n if (precision == null) {\n precision = numberUtil.getPrecision(data.value) || 0;\n } else if (precision === 'auto') {\n // Should be more precise then tick.\n precision = this._intervalPrecision;\n }\n // (1) If `precision` is set, 12.005 should be display as '12.00500'.\n // (2) Use roundNumber (toFixed) to avoid scientific notation like '3.5e-7'.\n var dataNum = roundNumber(data.value, precision, true);\n return formatUtil.addCommas(dataNum);\n };\n /**\n * @param splitNumber By default `5`.\n */\n IntervalScale.prototype.calcNiceTicks = function (splitNumber, minInterval, maxInterval) {\n splitNumber = splitNumber || 5;\n var extent = this._extent;\n var span = extent[1] - extent[0];\n if (!isFinite(span)) {\n return;\n }\n // User may set axis min 0 and data are all negative\n // FIXME If it needs to reverse ?\n if (span < 0) {\n span = -span;\n extent.reverse();\n }\n var result = helper.intervalScaleNiceTicks(extent, splitNumber, minInterval, maxInterval);\n this._intervalPrecision = result.intervalPrecision;\n this._interval = result.interval;\n this._niceExtent = result.niceTickExtent;\n };\n IntervalScale.prototype.calcNiceExtent = function (opt) {\n var extent = this._extent;\n // If extent start and end are same, expand them\n if (extent[0] === extent[1]) {\n if (extent[0] !== 0) {\n // Expand extent\n // Note that extents can be both negative. See #13154\n var expandSize = Math.abs(extent[0]);\n // In the fowllowing case\n // Axis has been fixed max 100\n // Plus data are all 100 and axis extent are [100, 100].\n // Extend to the both side will cause expanded max is larger than fixed max.\n // So only expand to the smaller side.\n if (!opt.fixMax) {\n extent[1] += expandSize / 2;\n extent[0] -= expandSize / 2;\n } else {\n extent[0] -= expandSize / 2;\n }\n } else {\n extent[1] = 1;\n }\n }\n var span = extent[1] - extent[0];\n // If there are no data and extent are [Infinity, -Infinity]\n if (!isFinite(span)) {\n extent[0] = 0;\n extent[1] = 1;\n }\n this.calcNiceTicks(opt.splitNumber, opt.minInterval, opt.maxInterval);\n // let extent = this._extent;\n var interval = this._interval;\n if (!opt.fixMin) {\n extent[0] = roundNumber(Math.floor(extent[0] / interval) * interval);\n }\n if (!opt.fixMax) {\n extent[1] = roundNumber(Math.ceil(extent[1] / interval) * interval);\n }\n };\n IntervalScale.prototype.setNiceExtent = function (min, max) {\n this._niceExtent = [min, max];\n };\n IntervalScale.type = 'interval';\n return IntervalScale;\n}(Scale);\nScale.registerClass(IntervalScale);\nexport default IntervalScale;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { isArray } from 'zrender/lib/core/util.js';\n/* global Float32Array */\nvar supportFloat32Array = typeof Float32Array !== 'undefined';\nvar Float32ArrayCtor = !supportFloat32Array ? Array : Float32Array;\nexport function createFloat32Array(arg) {\n if (isArray(arg)) {\n // Return self directly if don't support TypedArray.\n return supportFloat32Array ? new Float32Array(arg) : arg;\n }\n // Else is number\n return new Float32ArrayCtor(arg);\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { each, defaults, keys } from 'zrender/lib/core/util.js';\nimport { parsePercent } from '../util/number.js';\nimport { isDimensionStacked } from '../data/helper/dataStackHelper.js';\nimport createRenderPlanner from '../chart/helper/createRenderPlanner.js';\nimport { createFloat32Array } from '../util/vendor.js';\nvar STACK_PREFIX = '__ec_stack_';\nfunction getSeriesStackId(seriesModel) {\n return seriesModel.get('stack') || STACK_PREFIX + seriesModel.seriesIndex;\n}\nfunction getAxisKey(axis) {\n return axis.dim + axis.index;\n}\n/**\n * @return {Object} {width, offset, offsetCenter} If axis.type is not 'category', return undefined.\n */\nexport function getLayoutOnAxis(opt) {\n var params = [];\n var baseAxis = opt.axis;\n var axisKey = 'axis0';\n if (baseAxis.type !== 'category') {\n return;\n }\n var bandWidth = baseAxis.getBandWidth();\n for (var i = 0; i < opt.count || 0; i++) {\n params.push(defaults({\n bandWidth: bandWidth,\n axisKey: axisKey,\n stackId: STACK_PREFIX + i\n }, opt));\n }\n var widthAndOffsets = doCalBarWidthAndOffset(params);\n var result = [];\n for (var i = 0; i < opt.count; i++) {\n var item = widthAndOffsets[axisKey][STACK_PREFIX + i];\n item.offsetCenter = item.offset + item.width / 2;\n result.push(item);\n }\n return result;\n}\nexport function prepareLayoutBarSeries(seriesType, ecModel) {\n var seriesModels = [];\n ecModel.eachSeriesByType(seriesType, function (seriesModel) {\n // Check series coordinate, do layout for cartesian2d only\n if (isOnCartesian(seriesModel)) {\n seriesModels.push(seriesModel);\n }\n });\n return seriesModels;\n}\n/**\n * Map from (baseAxis.dim + '_' + baseAxis.index) to min gap of two adjacent\n * values.\n * This works for time axes, value axes, and log axes.\n * For a single time axis, return value is in the form like\n * {'x_0': [1000000]}.\n * The value of 1000000 is in milliseconds.\n */\nfunction getValueAxesMinGaps(barSeries) {\n /**\n * Map from axis.index to values.\n * For a single time axis, axisValues is in the form like\n * {'x_0': [1495555200000, 1495641600000, 1495728000000]}.\n * Items in axisValues[x], e.g. 1495555200000, are time values of all\n * series.\n */\n var axisValues = {};\n each(barSeries, function (seriesModel) {\n var cartesian = seriesModel.coordinateSystem;\n var baseAxis = cartesian.getBaseAxis();\n if (baseAxis.type !== 'time' && baseAxis.type !== 'value') {\n return;\n }\n var data = seriesModel.getData();\n var key = baseAxis.dim + '_' + baseAxis.index;\n var dimIdx = data.getDimensionIndex(data.mapDimension(baseAxis.dim));\n var store = data.getStore();\n for (var i = 0, cnt = store.count(); i < cnt; ++i) {\n var value = store.get(dimIdx, i);\n if (!axisValues[key]) {\n // No previous data for the axis\n axisValues[key] = [value];\n } else {\n // No value in previous series\n axisValues[key].push(value);\n }\n // Ignore duplicated time values in the same axis\n }\n });\n var axisMinGaps = {};\n for (var key in axisValues) {\n if (axisValues.hasOwnProperty(key)) {\n var valuesInAxis = axisValues[key];\n if (valuesInAxis) {\n // Sort axis values into ascending order to calculate gaps\n valuesInAxis.sort(function (a, b) {\n return a - b;\n });\n var min = null;\n for (var j = 1; j < valuesInAxis.length; ++j) {\n var delta = valuesInAxis[j] - valuesInAxis[j - 1];\n if (delta > 0) {\n // Ignore 0 delta because they are of the same axis value\n min = min === null ? delta : Math.min(min, delta);\n }\n }\n // Set to null if only have one data\n axisMinGaps[key] = min;\n }\n }\n }\n return axisMinGaps;\n}\nexport function makeColumnLayout(barSeries) {\n var axisMinGaps = getValueAxesMinGaps(barSeries);\n var seriesInfoList = [];\n each(barSeries, function (seriesModel) {\n var cartesian = seriesModel.coordinateSystem;\n var baseAxis = cartesian.getBaseAxis();\n var axisExtent = baseAxis.getExtent();\n var bandWidth;\n if (baseAxis.type === 'category') {\n bandWidth = baseAxis.getBandWidth();\n } else if (baseAxis.type === 'value' || baseAxis.type === 'time') {\n var key = baseAxis.dim + '_' + baseAxis.index;\n var minGap = axisMinGaps[key];\n var extentSpan = Math.abs(axisExtent[1] - axisExtent[0]);\n var scale = baseAxis.scale.getExtent();\n var scaleSpan = Math.abs(scale[1] - scale[0]);\n bandWidth = minGap ? extentSpan / scaleSpan * minGap : extentSpan; // When there is only one data value\n } else {\n var data = seriesModel.getData();\n bandWidth = Math.abs(axisExtent[1] - axisExtent[0]) / data.count();\n }\n var barWidth = parsePercent(seriesModel.get('barWidth'), bandWidth);\n var barMaxWidth = parsePercent(seriesModel.get('barMaxWidth'), bandWidth);\n var barMinWidth = parsePercent(\n // barMinWidth by default is 0.5 / 1 in cartesian. Because in value axis,\n // the auto-calculated bar width might be less than 0.5 / 1.\n seriesModel.get('barMinWidth') || (isInLargeMode(seriesModel) ? 0.5 : 1), bandWidth);\n var barGap = seriesModel.get('barGap');\n var barCategoryGap = seriesModel.get('barCategoryGap');\n seriesInfoList.push({\n bandWidth: bandWidth,\n barWidth: barWidth,\n barMaxWidth: barMaxWidth,\n barMinWidth: barMinWidth,\n barGap: barGap,\n barCategoryGap: barCategoryGap,\n axisKey: getAxisKey(baseAxis),\n stackId: getSeriesStackId(seriesModel)\n });\n });\n return doCalBarWidthAndOffset(seriesInfoList);\n}\nfunction doCalBarWidthAndOffset(seriesInfoList) {\n // Columns info on each category axis. Key is cartesian name\n var columnsMap = {};\n each(seriesInfoList, function (seriesInfo, idx) {\n var axisKey = seriesInfo.axisKey;\n var bandWidth = seriesInfo.bandWidth;\n var columnsOnAxis = columnsMap[axisKey] || {\n bandWidth: bandWidth,\n remainedWidth: bandWidth,\n autoWidthCount: 0,\n categoryGap: null,\n gap: '20%',\n stacks: {}\n };\n var stacks = columnsOnAxis.stacks;\n columnsMap[axisKey] = columnsOnAxis;\n var stackId = seriesInfo.stackId;\n if (!stacks[stackId]) {\n columnsOnAxis.autoWidthCount++;\n }\n stacks[stackId] = stacks[stackId] || {\n width: 0,\n maxWidth: 0\n };\n // Caution: In a single coordinate system, these barGrid attributes\n // will be shared by series. Consider that they have default values,\n // only the attributes set on the last series will work.\n // Do not change this fact unless there will be a break change.\n var barWidth = seriesInfo.barWidth;\n if (barWidth && !stacks[stackId].width) {\n // See #6312, do not restrict width.\n stacks[stackId].width = barWidth;\n barWidth = Math.min(columnsOnAxis.remainedWidth, barWidth);\n columnsOnAxis.remainedWidth -= barWidth;\n }\n var barMaxWidth = seriesInfo.barMaxWidth;\n barMaxWidth && (stacks[stackId].maxWidth = barMaxWidth);\n var barMinWidth = seriesInfo.barMinWidth;\n barMinWidth && (stacks[stackId].minWidth = barMinWidth);\n var barGap = seriesInfo.barGap;\n barGap != null && (columnsOnAxis.gap = barGap);\n var barCategoryGap = seriesInfo.barCategoryGap;\n barCategoryGap != null && (columnsOnAxis.categoryGap = barCategoryGap);\n });\n var result = {};\n each(columnsMap, function (columnsOnAxis, coordSysName) {\n result[coordSysName] = {};\n var stacks = columnsOnAxis.stacks;\n var bandWidth = columnsOnAxis.bandWidth;\n var categoryGapPercent = columnsOnAxis.categoryGap;\n if (categoryGapPercent == null) {\n var columnCount = keys(stacks).length;\n // More columns in one group\n // the spaces between group is smaller. Or the column will be too thin.\n categoryGapPercent = Math.max(35 - columnCount * 4, 15) + '%';\n }\n var categoryGap = parsePercent(categoryGapPercent, bandWidth);\n var barGapPercent = parsePercent(columnsOnAxis.gap, 1);\n var remainedWidth = columnsOnAxis.remainedWidth;\n var autoWidthCount = columnsOnAxis.autoWidthCount;\n var autoWidth = (remainedWidth - categoryGap) / (autoWidthCount + (autoWidthCount - 1) * barGapPercent);\n autoWidth = Math.max(autoWidth, 0);\n // Find if any auto calculated bar exceeded maxBarWidth\n each(stacks, function (column) {\n var maxWidth = column.maxWidth;\n var minWidth = column.minWidth;\n if (!column.width) {\n var finalWidth = autoWidth;\n if (maxWidth && maxWidth < finalWidth) {\n finalWidth = Math.min(maxWidth, remainedWidth);\n }\n // `minWidth` has higher priority. `minWidth` decide that whether the\n // bar is able to be visible. So `minWidth` should not be restricted\n // by `maxWidth` or `remainedWidth` (which is from `bandWidth`). In\n // the extreme cases for `value` axis, bars are allowed to overlap\n // with each other if `minWidth` specified.\n if (minWidth && minWidth > finalWidth) {\n finalWidth = minWidth;\n }\n if (finalWidth !== autoWidth) {\n column.width = finalWidth;\n remainedWidth -= finalWidth + barGapPercent * finalWidth;\n autoWidthCount--;\n }\n } else {\n // `barMinWidth/barMaxWidth` has higher priority than `barWidth`, as\n // CSS does. Because barWidth can be a percent value, where\n // `barMaxWidth` can be used to restrict the final width.\n var finalWidth = column.width;\n if (maxWidth) {\n finalWidth = Math.min(finalWidth, maxWidth);\n }\n // `minWidth` has higher priority, as described above\n if (minWidth) {\n finalWidth = Math.max(finalWidth, minWidth);\n }\n column.width = finalWidth;\n remainedWidth -= finalWidth + barGapPercent * finalWidth;\n autoWidthCount--;\n }\n });\n // Recalculate width again\n autoWidth = (remainedWidth - categoryGap) / (autoWidthCount + (autoWidthCount - 1) * barGapPercent);\n autoWidth = Math.max(autoWidth, 0);\n var widthSum = 0;\n var lastColumn;\n each(stacks, function (column, idx) {\n if (!column.width) {\n column.width = autoWidth;\n }\n lastColumn = column;\n widthSum += column.width * (1 + barGapPercent);\n });\n if (lastColumn) {\n widthSum -= lastColumn.width * barGapPercent;\n }\n var offset = -widthSum / 2;\n each(stacks, function (column, stackId) {\n result[coordSysName][stackId] = result[coordSysName][stackId] || {\n bandWidth: bandWidth,\n offset: offset,\n width: column.width\n };\n offset += column.width * (1 + barGapPercent);\n });\n });\n return result;\n}\nfunction retrieveColumnLayout(barWidthAndOffset, axis, seriesModel) {\n if (barWidthAndOffset && axis) {\n var result = barWidthAndOffset[getAxisKey(axis)];\n if (result != null && seriesModel != null) {\n return result[getSeriesStackId(seriesModel)];\n }\n return result;\n }\n}\nexport { retrieveColumnLayout };\nexport function layout(seriesType, ecModel) {\n var seriesModels = prepareLayoutBarSeries(seriesType, ecModel);\n var barWidthAndOffset = makeColumnLayout(seriesModels);\n each(seriesModels, function (seriesModel) {\n var data = seriesModel.getData();\n var cartesian = seriesModel.coordinateSystem;\n var baseAxis = cartesian.getBaseAxis();\n var stackId = getSeriesStackId(seriesModel);\n var columnLayoutInfo = barWidthAndOffset[getAxisKey(baseAxis)][stackId];\n var columnOffset = columnLayoutInfo.offset;\n var columnWidth = columnLayoutInfo.width;\n data.setLayout({\n bandWidth: columnLayoutInfo.bandWidth,\n offset: columnOffset,\n size: columnWidth\n });\n });\n}\n// TODO: Do not support stack in large mode yet.\nexport function createProgressiveLayout(seriesType) {\n return {\n seriesType: seriesType,\n plan: createRenderPlanner(),\n reset: function (seriesModel) {\n if (!isOnCartesian(seriesModel)) {\n return;\n }\n var data = seriesModel.getData();\n var cartesian = seriesModel.coordinateSystem;\n var baseAxis = cartesian.getBaseAxis();\n var valueAxis = cartesian.getOtherAxis(baseAxis);\n var valueDimIdx = data.getDimensionIndex(data.mapDimension(valueAxis.dim));\n var baseDimIdx = data.getDimensionIndex(data.mapDimension(baseAxis.dim));\n var drawBackground = seriesModel.get('showBackground', true);\n var valueDim = data.mapDimension(valueAxis.dim);\n var stackResultDim = data.getCalculationInfo('stackResultDimension');\n var stacked = isDimensionStacked(data, valueDim) && !!data.getCalculationInfo('stackedOnSeries');\n var isValueAxisH = valueAxis.isHorizontal();\n var valueAxisStart = getValueAxisStart(baseAxis, valueAxis);\n var isLarge = isInLargeMode(seriesModel);\n var barMinHeight = seriesModel.get('barMinHeight') || 0;\n var stackedDimIdx = stackResultDim && data.getDimensionIndex(stackResultDim);\n // Layout info.\n var columnWidth = data.getLayout('size');\n var columnOffset = data.getLayout('offset');\n return {\n progress: function (params, data) {\n var count = params.count;\n var largePoints = isLarge && createFloat32Array(count * 3);\n var largeBackgroundPoints = isLarge && drawBackground && createFloat32Array(count * 3);\n var largeDataIndices = isLarge && createFloat32Array(count);\n var coordLayout = cartesian.master.getRect();\n var bgSize = isValueAxisH ? coordLayout.width : coordLayout.height;\n var dataIndex;\n var store = data.getStore();\n var idxOffset = 0;\n while ((dataIndex = params.next()) != null) {\n var value = store.get(stacked ? stackedDimIdx : valueDimIdx, dataIndex);\n var baseValue = store.get(baseDimIdx, dataIndex);\n var baseCoord = valueAxisStart;\n var stackStartValue = void 0;\n // Because of the barMinHeight, we can not use the value in\n // stackResultDimension directly.\n if (stacked) {\n stackStartValue = +value - store.get(valueDimIdx, dataIndex);\n }\n var x = void 0;\n var y = void 0;\n var width = void 0;\n var height = void 0;\n if (isValueAxisH) {\n var coord = cartesian.dataToPoint([value, baseValue]);\n if (stacked) {\n var startCoord = cartesian.dataToPoint([stackStartValue, baseValue]);\n baseCoord = startCoord[0];\n }\n x = baseCoord;\n y = coord[1] + columnOffset;\n width = coord[0] - baseCoord;\n height = columnWidth;\n if (Math.abs(width) < barMinHeight) {\n width = (width < 0 ? -1 : 1) * barMinHeight;\n }\n } else {\n var coord = cartesian.dataToPoint([baseValue, value]);\n if (stacked) {\n var startCoord = cartesian.dataToPoint([baseValue, stackStartValue]);\n baseCoord = startCoord[1];\n }\n x = coord[0] + columnOffset;\n y = baseCoord;\n width = columnWidth;\n height = coord[1] - baseCoord;\n if (Math.abs(height) < barMinHeight) {\n // Include zero to has a positive bar\n height = (height <= 0 ? -1 : 1) * barMinHeight;\n }\n }\n if (!isLarge) {\n data.setItemLayout(dataIndex, {\n x: x,\n y: y,\n width: width,\n height: height\n });\n } else {\n largePoints[idxOffset] = x;\n largePoints[idxOffset + 1] = y;\n largePoints[idxOffset + 2] = isValueAxisH ? width : height;\n if (largeBackgroundPoints) {\n largeBackgroundPoints[idxOffset] = isValueAxisH ? coordLayout.x : x;\n largeBackgroundPoints[idxOffset + 1] = isValueAxisH ? y : coordLayout.y;\n largeBackgroundPoints[idxOffset + 2] = bgSize;\n }\n largeDataIndices[dataIndex] = dataIndex;\n }\n idxOffset += 3;\n }\n if (isLarge) {\n data.setLayout({\n largePoints: largePoints,\n largeDataIndices: largeDataIndices,\n largeBackgroundPoints: largeBackgroundPoints,\n valueAxisHorizontal: isValueAxisH\n });\n }\n }\n };\n }\n };\n}\nfunction isOnCartesian(seriesModel) {\n return seriesModel.coordinateSystem && seriesModel.coordinateSystem.type === 'cartesian2d';\n}\nfunction isInLargeMode(seriesModel) {\n return seriesModel.pipelineContext && seriesModel.pipelineContext.large;\n}\n// See cases in `test/bar-start.html` and `#7412`, `#8747`.\nfunction getValueAxisStart(baseAxis, valueAxis) {\n var startValue = valueAxis.model.get('startValue');\n if (!startValue) {\n startValue = 0;\n }\n return valueAxis.toGlobalCoord(valueAxis.dataToCoord(valueAxis.type === 'log' ? startValue > 0 ? startValue : 1 : startValue));\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\n/*\n* A third-party license is embedded for some of the code in this file:\n* The \"scaleLevels\" was originally copied from \"d3.js\" with some\n* modifications made for this project.\n* (See more details in the comment on the definition of \"scaleLevels\" below.)\n* The use of the source code of this file is also subject to the terms\n* and consitions of the license of \"d3.js\" (BSD-3Clause, see\n* ).\n*/\n// [About UTC and local time zone]:\n// In most cases, `number.parseDate` will treat input data string as local time\n// (except time zone is specified in time string). And `format.formateTime` returns\n// local time by default. option.useUTC is false by default. This design has\n// considered these common cases:\n// (1) Time that is persistent in server is in UTC, but it is needed to be displayed\n// in local time by default.\n// (2) By default, the input data string (e.g., '2011-01-02') should be displayed\n// as its original time, without any time difference.\nimport * as numberUtil from '../util/number.js';\nimport { ONE_SECOND, ONE_MINUTE, ONE_HOUR, ONE_DAY, ONE_YEAR, format, leveledFormat, getUnitValue, timeUnits, fullLeveledFormatter, getPrimaryTimeUnit, isPrimaryTimeUnit, getDefaultFormatPrecisionOfInterval, fullYearGetterName, monthSetterName, fullYearSetterName, dateSetterName, hoursGetterName, hoursSetterName, minutesSetterName, secondsSetterName, millisecondsSetterName, monthGetterName, dateGetterName, minutesGetterName, secondsGetterName, millisecondsGetterName } from '../util/time.js';\nimport * as scaleHelper from './helper.js';\nimport IntervalScale from './Interval.js';\nimport Scale from './Scale.js';\nimport { warn } from '../util/log.js';\nimport { filter, isNumber, map } from 'zrender/lib/core/util.js';\n// FIXME 公用?\nvar bisect = function (a, x, lo, hi) {\n while (lo < hi) {\n var mid = lo + hi >>> 1;\n if (a[mid][1] < x) {\n lo = mid + 1;\n } else {\n hi = mid;\n }\n }\n return lo;\n};\nvar TimeScale = /** @class */function (_super) {\n __extends(TimeScale, _super);\n function TimeScale(settings) {\n var _this = _super.call(this, settings) || this;\n _this.type = 'time';\n return _this;\n }\n /**\n * Get label is mainly for other components like dataZoom, tooltip.\n */\n TimeScale.prototype.getLabel = function (tick) {\n var useUTC = this.getSetting('useUTC');\n return format(tick.value, fullLeveledFormatter[getDefaultFormatPrecisionOfInterval(getPrimaryTimeUnit(this._minLevelUnit))] || fullLeveledFormatter.second, useUTC, this.getSetting('locale'));\n };\n TimeScale.prototype.getFormattedLabel = function (tick, idx, labelFormatter) {\n var isUTC = this.getSetting('useUTC');\n var lang = this.getSetting('locale');\n return leveledFormat(tick, idx, labelFormatter, lang, isUTC);\n };\n /**\n * @override\n */\n TimeScale.prototype.getTicks = function () {\n var interval = this._interval;\n var extent = this._extent;\n var ticks = [];\n // If interval is 0, return [];\n if (!interval) {\n return ticks;\n }\n ticks.push({\n value: extent[0],\n level: 0\n });\n var useUTC = this.getSetting('useUTC');\n var innerTicks = getIntervalTicks(this._minLevelUnit, this._approxInterval, useUTC, extent);\n ticks = ticks.concat(innerTicks);\n ticks.push({\n value: extent[1],\n level: 0\n });\n return ticks;\n };\n TimeScale.prototype.calcNiceExtent = function (opt) {\n var extent = this._extent;\n // If extent start and end are same, expand them\n if (extent[0] === extent[1]) {\n // Expand extent\n extent[0] -= ONE_DAY;\n extent[1] += ONE_DAY;\n }\n // If there are no data and extent are [Infinity, -Infinity]\n if (extent[1] === -Infinity && extent[0] === Infinity) {\n var d = new Date();\n extent[1] = +new Date(d.getFullYear(), d.getMonth(), d.getDate());\n extent[0] = extent[1] - ONE_DAY;\n }\n this.calcNiceTicks(opt.splitNumber, opt.minInterval, opt.maxInterval);\n };\n TimeScale.prototype.calcNiceTicks = function (approxTickNum, minInterval, maxInterval) {\n approxTickNum = approxTickNum || 10;\n var extent = this._extent;\n var span = extent[1] - extent[0];\n this._approxInterval = span / approxTickNum;\n if (minInterval != null && this._approxInterval < minInterval) {\n this._approxInterval = minInterval;\n }\n if (maxInterval != null && this._approxInterval > maxInterval) {\n this._approxInterval = maxInterval;\n }\n var scaleIntervalsLen = scaleIntervals.length;\n var idx = Math.min(bisect(scaleIntervals, this._approxInterval, 0, scaleIntervalsLen), scaleIntervalsLen - 1);\n // Interval that can be used to calculate ticks\n this._interval = scaleIntervals[idx][1];\n // Min level used when picking ticks from top down.\n // We check one more level to avoid the ticks are to sparse in some case.\n this._minLevelUnit = scaleIntervals[Math.max(idx - 1, 0)][0];\n };\n TimeScale.prototype.parse = function (val) {\n // val might be float.\n return isNumber(val) ? val : +numberUtil.parseDate(val);\n };\n TimeScale.prototype.contain = function (val) {\n return scaleHelper.contain(this.parse(val), this._extent);\n };\n TimeScale.prototype.normalize = function (val) {\n return scaleHelper.normalize(this.parse(val), this._extent);\n };\n TimeScale.prototype.scale = function (val) {\n return scaleHelper.scale(val, this._extent);\n };\n TimeScale.type = 'time';\n return TimeScale;\n}(IntervalScale);\n/**\n * This implementation was originally copied from \"d3.js\"\n * \n * with some modifications made for this program.\n * See the license statement at the head of this file.\n */\nvar scaleIntervals = [\n// Format interval\n['second', ONE_SECOND], ['minute', ONE_MINUTE], ['hour', ONE_HOUR], ['quarter-day', ONE_HOUR * 6], ['half-day', ONE_HOUR * 12], ['day', ONE_DAY * 1.2], ['half-week', ONE_DAY * 3.5], ['week', ONE_DAY * 7], ['month', ONE_DAY * 31], ['quarter', ONE_DAY * 95], ['half-year', ONE_YEAR / 2], ['year', ONE_YEAR] // 1Y\n];\nfunction isUnitValueSame(unit, valueA, valueB, isUTC) {\n var dateA = numberUtil.parseDate(valueA);\n var dateB = numberUtil.parseDate(valueB);\n var isSame = function (unit) {\n return getUnitValue(dateA, unit, isUTC) === getUnitValue(dateB, unit, isUTC);\n };\n var isSameYear = function () {\n return isSame('year');\n };\n // const isSameHalfYear = () => isSameYear() && isSame('half-year');\n // const isSameQuater = () => isSameYear() && isSame('quarter');\n var isSameMonth = function () {\n return isSameYear() && isSame('month');\n };\n var isSameDay = function () {\n return isSameMonth() && isSame('day');\n };\n // const isSameHalfDay = () => isSameDay() && isSame('half-day');\n var isSameHour = function () {\n return isSameDay() && isSame('hour');\n };\n var isSameMinute = function () {\n return isSameHour() && isSame('minute');\n };\n var isSameSecond = function () {\n return isSameMinute() && isSame('second');\n };\n var isSameMilliSecond = function () {\n return isSameSecond() && isSame('millisecond');\n };\n switch (unit) {\n case 'year':\n return isSameYear();\n case 'month':\n return isSameMonth();\n case 'day':\n return isSameDay();\n case 'hour':\n return isSameHour();\n case 'minute':\n return isSameMinute();\n case 'second':\n return isSameSecond();\n case 'millisecond':\n return isSameMilliSecond();\n }\n}\n// const primaryUnitGetters = {\n// year: fullYearGetterName(),\n// month: monthGetterName(),\n// day: dateGetterName(),\n// hour: hoursGetterName(),\n// minute: minutesGetterName(),\n// second: secondsGetterName(),\n// millisecond: millisecondsGetterName()\n// };\n// const primaryUnitUTCGetters = {\n// year: fullYearGetterName(true),\n// month: monthGetterName(true),\n// day: dateGetterName(true),\n// hour: hoursGetterName(true),\n// minute: minutesGetterName(true),\n// second: secondsGetterName(true),\n// millisecond: millisecondsGetterName(true)\n// };\n// function moveTick(date: Date, unitName: TimeUnit, step: number, isUTC: boolean) {\n// step = step || 1;\n// switch (getPrimaryTimeUnit(unitName)) {\n// case 'year':\n// date[fullYearSetterName(isUTC)](date[fullYearGetterName(isUTC)]() + step);\n// break;\n// case 'month':\n// date[monthSetterName(isUTC)](date[monthGetterName(isUTC)]() + step);\n// break;\n// case 'day':\n// date[dateSetterName(isUTC)](date[dateGetterName(isUTC)]() + step);\n// break;\n// case 'hour':\n// date[hoursSetterName(isUTC)](date[hoursGetterName(isUTC)]() + step);\n// break;\n// case 'minute':\n// date[minutesSetterName(isUTC)](date[minutesGetterName(isUTC)]() + step);\n// break;\n// case 'second':\n// date[secondsSetterName(isUTC)](date[secondsGetterName(isUTC)]() + step);\n// break;\n// case 'millisecond':\n// date[millisecondsSetterName(isUTC)](date[millisecondsGetterName(isUTC)]() + step);\n// break;\n// }\n// return date.getTime();\n// }\n// const DATE_INTERVALS = [[8, 7.5], [4, 3.5], [2, 1.5]];\n// const MONTH_INTERVALS = [[6, 5.5], [3, 2.5], [2, 1.5]];\n// const MINUTES_SECONDS_INTERVALS = [[30, 30], [20, 20], [15, 15], [10, 10], [5, 5], [2, 2]];\nfunction getDateInterval(approxInterval, daysInMonth) {\n approxInterval /= ONE_DAY;\n return approxInterval > 16 ? 16\n // Math.floor(daysInMonth / 2) + 1 // In this case we only want one tick between two months.\n : approxInterval > 7.5 ? 7 // TODO week 7 or day 8?\n : approxInterval > 3.5 ? 4 : approxInterval > 1.5 ? 2 : 1;\n}\nfunction getMonthInterval(approxInterval) {\n var APPROX_ONE_MONTH = 30 * ONE_DAY;\n approxInterval /= APPROX_ONE_MONTH;\n return approxInterval > 6 ? 6 : approxInterval > 3 ? 3 : approxInterval > 2 ? 2 : 1;\n}\nfunction getHourInterval(approxInterval) {\n approxInterval /= ONE_HOUR;\n return approxInterval > 12 ? 12 : approxInterval > 6 ? 6 : approxInterval > 3.5 ? 4 : approxInterval > 2 ? 2 : 1;\n}\nfunction getMinutesAndSecondsInterval(approxInterval, isMinutes) {\n approxInterval /= isMinutes ? ONE_MINUTE : ONE_SECOND;\n return approxInterval > 30 ? 30 : approxInterval > 20 ? 20 : approxInterval > 15 ? 15 : approxInterval > 10 ? 10 : approxInterval > 5 ? 5 : approxInterval > 2 ? 2 : 1;\n}\nfunction getMillisecondsInterval(approxInterval) {\n return numberUtil.nice(approxInterval, true);\n}\nfunction getFirstTimestampOfUnit(date, unitName, isUTC) {\n var outDate = new Date(date);\n switch (getPrimaryTimeUnit(unitName)) {\n case 'year':\n case 'month':\n outDate[monthSetterName(isUTC)](0);\n case 'day':\n outDate[dateSetterName(isUTC)](1);\n case 'hour':\n outDate[hoursSetterName(isUTC)](0);\n case 'minute':\n outDate[minutesSetterName(isUTC)](0);\n case 'second':\n outDate[secondsSetterName(isUTC)](0);\n outDate[millisecondsSetterName(isUTC)](0);\n }\n return outDate.getTime();\n}\nfunction getIntervalTicks(bottomUnitName, approxInterval, isUTC, extent) {\n var safeLimit = 10000;\n var unitNames = timeUnits;\n var iter = 0;\n function addTicksInSpan(interval, minTimestamp, maxTimestamp, getMethodName, setMethodName, isDate, out) {\n var date = new Date(minTimestamp);\n var dateTime = minTimestamp;\n var d = date[getMethodName]();\n // if (isDate) {\n // d -= 1; // Starts with 0; PENDING\n // }\n while (dateTime < maxTimestamp && dateTime <= extent[1]) {\n out.push({\n value: dateTime\n });\n d += interval;\n date[setMethodName](d);\n dateTime = date.getTime();\n }\n // This extra tick is for calcuating ticks of next level. Will not been added to the final result\n out.push({\n value: dateTime,\n notAdd: true\n });\n }\n function addLevelTicks(unitName, lastLevelTicks, levelTicks) {\n var newAddedTicks = [];\n var isFirstLevel = !lastLevelTicks.length;\n if (isUnitValueSame(getPrimaryTimeUnit(unitName), extent[0], extent[1], isUTC)) {\n return;\n }\n if (isFirstLevel) {\n lastLevelTicks = [{\n // TODO Optimize. Not include so may ticks.\n value: getFirstTimestampOfUnit(new Date(extent[0]), unitName, isUTC)\n }, {\n value: extent[1]\n }];\n }\n for (var i = 0; i < lastLevelTicks.length - 1; i++) {\n var startTick = lastLevelTicks[i].value;\n var endTick = lastLevelTicks[i + 1].value;\n if (startTick === endTick) {\n continue;\n }\n var interval = void 0;\n var getterName = void 0;\n var setterName = void 0;\n var isDate = false;\n switch (unitName) {\n case 'year':\n interval = Math.max(1, Math.round(approxInterval / ONE_DAY / 365));\n getterName = fullYearGetterName(isUTC);\n setterName = fullYearSetterName(isUTC);\n break;\n case 'half-year':\n case 'quarter':\n case 'month':\n interval = getMonthInterval(approxInterval);\n getterName = monthGetterName(isUTC);\n setterName = monthSetterName(isUTC);\n break;\n case 'week': // PENDING If week is added. Ignore day.\n case 'half-week':\n case 'day':\n interval = getDateInterval(approxInterval, 31); // Use 32 days and let interval been 16\n getterName = dateGetterName(isUTC);\n setterName = dateSetterName(isUTC);\n isDate = true;\n break;\n case 'half-day':\n case 'quarter-day':\n case 'hour':\n interval = getHourInterval(approxInterval);\n getterName = hoursGetterName(isUTC);\n setterName = hoursSetterName(isUTC);\n break;\n case 'minute':\n interval = getMinutesAndSecondsInterval(approxInterval, true);\n getterName = minutesGetterName(isUTC);\n setterName = minutesSetterName(isUTC);\n break;\n case 'second':\n interval = getMinutesAndSecondsInterval(approxInterval, false);\n getterName = secondsGetterName(isUTC);\n setterName = secondsSetterName(isUTC);\n break;\n case 'millisecond':\n interval = getMillisecondsInterval(approxInterval);\n getterName = millisecondsGetterName(isUTC);\n setterName = millisecondsSetterName(isUTC);\n break;\n }\n addTicksInSpan(interval, startTick, endTick, getterName, setterName, isDate, newAddedTicks);\n if (unitName === 'year' && levelTicks.length > 1 && i === 0) {\n // Add nearest years to the left extent.\n levelTicks.unshift({\n value: levelTicks[0].value - interval\n });\n }\n }\n for (var i = 0; i < newAddedTicks.length; i++) {\n levelTicks.push(newAddedTicks[i]);\n }\n // newAddedTicks.length && console.log(unitName, newAddedTicks);\n return newAddedTicks;\n }\n var levelsTicks = [];\n var currentLevelTicks = [];\n var tickCount = 0;\n var lastLevelTickCount = 0;\n for (var i = 0; i < unitNames.length && iter++ < safeLimit; ++i) {\n var primaryTimeUnit = getPrimaryTimeUnit(unitNames[i]);\n if (!isPrimaryTimeUnit(unitNames[i])) {\n // TODO\n continue;\n }\n addLevelTicks(unitNames[i], levelsTicks[levelsTicks.length - 1] || [], currentLevelTicks);\n var nextPrimaryTimeUnit = unitNames[i + 1] ? getPrimaryTimeUnit(unitNames[i + 1]) : null;\n if (primaryTimeUnit !== nextPrimaryTimeUnit) {\n if (currentLevelTicks.length) {\n lastLevelTickCount = tickCount;\n // Remove the duplicate so the tick count can be precisely.\n currentLevelTicks.sort(function (a, b) {\n return a.value - b.value;\n });\n var levelTicksRemoveDuplicated = [];\n for (var i_1 = 0; i_1 < currentLevelTicks.length; ++i_1) {\n var tickValue = currentLevelTicks[i_1].value;\n if (i_1 === 0 || currentLevelTicks[i_1 - 1].value !== tickValue) {\n levelTicksRemoveDuplicated.push(currentLevelTicks[i_1]);\n if (tickValue >= extent[0] && tickValue <= extent[1]) {\n tickCount++;\n }\n }\n }\n var targetTickNum = (extent[1] - extent[0]) / approxInterval;\n // Added too much in this level and not too less in last level\n if (tickCount > targetTickNum * 1.5 && lastLevelTickCount > targetTickNum / 1.5) {\n break;\n }\n // Only treat primary time unit as one level.\n levelsTicks.push(levelTicksRemoveDuplicated);\n if (tickCount > targetTickNum || bottomUnitName === unitNames[i]) {\n break;\n }\n }\n // Reset if next unitName is primary\n currentLevelTicks = [];\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n if (iter >= safeLimit) {\n warn('Exceed safe limit.');\n }\n }\n var levelsTicksInExtent = filter(map(levelsTicks, function (levelTicks) {\n return filter(levelTicks, function (tick) {\n return tick.value >= extent[0] && tick.value <= extent[1] && !tick.notAdd;\n });\n }), function (levelTicks) {\n return levelTicks.length > 0;\n });\n var ticks = [];\n var maxLevel = levelsTicksInExtent.length - 1;\n for (var i = 0; i < levelsTicksInExtent.length; ++i) {\n var levelTicks = levelsTicksInExtent[i];\n for (var k = 0; k < levelTicks.length; ++k) {\n ticks.push({\n value: levelTicks[k].value,\n level: maxLevel - i\n });\n }\n }\n ticks.sort(function (a, b) {\n return a.value - b.value;\n });\n // Remove duplicates\n var result = [];\n for (var i = 0; i < ticks.length; ++i) {\n if (i === 0 || ticks[i].value !== ticks[i - 1].value) {\n result.push(ticks[i]);\n }\n }\n return result;\n}\nScale.registerClass(TimeScale);\nexport default TimeScale;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport Scale from './Scale.js';\nimport * as numberUtil from '../util/number.js';\nimport * as scaleHelper from './helper.js';\n// Use some method of IntervalScale\nimport IntervalScale from './Interval.js';\nvar scaleProto = Scale.prototype;\n// FIXME:TS refactor: not good to call it directly with `this`?\nvar intervalScaleProto = IntervalScale.prototype;\nvar roundingErrorFix = numberUtil.round;\nvar mathFloor = Math.floor;\nvar mathCeil = Math.ceil;\nvar mathPow = Math.pow;\nvar mathLog = Math.log;\nvar LogScale = /** @class */function (_super) {\n __extends(LogScale, _super);\n function LogScale() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'log';\n _this.base = 10;\n _this._originalScale = new IntervalScale();\n // FIXME:TS actually used by `IntervalScale`\n _this._interval = 0;\n return _this;\n }\n /**\n * @param Whether expand the ticks to niced extent.\n */\n LogScale.prototype.getTicks = function (expandToNicedExtent) {\n var originalScale = this._originalScale;\n var extent = this._extent;\n var originalExtent = originalScale.getExtent();\n var ticks = intervalScaleProto.getTicks.call(this, expandToNicedExtent);\n return zrUtil.map(ticks, function (tick) {\n var val = tick.value;\n var powVal = numberUtil.round(mathPow(this.base, val));\n // Fix #4158\n powVal = val === extent[0] && this._fixMin ? fixRoundingError(powVal, originalExtent[0]) : powVal;\n powVal = val === extent[1] && this._fixMax ? fixRoundingError(powVal, originalExtent[1]) : powVal;\n return {\n value: powVal\n };\n }, this);\n };\n LogScale.prototype.setExtent = function (start, end) {\n var base = mathLog(this.base);\n // log(-Infinity) is NaN, so safe guard here\n start = mathLog(Math.max(0, start)) / base;\n end = mathLog(Math.max(0, end)) / base;\n intervalScaleProto.setExtent.call(this, start, end);\n };\n /**\n * @return {number} end\n */\n LogScale.prototype.getExtent = function () {\n var base = this.base;\n var extent = scaleProto.getExtent.call(this);\n extent[0] = mathPow(base, extent[0]);\n extent[1] = mathPow(base, extent[1]);\n // Fix #4158\n var originalScale = this._originalScale;\n var originalExtent = originalScale.getExtent();\n this._fixMin && (extent[0] = fixRoundingError(extent[0], originalExtent[0]));\n this._fixMax && (extent[1] = fixRoundingError(extent[1], originalExtent[1]));\n return extent;\n };\n LogScale.prototype.unionExtent = function (extent) {\n this._originalScale.unionExtent(extent);\n var base = this.base;\n extent[0] = mathLog(extent[0]) / mathLog(base);\n extent[1] = mathLog(extent[1]) / mathLog(base);\n scaleProto.unionExtent.call(this, extent);\n };\n LogScale.prototype.unionExtentFromData = function (data, dim) {\n // TODO\n // filter value that <= 0\n this.unionExtent(data.getApproximateExtent(dim));\n };\n /**\n * Update interval and extent of intervals for nice ticks\n * @param approxTickNum default 10 Given approx tick number\n */\n LogScale.prototype.calcNiceTicks = function (approxTickNum) {\n approxTickNum = approxTickNum || 10;\n var extent = this._extent;\n var span = extent[1] - extent[0];\n if (span === Infinity || span <= 0) {\n return;\n }\n var interval = numberUtil.quantity(span);\n var err = approxTickNum / span * interval;\n // Filter ticks to get closer to the desired count.\n if (err <= 0.5) {\n interval *= 10;\n }\n // Interval should be integer\n while (!isNaN(interval) && Math.abs(interval) < 1 && Math.abs(interval) > 0) {\n interval *= 10;\n }\n var niceExtent = [numberUtil.round(mathCeil(extent[0] / interval) * interval), numberUtil.round(mathFloor(extent[1] / interval) * interval)];\n this._interval = interval;\n this._niceExtent = niceExtent;\n };\n LogScale.prototype.calcNiceExtent = function (opt) {\n intervalScaleProto.calcNiceExtent.call(this, opt);\n this._fixMin = opt.fixMin;\n this._fixMax = opt.fixMax;\n };\n LogScale.prototype.parse = function (val) {\n return val;\n };\n LogScale.prototype.contain = function (val) {\n val = mathLog(val) / mathLog(this.base);\n return scaleHelper.contain(val, this._extent);\n };\n LogScale.prototype.normalize = function (val) {\n val = mathLog(val) / mathLog(this.base);\n return scaleHelper.normalize(val, this._extent);\n };\n LogScale.prototype.scale = function (val) {\n val = scaleHelper.scale(val, this._extent);\n return mathPow(this.base, val);\n };\n LogScale.type = 'log';\n return LogScale;\n}(Scale);\nvar proto = LogScale.prototype;\nproto.getMinorTicks = intervalScaleProto.getMinorTicks;\nproto.getLabel = intervalScaleProto.getLabel;\nfunction fixRoundingError(val, originalVal) {\n return roundingErrorFix(val, numberUtil.getPrecision(originalVal));\n}\nScale.registerClass(LogScale);\nexport default LogScale;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { assert, isArray, eqNaN, isFunction } from 'zrender/lib/core/util.js';\nimport { parsePercent } from 'zrender/lib/contain/text.js';\nvar ScaleRawExtentInfo = /** @class */function () {\n function ScaleRawExtentInfo(scale, model,\n // Usually: data extent from all series on this axis.\n originalExtent) {\n this._prepareParams(scale, model, originalExtent);\n }\n /**\n * Parameters depending on outside (like model, user callback)\n * are prepared and fixed here.\n */\n ScaleRawExtentInfo.prototype._prepareParams = function (scale, model,\n // Usually: data extent from all series on this axis.\n dataExtent) {\n if (dataExtent[1] < dataExtent[0]) {\n dataExtent = [NaN, NaN];\n }\n this._dataMin = dataExtent[0];\n this._dataMax = dataExtent[1];\n var isOrdinal = this._isOrdinal = scale.type === 'ordinal';\n this._needCrossZero = scale.type === 'interval' && model.getNeedCrossZero && model.getNeedCrossZero();\n var axisMinValue = model.get('min', true);\n if (axisMinValue == null) {\n axisMinValue = model.get('startValue', true);\n }\n var modelMinRaw = this._modelMinRaw = axisMinValue;\n if (isFunction(modelMinRaw)) {\n // This callback always provides users the full data extent (before data is filtered).\n this._modelMinNum = parseAxisModelMinMax(scale, modelMinRaw({\n min: dataExtent[0],\n max: dataExtent[1]\n }));\n } else if (modelMinRaw !== 'dataMin') {\n this._modelMinNum = parseAxisModelMinMax(scale, modelMinRaw);\n }\n var modelMaxRaw = this._modelMaxRaw = model.get('max', true);\n if (isFunction(modelMaxRaw)) {\n // This callback always provides users the full data extent (before data is filtered).\n this._modelMaxNum = parseAxisModelMinMax(scale, modelMaxRaw({\n min: dataExtent[0],\n max: dataExtent[1]\n }));\n } else if (modelMaxRaw !== 'dataMax') {\n this._modelMaxNum = parseAxisModelMinMax(scale, modelMaxRaw);\n }\n if (isOrdinal) {\n // FIXME: there is a flaw here: if there is no \"block\" data processor like `dataZoom`,\n // and progressive rendering is using, here the category result might just only contain\n // the processed chunk rather than the entire result.\n this._axisDataLen = model.getCategories().length;\n } else {\n var boundaryGap = model.get('boundaryGap');\n var boundaryGapArr = isArray(boundaryGap) ? boundaryGap : [boundaryGap || 0, boundaryGap || 0];\n if (typeof boundaryGapArr[0] === 'boolean' || typeof boundaryGapArr[1] === 'boolean') {\n if (process.env.NODE_ENV !== 'production') {\n console.warn('Boolean type for boundaryGap is only ' + 'allowed for ordinal axis. Please use string in ' + 'percentage instead, e.g., \"20%\". Currently, ' + 'boundaryGap is set to be 0.');\n }\n this._boundaryGapInner = [0, 0];\n } else {\n this._boundaryGapInner = [parsePercent(boundaryGapArr[0], 1), parsePercent(boundaryGapArr[1], 1)];\n }\n }\n };\n /**\n * Calculate extent by prepared parameters.\n * This method has no external dependency and can be called duplicatedly,\n * getting the same result.\n * If parameters changed, should call this method to recalcuate.\n */\n ScaleRawExtentInfo.prototype.calculate = function () {\n // Notice: When min/max is not set (that is, when there are null/undefined,\n // which is the most common case), these cases should be ensured:\n // (1) For 'ordinal', show all axis.data.\n // (2) For others:\n // + `boundaryGap` is applied (if min/max set, boundaryGap is\n // disabled).\n // + If `needCrossZero`, min/max should be zero, otherwise, min/max should\n // be the result that originalExtent enlarged by boundaryGap.\n // (3) If no data, it should be ensured that `scale.setBlank` is set.\n var isOrdinal = this._isOrdinal;\n var dataMin = this._dataMin;\n var dataMax = this._dataMax;\n var axisDataLen = this._axisDataLen;\n var boundaryGapInner = this._boundaryGapInner;\n var span = !isOrdinal ? dataMax - dataMin || Math.abs(dataMin) : null;\n // Currently if a `'value'` axis model min is specified as 'dataMin'/'dataMax',\n // `boundaryGap` will not be used. It's the different from specifying as `null`/`undefined`.\n var min = this._modelMinRaw === 'dataMin' ? dataMin : this._modelMinNum;\n var max = this._modelMaxRaw === 'dataMax' ? dataMax : this._modelMaxNum;\n // If `_modelMinNum`/`_modelMaxNum` is `null`/`undefined`, should not be fixed.\n var minFixed = min != null;\n var maxFixed = max != null;\n if (min == null) {\n min = isOrdinal ? axisDataLen ? 0 : NaN : dataMin - boundaryGapInner[0] * span;\n }\n if (max == null) {\n max = isOrdinal ? axisDataLen ? axisDataLen - 1 : NaN : dataMax + boundaryGapInner[1] * span;\n }\n (min == null || !isFinite(min)) && (min = NaN);\n (max == null || !isFinite(max)) && (max = NaN);\n var isBlank = eqNaN(min) || eqNaN(max) || isOrdinal && !axisDataLen;\n // If data extent modified, need to recalculated to ensure cross zero.\n if (this._needCrossZero) {\n // Axis is over zero and min is not set\n if (min > 0 && max > 0 && !minFixed) {\n min = 0;\n // minFixed = true;\n }\n // Axis is under zero and max is not set\n if (min < 0 && max < 0 && !maxFixed) {\n max = 0;\n // maxFixed = true;\n }\n // PENDING:\n // When `needCrossZero` and all data is positive/negative, should it be ensured\n // that the results processed by boundaryGap are positive/negative?\n // If so, here `minFixed`/`maxFixed` need to be set.\n }\n var determinedMin = this._determinedMin;\n var determinedMax = this._determinedMax;\n if (determinedMin != null) {\n min = determinedMin;\n minFixed = true;\n }\n if (determinedMax != null) {\n max = determinedMax;\n maxFixed = true;\n }\n // Ensure min/max be finite number or NaN here. (not to be null/undefined)\n // `NaN` means min/max axis is blank.\n return {\n min: min,\n max: max,\n minFixed: minFixed,\n maxFixed: maxFixed,\n isBlank: isBlank\n };\n };\n ScaleRawExtentInfo.prototype.modifyDataMinMax = function (minMaxName, val) {\n if (process.env.NODE_ENV !== 'production') {\n assert(!this.frozen);\n }\n this[DATA_MIN_MAX_ATTR[minMaxName]] = val;\n };\n ScaleRawExtentInfo.prototype.setDeterminedMinMax = function (minMaxName, val) {\n var attr = DETERMINED_MIN_MAX_ATTR[minMaxName];\n if (process.env.NODE_ENV !== 'production') {\n assert(!this.frozen\n // Earse them usually means logic flaw.\n && this[attr] == null);\n }\n this[attr] = val;\n };\n ScaleRawExtentInfo.prototype.freeze = function () {\n // @ts-ignore\n this.frozen = true;\n };\n return ScaleRawExtentInfo;\n}();\nexport { ScaleRawExtentInfo };\nvar DETERMINED_MIN_MAX_ATTR = {\n min: '_determinedMin',\n max: '_determinedMax'\n};\nvar DATA_MIN_MAX_ATTR = {\n min: '_dataMin',\n max: '_dataMax'\n};\n/**\n * Get scale min max and related info only depends on model settings.\n * This method can be called after coordinate system created.\n * For example, in data processing stage.\n *\n * Scale extent info probably be required multiple times during a workflow.\n * For example:\n * (1) `dataZoom` depends it to get the axis extent in \"100%\" state.\n * (2) `processor/extentCalculator` depends it to make sure whether axis extent is specified.\n * (3) `coordSys.update` use it to finally decide the scale extent.\n * But the callback of `min`/`max` should not be called multiple times.\n * The code below should not be implemented repeatedly either.\n * So we cache the result in the scale instance, which will be recreated at the beginning\n * of the workflow (because `scale` instance will be recreated each round of the workflow).\n */\nexport function ensureScaleRawExtentInfo(scale, model,\n// Usually: data extent from all series on this axis.\noriginalExtent) {\n // Do not permit to recreate.\n var rawExtentInfo = scale.rawExtentInfo;\n if (rawExtentInfo) {\n return rawExtentInfo;\n }\n rawExtentInfo = new ScaleRawExtentInfo(scale, model, originalExtent);\n // @ts-ignore\n scale.rawExtentInfo = rawExtentInfo;\n return rawExtentInfo;\n}\nexport function parseAxisModelMinMax(scale, minMax) {\n return minMax == null ? null : eqNaN(minMax) ? NaN : scale.parse(minMax);\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport OrdinalScale from '../scale/Ordinal.js';\nimport IntervalScale from '../scale/Interval.js';\nimport Scale from '../scale/Scale.js';\nimport { prepareLayoutBarSeries, makeColumnLayout, retrieveColumnLayout } from '../layout/barGrid.js';\nimport BoundingRect from 'zrender/lib/core/BoundingRect.js';\nimport TimeScale from '../scale/Time.js';\nimport LogScale from '../scale/Log.js';\nimport { getStackedDimension } from '../data/helper/dataStackHelper.js';\nimport { ensureScaleRawExtentInfo } from './scaleRawExtentInfo.js';\n/**\n * Get axis scale extent before niced.\n * Item of returned array can only be number (including Infinity and NaN).\n *\n * Caution:\n * Precondition of calling this method:\n * The scale extent has been initialized using series data extent via\n * `scale.setExtent` or `scale.unionExtentFromData`;\n */\nexport function getScaleExtent(scale, model) {\n var scaleType = scale.type;\n var rawExtentResult = ensureScaleRawExtentInfo(scale, model, scale.getExtent()).calculate();\n scale.setBlank(rawExtentResult.isBlank);\n var min = rawExtentResult.min;\n var max = rawExtentResult.max;\n // If bars are placed on a base axis of type time or interval account for axis boundary overflow and current axis\n // is base axis\n // FIXME\n // (1) Consider support value axis, where below zero and axis `onZero` should be handled properly.\n // (2) Refactor the logic with `barGrid`. Is it not need to `makeBarWidthAndOffsetInfo` twice with different extent?\n // Should not depend on series type `bar`?\n // (3) Fix that might overlap when using dataZoom.\n // (4) Consider other chart types using `barGrid`?\n // See #6728, #4862, `test/bar-overflow-time-plot.html`\n var ecModel = model.ecModel;\n if (ecModel && scaleType === 'time' /* || scaleType === 'interval' */) {\n var barSeriesModels = prepareLayoutBarSeries('bar', ecModel);\n var isBaseAxisAndHasBarSeries_1 = false;\n zrUtil.each(barSeriesModels, function (seriesModel) {\n isBaseAxisAndHasBarSeries_1 = isBaseAxisAndHasBarSeries_1 || seriesModel.getBaseAxis() === model.axis;\n });\n if (isBaseAxisAndHasBarSeries_1) {\n // Calculate placement of bars on axis. TODO should be decoupled\n // with barLayout\n var barWidthAndOffset = makeColumnLayout(barSeriesModels);\n // Adjust axis min and max to account for overflow\n var adjustedScale = adjustScaleForOverflow(min, max, model, barWidthAndOffset);\n min = adjustedScale.min;\n max = adjustedScale.max;\n }\n }\n return {\n extent: [min, max],\n // \"fix\" means \"fixed\", the value should not be\n // changed in the subsequent steps.\n fixMin: rawExtentResult.minFixed,\n fixMax: rawExtentResult.maxFixed\n };\n}\nfunction adjustScaleForOverflow(min, max, model,\n// Only support cartesian coord yet.\nbarWidthAndOffset) {\n // Get Axis Length\n var axisExtent = model.axis.getExtent();\n var axisLength = axisExtent[1] - axisExtent[0];\n // Get bars on current base axis and calculate min and max overflow\n var barsOnCurrentAxis = retrieveColumnLayout(barWidthAndOffset, model.axis);\n if (barsOnCurrentAxis === undefined) {\n return {\n min: min,\n max: max\n };\n }\n var minOverflow = Infinity;\n zrUtil.each(barsOnCurrentAxis, function (item) {\n minOverflow = Math.min(item.offset, minOverflow);\n });\n var maxOverflow = -Infinity;\n zrUtil.each(barsOnCurrentAxis, function (item) {\n maxOverflow = Math.max(item.offset + item.width, maxOverflow);\n });\n minOverflow = Math.abs(minOverflow);\n maxOverflow = Math.abs(maxOverflow);\n var totalOverFlow = minOverflow + maxOverflow;\n // Calculate required buffer based on old range and overflow\n var oldRange = max - min;\n var oldRangePercentOfNew = 1 - (minOverflow + maxOverflow) / axisLength;\n var overflowBuffer = oldRange / oldRangePercentOfNew - oldRange;\n max += overflowBuffer * (maxOverflow / totalOverFlow);\n min -= overflowBuffer * (minOverflow / totalOverFlow);\n return {\n min: min,\n max: max\n };\n}\n// Precondition of calling this method:\n// The scale extent has been initialized using series data extent via\n// `scale.setExtent` or `scale.unionExtentFromData`;\nexport function niceScaleExtent(scale, inModel) {\n var model = inModel;\n var extentInfo = getScaleExtent(scale, model);\n var extent = extentInfo.extent;\n var splitNumber = model.get('splitNumber');\n if (scale instanceof LogScale) {\n scale.base = model.get('logBase');\n }\n var scaleType = scale.type;\n var interval = model.get('interval');\n var isIntervalOrTime = scaleType === 'interval' || scaleType === 'time';\n scale.setExtent(extent[0], extent[1]);\n scale.calcNiceExtent({\n splitNumber: splitNumber,\n fixMin: extentInfo.fixMin,\n fixMax: extentInfo.fixMax,\n minInterval: isIntervalOrTime ? model.get('minInterval') : null,\n maxInterval: isIntervalOrTime ? model.get('maxInterval') : null\n });\n // If some one specified the min, max. And the default calculated interval\n // is not good enough. He can specify the interval. It is often appeared\n // in angle axis with angle 0 - 360. Interval calculated in interval scale is hard\n // to be 60.\n // FIXME\n if (interval != null) {\n scale.setInterval && scale.setInterval(interval);\n }\n}\n/**\n * @param axisType Default retrieve from model.type\n */\nexport function createScaleByModel(model, axisType) {\n axisType = axisType || model.get('type');\n if (axisType) {\n switch (axisType) {\n // Buildin scale\n case 'category':\n return new OrdinalScale({\n ordinalMeta: model.getOrdinalMeta ? model.getOrdinalMeta() : model.getCategories(),\n extent: [Infinity, -Infinity]\n });\n case 'time':\n return new TimeScale({\n locale: model.ecModel.getLocaleModel(),\n useUTC: model.ecModel.get('useUTC')\n });\n default:\n // case 'value'/'interval', 'log', or others.\n return new (Scale.getClass(axisType) || IntervalScale)();\n }\n }\n}\n/**\n * Check if the axis cross 0\n */\nexport function ifAxisCrossZero(axis) {\n var dataExtent = axis.scale.getExtent();\n var min = dataExtent[0];\n var max = dataExtent[1];\n return !(min > 0 && max > 0 || min < 0 && max < 0);\n}\n/**\n * @param axis\n * @return Label formatter function.\n * param: {number} tickValue,\n * param: {number} idx, the index in all ticks.\n * If category axis, this param is not required.\n * return: {string} label string.\n */\nexport function makeLabelFormatter(axis) {\n var labelFormatter = axis.getLabelModel().get('formatter');\n var categoryTickStart = axis.type === 'category' ? axis.scale.getExtent()[0] : null;\n if (axis.scale.type === 'time') {\n return function (tpl) {\n return function (tick, idx) {\n return axis.scale.getFormattedLabel(tick, idx, tpl);\n };\n }(labelFormatter);\n } else if (zrUtil.isString(labelFormatter)) {\n return function (tpl) {\n return function (tick) {\n // For category axis, get raw value; for numeric axis,\n // get formatted label like '1,333,444'.\n var label = axis.scale.getLabel(tick);\n var text = tpl.replace('{value}', label != null ? label : '');\n return text;\n };\n }(labelFormatter);\n } else if (zrUtil.isFunction(labelFormatter)) {\n return function (cb) {\n return function (tick, idx) {\n // The original intention of `idx` is \"the index of the tick in all ticks\".\n // But the previous implementation of category axis do not consider the\n // `axisLabel.interval`, which cause that, for example, the `interval` is\n // `1`, then the ticks \"name5\", \"name7\", \"name9\" are displayed, where the\n // corresponding `idx` are `0`, `2`, `4`, but not `0`, `1`, `2`. So we keep\n // the definition here for back compatibility.\n if (categoryTickStart != null) {\n idx = tick.value - categoryTickStart;\n }\n return cb(getAxisRawValue(axis, tick), idx, tick.level != null ? {\n level: tick.level\n } : null);\n };\n }(labelFormatter);\n } else {\n return function (tick) {\n return axis.scale.getLabel(tick);\n };\n }\n}\nexport function getAxisRawValue(axis, tick) {\n // In category axis with data zoom, tick is not the original\n // index of axis.data. So tick should not be exposed to user\n // in category axis.\n return axis.type === 'category' ? axis.scale.getLabel(tick) : tick.value;\n}\n/**\n * @param axis\n * @return Be null/undefined if no labels.\n */\nexport function estimateLabelUnionRect(axis) {\n var axisModel = axis.model;\n var scale = axis.scale;\n if (!axisModel.get(['axisLabel', 'show']) || scale.isBlank()) {\n return;\n }\n var realNumberScaleTicks;\n var tickCount;\n var categoryScaleExtent = scale.getExtent();\n // Optimize for large category data, avoid call `getTicks()`.\n if (scale instanceof OrdinalScale) {\n tickCount = scale.count();\n } else {\n realNumberScaleTicks = scale.getTicks();\n tickCount = realNumberScaleTicks.length;\n }\n var axisLabelModel = axis.getLabelModel();\n var labelFormatter = makeLabelFormatter(axis);\n var rect;\n var step = 1;\n // Simple optimization for large amount of labels\n if (tickCount > 40) {\n step = Math.ceil(tickCount / 40);\n }\n for (var i = 0; i < tickCount; i += step) {\n var tick = realNumberScaleTicks ? realNumberScaleTicks[i] : {\n value: categoryScaleExtent[0] + i\n };\n var label = labelFormatter(tick, i);\n var unrotatedSingleRect = axisLabelModel.getTextRect(label);\n var singleRect = rotateTextRect(unrotatedSingleRect, axisLabelModel.get('rotate') || 0);\n rect ? rect.union(singleRect) : rect = singleRect;\n }\n return rect;\n}\nfunction rotateTextRect(textRect, rotate) {\n var rotateRadians = rotate * Math.PI / 180;\n var beforeWidth = textRect.width;\n var beforeHeight = textRect.height;\n var afterWidth = beforeWidth * Math.abs(Math.cos(rotateRadians)) + Math.abs(beforeHeight * Math.sin(rotateRadians));\n var afterHeight = beforeWidth * Math.abs(Math.sin(rotateRadians)) + Math.abs(beforeHeight * Math.cos(rotateRadians));\n var rotatedRect = new BoundingRect(textRect.x, textRect.y, afterWidth, afterHeight);\n return rotatedRect;\n}\n/**\n * @param model axisLabelModel or axisTickModel\n * @return {number|String} Can be null|'auto'|number|function\n */\nexport function getOptionCategoryInterval(model) {\n var interval = model.get('interval');\n return interval == null ? 'auto' : interval;\n}\n/**\n * Set `categoryInterval` as 0 implicitly indicates that\n * show all labels regardless of overlap.\n * @param {Object} axis axisModel.axis\n */\nexport function shouldShowAllLabels(axis) {\n return axis.type === 'category' && getOptionCategoryInterval(axis.getLabelModel()) === 0;\n}\nexport function getDataDimensionsOnAxis(data, axisDim) {\n // Remove duplicated dat dimensions caused by `getStackedDimension`.\n var dataDimMap = {};\n // Currently `mapDimensionsAll` will contain stack result dimension ('__\\0ecstackresult').\n // PENDING: is it reasonable? Do we need to remove the original dim from \"coord dim\" since\n // there has been stacked result dim?\n zrUtil.each(data.mapDimensionsAll(axisDim), function (dataDim) {\n // For example, the extent of the original dimension\n // is [0.1, 0.5], the extent of the `stackResultDimension`\n // is [7, 9], the final extent should NOT include [0.1, 0.5],\n // because there is no graphic corresponding to [0.1, 0.5].\n // See the case in `test/area-stack.html` `main1`, where area line\n // stack needs `yAxis` not start from 0.\n dataDimMap[getStackedDimension(data, dataDim)] = true;\n });\n return zrUtil.keys(dataDimMap);\n}\nexport function unionAxisExtentFromData(dataExtent, data, axisDim) {\n if (data) {\n zrUtil.each(getDataDimensionsOnAxis(data, axisDim), function (dim) {\n var seriesExtent = data.getApproximateExtent(dim);\n seriesExtent[0] < dataExtent[0] && (dataExtent[0] = seriesExtent[0]);\n seriesExtent[1] > dataExtent[1] && (dataExtent[1] = seriesExtent[1]);\n });\n }\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nvar AxisModelCommonMixin = /** @class */function () {\n function AxisModelCommonMixin() {}\n AxisModelCommonMixin.prototype.getNeedCrossZero = function () {\n var option = this.option;\n return !option.scale;\n };\n /**\n * Should be implemented by each axis model if necessary.\n * @return coordinate system model\n */\n AxisModelCommonMixin.prototype.getCoordSysModel = function () {\n return;\n };\n return AxisModelCommonMixin;\n}();\nexport { AxisModelCommonMixin };","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { registerPreprocessor, registerProcessor, registerPostInit, registerPostUpdate, registerAction, registerCoordinateSystem, registerLayout, registerVisual, registerTransform, registerLoading, registerMap, registerUpdateLifecycle, PRIORITY } from './core/echarts.js';\nimport ComponentView from './view/Component.js';\nimport ChartView from './view/Chart.js';\nimport ComponentModel from './model/Component.js';\nimport SeriesModel from './model/Series.js';\nimport { isFunction, indexOf, isArray, each } from 'zrender/lib/core/util.js';\nimport { registerImpl } from './core/impl.js';\nimport { registerPainter } from 'zrender/lib/zrender.js';\nvar extensions = [];\nvar extensionRegisters = {\n registerPreprocessor: registerPreprocessor,\n registerProcessor: registerProcessor,\n registerPostInit: registerPostInit,\n registerPostUpdate: registerPostUpdate,\n registerUpdateLifecycle: registerUpdateLifecycle,\n registerAction: registerAction,\n registerCoordinateSystem: registerCoordinateSystem,\n registerLayout: registerLayout,\n registerVisual: registerVisual,\n registerTransform: registerTransform,\n registerLoading: registerLoading,\n registerMap: registerMap,\n registerImpl: registerImpl,\n PRIORITY: PRIORITY,\n ComponentModel: ComponentModel,\n ComponentView: ComponentView,\n SeriesModel: SeriesModel,\n ChartView: ChartView,\n // TODO Use ComponentModel and SeriesModel instead of Constructor\n registerComponentModel: function (ComponentModelClass) {\n ComponentModel.registerClass(ComponentModelClass);\n },\n registerComponentView: function (ComponentViewClass) {\n ComponentView.registerClass(ComponentViewClass);\n },\n registerSeriesModel: function (SeriesModelClass) {\n SeriesModel.registerClass(SeriesModelClass);\n },\n registerChartView: function (ChartViewClass) {\n ChartView.registerClass(ChartViewClass);\n },\n registerSubTypeDefaulter: function (componentType, defaulter) {\n ComponentModel.registerSubTypeDefaulter(componentType, defaulter);\n },\n registerPainter: function (painterType, PainterCtor) {\n registerPainter(painterType, PainterCtor);\n }\n};\nexport function use(ext) {\n if (isArray(ext)) {\n // use([ChartLine, ChartBar]);\n each(ext, function (singleExt) {\n use(singleExt);\n });\n return;\n }\n if (indexOf(extensions, ext) >= 0) {\n return;\n }\n extensions.push(ext);\n if (isFunction(ext)) {\n ext = {\n install: ext\n };\n }\n ext.install(extensionRegisters);\n}","import windingLine from './windingLine.js';\nvar EPSILON = 1e-8;\nfunction isAroundEqual(a, b) {\n return Math.abs(a - b) < EPSILON;\n}\nexport function contain(points, x, y) {\n var w = 0;\n var p = points[0];\n if (!p) {\n return false;\n }\n for (var i = 1; i < points.length; i++) {\n var p2 = points[i];\n w += windingLine(p[0], p[1], p2[0], p2[1], x, y);\n p = p2;\n }\n var p0 = points[0];\n if (!isAroundEqual(p[0], p0[0]) || !isAroundEqual(p[1], p0[1])) {\n w += windingLine(p[0], p[1], p0[0], p0[1], x, y);\n }\n return w !== 0;\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport BoundingRect from 'zrender/lib/core/BoundingRect.js';\nimport * as vec2 from 'zrender/lib/core/vector.js';\nimport * as polygonContain from 'zrender/lib/contain/polygon.js';\nimport * as matrix from 'zrender/lib/core/matrix.js';\nimport { each } from 'zrender/lib/core/util.js';\nvar TMP_TRANSFORM = [];\nfunction transformPoints(points, transform) {\n for (var p = 0; p < points.length; p++) {\n vec2.applyTransform(points[p], points[p], transform);\n }\n}\nfunction updateBBoxFromPoints(points, min, max, projection) {\n for (var i = 0; i < points.length; i++) {\n var p = points[i];\n if (projection) {\n // projection may return null point.\n p = projection.project(p);\n }\n if (p && isFinite(p[0]) && isFinite(p[1])) {\n vec2.min(min, min, p);\n vec2.max(max, max, p);\n }\n }\n}\nfunction centroid(points) {\n var signedArea = 0;\n var cx = 0;\n var cy = 0;\n var len = points.length;\n var x0 = points[len - 1][0];\n var y0 = points[len - 1][1];\n // Polygon should been closed.\n for (var i = 0; i < len; i++) {\n var x1 = points[i][0];\n var y1 = points[i][1];\n var a = x0 * y1 - x1 * y0;\n signedArea += a;\n cx += (x0 + x1) * a;\n cy += (y0 + y1) * a;\n x0 = x1;\n y0 = y1;\n }\n return signedArea ? [cx / signedArea / 3, cy / signedArea / 3, signedArea] : [points[0][0] || 0, points[0][1] || 0];\n}\nvar Region = /** @class */function () {\n function Region(name) {\n this.name = name;\n }\n Region.prototype.setCenter = function (center) {\n this._center = center;\n };\n /**\n * Get center point in data unit. That is,\n * for GeoJSONRegion, the unit is lat/lng,\n * for GeoSVGRegion, the unit is SVG local coord.\n */\n Region.prototype.getCenter = function () {\n var center = this._center;\n if (!center) {\n // In most cases there are no need to calculate this center.\n // So calculate only when called.\n center = this._center = this.calcCenter();\n }\n return center;\n };\n return Region;\n}();\nexport { Region };\nvar GeoJSONPolygonGeometry = /** @class */function () {\n function GeoJSONPolygonGeometry(exterior, interiors) {\n this.type = 'polygon';\n this.exterior = exterior;\n this.interiors = interiors;\n }\n return GeoJSONPolygonGeometry;\n}();\nexport { GeoJSONPolygonGeometry };\nvar GeoJSONLineStringGeometry = /** @class */function () {\n function GeoJSONLineStringGeometry(points) {\n this.type = 'linestring';\n this.points = points;\n }\n return GeoJSONLineStringGeometry;\n}();\nexport { GeoJSONLineStringGeometry };\nvar GeoJSONRegion = /** @class */function (_super) {\n __extends(GeoJSONRegion, _super);\n function GeoJSONRegion(name, geometries, cp) {\n var _this = _super.call(this, name) || this;\n _this.type = 'geoJSON';\n _this.geometries = geometries;\n _this._center = cp && [cp[0], cp[1]];\n return _this;\n }\n GeoJSONRegion.prototype.calcCenter = function () {\n var geometries = this.geometries;\n var largestGeo;\n var largestGeoSize = 0;\n for (var i = 0; i < geometries.length; i++) {\n var geo = geometries[i];\n var exterior = geo.exterior;\n // Simple trick to use points count instead of polygon area as region size.\n // Ignore linestring\n var size = exterior && exterior.length;\n if (size > largestGeoSize) {\n largestGeo = geo;\n largestGeoSize = size;\n }\n }\n if (largestGeo) {\n return centroid(largestGeo.exterior);\n }\n // from bounding rect by default.\n var rect = this.getBoundingRect();\n return [rect.x + rect.width / 2, rect.y + rect.height / 2];\n };\n GeoJSONRegion.prototype.getBoundingRect = function (projection) {\n var rect = this._rect;\n // Always recalculate if using projection.\n if (rect && !projection) {\n return rect;\n }\n var min = [Infinity, Infinity];\n var max = [-Infinity, -Infinity];\n var geometries = this.geometries;\n each(geometries, function (geo) {\n if (geo.type === 'polygon') {\n // Doesn't consider hole\n updateBBoxFromPoints(geo.exterior, min, max, projection);\n } else {\n each(geo.points, function (points) {\n updateBBoxFromPoints(points, min, max, projection);\n });\n }\n });\n // Normalie invalid bounding.\n if (!(isFinite(min[0]) && isFinite(min[1]) && isFinite(max[0]) && isFinite(max[1]))) {\n min[0] = min[1] = max[0] = max[1] = 0;\n }\n rect = new BoundingRect(min[0], min[1], max[0] - min[0], max[1] - min[1]);\n if (!projection) {\n this._rect = rect;\n }\n return rect;\n };\n GeoJSONRegion.prototype.contain = function (coord) {\n var rect = this.getBoundingRect();\n var geometries = this.geometries;\n if (!rect.contain(coord[0], coord[1])) {\n return false;\n }\n loopGeo: for (var i = 0, len = geometries.length; i < len; i++) {\n var geo = geometries[i];\n // Only support polygon.\n if (geo.type !== 'polygon') {\n continue;\n }\n var exterior = geo.exterior;\n var interiors = geo.interiors;\n if (polygonContain.contain(exterior, coord[0], coord[1])) {\n // Not in the region if point is in the hole.\n for (var k = 0; k < (interiors ? interiors.length : 0); k++) {\n if (polygonContain.contain(interiors[k], coord[0], coord[1])) {\n continue loopGeo;\n }\n }\n return true;\n }\n }\n return false;\n };\n /**\n * Transform the raw coords to target bounding.\n * @param x\n * @param y\n * @param width\n * @param height\n */\n GeoJSONRegion.prototype.transformTo = function (x, y, width, height) {\n var rect = this.getBoundingRect();\n var aspect = rect.width / rect.height;\n if (!width) {\n width = aspect * height;\n } else if (!height) {\n height = width / aspect;\n }\n var target = new BoundingRect(x, y, width, height);\n var transform = rect.calculateTransform(target);\n var geometries = this.geometries;\n for (var i = 0; i < geometries.length; i++) {\n var geo = geometries[i];\n if (geo.type === 'polygon') {\n transformPoints(geo.exterior, transform);\n each(geo.interiors, function (interior) {\n transformPoints(interior, transform);\n });\n } else {\n each(geo.points, function (points) {\n transformPoints(points, transform);\n });\n }\n }\n rect = this._rect;\n rect.copy(target);\n // Update center\n this._center = [rect.x + rect.width / 2, rect.y + rect.height / 2];\n };\n GeoJSONRegion.prototype.cloneShallow = function (name) {\n name == null && (name = this.name);\n var newRegion = new GeoJSONRegion(name, this.geometries, this._center);\n newRegion._rect = this._rect;\n newRegion.transformTo = null; // Simply avoid to be called.\n return newRegion;\n };\n return GeoJSONRegion;\n}(Region);\nexport { GeoJSONRegion };\nvar GeoSVGRegion = /** @class */function (_super) {\n __extends(GeoSVGRegion, _super);\n function GeoSVGRegion(name, elOnlyForCalculate) {\n var _this = _super.call(this, name) || this;\n _this.type = 'geoSVG';\n _this._elOnlyForCalculate = elOnlyForCalculate;\n return _this;\n }\n GeoSVGRegion.prototype.calcCenter = function () {\n var el = this._elOnlyForCalculate;\n var rect = el.getBoundingRect();\n var center = [rect.x + rect.width / 2, rect.y + rect.height / 2];\n var mat = matrix.identity(TMP_TRANSFORM);\n var target = el;\n while (target && !target.isGeoSVGGraphicRoot) {\n matrix.mul(mat, target.getLocalTransform(), mat);\n target = target.parent;\n }\n matrix.invert(mat, mat);\n vec2.applyTransform(center, center, mat);\n return center;\n };\n return GeoSVGRegion;\n}(Region);\nexport { GeoSVGRegion };","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/**\n * Parse and decode geo json\n */\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { GeoJSONLineStringGeometry, GeoJSONPolygonGeometry, GeoJSONRegion } from './Region.js';\nfunction decode(json) {\n if (!json.UTF8Encoding) {\n return json;\n }\n var jsonCompressed = json;\n var encodeScale = jsonCompressed.UTF8Scale;\n if (encodeScale == null) {\n encodeScale = 1024;\n }\n var features = jsonCompressed.features;\n zrUtil.each(features, function (feature) {\n var geometry = feature.geometry;\n var encodeOffsets = geometry.encodeOffsets;\n var coordinates = geometry.coordinates;\n // Geometry may be appeded manually in the script after json loaded.\n // In this case this geometry is usually not encoded.\n if (!encodeOffsets) {\n return;\n }\n switch (geometry.type) {\n case 'LineString':\n geometry.coordinates = decodeRing(coordinates, encodeOffsets, encodeScale);\n break;\n case 'Polygon':\n decodeRings(coordinates, encodeOffsets, encodeScale);\n break;\n case 'MultiLineString':\n decodeRings(coordinates, encodeOffsets, encodeScale);\n break;\n case 'MultiPolygon':\n zrUtil.each(coordinates, function (rings, idx) {\n return decodeRings(rings, encodeOffsets[idx], encodeScale);\n });\n }\n });\n // Has been decoded\n jsonCompressed.UTF8Encoding = false;\n return jsonCompressed;\n}\nfunction decodeRings(rings, encodeOffsets, encodeScale) {\n for (var c = 0; c < rings.length; c++) {\n rings[c] = decodeRing(rings[c], encodeOffsets[c], encodeScale);\n }\n}\nfunction decodeRing(coordinate, encodeOffsets, encodeScale) {\n var result = [];\n var prevX = encodeOffsets[0];\n var prevY = encodeOffsets[1];\n for (var i = 0; i < coordinate.length; i += 2) {\n var x = coordinate.charCodeAt(i) - 64;\n var y = coordinate.charCodeAt(i + 1) - 64;\n // ZigZag decoding\n x = x >> 1 ^ -(x & 1);\n y = y >> 1 ^ -(y & 1);\n // Delta deocding\n x += prevX;\n y += prevY;\n prevX = x;\n prevY = y;\n // Dequantize\n result.push([x / encodeScale, y / encodeScale]);\n }\n return result;\n}\nexport default function parseGeoJSON(geoJson, nameProperty) {\n geoJson = decode(geoJson);\n return zrUtil.map(zrUtil.filter(geoJson.features, function (featureObj) {\n // Output of mapshaper may have geometry null\n return featureObj.geometry && featureObj.properties && featureObj.geometry.coordinates.length > 0;\n }), function (featureObj) {\n var properties = featureObj.properties;\n var geo = featureObj.geometry;\n var geometries = [];\n switch (geo.type) {\n case 'Polygon':\n var coordinates = geo.coordinates;\n // According to the GeoJSON specification.\n // First must be exterior, and the rest are all interior(holes).\n geometries.push(new GeoJSONPolygonGeometry(coordinates[0], coordinates.slice(1)));\n break;\n case 'MultiPolygon':\n zrUtil.each(geo.coordinates, function (item) {\n if (item[0]) {\n geometries.push(new GeoJSONPolygonGeometry(item[0], item.slice(1)));\n }\n });\n break;\n case 'LineString':\n geometries.push(new GeoJSONLineStringGeometry([geo.coordinates]));\n break;\n case 'MultiLineString':\n geometries.push(new GeoJSONLineStringGeometry(geo.coordinates));\n }\n var region = new GeoJSONRegion(properties[nameProperty || 'name'], geometries, properties.cp);\n region.properties = properties;\n return region;\n });\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nexport { linearMap, round, asc, getPrecision, getPrecisionSafe, getPixelPrecision, getPercentWithPrecision, MAX_SAFE_INTEGER, remRadian, isRadianAroundZero, parseDate, quantity, quantityExponent, nice, quantile, reformIntervals, isNumeric, numericToNumber } from '../../util/number.js';","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nexport { parseDate as parse } from '../../util/number.js';\nexport { format } from '../../util/time.js';","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nexport { extendShape, extendPath, makePath, makeImage, mergePath, resizePath, createIcon, updateProps, initProps, getTransform, clipPointsByRect, clipRectByRect, registerShape, getShapeClass, Group, Image, Text, Circle, Ellipse, Sector, Ring, Polygon, Polyline, Rect, Line, BezierCurve, Arc, IncrementalDisplayable, CompoundPath, LinearGradient, RadialGradient, BoundingRect } from '../../util/graphic.js';","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nexport { addCommas, toCamelCase, normalizeCssArray, encodeHTML, formatTpl, getTooltipMarker, formatTime, capitalFirst, truncateText, getTextRect } from '../../util/format.js';","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nexport { map, each, indexOf, inherits, reduce, filter, bind, curry, isArray, isString, isObject, isFunction, extend, defaults, clone, merge } from 'zrender/lib/core/util.js';","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as textContain from 'zrender/lib/contain/text.js';\nimport { makeInner } from '../util/model.js';\nimport { makeLabelFormatter, getOptionCategoryInterval, shouldShowAllLabels } from './axisHelper.js';\nvar inner = makeInner();\nfunction tickValuesToNumbers(axis, values) {\n var nums = zrUtil.map(values, function (val) {\n return axis.scale.parse(val);\n });\n if (axis.type === 'time' && nums.length > 0) {\n // Time axis needs duplicate first/last tick (see TimeScale.getTicks())\n // The first and last tick/label don't get drawn\n nums.sort();\n nums.unshift(nums[0]);\n nums.push(nums[nums.length - 1]);\n }\n return nums;\n}\nexport function createAxisLabels(axis) {\n var custom = axis.getLabelModel().get('customValues');\n if (custom) {\n var labelFormatter_1 = makeLabelFormatter(axis);\n return {\n labels: tickValuesToNumbers(axis, custom).map(function (numval) {\n var tick = {\n value: numval\n };\n return {\n formattedLabel: labelFormatter_1(tick),\n rawLabel: axis.scale.getLabel(tick),\n tickValue: numval\n };\n })\n };\n }\n // Only ordinal scale support tick interval\n return axis.type === 'category' ? makeCategoryLabels(axis) : makeRealNumberLabels(axis);\n}\n/**\n * @param {module:echats/coord/Axis} axis\n * @param {module:echarts/model/Model} tickModel For example, can be axisTick, splitLine, splitArea.\n * @return {Object} {\n * ticks: Array.\n * tickCategoryInterval: number\n * }\n */\nexport function createAxisTicks(axis, tickModel) {\n var custom = axis.getTickModel().get('customValues');\n if (custom) {\n return {\n ticks: tickValuesToNumbers(axis, custom)\n };\n }\n // Only ordinal scale support tick interval\n return axis.type === 'category' ? makeCategoryTicks(axis, tickModel) : {\n ticks: zrUtil.map(axis.scale.getTicks(), function (tick) {\n return tick.value;\n })\n };\n}\nfunction makeCategoryLabels(axis) {\n var labelModel = axis.getLabelModel();\n var result = makeCategoryLabelsActually(axis, labelModel);\n return !labelModel.get('show') || axis.scale.isBlank() ? {\n labels: [],\n labelCategoryInterval: result.labelCategoryInterval\n } : result;\n}\nfunction makeCategoryLabelsActually(axis, labelModel) {\n var labelsCache = getListCache(axis, 'labels');\n var optionLabelInterval = getOptionCategoryInterval(labelModel);\n var result = listCacheGet(labelsCache, optionLabelInterval);\n if (result) {\n return result;\n }\n var labels;\n var numericLabelInterval;\n if (zrUtil.isFunction(optionLabelInterval)) {\n labels = makeLabelsByCustomizedCategoryInterval(axis, optionLabelInterval);\n } else {\n numericLabelInterval = optionLabelInterval === 'auto' ? makeAutoCategoryInterval(axis) : optionLabelInterval;\n labels = makeLabelsByNumericCategoryInterval(axis, numericLabelInterval);\n }\n // Cache to avoid calling interval function repeatedly.\n return listCacheSet(labelsCache, optionLabelInterval, {\n labels: labels,\n labelCategoryInterval: numericLabelInterval\n });\n}\nfunction makeCategoryTicks(axis, tickModel) {\n var ticksCache = getListCache(axis, 'ticks');\n var optionTickInterval = getOptionCategoryInterval(tickModel);\n var result = listCacheGet(ticksCache, optionTickInterval);\n if (result) {\n return result;\n }\n var ticks;\n var tickCategoryInterval;\n // Optimize for the case that large category data and no label displayed,\n // we should not return all ticks.\n if (!tickModel.get('show') || axis.scale.isBlank()) {\n ticks = [];\n }\n if (zrUtil.isFunction(optionTickInterval)) {\n ticks = makeLabelsByCustomizedCategoryInterval(axis, optionTickInterval, true);\n }\n // Always use label interval by default despite label show. Consider this\n // scenario, Use multiple grid with the xAxis sync, and only one xAxis shows\n // labels. `splitLine` and `axisTick` should be consistent in this case.\n else if (optionTickInterval === 'auto') {\n var labelsResult = makeCategoryLabelsActually(axis, axis.getLabelModel());\n tickCategoryInterval = labelsResult.labelCategoryInterval;\n ticks = zrUtil.map(labelsResult.labels, function (labelItem) {\n return labelItem.tickValue;\n });\n } else {\n tickCategoryInterval = optionTickInterval;\n ticks = makeLabelsByNumericCategoryInterval(axis, tickCategoryInterval, true);\n }\n // Cache to avoid calling interval function repeatedly.\n return listCacheSet(ticksCache, optionTickInterval, {\n ticks: ticks,\n tickCategoryInterval: tickCategoryInterval\n });\n}\nfunction makeRealNumberLabels(axis) {\n var ticks = axis.scale.getTicks();\n var labelFormatter = makeLabelFormatter(axis);\n return {\n labels: zrUtil.map(ticks, function (tick, idx) {\n return {\n level: tick.level,\n formattedLabel: labelFormatter(tick, idx),\n rawLabel: axis.scale.getLabel(tick),\n tickValue: tick.value\n };\n })\n };\n}\nfunction getListCache(axis, prop) {\n // Because key can be a function, and cache size always is small, we use array cache.\n return inner(axis)[prop] || (inner(axis)[prop] = []);\n}\nfunction listCacheGet(cache, key) {\n for (var i = 0; i < cache.length; i++) {\n if (cache[i].key === key) {\n return cache[i].value;\n }\n }\n}\nfunction listCacheSet(cache, key, value) {\n cache.push({\n key: key,\n value: value\n });\n return value;\n}\nfunction makeAutoCategoryInterval(axis) {\n var result = inner(axis).autoInterval;\n return result != null ? result : inner(axis).autoInterval = axis.calculateCategoryInterval();\n}\n/**\n * Calculate interval for category axis ticks and labels.\n * To get precise result, at least one of `getRotate` and `isHorizontal`\n * should be implemented in axis.\n */\nexport function calculateCategoryInterval(axis) {\n var params = fetchAutoCategoryIntervalCalculationParams(axis);\n var labelFormatter = makeLabelFormatter(axis);\n var rotation = (params.axisRotate - params.labelRotate) / 180 * Math.PI;\n var ordinalScale = axis.scale;\n var ordinalExtent = ordinalScale.getExtent();\n // Providing this method is for optimization:\n // avoid generating a long array by `getTicks`\n // in large category data case.\n var tickCount = ordinalScale.count();\n if (ordinalExtent[1] - ordinalExtent[0] < 1) {\n return 0;\n }\n var step = 1;\n // Simple optimization. Empirical value: tick count should less than 40.\n if (tickCount > 40) {\n step = Math.max(1, Math.floor(tickCount / 40));\n }\n var tickValue = ordinalExtent[0];\n var unitSpan = axis.dataToCoord(tickValue + 1) - axis.dataToCoord(tickValue);\n var unitW = Math.abs(unitSpan * Math.cos(rotation));\n var unitH = Math.abs(unitSpan * Math.sin(rotation));\n var maxW = 0;\n var maxH = 0;\n // Caution: Performance sensitive for large category data.\n // Consider dataZoom, we should make appropriate step to avoid O(n) loop.\n for (; tickValue <= ordinalExtent[1]; tickValue += step) {\n var width = 0;\n var height = 0;\n // Not precise, do not consider align and vertical align\n // and each distance from axis line yet.\n var rect = textContain.getBoundingRect(labelFormatter({\n value: tickValue\n }), params.font, 'center', 'top');\n // Magic number\n width = rect.width * 1.3;\n height = rect.height * 1.3;\n // Min size, void long loop.\n maxW = Math.max(maxW, width, 7);\n maxH = Math.max(maxH, height, 7);\n }\n var dw = maxW / unitW;\n var dh = maxH / unitH;\n // 0/0 is NaN, 1/0 is Infinity.\n isNaN(dw) && (dw = Infinity);\n isNaN(dh) && (dh = Infinity);\n var interval = Math.max(0, Math.floor(Math.min(dw, dh)));\n var cache = inner(axis.model);\n var axisExtent = axis.getExtent();\n var lastAutoInterval = cache.lastAutoInterval;\n var lastTickCount = cache.lastTickCount;\n // Use cache to keep interval stable while moving zoom window,\n // otherwise the calculated interval might jitter when the zoom\n // window size is close to the interval-changing size.\n // For example, if all of the axis labels are `a, b, c, d, e, f, g`.\n // The jitter will cause that sometimes the displayed labels are\n // `a, d, g` (interval: 2) sometimes `a, c, e`(interval: 1).\n if (lastAutoInterval != null && lastTickCount != null && Math.abs(lastAutoInterval - interval) <= 1 && Math.abs(lastTickCount - tickCount) <= 1\n // Always choose the bigger one, otherwise the critical\n // point is not the same when zooming in or zooming out.\n && lastAutoInterval > interval\n // If the axis change is caused by chart resize, the cache should not\n // be used. Otherwise some hidden labels might not be shown again.\n && cache.axisExtent0 === axisExtent[0] && cache.axisExtent1 === axisExtent[1]) {\n interval = lastAutoInterval;\n }\n // Only update cache if cache not used, otherwise the\n // changing of interval is too insensitive.\n else {\n cache.lastTickCount = tickCount;\n cache.lastAutoInterval = interval;\n cache.axisExtent0 = axisExtent[0];\n cache.axisExtent1 = axisExtent[1];\n }\n return interval;\n}\nfunction fetchAutoCategoryIntervalCalculationParams(axis) {\n var labelModel = axis.getLabelModel();\n return {\n axisRotate: axis.getRotate ? axis.getRotate() : axis.isHorizontal && !axis.isHorizontal() ? 90 : 0,\n labelRotate: labelModel.get('rotate') || 0,\n font: labelModel.getFont()\n };\n}\nfunction makeLabelsByNumericCategoryInterval(axis, categoryInterval, onlyTick) {\n var labelFormatter = makeLabelFormatter(axis);\n var ordinalScale = axis.scale;\n var ordinalExtent = ordinalScale.getExtent();\n var labelModel = axis.getLabelModel();\n var result = [];\n // TODO: axisType: ordinalTime, pick the tick from each month/day/year/...\n var step = Math.max((categoryInterval || 0) + 1, 1);\n var startTick = ordinalExtent[0];\n var tickCount = ordinalScale.count();\n // Calculate start tick based on zero if possible to keep label consistent\n // while zooming and moving while interval > 0. Otherwise the selection\n // of displayable ticks and symbols probably keep changing.\n // 3 is empirical value.\n if (startTick !== 0 && step > 1 && tickCount / step > 2) {\n startTick = Math.round(Math.ceil(startTick / step) * step);\n }\n // (1) Only add min max label here but leave overlap checking\n // to render stage, which also ensure the returned list\n // suitable for splitLine and splitArea rendering.\n // (2) Scales except category always contain min max label so\n // do not need to perform this process.\n var showAllLabel = shouldShowAllLabels(axis);\n var includeMinLabel = labelModel.get('showMinLabel') || showAllLabel;\n var includeMaxLabel = labelModel.get('showMaxLabel') || showAllLabel;\n if (includeMinLabel && startTick !== ordinalExtent[0]) {\n addItem(ordinalExtent[0]);\n }\n // Optimize: avoid generating large array by `ordinalScale.getTicks()`.\n var tickValue = startTick;\n for (; tickValue <= ordinalExtent[1]; tickValue += step) {\n addItem(tickValue);\n }\n if (includeMaxLabel && tickValue - step !== ordinalExtent[1]) {\n addItem(ordinalExtent[1]);\n }\n function addItem(tickValue) {\n var tickObj = {\n value: tickValue\n };\n result.push(onlyTick ? tickValue : {\n formattedLabel: labelFormatter(tickObj),\n rawLabel: ordinalScale.getLabel(tickObj),\n tickValue: tickValue\n });\n }\n return result;\n}\nfunction makeLabelsByCustomizedCategoryInterval(axis, categoryInterval, onlyTick) {\n var ordinalScale = axis.scale;\n var labelFormatter = makeLabelFormatter(axis);\n var result = [];\n zrUtil.each(ordinalScale.getTicks(), function (tick) {\n var rawLabel = ordinalScale.getLabel(tick);\n var tickValue = tick.value;\n if (categoryInterval(tick.value, rawLabel)) {\n result.push(onlyTick ? tickValue : {\n formattedLabel: labelFormatter(tick),\n rawLabel: rawLabel,\n tickValue: tickValue\n });\n }\n });\n return result;\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { each, map } from 'zrender/lib/core/util.js';\nimport { linearMap, getPixelPrecision, round } from '../util/number.js';\nimport { createAxisTicks, createAxisLabels, calculateCategoryInterval } from './axisTickLabelBuilder.js';\nvar NORMALIZED_EXTENT = [0, 1];\n/**\n * Base class of Axis.\n */\nvar Axis = /** @class */function () {\n function Axis(dim, scale, extent) {\n this.onBand = false;\n this.inverse = false;\n this.dim = dim;\n this.scale = scale;\n this._extent = extent || [0, 0];\n }\n /**\n * If axis extent contain given coord\n */\n Axis.prototype.contain = function (coord) {\n var extent = this._extent;\n var min = Math.min(extent[0], extent[1]);\n var max = Math.max(extent[0], extent[1]);\n return coord >= min && coord <= max;\n };\n /**\n * If axis extent contain given data\n */\n Axis.prototype.containData = function (data) {\n return this.scale.contain(data);\n };\n /**\n * Get coord extent.\n */\n Axis.prototype.getExtent = function () {\n return this._extent.slice();\n };\n /**\n * Get precision used for formatting\n */\n Axis.prototype.getPixelPrecision = function (dataExtent) {\n return getPixelPrecision(dataExtent || this.scale.getExtent(), this._extent);\n };\n /**\n * Set coord extent\n */\n Axis.prototype.setExtent = function (start, end) {\n var extent = this._extent;\n extent[0] = start;\n extent[1] = end;\n };\n /**\n * Convert data to coord. Data is the rank if it has an ordinal scale\n */\n Axis.prototype.dataToCoord = function (data, clamp) {\n var extent = this._extent;\n var scale = this.scale;\n data = scale.normalize(data);\n if (this.onBand && scale.type === 'ordinal') {\n extent = extent.slice();\n fixExtentWithBands(extent, scale.count());\n }\n return linearMap(data, NORMALIZED_EXTENT, extent, clamp);\n };\n /**\n * Convert coord to data. Data is the rank if it has an ordinal scale\n */\n Axis.prototype.coordToData = function (coord, clamp) {\n var extent = this._extent;\n var scale = this.scale;\n if (this.onBand && scale.type === 'ordinal') {\n extent = extent.slice();\n fixExtentWithBands(extent, scale.count());\n }\n var t = linearMap(coord, extent, NORMALIZED_EXTENT, clamp);\n return this.scale.scale(t);\n };\n /**\n * Convert pixel point to data in axis\n */\n Axis.prototype.pointToData = function (point, clamp) {\n // Should be implemented in derived class if necessary.\n return;\n };\n /**\n * Different from `zrUtil.map(axis.getTicks(), axis.dataToCoord, axis)`,\n * `axis.getTicksCoords` considers `onBand`, which is used by\n * `boundaryGap:true` of category axis and splitLine and splitArea.\n * @param opt.tickModel default: axis.model.getModel('axisTick')\n * @param opt.clamp If `true`, the first and the last\n * tick must be at the axis end points. Otherwise, clip ticks\n * that outside the axis extent.\n */\n Axis.prototype.getTicksCoords = function (opt) {\n opt = opt || {};\n var tickModel = opt.tickModel || this.getTickModel();\n var result = createAxisTicks(this, tickModel);\n var ticks = result.ticks;\n var ticksCoords = map(ticks, function (tickVal) {\n return {\n coord: this.dataToCoord(this.scale.type === 'ordinal' ? this.scale.getRawOrdinalNumber(tickVal) : tickVal),\n tickValue: tickVal\n };\n }, this);\n var alignWithLabel = tickModel.get('alignWithLabel');\n fixOnBandTicksCoords(this, ticksCoords, alignWithLabel, opt.clamp);\n return ticksCoords;\n };\n Axis.prototype.getMinorTicksCoords = function () {\n if (this.scale.type === 'ordinal') {\n // Category axis doesn't support minor ticks\n return [];\n }\n var minorTickModel = this.model.getModel('minorTick');\n var splitNumber = minorTickModel.get('splitNumber');\n // Protection.\n if (!(splitNumber > 0 && splitNumber < 100)) {\n splitNumber = 5;\n }\n var minorTicks = this.scale.getMinorTicks(splitNumber);\n var minorTicksCoords = map(minorTicks, function (minorTicksGroup) {\n return map(minorTicksGroup, function (minorTick) {\n return {\n coord: this.dataToCoord(minorTick),\n tickValue: minorTick\n };\n }, this);\n }, this);\n return minorTicksCoords;\n };\n Axis.prototype.getViewLabels = function () {\n return createAxisLabels(this).labels;\n };\n Axis.prototype.getLabelModel = function () {\n return this.model.getModel('axisLabel');\n };\n /**\n * Notice here we only get the default tick model. For splitLine\n * or splitArea, we should pass the splitLineModel or splitAreaModel\n * manually when calling `getTicksCoords`.\n * In GL, this method may be overridden to:\n * `axisModel.getModel('axisTick', grid3DModel.getModel('axisTick'));`\n */\n Axis.prototype.getTickModel = function () {\n return this.model.getModel('axisTick');\n };\n /**\n * Get width of band\n */\n Axis.prototype.getBandWidth = function () {\n var axisExtent = this._extent;\n var dataExtent = this.scale.getExtent();\n var len = dataExtent[1] - dataExtent[0] + (this.onBand ? 1 : 0);\n // Fix #2728, avoid NaN when only one data.\n len === 0 && (len = 1);\n var size = Math.abs(axisExtent[1] - axisExtent[0]);\n return Math.abs(size) / len;\n };\n /**\n * Only be called in category axis.\n * Can be overridden, consider other axes like in 3D.\n * @return Auto interval for cateogry axis tick and label\n */\n Axis.prototype.calculateCategoryInterval = function () {\n return calculateCategoryInterval(this);\n };\n return Axis;\n}();\nfunction fixExtentWithBands(extent, nTick) {\n var size = extent[1] - extent[0];\n var len = nTick;\n var margin = size / len / 2;\n extent[0] += margin;\n extent[1] -= margin;\n}\n// If axis has labels [1, 2, 3, 4]. Bands on the axis are\n// |---1---|---2---|---3---|---4---|.\n// So the displayed ticks and splitLine/splitArea should between\n// each data item, otherwise cause misleading (e.g., split tow bars\n// of a single data item when there are two bar series).\n// Also consider if tickCategoryInterval > 0 and onBand, ticks and\n// splitLine/spliteArea should layout appropriately corresponding\n// to displayed labels. (So we should not use `getBandWidth` in this\n// case).\nfunction fixOnBandTicksCoords(axis, ticksCoords, alignWithLabel, clamp) {\n var ticksLen = ticksCoords.length;\n if (!axis.onBand || alignWithLabel || !ticksLen) {\n return;\n }\n var axisExtent = axis.getExtent();\n var last;\n var diffSize;\n if (ticksLen === 1) {\n ticksCoords[0].coord = axisExtent[0];\n last = ticksCoords[1] = {\n coord: axisExtent[1]\n };\n } else {\n var crossLen = ticksCoords[ticksLen - 1].tickValue - ticksCoords[0].tickValue;\n var shift_1 = (ticksCoords[ticksLen - 1].coord - ticksCoords[0].coord) / crossLen;\n each(ticksCoords, function (ticksItem) {\n ticksItem.coord -= shift_1 / 2;\n });\n var dataExtent = axis.scale.getExtent();\n diffSize = 1 + dataExtent[1] - ticksCoords[ticksLen - 1].tickValue;\n last = {\n coord: ticksCoords[ticksLen - 1].coord + shift_1 * diffSize\n };\n ticksCoords.push(last);\n }\n var inverse = axisExtent[0] > axisExtent[1];\n // Handling clamp.\n if (littleThan(ticksCoords[0].coord, axisExtent[0])) {\n clamp ? ticksCoords[0].coord = axisExtent[0] : ticksCoords.shift();\n }\n if (clamp && littleThan(axisExtent[0], ticksCoords[0].coord)) {\n ticksCoords.unshift({\n coord: axisExtent[0]\n });\n }\n if (littleThan(axisExtent[1], last.coord)) {\n clamp ? last.coord = axisExtent[1] : ticksCoords.pop();\n }\n if (clamp && littleThan(last.coord, axisExtent[1])) {\n ticksCoords.push({\n coord: axisExtent[1]\n });\n }\n function littleThan(a, b) {\n // Avoid rounding error cause calculated tick coord different with extent.\n // It may cause an extra unnecessary tick added.\n a = round(a);\n b = round(b);\n return inverse ? a > b : a < b;\n }\n}\nexport default Axis;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// These APIs are for more advanced usages\n// For example extend charts and components, creating graphic elements, formatting.\nimport ComponentModel from '../model/Component.js';\nimport ComponentView from '../view/Component.js';\nimport SeriesModel from '../model/Series.js';\nimport ChartView from '../view/Chart.js';\nimport SeriesData from '../data/SeriesData.js';\nimport * as zrender_1 from 'zrender/lib/zrender.js';\nexport { zrender_1 as zrender };\nimport * as matrix_1 from 'zrender/lib/core/matrix.js';\nexport { matrix_1 as matrix };\nimport * as vector_1 from 'zrender/lib/core/vector.js';\nexport { vector_1 as vector };\nimport * as zrUtil_1 from 'zrender/lib/core/util.js';\nexport { zrUtil_1 as zrUtil };\nimport * as color_1 from 'zrender/lib/tool/color.js';\nexport { color_1 as color };\nexport { throttle } from '../util/throttle.js';\nimport * as helper_1 from './api/helper.js';\nexport { helper_1 as helper };\nexport { use } from '../extension.js';\nexport { setPlatformAPI } from 'zrender/lib/core/platform.js';\n// --------------------- Helper Methods ---------------------\nexport { default as parseGeoJSON } from '../coord/geo/parseGeoJson.js';\nexport { default as parseGeoJson } from '../coord/geo/parseGeoJson.js';\nimport * as number_1 from './api/number.js';\nexport { number_1 as number };\nimport * as time_1 from './api/time.js';\nexport { time_1 as time };\nimport * as graphic_1 from './api/graphic.js';\nexport { graphic_1 as graphic };\nimport * as format_1 from './api/format.js';\nexport { format_1 as format };\nimport * as util_1 from './api/util.js';\nexport { util_1 as util };\nexport { default as env } from 'zrender/lib/core/env.js';\n// --------------------- Export for Extension Usage ---------------------\n// export {SeriesData};\nexport { SeriesData as List }; // TODO: Compatitable with exists echarts-gl code\nexport { default as Model } from '../model/Model.js';\nexport { default as Axis } from '../coord/Axis.js';\nexport { ComponentModel, ComponentView, SeriesModel, ChartView };\n// Only for GL\nexport { brushSingle as innerDrawElementOnCanvas } from 'zrender/lib/canvas/graphic.js';\n// --------------------- Deprecated Extension Methods ---------------------\n// Should use `ComponentModel.extend` or `class XXXX extend ComponentModel` to create class.\n// Then use `registerComponentModel` in `install` parameter when `use` this extension. For example:\n// class Bar3DModel extends ComponentModel {}\n// export function install(registers) { registers.registerComponentModel(Bar3DModel); }\n// echarts.use(install);\nexport function extendComponentModel(proto) {\n var Model = ComponentModel.extend(proto);\n ComponentModel.registerClass(Model);\n return Model;\n}\nexport function extendComponentView(proto) {\n var View = ComponentView.extend(proto);\n ComponentView.registerClass(View);\n return View;\n}\nexport function extendSeriesModel(proto) {\n var Model = SeriesModel.extend(proto);\n SeriesModel.registerClass(Model);\n return Model;\n}\nexport function extendChartView(proto) {\n var View = ChartView.extend(proto);\n ChartView.registerClass(View);\n return View;\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { BoundingRect, OrientedBoundingRect } from '../util/graphic.js';\nexport function prepareLayoutList(input) {\n var list = [];\n for (var i = 0; i < input.length; i++) {\n var rawItem = input[i];\n if (rawItem.defaultAttr.ignore) {\n continue;\n }\n var label = rawItem.label;\n var transform = label.getComputedTransform();\n // NOTE: Get bounding rect after getComputedTransform, or label may not been updated by the host el.\n var localRect = label.getBoundingRect();\n var isAxisAligned = !transform || transform[1] < 1e-5 && transform[2] < 1e-5;\n var minMargin = label.style.margin || 0;\n var globalRect = localRect.clone();\n globalRect.applyTransform(transform);\n globalRect.x -= minMargin / 2;\n globalRect.y -= minMargin / 2;\n globalRect.width += minMargin;\n globalRect.height += minMargin;\n var obb = isAxisAligned ? new OrientedBoundingRect(localRect, transform) : null;\n list.push({\n label: label,\n labelLine: rawItem.labelLine,\n rect: globalRect,\n localRect: localRect,\n obb: obb,\n priority: rawItem.priority,\n defaultAttr: rawItem.defaultAttr,\n layoutOption: rawItem.computedLayoutOption,\n axisAligned: isAxisAligned,\n transform: transform\n });\n }\n return list;\n}\nfunction shiftLayout(list, xyDim, sizeDim, minBound, maxBound, balanceShift) {\n var len = list.length;\n if (len < 2) {\n return;\n }\n list.sort(function (a, b) {\n return a.rect[xyDim] - b.rect[xyDim];\n });\n var lastPos = 0;\n var delta;\n var adjusted = false;\n var shifts = [];\n var totalShifts = 0;\n for (var i = 0; i < len; i++) {\n var item = list[i];\n var rect = item.rect;\n delta = rect[xyDim] - lastPos;\n if (delta < 0) {\n // shiftForward(i, len, -delta);\n rect[xyDim] -= delta;\n item.label[xyDim] -= delta;\n adjusted = true;\n }\n var shift = Math.max(-delta, 0);\n shifts.push(shift);\n totalShifts += shift;\n lastPos = rect[xyDim] + rect[sizeDim];\n }\n if (totalShifts > 0 && balanceShift) {\n // Shift back to make the distribution more equally.\n shiftList(-totalShifts / len, 0, len);\n }\n // TODO bleedMargin?\n var first = list[0];\n var last = list[len - 1];\n var minGap;\n var maxGap;\n updateMinMaxGap();\n // If ends exceed two bounds, squeeze at most 80%, then take the gap of two bounds.\n minGap < 0 && squeezeGaps(-minGap, 0.8);\n maxGap < 0 && squeezeGaps(maxGap, 0.8);\n updateMinMaxGap();\n takeBoundsGap(minGap, maxGap, 1);\n takeBoundsGap(maxGap, minGap, -1);\n // Handle bailout when there is not enough space.\n updateMinMaxGap();\n if (minGap < 0) {\n squeezeWhenBailout(-minGap);\n }\n if (maxGap < 0) {\n squeezeWhenBailout(maxGap);\n }\n function updateMinMaxGap() {\n minGap = first.rect[xyDim] - minBound;\n maxGap = maxBound - last.rect[xyDim] - last.rect[sizeDim];\n }\n function takeBoundsGap(gapThisBound, gapOtherBound, moveDir) {\n if (gapThisBound < 0) {\n // Move from other gap if can.\n var moveFromMaxGap = Math.min(gapOtherBound, -gapThisBound);\n if (moveFromMaxGap > 0) {\n shiftList(moveFromMaxGap * moveDir, 0, len);\n var remained = moveFromMaxGap + gapThisBound;\n if (remained < 0) {\n squeezeGaps(-remained * moveDir, 1);\n }\n } else {\n squeezeGaps(-gapThisBound * moveDir, 1);\n }\n }\n }\n function shiftList(delta, start, end) {\n if (delta !== 0) {\n adjusted = true;\n }\n for (var i = start; i < end; i++) {\n var item = list[i];\n var rect = item.rect;\n rect[xyDim] += delta;\n item.label[xyDim] += delta;\n }\n }\n // Squeeze gaps if the labels exceed margin.\n function squeezeGaps(delta, maxSqeezePercent) {\n var gaps = [];\n var totalGaps = 0;\n for (var i = 1; i < len; i++) {\n var prevItemRect = list[i - 1].rect;\n var gap = Math.max(list[i].rect[xyDim] - prevItemRect[xyDim] - prevItemRect[sizeDim], 0);\n gaps.push(gap);\n totalGaps += gap;\n }\n if (!totalGaps) {\n return;\n }\n var squeezePercent = Math.min(Math.abs(delta) / totalGaps, maxSqeezePercent);\n if (delta > 0) {\n for (var i = 0; i < len - 1; i++) {\n // Distribute the shift delta to all gaps.\n var movement = gaps[i] * squeezePercent;\n // Forward\n shiftList(movement, 0, i + 1);\n }\n } else {\n // Backward\n for (var i = len - 1; i > 0; i--) {\n // Distribute the shift delta to all gaps.\n var movement = gaps[i - 1] * squeezePercent;\n shiftList(-movement, i, len);\n }\n }\n }\n /**\n * Squeeze to allow overlap if there is no more space available.\n * Let other overlapping strategy like hideOverlap do the job instead of keep exceeding the bounds.\n */\n function squeezeWhenBailout(delta) {\n var dir = delta < 0 ? -1 : 1;\n delta = Math.abs(delta);\n var moveForEachLabel = Math.ceil(delta / (len - 1));\n for (var i = 0; i < len - 1; i++) {\n if (dir > 0) {\n // Forward\n shiftList(moveForEachLabel, 0, i + 1);\n } else {\n // Backward\n shiftList(-moveForEachLabel, len - i - 1, len);\n }\n delta -= moveForEachLabel;\n if (delta <= 0) {\n return;\n }\n }\n }\n return adjusted;\n}\n/**\n * Adjust labels on x direction to avoid overlap.\n */\nexport function shiftLayoutOnX(list, leftBound, rightBound,\n// If average the shifts on all labels and add them to 0\n// TODO: Not sure if should enable it.\n// Pros: The angle of lines will distribute more equally\n// Cons: In some layout. It may not what user wanted. like in pie. the label of last sector is usually changed unexpectedly.\nbalanceShift) {\n return shiftLayout(list, 'x', 'width', leftBound, rightBound, balanceShift);\n}\n/**\n * Adjust labels on y direction to avoid overlap.\n */\nexport function shiftLayoutOnY(list, topBound, bottomBound,\n// If average the shifts on all labels and add them to 0\nbalanceShift) {\n return shiftLayout(list, 'y', 'height', topBound, bottomBound, balanceShift);\n}\nexport function hideOverlap(labelList) {\n var displayedLabels = [];\n // TODO, render overflow visible first, put in the displayedLabels.\n labelList.sort(function (a, b) {\n return b.priority - a.priority;\n });\n var globalRect = new BoundingRect(0, 0, 0, 0);\n function hideEl(el) {\n if (!el.ignore) {\n // Show on emphasis.\n var emphasisState = el.ensureState('emphasis');\n if (emphasisState.ignore == null) {\n emphasisState.ignore = false;\n }\n }\n el.ignore = true;\n }\n for (var i = 0; i < labelList.length; i++) {\n var labelItem = labelList[i];\n var isAxisAligned = labelItem.axisAligned;\n var localRect = labelItem.localRect;\n var transform = labelItem.transform;\n var label = labelItem.label;\n var labelLine = labelItem.labelLine;\n globalRect.copy(labelItem.rect);\n // Add a threshold because layout may be aligned precisely.\n globalRect.width -= 0.1;\n globalRect.height -= 0.1;\n globalRect.x += 0.05;\n globalRect.y += 0.05;\n var obb = labelItem.obb;\n var overlapped = false;\n for (var j = 0; j < displayedLabels.length; j++) {\n var existsTextCfg = displayedLabels[j];\n // Fast rejection.\n if (!globalRect.intersect(existsTextCfg.rect)) {\n continue;\n }\n if (isAxisAligned && existsTextCfg.axisAligned) {\n // Is overlapped\n overlapped = true;\n break;\n }\n if (!existsTextCfg.obb) {\n // If self is not axis aligned. But other is.\n existsTextCfg.obb = new OrientedBoundingRect(existsTextCfg.localRect, existsTextCfg.transform);\n }\n if (!obb) {\n // If self is axis aligned. But other is not.\n obb = new OrientedBoundingRect(localRect, transform);\n }\n if (obb.intersect(existsTextCfg.obb)) {\n overlapped = true;\n break;\n }\n }\n // TODO Callback to determine if this overlap should be handled?\n if (overlapped) {\n hideEl(label);\n labelLine && hideEl(labelLine);\n } else {\n label.attr('ignore', labelItem.defaultAttr.ignore);\n labelLine && labelLine.attr('ignore', labelItem.defaultAttr.labelGuideIgnore);\n displayedLabels.push(labelItem);\n }\n }\n}","import { __extends } from \"tslib\";\nimport * as util from '../core/util.js';\nimport { devicePixelRatio } from '../config.js';\nimport Eventful from '../core/Eventful.js';\nimport { getCanvasGradient } from './helper.js';\nimport { createCanvasPattern } from './graphic.js';\nimport BoundingRect from '../core/BoundingRect.js';\nimport { REDRAW_BIT } from '../graphic/constants.js';\nimport { platformApi } from '../core/platform.js';\nfunction createDom(id, painter, dpr) {\n var newDom = platformApi.createCanvas();\n var width = painter.getWidth();\n var height = painter.getHeight();\n var newDomStyle = newDom.style;\n if (newDomStyle) {\n newDomStyle.position = 'absolute';\n newDomStyle.left = '0';\n newDomStyle.top = '0';\n newDomStyle.width = width + 'px';\n newDomStyle.height = height + 'px';\n newDom.setAttribute('data-zr-dom-id', id);\n }\n newDom.width = width * dpr;\n newDom.height = height * dpr;\n return newDom;\n}\n;\nvar Layer = function (_super) {\n __extends(Layer, _super);\n function Layer(id, painter, dpr) {\n var _this = _super.call(this) || this;\n _this.motionBlur = false;\n _this.lastFrameAlpha = 0.7;\n _this.dpr = 1;\n _this.virtual = false;\n _this.config = {};\n _this.incremental = false;\n _this.zlevel = 0;\n _this.maxRepaintRectCount = 5;\n _this.__dirty = true;\n _this.__firstTimePaint = true;\n _this.__used = false;\n _this.__drawIndex = 0;\n _this.__startIndex = 0;\n _this.__endIndex = 0;\n _this.__prevStartIndex = null;\n _this.__prevEndIndex = null;\n var dom;\n dpr = dpr || devicePixelRatio;\n if (typeof id === 'string') {\n dom = createDom(id, painter, dpr);\n } else if (util.isObject(id)) {\n dom = id;\n id = dom.id;\n }\n _this.id = id;\n _this.dom = dom;\n var domStyle = dom.style;\n if (domStyle) {\n util.disableUserSelect(dom);\n dom.onselectstart = function () {\n return false;\n };\n domStyle.padding = '0';\n domStyle.margin = '0';\n domStyle.borderWidth = '0';\n }\n _this.painter = painter;\n _this.dpr = dpr;\n return _this;\n }\n Layer.prototype.getElementCount = function () {\n return this.__endIndex - this.__startIndex;\n };\n Layer.prototype.afterBrush = function () {\n this.__prevStartIndex = this.__startIndex;\n this.__prevEndIndex = this.__endIndex;\n };\n Layer.prototype.initContext = function () {\n this.ctx = this.dom.getContext('2d');\n this.ctx.dpr = this.dpr;\n };\n Layer.prototype.setUnpainted = function () {\n this.__firstTimePaint = true;\n };\n Layer.prototype.createBackBuffer = function () {\n var dpr = this.dpr;\n this.domBack = createDom('back-' + this.id, this.painter, dpr);\n this.ctxBack = this.domBack.getContext('2d');\n if (dpr !== 1) {\n this.ctxBack.scale(dpr, dpr);\n }\n };\n Layer.prototype.createRepaintRects = function (displayList, prevList, viewWidth, viewHeight) {\n if (this.__firstTimePaint) {\n this.__firstTimePaint = false;\n return null;\n }\n var mergedRepaintRects = [];\n var maxRepaintRectCount = this.maxRepaintRectCount;\n var full = false;\n var pendingRect = new BoundingRect(0, 0, 0, 0);\n function addRectToMergePool(rect) {\n if (!rect.isFinite() || rect.isZero()) {\n return;\n }\n if (mergedRepaintRects.length === 0) {\n var boundingRect = new BoundingRect(0, 0, 0, 0);\n boundingRect.copy(rect);\n mergedRepaintRects.push(boundingRect);\n } else {\n var isMerged = false;\n var minDeltaArea = Infinity;\n var bestRectToMergeIdx = 0;\n for (var i = 0; i < mergedRepaintRects.length; ++i) {\n var mergedRect = mergedRepaintRects[i];\n if (mergedRect.intersect(rect)) {\n var pendingRect_1 = new BoundingRect(0, 0, 0, 0);\n pendingRect_1.copy(mergedRect);\n pendingRect_1.union(rect);\n mergedRepaintRects[i] = pendingRect_1;\n isMerged = true;\n break;\n } else if (full) {\n pendingRect.copy(rect);\n pendingRect.union(mergedRect);\n var aArea = rect.width * rect.height;\n var bArea = mergedRect.width * mergedRect.height;\n var pendingArea = pendingRect.width * pendingRect.height;\n var deltaArea = pendingArea - aArea - bArea;\n if (deltaArea < minDeltaArea) {\n minDeltaArea = deltaArea;\n bestRectToMergeIdx = i;\n }\n }\n }\n if (full) {\n mergedRepaintRects[bestRectToMergeIdx].union(rect);\n isMerged = true;\n }\n if (!isMerged) {\n var boundingRect = new BoundingRect(0, 0, 0, 0);\n boundingRect.copy(rect);\n mergedRepaintRects.push(boundingRect);\n }\n if (!full) {\n full = mergedRepaintRects.length >= maxRepaintRectCount;\n }\n }\n }\n for (var i = this.__startIndex; i < this.__endIndex; ++i) {\n var el = displayList[i];\n if (el) {\n var shouldPaint = el.shouldBePainted(viewWidth, viewHeight, true, true);\n var prevRect = el.__isRendered && (el.__dirty & REDRAW_BIT || !shouldPaint) ? el.getPrevPaintRect() : null;\n if (prevRect) {\n addRectToMergePool(prevRect);\n }\n var curRect = shouldPaint && (el.__dirty & REDRAW_BIT || !el.__isRendered) ? el.getPaintRect() : null;\n if (curRect) {\n addRectToMergePool(curRect);\n }\n }\n }\n for (var i = this.__prevStartIndex; i < this.__prevEndIndex; ++i) {\n var el = prevList[i];\n var shouldPaint = el && el.shouldBePainted(viewWidth, viewHeight, true, true);\n if (el && (!shouldPaint || !el.__zr) && el.__isRendered) {\n var prevRect = el.getPrevPaintRect();\n if (prevRect) {\n addRectToMergePool(prevRect);\n }\n }\n }\n var hasIntersections;\n do {\n hasIntersections = false;\n for (var i = 0; i < mergedRepaintRects.length;) {\n if (mergedRepaintRects[i].isZero()) {\n mergedRepaintRects.splice(i, 1);\n continue;\n }\n for (var j = i + 1; j < mergedRepaintRects.length;) {\n if (mergedRepaintRects[i].intersect(mergedRepaintRects[j])) {\n hasIntersections = true;\n mergedRepaintRects[i].union(mergedRepaintRects[j]);\n mergedRepaintRects.splice(j, 1);\n } else {\n j++;\n }\n }\n i++;\n }\n } while (hasIntersections);\n this._paintRects = mergedRepaintRects;\n return mergedRepaintRects;\n };\n Layer.prototype.debugGetPaintRects = function () {\n return (this._paintRects || []).slice();\n };\n Layer.prototype.resize = function (width, height) {\n var dpr = this.dpr;\n var dom = this.dom;\n var domStyle = dom.style;\n var domBack = this.domBack;\n if (domStyle) {\n domStyle.width = width + 'px';\n domStyle.height = height + 'px';\n }\n dom.width = width * dpr;\n dom.height = height * dpr;\n if (domBack) {\n domBack.width = width * dpr;\n domBack.height = height * dpr;\n if (dpr !== 1) {\n this.ctxBack.scale(dpr, dpr);\n }\n }\n };\n Layer.prototype.clear = function (clearAll, clearColor, repaintRects) {\n var dom = this.dom;\n var ctx = this.ctx;\n var width = dom.width;\n var height = dom.height;\n clearColor = clearColor || this.clearColor;\n var haveMotionBLur = this.motionBlur && !clearAll;\n var lastFrameAlpha = this.lastFrameAlpha;\n var dpr = this.dpr;\n var self = this;\n if (haveMotionBLur) {\n if (!this.domBack) {\n this.createBackBuffer();\n }\n this.ctxBack.globalCompositeOperation = 'copy';\n this.ctxBack.drawImage(dom, 0, 0, width / dpr, height / dpr);\n }\n var domBack = this.domBack;\n function doClear(x, y, width, height) {\n ctx.clearRect(x, y, width, height);\n if (clearColor && clearColor !== 'transparent') {\n var clearColorGradientOrPattern = void 0;\n if (util.isGradientObject(clearColor)) {\n var shouldCache = clearColor.global || clearColor.__width === width && clearColor.__height === height;\n clearColorGradientOrPattern = shouldCache && clearColor.__canvasGradient || getCanvasGradient(ctx, clearColor, {\n x: 0,\n y: 0,\n width: width,\n height: height\n });\n clearColor.__canvasGradient = clearColorGradientOrPattern;\n clearColor.__width = width;\n clearColor.__height = height;\n } else if (util.isImagePatternObject(clearColor)) {\n clearColor.scaleX = clearColor.scaleX || dpr;\n clearColor.scaleY = clearColor.scaleY || dpr;\n clearColorGradientOrPattern = createCanvasPattern(ctx, clearColor, {\n dirty: function () {\n self.setUnpainted();\n self.painter.refresh();\n }\n });\n }\n ctx.save();\n ctx.fillStyle = clearColorGradientOrPattern || clearColor;\n ctx.fillRect(x, y, width, height);\n ctx.restore();\n }\n if (haveMotionBLur) {\n ctx.save();\n ctx.globalAlpha = lastFrameAlpha;\n ctx.drawImage(domBack, x, y, width, height);\n ctx.restore();\n }\n }\n ;\n if (!repaintRects || haveMotionBLur) {\n doClear(0, 0, width, height);\n } else if (repaintRects.length) {\n util.each(repaintRects, function (rect) {\n doClear(rect.x * dpr, rect.y * dpr, rect.width * dpr, rect.height * dpr);\n });\n }\n };\n return Layer;\n}(Eventful);\nexport default Layer;","import { devicePixelRatio } from '../config.js';\nimport * as util from '../core/util.js';\nimport Layer from './Layer.js';\nimport requestAnimationFrame from '../animation/requestAnimationFrame.js';\nimport env from '../core/env.js';\nimport { brush, brushSingle } from './graphic.js';\nimport { REDRAW_BIT } from '../graphic/constants.js';\nimport { getSize } from './helper.js';\nvar HOVER_LAYER_ZLEVEL = 1e5;\nvar CANVAS_ZLEVEL = 314159;\nvar EL_AFTER_INCREMENTAL_INC = 0.01;\nvar INCREMENTAL_INC = 0.001;\nfunction isLayerValid(layer) {\n if (!layer) {\n return false;\n }\n if (layer.__builtin__) {\n return true;\n }\n if (typeof layer.resize !== 'function' || typeof layer.refresh !== 'function') {\n return false;\n }\n return true;\n}\nfunction createRoot(width, height) {\n var domRoot = document.createElement('div');\n domRoot.style.cssText = ['position:relative', 'width:' + width + 'px', 'height:' + height + 'px', 'padding:0', 'margin:0', 'border-width:0'].join(';') + ';';\n return domRoot;\n}\nvar CanvasPainter = function () {\n function CanvasPainter(root, storage, opts, id) {\n this.type = 'canvas';\n this._zlevelList = [];\n this._prevDisplayList = [];\n this._layers = {};\n this._layerConfig = {};\n this._needsManuallyCompositing = false;\n this.type = 'canvas';\n var singleCanvas = !root.nodeName || root.nodeName.toUpperCase() === 'CANVAS';\n this._opts = opts = util.extend({}, opts || {});\n this.dpr = opts.devicePixelRatio || devicePixelRatio;\n this._singleCanvas = singleCanvas;\n this.root = root;\n var rootStyle = root.style;\n if (rootStyle) {\n util.disableUserSelect(root);\n root.innerHTML = '';\n }\n this.storage = storage;\n var zlevelList = this._zlevelList;\n this._prevDisplayList = [];\n var layers = this._layers;\n if (!singleCanvas) {\n this._width = getSize(root, 0, opts);\n this._height = getSize(root, 1, opts);\n var domRoot = this._domRoot = createRoot(this._width, this._height);\n root.appendChild(domRoot);\n } else {\n var rootCanvas = root;\n var width = rootCanvas.width;\n var height = rootCanvas.height;\n if (opts.width != null) {\n width = opts.width;\n }\n if (opts.height != null) {\n height = opts.height;\n }\n this.dpr = opts.devicePixelRatio || 1;\n rootCanvas.width = width * this.dpr;\n rootCanvas.height = height * this.dpr;\n this._width = width;\n this._height = height;\n var mainLayer = new Layer(rootCanvas, this, this.dpr);\n mainLayer.__builtin__ = true;\n mainLayer.initContext();\n layers[CANVAS_ZLEVEL] = mainLayer;\n mainLayer.zlevel = CANVAS_ZLEVEL;\n zlevelList.push(CANVAS_ZLEVEL);\n this._domRoot = root;\n }\n }\n CanvasPainter.prototype.getType = function () {\n return 'canvas';\n };\n CanvasPainter.prototype.isSingleCanvas = function () {\n return this._singleCanvas;\n };\n CanvasPainter.prototype.getViewportRoot = function () {\n return this._domRoot;\n };\n CanvasPainter.prototype.getViewportRootOffset = function () {\n var viewportRoot = this.getViewportRoot();\n if (viewportRoot) {\n return {\n offsetLeft: viewportRoot.offsetLeft || 0,\n offsetTop: viewportRoot.offsetTop || 0\n };\n }\n };\n CanvasPainter.prototype.refresh = function (paintAll) {\n var list = this.storage.getDisplayList(true);\n var prevList = this._prevDisplayList;\n var zlevelList = this._zlevelList;\n this._redrawId = Math.random();\n this._paintList(list, prevList, paintAll, this._redrawId);\n for (var i = 0; i < zlevelList.length; i++) {\n var z = zlevelList[i];\n var layer = this._layers[z];\n if (!layer.__builtin__ && layer.refresh) {\n var clearColor = i === 0 ? this._backgroundColor : null;\n layer.refresh(clearColor);\n }\n }\n if (this._opts.useDirtyRect) {\n this._prevDisplayList = list.slice();\n }\n return this;\n };\n CanvasPainter.prototype.refreshHover = function () {\n this._paintHoverList(this.storage.getDisplayList(false));\n };\n CanvasPainter.prototype._paintHoverList = function (list) {\n var len = list.length;\n var hoverLayer = this._hoverlayer;\n hoverLayer && hoverLayer.clear();\n if (!len) {\n return;\n }\n var scope = {\n inHover: true,\n viewWidth: this._width,\n viewHeight: this._height\n };\n var ctx;\n for (var i = 0; i < len; i++) {\n var el = list[i];\n if (el.__inHover) {\n if (!hoverLayer) {\n hoverLayer = this._hoverlayer = this.getLayer(HOVER_LAYER_ZLEVEL);\n }\n if (!ctx) {\n ctx = hoverLayer.ctx;\n ctx.save();\n }\n brush(ctx, el, scope, i === len - 1);\n }\n }\n if (ctx) {\n ctx.restore();\n }\n };\n CanvasPainter.prototype.getHoverLayer = function () {\n return this.getLayer(HOVER_LAYER_ZLEVEL);\n };\n CanvasPainter.prototype.paintOne = function (ctx, el) {\n brushSingle(ctx, el);\n };\n CanvasPainter.prototype._paintList = function (list, prevList, paintAll, redrawId) {\n if (this._redrawId !== redrawId) {\n return;\n }\n paintAll = paintAll || false;\n this._updateLayerStatus(list);\n var _a = this._doPaintList(list, prevList, paintAll),\n finished = _a.finished,\n needsRefreshHover = _a.needsRefreshHover;\n if (this._needsManuallyCompositing) {\n this._compositeManually();\n }\n if (needsRefreshHover) {\n this._paintHoverList(list);\n }\n if (!finished) {\n var self_1 = this;\n requestAnimationFrame(function () {\n self_1._paintList(list, prevList, paintAll, redrawId);\n });\n } else {\n this.eachLayer(function (layer) {\n layer.afterBrush && layer.afterBrush();\n });\n }\n };\n CanvasPainter.prototype._compositeManually = function () {\n var ctx = this.getLayer(CANVAS_ZLEVEL).ctx;\n var width = this._domRoot.width;\n var height = this._domRoot.height;\n ctx.clearRect(0, 0, width, height);\n this.eachBuiltinLayer(function (layer) {\n if (layer.virtual) {\n ctx.drawImage(layer.dom, 0, 0, width, height);\n }\n });\n };\n CanvasPainter.prototype._doPaintList = function (list, prevList, paintAll) {\n var _this = this;\n var layerList = [];\n var useDirtyRect = this._opts.useDirtyRect;\n for (var zi = 0; zi < this._zlevelList.length; zi++) {\n var zlevel = this._zlevelList[zi];\n var layer = this._layers[zlevel];\n if (layer.__builtin__ && layer !== this._hoverlayer && (layer.__dirty || paintAll)) {\n layerList.push(layer);\n }\n }\n var finished = true;\n var needsRefreshHover = false;\n var _loop_1 = function (k) {\n var layer = layerList[k];\n var ctx = layer.ctx;\n var repaintRects = useDirtyRect && layer.createRepaintRects(list, prevList, this_1._width, this_1._height);\n var start = paintAll ? layer.__startIndex : layer.__drawIndex;\n var useTimer = !paintAll && layer.incremental && Date.now;\n var startTime = useTimer && Date.now();\n var clearColor = layer.zlevel === this_1._zlevelList[0] ? this_1._backgroundColor : null;\n if (layer.__startIndex === layer.__endIndex) {\n layer.clear(false, clearColor, repaintRects);\n } else if (start === layer.__startIndex) {\n var firstEl = list[start];\n if (!firstEl.incremental || !firstEl.notClear || paintAll) {\n layer.clear(false, clearColor, repaintRects);\n }\n }\n if (start === -1) {\n console.error('For some unknown reason. drawIndex is -1');\n start = layer.__startIndex;\n }\n var i;\n var repaint = function (repaintRect) {\n var scope = {\n inHover: false,\n allClipped: false,\n prevEl: null,\n viewWidth: _this._width,\n viewHeight: _this._height\n };\n for (i = start; i < layer.__endIndex; i++) {\n var el = list[i];\n if (el.__inHover) {\n needsRefreshHover = true;\n }\n _this._doPaintEl(el, layer, useDirtyRect, repaintRect, scope, i === layer.__endIndex - 1);\n if (useTimer) {\n var dTime = Date.now() - startTime;\n if (dTime > 15) {\n break;\n }\n }\n }\n if (scope.prevElClipPaths) {\n ctx.restore();\n }\n };\n if (repaintRects) {\n if (repaintRects.length === 0) {\n i = layer.__endIndex;\n } else {\n var dpr = this_1.dpr;\n for (var r = 0; r < repaintRects.length; ++r) {\n var rect = repaintRects[r];\n ctx.save();\n ctx.beginPath();\n ctx.rect(rect.x * dpr, rect.y * dpr, rect.width * dpr, rect.height * dpr);\n ctx.clip();\n repaint(rect);\n ctx.restore();\n }\n }\n } else {\n ctx.save();\n repaint();\n ctx.restore();\n }\n layer.__drawIndex = i;\n if (layer.__drawIndex < layer.__endIndex) {\n finished = false;\n }\n };\n var this_1 = this;\n for (var k = 0; k < layerList.length; k++) {\n _loop_1(k);\n }\n if (env.wxa) {\n util.each(this._layers, function (layer) {\n if (layer && layer.ctx && layer.ctx.draw) {\n layer.ctx.draw();\n }\n });\n }\n return {\n finished: finished,\n needsRefreshHover: needsRefreshHover\n };\n };\n CanvasPainter.prototype._doPaintEl = function (el, currentLayer, useDirtyRect, repaintRect, scope, isLast) {\n var ctx = currentLayer.ctx;\n if (useDirtyRect) {\n var paintRect = el.getPaintRect();\n if (!repaintRect || paintRect && paintRect.intersect(repaintRect)) {\n brush(ctx, el, scope, isLast);\n el.setPrevPaintRect(paintRect);\n }\n } else {\n brush(ctx, el, scope, isLast);\n }\n };\n CanvasPainter.prototype.getLayer = function (zlevel, virtual) {\n if (this._singleCanvas && !this._needsManuallyCompositing) {\n zlevel = CANVAS_ZLEVEL;\n }\n var layer = this._layers[zlevel];\n if (!layer) {\n layer = new Layer('zr_' + zlevel, this, this.dpr);\n layer.zlevel = zlevel;\n layer.__builtin__ = true;\n if (this._layerConfig[zlevel]) {\n util.merge(layer, this._layerConfig[zlevel], true);\n } else if (this._layerConfig[zlevel - EL_AFTER_INCREMENTAL_INC]) {\n util.merge(layer, this._layerConfig[zlevel - EL_AFTER_INCREMENTAL_INC], true);\n }\n if (virtual) {\n layer.virtual = virtual;\n }\n this.insertLayer(zlevel, layer);\n layer.initContext();\n }\n return layer;\n };\n CanvasPainter.prototype.insertLayer = function (zlevel, layer) {\n var layersMap = this._layers;\n var zlevelList = this._zlevelList;\n var len = zlevelList.length;\n var domRoot = this._domRoot;\n var prevLayer = null;\n var i = -1;\n if (layersMap[zlevel]) {\n if (process.env.NODE_ENV !== 'production') {\n util.logError('ZLevel ' + zlevel + ' has been used already');\n }\n return;\n }\n if (!isLayerValid(layer)) {\n if (process.env.NODE_ENV !== 'production') {\n util.logError('Layer of zlevel ' + zlevel + ' is not valid');\n }\n return;\n }\n if (len > 0 && zlevel > zlevelList[0]) {\n for (i = 0; i < len - 1; i++) {\n if (zlevelList[i] < zlevel && zlevelList[i + 1] > zlevel) {\n break;\n }\n }\n prevLayer = layersMap[zlevelList[i]];\n }\n zlevelList.splice(i + 1, 0, zlevel);\n layersMap[zlevel] = layer;\n if (!layer.virtual) {\n if (prevLayer) {\n var prevDom = prevLayer.dom;\n if (prevDom.nextSibling) {\n domRoot.insertBefore(layer.dom, prevDom.nextSibling);\n } else {\n domRoot.appendChild(layer.dom);\n }\n } else {\n if (domRoot.firstChild) {\n domRoot.insertBefore(layer.dom, domRoot.firstChild);\n } else {\n domRoot.appendChild(layer.dom);\n }\n }\n }\n layer.painter || (layer.painter = this);\n };\n CanvasPainter.prototype.eachLayer = function (cb, context) {\n var zlevelList = this._zlevelList;\n for (var i = 0; i < zlevelList.length; i++) {\n var z = zlevelList[i];\n cb.call(context, this._layers[z], z);\n }\n };\n CanvasPainter.prototype.eachBuiltinLayer = function (cb, context) {\n var zlevelList = this._zlevelList;\n for (var i = 0; i < zlevelList.length; i++) {\n var z = zlevelList[i];\n var layer = this._layers[z];\n if (layer.__builtin__) {\n cb.call(context, layer, z);\n }\n }\n };\n CanvasPainter.prototype.eachOtherLayer = function (cb, context) {\n var zlevelList = this._zlevelList;\n for (var i = 0; i < zlevelList.length; i++) {\n var z = zlevelList[i];\n var layer = this._layers[z];\n if (!layer.__builtin__) {\n cb.call(context, layer, z);\n }\n }\n };\n CanvasPainter.prototype.getLayers = function () {\n return this._layers;\n };\n CanvasPainter.prototype._updateLayerStatus = function (list) {\n this.eachBuiltinLayer(function (layer, z) {\n layer.__dirty = layer.__used = false;\n });\n function updatePrevLayer(idx) {\n if (prevLayer) {\n if (prevLayer.__endIndex !== idx) {\n prevLayer.__dirty = true;\n }\n prevLayer.__endIndex = idx;\n }\n }\n if (this._singleCanvas) {\n for (var i_1 = 1; i_1 < list.length; i_1++) {\n var el = list[i_1];\n if (el.zlevel !== list[i_1 - 1].zlevel || el.incremental) {\n this._needsManuallyCompositing = true;\n break;\n }\n }\n }\n var prevLayer = null;\n var incrementalLayerCount = 0;\n var prevZlevel;\n var i;\n for (i = 0; i < list.length; i++) {\n var el = list[i];\n var zlevel = el.zlevel;\n var layer = void 0;\n if (prevZlevel !== zlevel) {\n prevZlevel = zlevel;\n incrementalLayerCount = 0;\n }\n if (el.incremental) {\n layer = this.getLayer(zlevel + INCREMENTAL_INC, this._needsManuallyCompositing);\n layer.incremental = true;\n incrementalLayerCount = 1;\n } else {\n layer = this.getLayer(zlevel + (incrementalLayerCount > 0 ? EL_AFTER_INCREMENTAL_INC : 0), this._needsManuallyCompositing);\n }\n if (!layer.__builtin__) {\n util.logError('ZLevel ' + zlevel + ' has been used by unkown layer ' + layer.id);\n }\n if (layer !== prevLayer) {\n layer.__used = true;\n if (layer.__startIndex !== i) {\n layer.__dirty = true;\n }\n layer.__startIndex = i;\n if (!layer.incremental) {\n layer.__drawIndex = i;\n } else {\n layer.__drawIndex = -1;\n }\n updatePrevLayer(i);\n prevLayer = layer;\n }\n if (el.__dirty & REDRAW_BIT && !el.__inHover) {\n layer.__dirty = true;\n if (layer.incremental && layer.__drawIndex < 0) {\n layer.__drawIndex = i;\n }\n }\n }\n updatePrevLayer(i);\n this.eachBuiltinLayer(function (layer, z) {\n if (!layer.__used && layer.getElementCount() > 0) {\n layer.__dirty = true;\n layer.__startIndex = layer.__endIndex = layer.__drawIndex = 0;\n }\n if (layer.__dirty && layer.__drawIndex < 0) {\n layer.__drawIndex = layer.__startIndex;\n }\n });\n };\n CanvasPainter.prototype.clear = function () {\n this.eachBuiltinLayer(this._clearLayer);\n return this;\n };\n CanvasPainter.prototype._clearLayer = function (layer) {\n layer.clear();\n };\n CanvasPainter.prototype.setBackgroundColor = function (backgroundColor) {\n this._backgroundColor = backgroundColor;\n util.each(this._layers, function (layer) {\n layer.setUnpainted();\n });\n };\n CanvasPainter.prototype.configLayer = function (zlevel, config) {\n if (config) {\n var layerConfig = this._layerConfig;\n if (!layerConfig[zlevel]) {\n layerConfig[zlevel] = config;\n } else {\n util.merge(layerConfig[zlevel], config, true);\n }\n for (var i = 0; i < this._zlevelList.length; i++) {\n var _zlevel = this._zlevelList[i];\n if (_zlevel === zlevel || _zlevel === zlevel + EL_AFTER_INCREMENTAL_INC) {\n var layer = this._layers[_zlevel];\n util.merge(layer, layerConfig[zlevel], true);\n }\n }\n }\n };\n CanvasPainter.prototype.delLayer = function (zlevel) {\n var layers = this._layers;\n var zlevelList = this._zlevelList;\n var layer = layers[zlevel];\n if (!layer) {\n return;\n }\n layer.dom.parentNode.removeChild(layer.dom);\n delete layers[zlevel];\n zlevelList.splice(util.indexOf(zlevelList, zlevel), 1);\n };\n CanvasPainter.prototype.resize = function (width, height) {\n if (!this._domRoot.style) {\n if (width == null || height == null) {\n return;\n }\n this._width = width;\n this._height = height;\n this.getLayer(CANVAS_ZLEVEL).resize(width, height);\n } else {\n var domRoot = this._domRoot;\n domRoot.style.display = 'none';\n var opts = this._opts;\n var root = this.root;\n width != null && (opts.width = width);\n height != null && (opts.height = height);\n width = getSize(root, 0, opts);\n height = getSize(root, 1, opts);\n domRoot.style.display = '';\n if (this._width !== width || height !== this._height) {\n domRoot.style.width = width + 'px';\n domRoot.style.height = height + 'px';\n for (var id in this._layers) {\n if (this._layers.hasOwnProperty(id)) {\n this._layers[id].resize(width, height);\n }\n }\n this.refresh(true);\n }\n this._width = width;\n this._height = height;\n }\n return this;\n };\n CanvasPainter.prototype.clearLayer = function (zlevel) {\n var layer = this._layers[zlevel];\n if (layer) {\n layer.clear();\n }\n };\n CanvasPainter.prototype.dispose = function () {\n this.root.innerHTML = '';\n this.root = this.storage = this._domRoot = this._layers = null;\n };\n CanvasPainter.prototype.getRenderedCanvas = function (opts) {\n opts = opts || {};\n if (this._singleCanvas && !this._compositeManually) {\n return this._layers[CANVAS_ZLEVEL].dom;\n }\n var imageLayer = new Layer('image', this, opts.pixelRatio || this.dpr);\n imageLayer.initContext();\n imageLayer.clear(false, opts.backgroundColor || this._backgroundColor);\n var ctx = imageLayer.ctx;\n if (opts.pixelRatio <= this.dpr) {\n this.refresh();\n var width_1 = imageLayer.dom.width;\n var height_1 = imageLayer.dom.height;\n this.eachLayer(function (layer) {\n if (layer.__builtin__) {\n ctx.drawImage(layer.dom, 0, 0, width_1, height_1);\n } else if (layer.renderToCanvas) {\n ctx.save();\n layer.renderToCanvas(ctx);\n ctx.restore();\n }\n });\n } else {\n var scope = {\n inHover: false,\n viewWidth: this._width,\n viewHeight: this._height\n };\n var displayList = this.storage.getDisplayList(true);\n for (var i = 0, len = displayList.length; i < len; i++) {\n var el = displayList[i];\n brush(ctx, el, scope, i === len - 1);\n }\n }\n return imageLayer.dom;\n };\n CanvasPainter.prototype.getWidth = function () {\n return this._width;\n };\n CanvasPainter.prototype.getHeight = function () {\n return this._height;\n };\n return CanvasPainter;\n}();\nexport default CanvasPainter;\n;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport CanvasPainter from 'zrender/lib/canvas/Painter.js';\nexport function install(registers) {\n registers.registerPainter('canvas', CanvasPainter);\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport createSeriesData from '../helper/createSeriesData.js';\nimport SeriesModel from '../../model/Series.js';\nimport { createSymbol } from '../../util/symbol.js';\nimport { Group } from '../../util/graphic.js';\nvar LineSeriesModel = /** @class */function (_super) {\n __extends(LineSeriesModel, _super);\n function LineSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = LineSeriesModel.type;\n _this.hasSymbolVisual = true;\n return _this;\n }\n LineSeriesModel.prototype.getInitialData = function (option) {\n if (process.env.NODE_ENV !== 'production') {\n var coordSys = option.coordinateSystem;\n if (coordSys !== 'polar' && coordSys !== 'cartesian2d') {\n throw new Error('Line not support coordinateSystem besides cartesian and polar');\n }\n }\n return createSeriesData(null, this, {\n useEncodeDefaulter: true\n });\n };\n LineSeriesModel.prototype.getLegendIcon = function (opt) {\n var group = new Group();\n var line = createSymbol('line', 0, opt.itemHeight / 2, opt.itemWidth, 0, opt.lineStyle.stroke, false);\n group.add(line);\n line.setStyle(opt.lineStyle);\n var visualType = this.getData().getVisual('symbol');\n var visualRotate = this.getData().getVisual('symbolRotate');\n var symbolType = visualType === 'none' ? 'circle' : visualType;\n // Symbol size is 80% when there is a line\n var size = opt.itemHeight * 0.8;\n var symbol = createSymbol(symbolType, (opt.itemWidth - size) / 2, (opt.itemHeight - size) / 2, size, size, opt.itemStyle.fill);\n group.add(symbol);\n symbol.setStyle(opt.itemStyle);\n var symbolRotate = opt.iconRotate === 'inherit' ? visualRotate : opt.iconRotate || 0;\n symbol.rotation = symbolRotate * Math.PI / 180;\n symbol.setOrigin([opt.itemWidth / 2, opt.itemHeight / 2]);\n if (symbolType.indexOf('empty') > -1) {\n symbol.style.stroke = symbol.style.fill;\n symbol.style.fill = '#fff';\n symbol.style.lineWidth = 2;\n }\n return group;\n };\n LineSeriesModel.type = 'series.line';\n LineSeriesModel.dependencies = ['grid', 'polar'];\n LineSeriesModel.defaultOption = {\n // zlevel: 0,\n z: 3,\n coordinateSystem: 'cartesian2d',\n legendHoverLink: true,\n clip: true,\n label: {\n position: 'top'\n },\n // itemStyle: {\n // },\n endLabel: {\n show: false,\n valueAnimation: true,\n distance: 8\n },\n lineStyle: {\n width: 2,\n type: 'solid'\n },\n emphasis: {\n scale: true\n },\n // areaStyle: {\n // origin of areaStyle. Valid values:\n // `'auto'/null/undefined`: from axisLine to data\n // `'start'`: from min to data\n // `'end'`: from data to max\n // origin: 'auto'\n // },\n // false, 'start', 'end', 'middle'\n step: false,\n // Disabled if step is true\n smooth: false,\n smoothMonotone: null,\n symbol: 'emptyCircle',\n symbolSize: 4,\n symbolRotate: null,\n showSymbol: true,\n // `false`: follow the label interval strategy.\n // `true`: show all symbols.\n // `'auto'`: If possible, show all symbols, otherwise\n // follow the label interval strategy.\n showAllSymbol: 'auto',\n // Whether to connect break point.\n connectNulls: false,\n // Sampling for large data. Can be: 'average', 'max', 'min', 'sum', 'lttb'.\n sampling: 'none',\n animationEasing: 'linear',\n // Disable progressive\n progressive: 0,\n hoverLayerThreshold: Infinity,\n universalTransition: {\n divideShape: 'clone'\n },\n triggerLineEvent: false\n };\n return LineSeriesModel;\n}(SeriesModel);\nexport default LineSeriesModel;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { retrieveRawValue } from '../../data/helper/dataProvider.js';\nimport { isArray } from 'zrender/lib/core/util.js';\n/**\n * @return label string. Not null/undefined\n */\nexport function getDefaultLabel(data, dataIndex) {\n var labelDims = data.mapDimensionsAll('defaultedLabel');\n var len = labelDims.length;\n // Simple optimization (in lots of cases, label dims length is 1)\n if (len === 1) {\n var rawVal = retrieveRawValue(data, dataIndex, labelDims[0]);\n return rawVal != null ? rawVal + '' : null;\n } else if (len) {\n var vals = [];\n for (var i = 0; i < labelDims.length; i++) {\n vals.push(retrieveRawValue(data, dataIndex, labelDims[i]));\n }\n return vals.join(' ');\n }\n}\nexport function getDefaultInterpolatedLabel(data, interpolatedValue) {\n var labelDims = data.mapDimensionsAll('defaultedLabel');\n if (!isArray(interpolatedValue)) {\n return interpolatedValue + '';\n }\n var vals = [];\n for (var i = 0; i < labelDims.length; i++) {\n var dimIndex = data.getDimensionIndex(labelDims[i]);\n if (dimIndex >= 0) {\n vals.push(interpolatedValue[dimIndex]);\n }\n }\n return vals.join(' ');\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport { createSymbol, normalizeSymbolOffset, normalizeSymbolSize } from '../../util/symbol.js';\nimport * as graphic from '../../util/graphic.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { enterEmphasis, leaveEmphasis, toggleHoverEmphasis } from '../../util/states.js';\nimport { getDefaultLabel } from './labelHelper.js';\nimport { extend } from 'zrender/lib/core/util.js';\nimport { setLabelStyle, getLabelStatesModels } from '../../label/labelStyle.js';\nimport ZRImage from 'zrender/lib/graphic/Image.js';\nimport { saveOldStyle } from '../../animation/basicTransition.js';\nvar Symbol = /** @class */function (_super) {\n __extends(Symbol, _super);\n function Symbol(data, idx, seriesScope, opts) {\n var _this = _super.call(this) || this;\n _this.updateData(data, idx, seriesScope, opts);\n return _this;\n }\n Symbol.prototype._createSymbol = function (symbolType, data, idx, symbolSize, keepAspect) {\n // Remove paths created before\n this.removeAll();\n // let symbolPath = createSymbol(\n // symbolType, -0.5, -0.5, 1, 1, color\n // );\n // If width/height are set too small (e.g., set to 1) on ios10\n // and macOS Sierra, a circle stroke become a rect, no matter what\n // the scale is set. So we set width/height as 2. See #4150.\n var symbolPath = createSymbol(symbolType, -1, -1, 2, 2, null, keepAspect);\n symbolPath.attr({\n z2: 100,\n culling: true,\n scaleX: symbolSize[0] / 2,\n scaleY: symbolSize[1] / 2\n });\n // Rewrite drift method\n symbolPath.drift = driftSymbol;\n this._symbolType = symbolType;\n this.add(symbolPath);\n };\n /**\n * Stop animation\n * @param {boolean} toLastFrame\n */\n Symbol.prototype.stopSymbolAnimation = function (toLastFrame) {\n this.childAt(0).stopAnimation(null, toLastFrame);\n };\n Symbol.prototype.getSymbolType = function () {\n return this._symbolType;\n };\n /**\n * FIXME:\n * Caution: This method breaks the encapsulation of this module,\n * but it indeed brings convenience. So do not use the method\n * unless you detailedly know all the implements of `Symbol`,\n * especially animation.\n *\n * Get symbol path element.\n */\n Symbol.prototype.getSymbolPath = function () {\n return this.childAt(0);\n };\n /**\n * Highlight symbol\n */\n Symbol.prototype.highlight = function () {\n enterEmphasis(this.childAt(0));\n };\n /**\n * Downplay symbol\n */\n Symbol.prototype.downplay = function () {\n leaveEmphasis(this.childAt(0));\n };\n /**\n * @param {number} zlevel\n * @param {number} z\n */\n Symbol.prototype.setZ = function (zlevel, z) {\n var symbolPath = this.childAt(0);\n symbolPath.zlevel = zlevel;\n symbolPath.z = z;\n };\n Symbol.prototype.setDraggable = function (draggable, hasCursorOption) {\n var symbolPath = this.childAt(0);\n symbolPath.draggable = draggable;\n symbolPath.cursor = !hasCursorOption && draggable ? 'move' : symbolPath.cursor;\n };\n /**\n * Update symbol properties\n */\n Symbol.prototype.updateData = function (data, idx, seriesScope, opts) {\n this.silent = false;\n var symbolType = data.getItemVisual(idx, 'symbol') || 'circle';\n var seriesModel = data.hostModel;\n var symbolSize = Symbol.getSymbolSize(data, idx);\n var isInit = symbolType !== this._symbolType;\n var disableAnimation = opts && opts.disableAnimation;\n if (isInit) {\n var keepAspect = data.getItemVisual(idx, 'symbolKeepAspect');\n this._createSymbol(symbolType, data, idx, symbolSize, keepAspect);\n } else {\n var symbolPath = this.childAt(0);\n symbolPath.silent = false;\n var target = {\n scaleX: symbolSize[0] / 2,\n scaleY: symbolSize[1] / 2\n };\n disableAnimation ? symbolPath.attr(target) : graphic.updateProps(symbolPath, target, seriesModel, idx);\n saveOldStyle(symbolPath);\n }\n this._updateCommon(data, idx, symbolSize, seriesScope, opts);\n if (isInit) {\n var symbolPath = this.childAt(0);\n if (!disableAnimation) {\n var target = {\n scaleX: this._sizeX,\n scaleY: this._sizeY,\n style: {\n // Always fadeIn. Because it has fadeOut animation when symbol is removed..\n opacity: symbolPath.style.opacity\n }\n };\n symbolPath.scaleX = symbolPath.scaleY = 0;\n symbolPath.style.opacity = 0;\n graphic.initProps(symbolPath, target, seriesModel, idx);\n }\n }\n if (disableAnimation) {\n // Must stop leave transition manually if don't call initProps or updateProps.\n this.childAt(0).stopAnimation('leave');\n }\n };\n Symbol.prototype._updateCommon = function (data, idx, symbolSize, seriesScope, opts) {\n var symbolPath = this.childAt(0);\n var seriesModel = data.hostModel;\n var emphasisItemStyle;\n var blurItemStyle;\n var selectItemStyle;\n var focus;\n var blurScope;\n var emphasisDisabled;\n var labelStatesModels;\n var hoverScale;\n var cursorStyle;\n if (seriesScope) {\n emphasisItemStyle = seriesScope.emphasisItemStyle;\n blurItemStyle = seriesScope.blurItemStyle;\n selectItemStyle = seriesScope.selectItemStyle;\n focus = seriesScope.focus;\n blurScope = seriesScope.blurScope;\n labelStatesModels = seriesScope.labelStatesModels;\n hoverScale = seriesScope.hoverScale;\n cursorStyle = seriesScope.cursorStyle;\n emphasisDisabled = seriesScope.emphasisDisabled;\n }\n if (!seriesScope || data.hasItemOption) {\n var itemModel = seriesScope && seriesScope.itemModel ? seriesScope.itemModel : data.getItemModel(idx);\n var emphasisModel = itemModel.getModel('emphasis');\n emphasisItemStyle = emphasisModel.getModel('itemStyle').getItemStyle();\n selectItemStyle = itemModel.getModel(['select', 'itemStyle']).getItemStyle();\n blurItemStyle = itemModel.getModel(['blur', 'itemStyle']).getItemStyle();\n focus = emphasisModel.get('focus');\n blurScope = emphasisModel.get('blurScope');\n emphasisDisabled = emphasisModel.get('disabled');\n labelStatesModels = getLabelStatesModels(itemModel);\n hoverScale = emphasisModel.getShallow('scale');\n cursorStyle = itemModel.getShallow('cursor');\n }\n var symbolRotate = data.getItemVisual(idx, 'symbolRotate');\n symbolPath.attr('rotation', (symbolRotate || 0) * Math.PI / 180 || 0);\n var symbolOffset = normalizeSymbolOffset(data.getItemVisual(idx, 'symbolOffset'), symbolSize);\n if (symbolOffset) {\n symbolPath.x = symbolOffset[0];\n symbolPath.y = symbolOffset[1];\n }\n cursorStyle && symbolPath.attr('cursor', cursorStyle);\n var symbolStyle = data.getItemVisual(idx, 'style');\n var visualColor = symbolStyle.fill;\n if (symbolPath instanceof ZRImage) {\n var pathStyle = symbolPath.style;\n symbolPath.useStyle(extend({\n // TODO other properties like x, y ?\n image: pathStyle.image,\n x: pathStyle.x,\n y: pathStyle.y,\n width: pathStyle.width,\n height: pathStyle.height\n }, symbolStyle));\n } else {\n if (symbolPath.__isEmptyBrush) {\n // fill and stroke will be swapped if it's empty.\n // So we cloned a new style to avoid it affecting the original style in visual storage.\n // TODO Better implementation. No empty logic!\n symbolPath.useStyle(extend({}, symbolStyle));\n } else {\n symbolPath.useStyle(symbolStyle);\n }\n // Disable decal because symbol scale will been applied on the decal.\n symbolPath.style.decal = null;\n symbolPath.setColor(visualColor, opts && opts.symbolInnerColor);\n symbolPath.style.strokeNoScale = true;\n }\n var liftZ = data.getItemVisual(idx, 'liftZ');\n var z2Origin = this._z2;\n if (liftZ != null) {\n if (z2Origin == null) {\n this._z2 = symbolPath.z2;\n symbolPath.z2 += liftZ;\n }\n } else if (z2Origin != null) {\n symbolPath.z2 = z2Origin;\n this._z2 = null;\n }\n var useNameLabel = opts && opts.useNameLabel;\n setLabelStyle(symbolPath, labelStatesModels, {\n labelFetcher: seriesModel,\n labelDataIndex: idx,\n defaultText: getLabelDefaultText,\n inheritColor: visualColor,\n defaultOpacity: symbolStyle.opacity\n });\n // Do not execute util needed.\n function getLabelDefaultText(idx) {\n return useNameLabel ? data.getName(idx) : getDefaultLabel(data, idx);\n }\n this._sizeX = symbolSize[0] / 2;\n this._sizeY = symbolSize[1] / 2;\n var emphasisState = symbolPath.ensureState('emphasis');\n emphasisState.style = emphasisItemStyle;\n symbolPath.ensureState('select').style = selectItemStyle;\n symbolPath.ensureState('blur').style = blurItemStyle;\n // null / undefined / true means to use default strategy.\n // 0 / false / negative number / NaN / Infinity means no scale.\n var scaleRatio = hoverScale == null || hoverScale === true ? Math.max(1.1, 3 / this._sizeY)\n // PENDING: restrict hoverScale > 1? It seems unreasonable to scale down\n : isFinite(hoverScale) && hoverScale > 0 ? +hoverScale : 1;\n // always set scale to allow resetting\n emphasisState.scaleX = this._sizeX * scaleRatio;\n emphasisState.scaleY = this._sizeY * scaleRatio;\n this.setSymbolScale(1);\n toggleHoverEmphasis(this, focus, blurScope, emphasisDisabled);\n };\n Symbol.prototype.setSymbolScale = function (scale) {\n this.scaleX = this.scaleY = scale;\n };\n Symbol.prototype.fadeOut = function (cb, seriesModel, opt) {\n var symbolPath = this.childAt(0);\n var dataIndex = getECData(this).dataIndex;\n var animationOpt = opt && opt.animation;\n // Avoid mistaken hover when fading out\n this.silent = symbolPath.silent = true;\n // Not show text when animating\n if (opt && opt.fadeLabel) {\n var textContent = symbolPath.getTextContent();\n if (textContent) {\n graphic.removeElement(textContent, {\n style: {\n opacity: 0\n }\n }, seriesModel, {\n dataIndex: dataIndex,\n removeOpt: animationOpt,\n cb: function () {\n symbolPath.removeTextContent();\n }\n });\n }\n } else {\n symbolPath.removeTextContent();\n }\n graphic.removeElement(symbolPath, {\n style: {\n opacity: 0\n },\n scaleX: 0,\n scaleY: 0\n }, seriesModel, {\n dataIndex: dataIndex,\n cb: cb,\n removeOpt: animationOpt\n });\n };\n Symbol.getSymbolSize = function (data, idx) {\n return normalizeSymbolSize(data.getItemVisual(idx, 'symbolSize'));\n };\n return Symbol;\n}(graphic.Group);\nfunction driftSymbol(dx, dy) {\n this.parent.drift(dx, dy);\n}\nexport default Symbol;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as graphic from '../../util/graphic.js';\nimport SymbolClz from './Symbol.js';\nimport { isObject } from 'zrender/lib/core/util.js';\nimport { getLabelStatesModels } from '../../label/labelStyle.js';\nfunction symbolNeedsDraw(data, point, idx, opt) {\n return point && !isNaN(point[0]) && !isNaN(point[1]) && !(opt.isIgnore && opt.isIgnore(idx))\n // We do not set clipShape on group, because it will cut part of\n // the symbol element shape. We use the same clip shape here as\n // the line clip.\n && !(opt.clipShape && !opt.clipShape.contain(point[0], point[1])) && data.getItemVisual(idx, 'symbol') !== 'none';\n}\nfunction normalizeUpdateOpt(opt) {\n if (opt != null && !isObject(opt)) {\n opt = {\n isIgnore: opt\n };\n }\n return opt || {};\n}\nfunction makeSeriesScope(data) {\n var seriesModel = data.hostModel;\n var emphasisModel = seriesModel.getModel('emphasis');\n return {\n emphasisItemStyle: emphasisModel.getModel('itemStyle').getItemStyle(),\n blurItemStyle: seriesModel.getModel(['blur', 'itemStyle']).getItemStyle(),\n selectItemStyle: seriesModel.getModel(['select', 'itemStyle']).getItemStyle(),\n focus: emphasisModel.get('focus'),\n blurScope: emphasisModel.get('blurScope'),\n emphasisDisabled: emphasisModel.get('disabled'),\n hoverScale: emphasisModel.get('scale'),\n labelStatesModels: getLabelStatesModels(seriesModel),\n cursorStyle: seriesModel.get('cursor')\n };\n}\nvar SymbolDraw = /** @class */function () {\n function SymbolDraw(SymbolCtor) {\n this.group = new graphic.Group();\n this._SymbolCtor = SymbolCtor || SymbolClz;\n }\n /**\n * Update symbols draw by new data\n */\n SymbolDraw.prototype.updateData = function (data, opt) {\n // Remove progressive els.\n this._progressiveEls = null;\n opt = normalizeUpdateOpt(opt);\n var group = this.group;\n var seriesModel = data.hostModel;\n var oldData = this._data;\n var SymbolCtor = this._SymbolCtor;\n var disableAnimation = opt.disableAnimation;\n var seriesScope = makeSeriesScope(data);\n var symbolUpdateOpt = {\n disableAnimation: disableAnimation\n };\n var getSymbolPoint = opt.getSymbolPoint || function (idx) {\n return data.getItemLayout(idx);\n };\n // There is no oldLineData only when first rendering or switching from\n // stream mode to normal mode, where previous elements should be removed.\n if (!oldData) {\n group.removeAll();\n }\n data.diff(oldData).add(function (newIdx) {\n var point = getSymbolPoint(newIdx);\n if (symbolNeedsDraw(data, point, newIdx, opt)) {\n var symbolEl = new SymbolCtor(data, newIdx, seriesScope, symbolUpdateOpt);\n symbolEl.setPosition(point);\n data.setItemGraphicEl(newIdx, symbolEl);\n group.add(symbolEl);\n }\n }).update(function (newIdx, oldIdx) {\n var symbolEl = oldData.getItemGraphicEl(oldIdx);\n var point = getSymbolPoint(newIdx);\n if (!symbolNeedsDraw(data, point, newIdx, opt)) {\n group.remove(symbolEl);\n return;\n }\n var newSymbolType = data.getItemVisual(newIdx, 'symbol') || 'circle';\n var oldSymbolType = symbolEl && symbolEl.getSymbolType && symbolEl.getSymbolType();\n if (!symbolEl\n // Create a new if symbol type changed.\n || oldSymbolType && oldSymbolType !== newSymbolType) {\n group.remove(symbolEl);\n symbolEl = new SymbolCtor(data, newIdx, seriesScope, symbolUpdateOpt);\n symbolEl.setPosition(point);\n } else {\n symbolEl.updateData(data, newIdx, seriesScope, symbolUpdateOpt);\n var target = {\n x: point[0],\n y: point[1]\n };\n disableAnimation ? symbolEl.attr(target) : graphic.updateProps(symbolEl, target, seriesModel);\n }\n // Add back\n group.add(symbolEl);\n data.setItemGraphicEl(newIdx, symbolEl);\n }).remove(function (oldIdx) {\n var el = oldData.getItemGraphicEl(oldIdx);\n el && el.fadeOut(function () {\n group.remove(el);\n }, seriesModel);\n }).execute();\n this._getSymbolPoint = getSymbolPoint;\n this._data = data;\n };\n ;\n SymbolDraw.prototype.updateLayout = function () {\n var _this = this;\n var data = this._data;\n if (data) {\n // Not use animation\n data.eachItemGraphicEl(function (el, idx) {\n var point = _this._getSymbolPoint(idx);\n el.setPosition(point);\n el.markRedraw();\n });\n }\n };\n ;\n SymbolDraw.prototype.incrementalPrepareUpdate = function (data) {\n this._seriesScope = makeSeriesScope(data);\n this._data = null;\n this.group.removeAll();\n };\n ;\n /**\n * Update symbols draw by new data\n */\n SymbolDraw.prototype.incrementalUpdate = function (taskParams, data, opt) {\n // Clear\n this._progressiveEls = [];\n opt = normalizeUpdateOpt(opt);\n function updateIncrementalAndHover(el) {\n if (!el.isGroup) {\n el.incremental = true;\n el.ensureState('emphasis').hoverLayer = true;\n }\n }\n for (var idx = taskParams.start; idx < taskParams.end; idx++) {\n var point = data.getItemLayout(idx);\n if (symbolNeedsDraw(data, point, idx, opt)) {\n var el = new this._SymbolCtor(data, idx, this._seriesScope);\n el.traverse(updateIncrementalAndHover);\n el.setPosition(point);\n this.group.add(el);\n data.setItemGraphicEl(idx, el);\n this._progressiveEls.push(el);\n }\n }\n };\n ;\n SymbolDraw.prototype.eachRendered = function (cb) {\n graphic.traverseElements(this._progressiveEls || this.group, cb);\n };\n SymbolDraw.prototype.remove = function (enableAnimation) {\n var group = this.group;\n var data = this._data;\n // Incremental model do not have this._data.\n if (data && enableAnimation) {\n data.eachItemGraphicEl(function (el) {\n el.fadeOut(function () {\n group.remove(el);\n }, data.hostModel);\n });\n } else {\n group.removeAll();\n }\n };\n ;\n return SymbolDraw;\n}();\nexport default SymbolDraw;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { isDimensionStacked } from '../../data/helper/dataStackHelper.js';\nimport { isNumber, map } from 'zrender/lib/core/util.js';\nexport function prepareDataCoordInfo(coordSys, data, valueOrigin) {\n var baseAxis = coordSys.getBaseAxis();\n var valueAxis = coordSys.getOtherAxis(baseAxis);\n var valueStart = getValueStart(valueAxis, valueOrigin);\n var baseAxisDim = baseAxis.dim;\n var valueAxisDim = valueAxis.dim;\n var valueDim = data.mapDimension(valueAxisDim);\n var baseDim = data.mapDimension(baseAxisDim);\n var baseDataOffset = valueAxisDim === 'x' || valueAxisDim === 'radius' ? 1 : 0;\n var dims = map(coordSys.dimensions, function (coordDim) {\n return data.mapDimension(coordDim);\n });\n var stacked = false;\n var stackResultDim = data.getCalculationInfo('stackResultDimension');\n if (isDimensionStacked(data, dims[0] /* , dims[1] */)) {\n // jshint ignore:line\n stacked = true;\n dims[0] = stackResultDim;\n }\n if (isDimensionStacked(data, dims[1] /* , dims[0] */)) {\n // jshint ignore:line\n stacked = true;\n dims[1] = stackResultDim;\n }\n return {\n dataDimsForPoint: dims,\n valueStart: valueStart,\n valueAxisDim: valueAxisDim,\n baseAxisDim: baseAxisDim,\n stacked: !!stacked,\n valueDim: valueDim,\n baseDim: baseDim,\n baseDataOffset: baseDataOffset,\n stackedOverDimension: data.getCalculationInfo('stackedOverDimension')\n };\n}\nfunction getValueStart(valueAxis, valueOrigin) {\n var valueStart = 0;\n var extent = valueAxis.scale.getExtent();\n if (valueOrigin === 'start') {\n valueStart = extent[0];\n } else if (valueOrigin === 'end') {\n valueStart = extent[1];\n }\n // If origin is specified as a number, use it as\n // valueStart directly\n else if (isNumber(valueOrigin) && !isNaN(valueOrigin)) {\n valueStart = valueOrigin;\n }\n // auto\n else {\n // Both positive\n if (extent[0] > 0) {\n valueStart = extent[0];\n }\n // Both negative\n else if (extent[1] < 0) {\n valueStart = extent[1];\n }\n // If is one positive, and one negative, onZero shall be true\n }\n return valueStart;\n}\nexport function getStackedOnPoint(dataCoordInfo, coordSys, data, idx) {\n var value = NaN;\n if (dataCoordInfo.stacked) {\n value = data.get(data.getCalculationInfo('stackedOverDimension'), idx);\n }\n if (isNaN(value)) {\n value = dataCoordInfo.valueStart;\n }\n var baseDataOffset = dataCoordInfo.baseDataOffset;\n var stackedData = [];\n stackedData[baseDataOffset] = data.get(dataCoordInfo.baseDim, idx);\n stackedData[1 - baseDataOffset] = value;\n return coordSys.dataToPoint(stackedData);\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { prepareDataCoordInfo, getStackedOnPoint } from './helper.js';\nimport { createFloat32Array } from '../../util/vendor.js';\nfunction diffData(oldData, newData) {\n var diffResult = [];\n newData.diff(oldData).add(function (idx) {\n diffResult.push({\n cmd: '+',\n idx: idx\n });\n }).update(function (newIdx, oldIdx) {\n diffResult.push({\n cmd: '=',\n idx: oldIdx,\n idx1: newIdx\n });\n }).remove(function (idx) {\n diffResult.push({\n cmd: '-',\n idx: idx\n });\n }).execute();\n return diffResult;\n}\nexport default function lineAnimationDiff(oldData, newData, oldStackedOnPoints, newStackedOnPoints, oldCoordSys, newCoordSys, oldValueOrigin, newValueOrigin) {\n var diff = diffData(oldData, newData);\n // let newIdList = newData.mapArray(newData.getId);\n // let oldIdList = oldData.mapArray(oldData.getId);\n // convertToIntId(newIdList, oldIdList);\n // // FIXME One data ?\n // diff = arrayDiff(oldIdList, newIdList);\n var currPoints = [];\n var nextPoints = [];\n // Points for stacking base line\n var currStackedPoints = [];\n var nextStackedPoints = [];\n var status = [];\n var sortedIndices = [];\n var rawIndices = [];\n var newDataOldCoordInfo = prepareDataCoordInfo(oldCoordSys, newData, oldValueOrigin);\n // const oldDataNewCoordInfo = prepareDataCoordInfo(newCoordSys, oldData, newValueOrigin);\n var oldPoints = oldData.getLayout('points') || [];\n var newPoints = newData.getLayout('points') || [];\n for (var i = 0; i < diff.length; i++) {\n var diffItem = diff[i];\n var pointAdded = true;\n var oldIdx2 = void 0;\n var newIdx2 = void 0;\n // FIXME, animation is not so perfect when dataZoom window moves fast\n // Which is in case remvoing or add more than one data in the tail or head\n switch (diffItem.cmd) {\n case '=':\n oldIdx2 = diffItem.idx * 2;\n newIdx2 = diffItem.idx1 * 2;\n var currentX = oldPoints[oldIdx2];\n var currentY = oldPoints[oldIdx2 + 1];\n var nextX = newPoints[newIdx2];\n var nextY = newPoints[newIdx2 + 1];\n // If previous data is NaN, use next point directly\n if (isNaN(currentX) || isNaN(currentY)) {\n currentX = nextX;\n currentY = nextY;\n }\n currPoints.push(currentX, currentY);\n nextPoints.push(nextX, nextY);\n currStackedPoints.push(oldStackedOnPoints[oldIdx2], oldStackedOnPoints[oldIdx2 + 1]);\n nextStackedPoints.push(newStackedOnPoints[newIdx2], newStackedOnPoints[newIdx2 + 1]);\n rawIndices.push(newData.getRawIndex(diffItem.idx1));\n break;\n case '+':\n var newIdx = diffItem.idx;\n var newDataDimsForPoint = newDataOldCoordInfo.dataDimsForPoint;\n var oldPt = oldCoordSys.dataToPoint([newData.get(newDataDimsForPoint[0], newIdx), newData.get(newDataDimsForPoint[1], newIdx)]);\n newIdx2 = newIdx * 2;\n currPoints.push(oldPt[0], oldPt[1]);\n nextPoints.push(newPoints[newIdx2], newPoints[newIdx2 + 1]);\n var stackedOnPoint = getStackedOnPoint(newDataOldCoordInfo, oldCoordSys, newData, newIdx);\n currStackedPoints.push(stackedOnPoint[0], stackedOnPoint[1]);\n nextStackedPoints.push(newStackedOnPoints[newIdx2], newStackedOnPoints[newIdx2 + 1]);\n rawIndices.push(newData.getRawIndex(newIdx));\n break;\n case '-':\n pointAdded = false;\n }\n // Original indices\n if (pointAdded) {\n status.push(diffItem);\n sortedIndices.push(sortedIndices.length);\n }\n }\n // Diff result may be crossed if all items are changed\n // Sort by data index\n sortedIndices.sort(function (a, b) {\n return rawIndices[a] - rawIndices[b];\n });\n var len = currPoints.length;\n var sortedCurrPoints = createFloat32Array(len);\n var sortedNextPoints = createFloat32Array(len);\n var sortedCurrStackedPoints = createFloat32Array(len);\n var sortedNextStackedPoints = createFloat32Array(len);\n var sortedStatus = [];\n for (var i = 0; i < sortedIndices.length; i++) {\n var idx = sortedIndices[i];\n var i2 = i * 2;\n var idx2 = idx * 2;\n sortedCurrPoints[i2] = currPoints[idx2];\n sortedCurrPoints[i2 + 1] = currPoints[idx2 + 1];\n sortedNextPoints[i2] = nextPoints[idx2];\n sortedNextPoints[i2 + 1] = nextPoints[idx2 + 1];\n sortedCurrStackedPoints[i2] = currStackedPoints[idx2];\n sortedCurrStackedPoints[i2 + 1] = currStackedPoints[idx2 + 1];\n sortedNextStackedPoints[i2] = nextStackedPoints[idx2];\n sortedNextStackedPoints[i2 + 1] = nextStackedPoints[idx2 + 1];\n sortedStatus[i] = status[idx];\n }\n return {\n current: sortedCurrPoints,\n next: sortedNextPoints,\n stackedOnCurrent: sortedCurrStackedPoints,\n stackedOnNext: sortedNextStackedPoints,\n status: sortedStatus\n };\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\n// Poly path support NaN point\nimport Path from 'zrender/lib/graphic/Path.js';\nimport PathProxy from 'zrender/lib/core/PathProxy.js';\nimport { cubicRootAt, cubicAt } from 'zrender/lib/core/curve.js';\nvar mathMin = Math.min;\nvar mathMax = Math.max;\nfunction isPointNull(x, y) {\n return isNaN(x) || isNaN(y);\n}\n/**\n * Draw smoothed line in non-monotone, in may cause undesired curve in extreme\n * situations. This should be used when points are non-monotone neither in x or\n * y dimension.\n */\nfunction drawSegment(ctx, points, start, segLen, allLen, dir, smooth, smoothMonotone, connectNulls) {\n var prevX;\n var prevY;\n var cpx0;\n var cpy0;\n var cpx1;\n var cpy1;\n var idx = start;\n var k = 0;\n for (; k < segLen; k++) {\n var x = points[idx * 2];\n var y = points[idx * 2 + 1];\n if (idx >= allLen || idx < 0) {\n break;\n }\n if (isPointNull(x, y)) {\n if (connectNulls) {\n idx += dir;\n continue;\n }\n break;\n }\n if (idx === start) {\n ctx[dir > 0 ? 'moveTo' : 'lineTo'](x, y);\n cpx0 = x;\n cpy0 = y;\n } else {\n var dx = x - prevX;\n var dy = y - prevY;\n // Ignore tiny segment.\n if (dx * dx + dy * dy < 0.5) {\n idx += dir;\n continue;\n }\n if (smooth > 0) {\n var nextIdx = idx + dir;\n var nextX = points[nextIdx * 2];\n var nextY = points[nextIdx * 2 + 1];\n // Ignore duplicate point\n while (nextX === x && nextY === y && k < segLen) {\n k++;\n nextIdx += dir;\n idx += dir;\n nextX = points[nextIdx * 2];\n nextY = points[nextIdx * 2 + 1];\n x = points[idx * 2];\n y = points[idx * 2 + 1];\n dx = x - prevX;\n dy = y - prevY;\n }\n var tmpK = k + 1;\n if (connectNulls) {\n // Find next point not null\n while (isPointNull(nextX, nextY) && tmpK < segLen) {\n tmpK++;\n nextIdx += dir;\n nextX = points[nextIdx * 2];\n nextY = points[nextIdx * 2 + 1];\n }\n }\n var ratioNextSeg = 0.5;\n var vx = 0;\n var vy = 0;\n var nextCpx0 = void 0;\n var nextCpy0 = void 0;\n // Is last point\n if (tmpK >= segLen || isPointNull(nextX, nextY)) {\n cpx1 = x;\n cpy1 = y;\n } else {\n vx = nextX - prevX;\n vy = nextY - prevY;\n var dx0 = x - prevX;\n var dx1 = nextX - x;\n var dy0 = y - prevY;\n var dy1 = nextY - y;\n var lenPrevSeg = void 0;\n var lenNextSeg = void 0;\n if (smoothMonotone === 'x') {\n lenPrevSeg = Math.abs(dx0);\n lenNextSeg = Math.abs(dx1);\n var dir_1 = vx > 0 ? 1 : -1;\n cpx1 = x - dir_1 * lenPrevSeg * smooth;\n cpy1 = y;\n nextCpx0 = x + dir_1 * lenNextSeg * smooth;\n nextCpy0 = y;\n } else if (smoothMonotone === 'y') {\n lenPrevSeg = Math.abs(dy0);\n lenNextSeg = Math.abs(dy1);\n var dir_2 = vy > 0 ? 1 : -1;\n cpx1 = x;\n cpy1 = y - dir_2 * lenPrevSeg * smooth;\n nextCpx0 = x;\n nextCpy0 = y + dir_2 * lenNextSeg * smooth;\n } else {\n lenPrevSeg = Math.sqrt(dx0 * dx0 + dy0 * dy0);\n lenNextSeg = Math.sqrt(dx1 * dx1 + dy1 * dy1);\n // Use ratio of seg length\n ratioNextSeg = lenNextSeg / (lenNextSeg + lenPrevSeg);\n cpx1 = x - vx * smooth * (1 - ratioNextSeg);\n cpy1 = y - vy * smooth * (1 - ratioNextSeg);\n // cp0 of next segment\n nextCpx0 = x + vx * smooth * ratioNextSeg;\n nextCpy0 = y + vy * smooth * ratioNextSeg;\n // Smooth constraint between point and next point.\n // Avoid exceeding extreme after smoothing.\n nextCpx0 = mathMin(nextCpx0, mathMax(nextX, x));\n nextCpy0 = mathMin(nextCpy0, mathMax(nextY, y));\n nextCpx0 = mathMax(nextCpx0, mathMin(nextX, x));\n nextCpy0 = mathMax(nextCpy0, mathMin(nextY, y));\n // Reclaculate cp1 based on the adjusted cp0 of next seg.\n vx = nextCpx0 - x;\n vy = nextCpy0 - y;\n cpx1 = x - vx * lenPrevSeg / lenNextSeg;\n cpy1 = y - vy * lenPrevSeg / lenNextSeg;\n // Smooth constraint between point and prev point.\n // Avoid exceeding extreme after smoothing.\n cpx1 = mathMin(cpx1, mathMax(prevX, x));\n cpy1 = mathMin(cpy1, mathMax(prevY, y));\n cpx1 = mathMax(cpx1, mathMin(prevX, x));\n cpy1 = mathMax(cpy1, mathMin(prevY, y));\n // Adjust next cp0 again.\n vx = x - cpx1;\n vy = y - cpy1;\n nextCpx0 = x + vx * lenNextSeg / lenPrevSeg;\n nextCpy0 = y + vy * lenNextSeg / lenPrevSeg;\n }\n }\n ctx.bezierCurveTo(cpx0, cpy0, cpx1, cpy1, x, y);\n cpx0 = nextCpx0;\n cpy0 = nextCpy0;\n } else {\n ctx.lineTo(x, y);\n }\n }\n prevX = x;\n prevY = y;\n idx += dir;\n }\n return k;\n}\nvar ECPolylineShape = /** @class */function () {\n function ECPolylineShape() {\n this.smooth = 0;\n this.smoothConstraint = true;\n }\n return ECPolylineShape;\n}();\nvar ECPolyline = /** @class */function (_super) {\n __extends(ECPolyline, _super);\n function ECPolyline(opts) {\n var _this = _super.call(this, opts) || this;\n _this.type = 'ec-polyline';\n return _this;\n }\n ECPolyline.prototype.getDefaultStyle = function () {\n return {\n stroke: '#000',\n fill: null\n };\n };\n ECPolyline.prototype.getDefaultShape = function () {\n return new ECPolylineShape();\n };\n ECPolyline.prototype.buildPath = function (ctx, shape) {\n var points = shape.points;\n var i = 0;\n var len = points.length / 2;\n // const result = getBoundingBox(points, shape.smoothConstraint);\n if (shape.connectNulls) {\n // Must remove first and last null values avoid draw error in polygon\n for (; len > 0; len--) {\n if (!isPointNull(points[len * 2 - 2], points[len * 2 - 1])) {\n break;\n }\n }\n for (; i < len; i++) {\n if (!isPointNull(points[i * 2], points[i * 2 + 1])) {\n break;\n }\n }\n }\n while (i < len) {\n i += drawSegment(ctx, points, i, len, len, 1, shape.smooth, shape.smoothMonotone, shape.connectNulls) + 1;\n }\n };\n ECPolyline.prototype.getPointOn = function (xOrY, dim) {\n if (!this.path) {\n this.createPathProxy();\n this.buildPath(this.path, this.shape);\n }\n var path = this.path;\n var data = path.data;\n var CMD = PathProxy.CMD;\n var x0;\n var y0;\n var isDimX = dim === 'x';\n var roots = [];\n for (var i = 0; i < data.length;) {\n var cmd = data[i++];\n var x = void 0;\n var y = void 0;\n var x2 = void 0;\n var y2 = void 0;\n var x3 = void 0;\n var y3 = void 0;\n var t = void 0;\n switch (cmd) {\n case CMD.M:\n x0 = data[i++];\n y0 = data[i++];\n break;\n case CMD.L:\n x = data[i++];\n y = data[i++];\n t = isDimX ? (xOrY - x0) / (x - x0) : (xOrY - y0) / (y - y0);\n if (t <= 1 && t >= 0) {\n var val = isDimX ? (y - y0) * t + y0 : (x - x0) * t + x0;\n return isDimX ? [xOrY, val] : [val, xOrY];\n }\n x0 = x;\n y0 = y;\n break;\n case CMD.C:\n x = data[i++];\n y = data[i++];\n x2 = data[i++];\n y2 = data[i++];\n x3 = data[i++];\n y3 = data[i++];\n var nRoot = isDimX ? cubicRootAt(x0, x, x2, x3, xOrY, roots) : cubicRootAt(y0, y, y2, y3, xOrY, roots);\n if (nRoot > 0) {\n for (var i_1 = 0; i_1 < nRoot; i_1++) {\n var t_1 = roots[i_1];\n if (t_1 <= 1 && t_1 >= 0) {\n var val = isDimX ? cubicAt(y0, y, y2, y3, t_1) : cubicAt(x0, x, x2, x3, t_1);\n return isDimX ? [xOrY, val] : [val, xOrY];\n }\n }\n }\n x0 = x3;\n y0 = y3;\n break;\n }\n }\n };\n return ECPolyline;\n}(Path);\nexport { ECPolyline };\nvar ECPolygonShape = /** @class */function (_super) {\n __extends(ECPolygonShape, _super);\n function ECPolygonShape() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ECPolygonShape;\n}(ECPolylineShape);\nvar ECPolygon = /** @class */function (_super) {\n __extends(ECPolygon, _super);\n function ECPolygon(opts) {\n var _this = _super.call(this, opts) || this;\n _this.type = 'ec-polygon';\n return _this;\n }\n ECPolygon.prototype.getDefaultShape = function () {\n return new ECPolygonShape();\n };\n ECPolygon.prototype.buildPath = function (ctx, shape) {\n var points = shape.points;\n var stackedOnPoints = shape.stackedOnPoints;\n var i = 0;\n var len = points.length / 2;\n var smoothMonotone = shape.smoothMonotone;\n if (shape.connectNulls) {\n // Must remove first and last null values avoid draw error in polygon\n for (; len > 0; len--) {\n if (!isPointNull(points[len * 2 - 2], points[len * 2 - 1])) {\n break;\n }\n }\n for (; i < len; i++) {\n if (!isPointNull(points[i * 2], points[i * 2 + 1])) {\n break;\n }\n }\n }\n while (i < len) {\n var k = drawSegment(ctx, points, i, len, len, 1, shape.smooth, smoothMonotone, shape.connectNulls);\n drawSegment(ctx, stackedOnPoints, i + k - 1, k, len, -1, shape.stackedOnSmooth, smoothMonotone, shape.connectNulls);\n i += k + 1;\n ctx.closePath();\n }\n };\n return ECPolygon;\n}(Path);\nexport { ECPolygon };","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as graphic from '../../util/graphic.js';\nimport { round } from '../../util/number.js';\nimport { isFunction } from 'zrender/lib/core/util.js';\nfunction createGridClipPath(cartesian, hasAnimation, seriesModel, done, during) {\n var rect = cartesian.getArea();\n var x = rect.x;\n var y = rect.y;\n var width = rect.width;\n var height = rect.height;\n var lineWidth = seriesModel.get(['lineStyle', 'width']) || 2;\n // Expand the clip path a bit to avoid the border is clipped and looks thinner\n x -= lineWidth / 2;\n y -= lineWidth / 2;\n width += lineWidth;\n height += lineWidth;\n // fix: https://github.com/apache/incubator-echarts/issues/11369\n width = Math.ceil(width);\n if (x !== Math.floor(x)) {\n x = Math.floor(x);\n // if no extra 1px on `width`, it will still be clipped since `x` is floored\n width++;\n }\n var clipPath = new graphic.Rect({\n shape: {\n x: x,\n y: y,\n width: width,\n height: height\n }\n });\n if (hasAnimation) {\n var baseAxis = cartesian.getBaseAxis();\n var isHorizontal = baseAxis.isHorizontal();\n var isAxisInversed = baseAxis.inverse;\n if (isHorizontal) {\n if (isAxisInversed) {\n clipPath.shape.x += width;\n }\n clipPath.shape.width = 0;\n } else {\n if (!isAxisInversed) {\n clipPath.shape.y += height;\n }\n clipPath.shape.height = 0;\n }\n var duringCb = isFunction(during) ? function (percent) {\n during(percent, clipPath);\n } : null;\n graphic.initProps(clipPath, {\n shape: {\n width: width,\n height: height,\n x: x,\n y: y\n }\n }, seriesModel, null, done, duringCb);\n }\n return clipPath;\n}\nfunction createPolarClipPath(polar, hasAnimation, seriesModel) {\n var sectorArea = polar.getArea();\n // Avoid float number rounding error for symbol on the edge of axis extent.\n var r0 = round(sectorArea.r0, 1);\n var r = round(sectorArea.r, 1);\n var clipPath = new graphic.Sector({\n shape: {\n cx: round(polar.cx, 1),\n cy: round(polar.cy, 1),\n r0: r0,\n r: r,\n startAngle: sectorArea.startAngle,\n endAngle: sectorArea.endAngle,\n clockwise: sectorArea.clockwise\n }\n });\n if (hasAnimation) {\n var isRadial = polar.getBaseAxis().dim === 'angle';\n if (isRadial) {\n clipPath.shape.endAngle = sectorArea.startAngle;\n } else {\n clipPath.shape.r = r0;\n }\n graphic.initProps(clipPath, {\n shape: {\n endAngle: sectorArea.endAngle,\n r: r\n }\n }, seriesModel);\n }\n return clipPath;\n}\nfunction createClipPath(coordSys, hasAnimation, seriesModel, done, during) {\n if (!coordSys) {\n return null;\n } else if (coordSys.type === 'polar') {\n return createPolarClipPath(coordSys, hasAnimation, seriesModel);\n } else if (coordSys.type === 'cartesian2d') {\n return createGridClipPath(coordSys, hasAnimation, seriesModel, done, during);\n }\n return null;\n}\nexport { createGridClipPath, createPolarClipPath, createClipPath };","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nexport function isCoordinateSystemType(coordSys, type) {\n return coordSys.type === type;\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\n// FIXME step not support polar\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport SymbolDraw from '../helper/SymbolDraw.js';\nimport SymbolClz from '../helper/Symbol.js';\nimport lineAnimationDiff from './lineAnimationDiff.js';\nimport * as graphic from '../../util/graphic.js';\nimport * as modelUtil from '../../util/model.js';\nimport { ECPolyline, ECPolygon } from './poly.js';\nimport ChartView from '../../view/Chart.js';\nimport { prepareDataCoordInfo, getStackedOnPoint } from './helper.js';\nimport { createGridClipPath, createPolarClipPath } from '../helper/createClipPathFromCoordSys.js';\nimport { isCoordinateSystemType } from '../../coord/CoordinateSystem.js';\nimport { setStatesStylesFromModel, setStatesFlag, toggleHoverEmphasis, SPECIAL_STATES } from '../../util/states.js';\nimport { setLabelStyle, getLabelStatesModels, labelInner } from '../../label/labelStyle.js';\nimport { getDefaultLabel, getDefaultInterpolatedLabel } from '../helper/labelHelper.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { createFloat32Array } from '../../util/vendor.js';\nimport { convertToColorString } from '../../util/format.js';\nimport { lerp } from 'zrender/lib/tool/color.js';\nfunction isPointsSame(points1, points2) {\n if (points1.length !== points2.length) {\n return;\n }\n for (var i = 0; i < points1.length; i++) {\n if (points1[i] !== points2[i]) {\n return;\n }\n }\n return true;\n}\nfunction bboxFromPoints(points) {\n var minX = Infinity;\n var minY = Infinity;\n var maxX = -Infinity;\n var maxY = -Infinity;\n for (var i = 0; i < points.length;) {\n var x = points[i++];\n var y = points[i++];\n if (!isNaN(x)) {\n minX = Math.min(x, minX);\n maxX = Math.max(x, maxX);\n }\n if (!isNaN(y)) {\n minY = Math.min(y, minY);\n maxY = Math.max(y, maxY);\n }\n }\n return [[minX, minY], [maxX, maxY]];\n}\nfunction getBoundingDiff(points1, points2) {\n var _a = bboxFromPoints(points1),\n min1 = _a[0],\n max1 = _a[1];\n var _b = bboxFromPoints(points2),\n min2 = _b[0],\n max2 = _b[1];\n // Get a max value from each corner of two boundings.\n return Math.max(Math.abs(min1[0] - min2[0]), Math.abs(min1[1] - min2[1]), Math.abs(max1[0] - max2[0]), Math.abs(max1[1] - max2[1]));\n}\nfunction getSmooth(smooth) {\n return zrUtil.isNumber(smooth) ? smooth : smooth ? 0.5 : 0;\n}\nfunction getStackedOnPoints(coordSys, data, dataCoordInfo) {\n if (!dataCoordInfo.valueDim) {\n return [];\n }\n var len = data.count();\n var points = createFloat32Array(len * 2);\n for (var idx = 0; idx < len; idx++) {\n var pt = getStackedOnPoint(dataCoordInfo, coordSys, data, idx);\n points[idx * 2] = pt[0];\n points[idx * 2 + 1] = pt[1];\n }\n return points;\n}\nfunction turnPointsIntoStep(points, coordSys, stepTurnAt, connectNulls) {\n var baseAxis = coordSys.getBaseAxis();\n var baseIndex = baseAxis.dim === 'x' || baseAxis.dim === 'radius' ? 0 : 1;\n var stepPoints = [];\n var i = 0;\n var stepPt = [];\n var pt = [];\n var nextPt = [];\n var filteredPoints = [];\n if (connectNulls) {\n for (i = 0; i < points.length; i += 2) {\n if (!isNaN(points[i]) && !isNaN(points[i + 1])) {\n filteredPoints.push(points[i], points[i + 1]);\n }\n }\n points = filteredPoints;\n }\n for (i = 0; i < points.length - 2; i += 2) {\n nextPt[0] = points[i + 2];\n nextPt[1] = points[i + 3];\n pt[0] = points[i];\n pt[1] = points[i + 1];\n stepPoints.push(pt[0], pt[1]);\n switch (stepTurnAt) {\n case 'end':\n stepPt[baseIndex] = nextPt[baseIndex];\n stepPt[1 - baseIndex] = pt[1 - baseIndex];\n stepPoints.push(stepPt[0], stepPt[1]);\n break;\n case 'middle':\n var middle = (pt[baseIndex] + nextPt[baseIndex]) / 2;\n var stepPt2 = [];\n stepPt[baseIndex] = stepPt2[baseIndex] = middle;\n stepPt[1 - baseIndex] = pt[1 - baseIndex];\n stepPt2[1 - baseIndex] = nextPt[1 - baseIndex];\n stepPoints.push(stepPt[0], stepPt[1]);\n stepPoints.push(stepPt2[0], stepPt2[1]);\n break;\n default:\n // default is start\n stepPt[baseIndex] = pt[baseIndex];\n stepPt[1 - baseIndex] = nextPt[1 - baseIndex];\n stepPoints.push(stepPt[0], stepPt[1]);\n }\n }\n // Last points\n stepPoints.push(points[i++], points[i++]);\n return stepPoints;\n}\n/**\n * Clip color stops to edge. Avoid creating too large gradients.\n * Which may lead to blurry when GPU acceleration is enabled. See #15680\n *\n * The stops has been sorted from small to large.\n */\nfunction clipColorStops(colorStops, maxSize) {\n var newColorStops = [];\n var len = colorStops.length;\n // coord will always < 0 in prevOutOfRangeColorStop.\n var prevOutOfRangeColorStop;\n var prevInRangeColorStop;\n function lerpStop(stop0, stop1, clippedCoord) {\n var coord0 = stop0.coord;\n var p = (clippedCoord - coord0) / (stop1.coord - coord0);\n var color = lerp(p, [stop0.color, stop1.color]);\n return {\n coord: clippedCoord,\n color: color\n };\n }\n for (var i = 0; i < len; i++) {\n var stop_1 = colorStops[i];\n var coord = stop_1.coord;\n if (coord < 0) {\n prevOutOfRangeColorStop = stop_1;\n } else if (coord > maxSize) {\n if (prevInRangeColorStop) {\n newColorStops.push(lerpStop(prevInRangeColorStop, stop_1, maxSize));\n } else if (prevOutOfRangeColorStop) {\n // If there are two stops and coord range is between these two stops\n newColorStops.push(lerpStop(prevOutOfRangeColorStop, stop_1, 0), lerpStop(prevOutOfRangeColorStop, stop_1, maxSize));\n }\n // All following stop will be out of range. So just ignore them.\n break;\n } else {\n if (prevOutOfRangeColorStop) {\n newColorStops.push(lerpStop(prevOutOfRangeColorStop, stop_1, 0));\n // Reset\n prevOutOfRangeColorStop = null;\n }\n newColorStops.push(stop_1);\n prevInRangeColorStop = stop_1;\n }\n }\n return newColorStops;\n}\nfunction getVisualGradient(data, coordSys, api) {\n var visualMetaList = data.getVisual('visualMeta');\n if (!visualMetaList || !visualMetaList.length || !data.count()) {\n // When data.count() is 0, gradient range can not be calculated.\n return;\n }\n if (coordSys.type !== 'cartesian2d') {\n if (process.env.NODE_ENV !== 'production') {\n console.warn('Visual map on line style is only supported on cartesian2d.');\n }\n return;\n }\n var coordDim;\n var visualMeta;\n for (var i = visualMetaList.length - 1; i >= 0; i--) {\n var dimInfo = data.getDimensionInfo(visualMetaList[i].dimension);\n coordDim = dimInfo && dimInfo.coordDim;\n // Can only be x or y\n if (coordDim === 'x' || coordDim === 'y') {\n visualMeta = visualMetaList[i];\n break;\n }\n }\n if (!visualMeta) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn('Visual map on line style only support x or y dimension.');\n }\n return;\n }\n // If the area to be rendered is bigger than area defined by LinearGradient,\n // the canvas spec prescribes that the color of the first stop and the last\n // stop should be used. But if two stops are added at offset 0, in effect\n // browsers use the color of the second stop to render area outside\n // LinearGradient. So we can only infinitesimally extend area defined in\n // LinearGradient to render `outerColors`.\n var axis = coordSys.getAxis(coordDim);\n // dataToCoord mapping may not be linear, but must be monotonic.\n var colorStops = zrUtil.map(visualMeta.stops, function (stop) {\n // offset will be calculated later.\n return {\n coord: axis.toGlobalCoord(axis.dataToCoord(stop.value)),\n color: stop.color\n };\n });\n var stopLen = colorStops.length;\n var outerColors = visualMeta.outerColors.slice();\n if (stopLen && colorStops[0].coord > colorStops[stopLen - 1].coord) {\n colorStops.reverse();\n outerColors.reverse();\n }\n var colorStopsInRange = clipColorStops(colorStops, coordDim === 'x' ? api.getWidth() : api.getHeight());\n var inRangeStopLen = colorStopsInRange.length;\n if (!inRangeStopLen && stopLen) {\n // All stops are out of range. All will be the same color.\n return colorStops[0].coord < 0 ? outerColors[1] ? outerColors[1] : colorStops[stopLen - 1].color : outerColors[0] ? outerColors[0] : colorStops[0].color;\n }\n var tinyExtent = 10; // Arbitrary value: 10px\n var minCoord = colorStopsInRange[0].coord - tinyExtent;\n var maxCoord = colorStopsInRange[inRangeStopLen - 1].coord + tinyExtent;\n var coordSpan = maxCoord - minCoord;\n if (coordSpan < 1e-3) {\n return 'transparent';\n }\n zrUtil.each(colorStopsInRange, function (stop) {\n stop.offset = (stop.coord - minCoord) / coordSpan;\n });\n colorStopsInRange.push({\n // NOTE: inRangeStopLen may still be 0 if stoplen is zero.\n offset: inRangeStopLen ? colorStopsInRange[inRangeStopLen - 1].offset : 0.5,\n color: outerColors[1] || 'transparent'\n });\n colorStopsInRange.unshift({\n offset: inRangeStopLen ? colorStopsInRange[0].offset : 0.5,\n color: outerColors[0] || 'transparent'\n });\n var gradient = new graphic.LinearGradient(0, 0, 0, 0, colorStopsInRange, true);\n gradient[coordDim] = minCoord;\n gradient[coordDim + '2'] = maxCoord;\n return gradient;\n}\nfunction getIsIgnoreFunc(seriesModel, data, coordSys) {\n var showAllSymbol = seriesModel.get('showAllSymbol');\n var isAuto = showAllSymbol === 'auto';\n if (showAllSymbol && !isAuto) {\n return;\n }\n var categoryAxis = coordSys.getAxesByScale('ordinal')[0];\n if (!categoryAxis) {\n return;\n }\n // Note that category label interval strategy might bring some weird effect\n // in some scenario: users may wonder why some of the symbols are not\n // displayed. So we show all symbols as possible as we can.\n if (isAuto\n // Simplify the logic, do not determine label overlap here.\n && canShowAllSymbolForCategory(categoryAxis, data)) {\n return;\n }\n // Otherwise follow the label interval strategy on category axis.\n var categoryDataDim = data.mapDimension(categoryAxis.dim);\n var labelMap = {};\n zrUtil.each(categoryAxis.getViewLabels(), function (labelItem) {\n var ordinalNumber = categoryAxis.scale.getRawOrdinalNumber(labelItem.tickValue);\n labelMap[ordinalNumber] = 1;\n });\n return function (dataIndex) {\n return !labelMap.hasOwnProperty(data.get(categoryDataDim, dataIndex));\n };\n}\nfunction canShowAllSymbolForCategory(categoryAxis, data) {\n // In most cases, line is monotonous on category axis, and the label size\n // is close with each other. So we check the symbol size and some of the\n // label size alone with the category axis to estimate whether all symbol\n // can be shown without overlap.\n var axisExtent = categoryAxis.getExtent();\n var availSize = Math.abs(axisExtent[1] - axisExtent[0]) / categoryAxis.scale.count();\n isNaN(availSize) && (availSize = 0); // 0/0 is NaN.\n // Sampling some points, max 5.\n var dataLen = data.count();\n var step = Math.max(1, Math.round(dataLen / 5));\n for (var dataIndex = 0; dataIndex < dataLen; dataIndex += step) {\n if (SymbolClz.getSymbolSize(data, dataIndex\n // Only for cartesian, where `isHorizontal` exists.\n )[categoryAxis.isHorizontal() ? 1 : 0]\n // Empirical number\n * 1.5 > availSize) {\n return false;\n }\n }\n return true;\n}\nfunction isPointNull(x, y) {\n return isNaN(x) || isNaN(y);\n}\nfunction getLastIndexNotNull(points) {\n var len = points.length / 2;\n for (; len > 0; len--) {\n if (!isPointNull(points[len * 2 - 2], points[len * 2 - 1])) {\n break;\n }\n }\n return len - 1;\n}\nfunction getPointAtIndex(points, idx) {\n return [points[idx * 2], points[idx * 2 + 1]];\n}\nfunction getIndexRange(points, xOrY, dim) {\n var len = points.length / 2;\n var dimIdx = dim === 'x' ? 0 : 1;\n var a;\n var b;\n var prevIndex = 0;\n var nextIndex = -1;\n for (var i = 0; i < len; i++) {\n b = points[i * 2 + dimIdx];\n if (isNaN(b) || isNaN(points[i * 2 + 1 - dimIdx])) {\n continue;\n }\n if (i === 0) {\n a = b;\n continue;\n }\n if (a <= xOrY && b >= xOrY || a >= xOrY && b <= xOrY) {\n nextIndex = i;\n break;\n }\n prevIndex = i;\n a = b;\n }\n return {\n range: [prevIndex, nextIndex],\n t: (xOrY - a) / (b - a)\n };\n}\nfunction anyStateShowEndLabel(seriesModel) {\n if (seriesModel.get(['endLabel', 'show'])) {\n return true;\n }\n for (var i = 0; i < SPECIAL_STATES.length; i++) {\n if (seriesModel.get([SPECIAL_STATES[i], 'endLabel', 'show'])) {\n return true;\n }\n }\n return false;\n}\nfunction createLineClipPath(lineView, coordSys, hasAnimation, seriesModel) {\n if (isCoordinateSystemType(coordSys, 'cartesian2d')) {\n var endLabelModel_1 = seriesModel.getModel('endLabel');\n var valueAnimation_1 = endLabelModel_1.get('valueAnimation');\n var data_1 = seriesModel.getData();\n var labelAnimationRecord_1 = {\n lastFrameIndex: 0\n };\n var during = anyStateShowEndLabel(seriesModel) ? function (percent, clipRect) {\n lineView._endLabelOnDuring(percent, clipRect, data_1, labelAnimationRecord_1, valueAnimation_1, endLabelModel_1, coordSys);\n } : null;\n var isHorizontal = coordSys.getBaseAxis().isHorizontal();\n var clipPath = createGridClipPath(coordSys, hasAnimation, seriesModel, function () {\n var endLabel = lineView._endLabel;\n if (endLabel && hasAnimation) {\n if (labelAnimationRecord_1.originalX != null) {\n endLabel.attr({\n x: labelAnimationRecord_1.originalX,\n y: labelAnimationRecord_1.originalY\n });\n }\n }\n }, during);\n // Expand clip shape to avoid clipping when line value exceeds axis\n if (!seriesModel.get('clip', true)) {\n var rectShape = clipPath.shape;\n var expandSize = Math.max(rectShape.width, rectShape.height);\n if (isHorizontal) {\n rectShape.y -= expandSize;\n rectShape.height += expandSize * 2;\n } else {\n rectShape.x -= expandSize;\n rectShape.width += expandSize * 2;\n }\n }\n // Set to the final frame. To make sure label layout is right.\n if (during) {\n during(1, clipPath);\n }\n return clipPath;\n } else {\n if (process.env.NODE_ENV !== 'production') {\n if (seriesModel.get(['endLabel', 'show'])) {\n console.warn('endLabel is not supported for lines in polar systems.');\n }\n }\n return createPolarClipPath(coordSys, hasAnimation, seriesModel);\n }\n}\nfunction getEndLabelStateSpecified(endLabelModel, coordSys) {\n var baseAxis = coordSys.getBaseAxis();\n var isHorizontal = baseAxis.isHorizontal();\n var isBaseInversed = baseAxis.inverse;\n var align = isHorizontal ? isBaseInversed ? 'right' : 'left' : 'center';\n var verticalAlign = isHorizontal ? 'middle' : isBaseInversed ? 'top' : 'bottom';\n return {\n normal: {\n align: endLabelModel.get('align') || align,\n verticalAlign: endLabelModel.get('verticalAlign') || verticalAlign\n }\n };\n}\nvar LineView = /** @class */function (_super) {\n __extends(LineView, _super);\n function LineView() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n LineView.prototype.init = function () {\n var lineGroup = new graphic.Group();\n var symbolDraw = new SymbolDraw();\n this.group.add(symbolDraw.group);\n this._symbolDraw = symbolDraw;\n this._lineGroup = lineGroup;\n };\n LineView.prototype.render = function (seriesModel, ecModel, api) {\n var _this = this;\n var coordSys = seriesModel.coordinateSystem;\n var group = this.group;\n var data = seriesModel.getData();\n var lineStyleModel = seriesModel.getModel('lineStyle');\n var areaStyleModel = seriesModel.getModel('areaStyle');\n var points = data.getLayout('points') || [];\n var isCoordSysPolar = coordSys.type === 'polar';\n var prevCoordSys = this._coordSys;\n var symbolDraw = this._symbolDraw;\n var polyline = this._polyline;\n var polygon = this._polygon;\n var lineGroup = this._lineGroup;\n var hasAnimation = !ecModel.ssr && seriesModel.get('animation');\n var isAreaChart = !areaStyleModel.isEmpty();\n var valueOrigin = areaStyleModel.get('origin');\n var dataCoordInfo = prepareDataCoordInfo(coordSys, data, valueOrigin);\n var stackedOnPoints = isAreaChart && getStackedOnPoints(coordSys, data, dataCoordInfo);\n var showSymbol = seriesModel.get('showSymbol');\n var connectNulls = seriesModel.get('connectNulls');\n var isIgnoreFunc = showSymbol && !isCoordSysPolar && getIsIgnoreFunc(seriesModel, data, coordSys);\n // Remove temporary symbols\n var oldData = this._data;\n oldData && oldData.eachItemGraphicEl(function (el, idx) {\n if (el.__temp) {\n group.remove(el);\n oldData.setItemGraphicEl(idx, null);\n }\n });\n // Remove previous created symbols if showSymbol changed to false\n if (!showSymbol) {\n symbolDraw.remove();\n }\n group.add(lineGroup);\n // FIXME step not support polar\n var step = !isCoordSysPolar ? seriesModel.get('step') : false;\n var clipShapeForSymbol;\n if (coordSys && coordSys.getArea && seriesModel.get('clip', true)) {\n clipShapeForSymbol = coordSys.getArea();\n // Avoid float number rounding error for symbol on the edge of axis extent.\n // See #7913 and `test/dataZoom-clip.html`.\n if (clipShapeForSymbol.width != null) {\n clipShapeForSymbol.x -= 0.1;\n clipShapeForSymbol.y -= 0.1;\n clipShapeForSymbol.width += 0.2;\n clipShapeForSymbol.height += 0.2;\n } else if (clipShapeForSymbol.r0) {\n clipShapeForSymbol.r0 -= 0.5;\n clipShapeForSymbol.r += 0.5;\n }\n }\n this._clipShapeForSymbol = clipShapeForSymbol;\n var visualColor = getVisualGradient(data, coordSys, api) || data.getVisual('style')[data.getVisual('drawType')];\n // Initialization animation or coordinate system changed\n if (!(polyline && prevCoordSys.type === coordSys.type && step === this._step)) {\n showSymbol && symbolDraw.updateData(data, {\n isIgnore: isIgnoreFunc,\n clipShape: clipShapeForSymbol,\n disableAnimation: true,\n getSymbolPoint: function (idx) {\n return [points[idx * 2], points[idx * 2 + 1]];\n }\n });\n hasAnimation && this._initSymbolLabelAnimation(data, coordSys, clipShapeForSymbol);\n if (step) {\n // TODO If stacked series is not step\n points = turnPointsIntoStep(points, coordSys, step, connectNulls);\n if (stackedOnPoints) {\n stackedOnPoints = turnPointsIntoStep(stackedOnPoints, coordSys, step, connectNulls);\n }\n }\n polyline = this._newPolyline(points);\n if (isAreaChart) {\n polygon = this._newPolygon(points, stackedOnPoints);\n } // If areaStyle is removed\n else if (polygon) {\n lineGroup.remove(polygon);\n polygon = this._polygon = null;\n }\n // NOTE: Must update _endLabel before setClipPath.\n if (!isCoordSysPolar) {\n this._initOrUpdateEndLabel(seriesModel, coordSys, convertToColorString(visualColor));\n }\n lineGroup.setClipPath(createLineClipPath(this, coordSys, true, seriesModel));\n } else {\n if (isAreaChart && !polygon) {\n // If areaStyle is added\n polygon = this._newPolygon(points, stackedOnPoints);\n } else if (polygon && !isAreaChart) {\n // If areaStyle is removed\n lineGroup.remove(polygon);\n polygon = this._polygon = null;\n }\n // NOTE: Must update _endLabel before setClipPath.\n if (!isCoordSysPolar) {\n this._initOrUpdateEndLabel(seriesModel, coordSys, convertToColorString(visualColor));\n }\n // Update clipPath\n var oldClipPath = lineGroup.getClipPath();\n if (oldClipPath) {\n var newClipPath = createLineClipPath(this, coordSys, false, seriesModel);\n graphic.initProps(oldClipPath, {\n shape: newClipPath.shape\n }, seriesModel);\n } else {\n lineGroup.setClipPath(createLineClipPath(this, coordSys, true, seriesModel));\n }\n // Always update, or it is wrong in the case turning on legend\n // because points are not changed.\n showSymbol && symbolDraw.updateData(data, {\n isIgnore: isIgnoreFunc,\n clipShape: clipShapeForSymbol,\n disableAnimation: true,\n getSymbolPoint: function (idx) {\n return [points[idx * 2], points[idx * 2 + 1]];\n }\n });\n // In the case data zoom triggered refreshing frequently\n // Data may not change if line has a category axis. So it should animate nothing.\n if (!isPointsSame(this._stackedOnPoints, stackedOnPoints) || !isPointsSame(this._points, points)) {\n if (hasAnimation) {\n this._doUpdateAnimation(data, stackedOnPoints, coordSys, api, step, valueOrigin, connectNulls);\n } else {\n // Not do it in update with animation\n if (step) {\n // TODO If stacked series is not step\n points = turnPointsIntoStep(points, coordSys, step, connectNulls);\n if (stackedOnPoints) {\n stackedOnPoints = turnPointsIntoStep(stackedOnPoints, coordSys, step, connectNulls);\n }\n }\n polyline.setShape({\n points: points\n });\n polygon && polygon.setShape({\n points: points,\n stackedOnPoints: stackedOnPoints\n });\n }\n }\n }\n var emphasisModel = seriesModel.getModel('emphasis');\n var focus = emphasisModel.get('focus');\n var blurScope = emphasisModel.get('blurScope');\n var emphasisDisabled = emphasisModel.get('disabled');\n polyline.useStyle(zrUtil.defaults(\n // Use color in lineStyle first\n lineStyleModel.getLineStyle(), {\n fill: 'none',\n stroke: visualColor,\n lineJoin: 'bevel'\n }));\n setStatesStylesFromModel(polyline, seriesModel, 'lineStyle');\n if (polyline.style.lineWidth > 0 && seriesModel.get(['emphasis', 'lineStyle', 'width']) === 'bolder') {\n var emphasisLineStyle = polyline.getState('emphasis').style;\n emphasisLineStyle.lineWidth = +polyline.style.lineWidth + 1;\n }\n // Needs seriesIndex for focus\n getECData(polyline).seriesIndex = seriesModel.seriesIndex;\n toggleHoverEmphasis(polyline, focus, blurScope, emphasisDisabled);\n var smooth = getSmooth(seriesModel.get('smooth'));\n var smoothMonotone = seriesModel.get('smoothMonotone');\n polyline.setShape({\n smooth: smooth,\n smoothMonotone: smoothMonotone,\n connectNulls: connectNulls\n });\n if (polygon) {\n var stackedOnSeries = data.getCalculationInfo('stackedOnSeries');\n var stackedOnSmooth = 0;\n polygon.useStyle(zrUtil.defaults(areaStyleModel.getAreaStyle(), {\n fill: visualColor,\n opacity: 0.7,\n lineJoin: 'bevel',\n decal: data.getVisual('style').decal\n }));\n if (stackedOnSeries) {\n stackedOnSmooth = getSmooth(stackedOnSeries.get('smooth'));\n }\n polygon.setShape({\n smooth: smooth,\n stackedOnSmooth: stackedOnSmooth,\n smoothMonotone: smoothMonotone,\n connectNulls: connectNulls\n });\n setStatesStylesFromModel(polygon, seriesModel, 'areaStyle');\n // Needs seriesIndex for focus\n getECData(polygon).seriesIndex = seriesModel.seriesIndex;\n toggleHoverEmphasis(polygon, focus, blurScope, emphasisDisabled);\n }\n var changePolyState = function (toState) {\n _this._changePolyState(toState);\n };\n data.eachItemGraphicEl(function (el) {\n // Switch polyline / polygon state if element changed its state.\n el && (el.onHoverStateChange = changePolyState);\n });\n this._polyline.onHoverStateChange = changePolyState;\n this._data = data;\n // Save the coordinate system for transition animation when data changed\n this._coordSys = coordSys;\n this._stackedOnPoints = stackedOnPoints;\n this._points = points;\n this._step = step;\n this._valueOrigin = valueOrigin;\n if (seriesModel.get('triggerLineEvent')) {\n this.packEventData(seriesModel, polyline);\n polygon && this.packEventData(seriesModel, polygon);\n }\n };\n LineView.prototype.packEventData = function (seriesModel, el) {\n getECData(el).eventData = {\n componentType: 'series',\n componentSubType: 'line',\n componentIndex: seriesModel.componentIndex,\n seriesIndex: seriesModel.seriesIndex,\n seriesName: seriesModel.name,\n seriesType: 'line'\n };\n };\n LineView.prototype.highlight = function (seriesModel, ecModel, api, payload) {\n var data = seriesModel.getData();\n var dataIndex = modelUtil.queryDataIndex(data, payload);\n this._changePolyState('emphasis');\n if (!(dataIndex instanceof Array) && dataIndex != null && dataIndex >= 0) {\n var points = data.getLayout('points');\n var symbol = data.getItemGraphicEl(dataIndex);\n if (!symbol) {\n // Create a temporary symbol if it is not exists\n var x = points[dataIndex * 2];\n var y = points[dataIndex * 2 + 1];\n if (isNaN(x) || isNaN(y)) {\n // Null data\n return;\n }\n // fix #11360: shouldn't draw symbol outside clipShapeForSymbol\n if (this._clipShapeForSymbol && !this._clipShapeForSymbol.contain(x, y)) {\n return;\n }\n var zlevel = seriesModel.get('zlevel') || 0;\n var z = seriesModel.get('z') || 0;\n symbol = new SymbolClz(data, dataIndex);\n symbol.x = x;\n symbol.y = y;\n symbol.setZ(zlevel, z);\n // ensure label text of the temporary symbol is in front of line and area polygon\n var symbolLabel = symbol.getSymbolPath().getTextContent();\n if (symbolLabel) {\n symbolLabel.zlevel = zlevel;\n symbolLabel.z = z;\n symbolLabel.z2 = this._polyline.z2 + 1;\n }\n symbol.__temp = true;\n data.setItemGraphicEl(dataIndex, symbol);\n // Stop scale animation\n symbol.stopSymbolAnimation(true);\n this.group.add(symbol);\n }\n symbol.highlight();\n } else {\n // Highlight whole series\n ChartView.prototype.highlight.call(this, seriesModel, ecModel, api, payload);\n }\n };\n LineView.prototype.downplay = function (seriesModel, ecModel, api, payload) {\n var data = seriesModel.getData();\n var dataIndex = modelUtil.queryDataIndex(data, payload);\n this._changePolyState('normal');\n if (dataIndex != null && dataIndex >= 0) {\n var symbol = data.getItemGraphicEl(dataIndex);\n if (symbol) {\n if (symbol.__temp) {\n data.setItemGraphicEl(dataIndex, null);\n this.group.remove(symbol);\n } else {\n symbol.downplay();\n }\n }\n } else {\n // FIXME\n // can not downplay completely.\n // Downplay whole series\n ChartView.prototype.downplay.call(this, seriesModel, ecModel, api, payload);\n }\n };\n LineView.prototype._changePolyState = function (toState) {\n var polygon = this._polygon;\n setStatesFlag(this._polyline, toState);\n polygon && setStatesFlag(polygon, toState);\n };\n LineView.prototype._newPolyline = function (points) {\n var polyline = this._polyline;\n // Remove previous created polyline\n if (polyline) {\n this._lineGroup.remove(polyline);\n }\n polyline = new ECPolyline({\n shape: {\n points: points\n },\n segmentIgnoreThreshold: 2,\n z2: 10\n });\n this._lineGroup.add(polyline);\n this._polyline = polyline;\n return polyline;\n };\n LineView.prototype._newPolygon = function (points, stackedOnPoints) {\n var polygon = this._polygon;\n // Remove previous created polygon\n if (polygon) {\n this._lineGroup.remove(polygon);\n }\n polygon = new ECPolygon({\n shape: {\n points: points,\n stackedOnPoints: stackedOnPoints\n },\n segmentIgnoreThreshold: 2\n });\n this._lineGroup.add(polygon);\n this._polygon = polygon;\n return polygon;\n };\n LineView.prototype._initSymbolLabelAnimation = function (data, coordSys, clipShape) {\n var isHorizontalOrRadial;\n var isCoordSysPolar;\n var baseAxis = coordSys.getBaseAxis();\n var isAxisInverse = baseAxis.inverse;\n if (coordSys.type === 'cartesian2d') {\n isHorizontalOrRadial = baseAxis.isHorizontal();\n isCoordSysPolar = false;\n } else if (coordSys.type === 'polar') {\n isHorizontalOrRadial = baseAxis.dim === 'angle';\n isCoordSysPolar = true;\n }\n var seriesModel = data.hostModel;\n var seriesDuration = seriesModel.get('animationDuration');\n if (zrUtil.isFunction(seriesDuration)) {\n seriesDuration = seriesDuration(null);\n }\n var seriesDelay = seriesModel.get('animationDelay') || 0;\n var seriesDelayValue = zrUtil.isFunction(seriesDelay) ? seriesDelay(null) : seriesDelay;\n data.eachItemGraphicEl(function (symbol, idx) {\n var el = symbol;\n if (el) {\n var point = [symbol.x, symbol.y];\n var start = void 0;\n var end = void 0;\n var current = void 0;\n if (clipShape) {\n if (isCoordSysPolar) {\n var polarClip = clipShape;\n var coord = coordSys.pointToCoord(point);\n if (isHorizontalOrRadial) {\n start = polarClip.startAngle;\n end = polarClip.endAngle;\n current = -coord[1] / 180 * Math.PI;\n } else {\n start = polarClip.r0;\n end = polarClip.r;\n current = coord[0];\n }\n } else {\n var gridClip = clipShape;\n if (isHorizontalOrRadial) {\n start = gridClip.x;\n end = gridClip.x + gridClip.width;\n current = symbol.x;\n } else {\n start = gridClip.y + gridClip.height;\n end = gridClip.y;\n current = symbol.y;\n }\n }\n }\n var ratio = end === start ? 0 : (current - start) / (end - start);\n if (isAxisInverse) {\n ratio = 1 - ratio;\n }\n var delay = zrUtil.isFunction(seriesDelay) ? seriesDelay(idx) : seriesDuration * ratio + seriesDelayValue;\n var symbolPath = el.getSymbolPath();\n var text = symbolPath.getTextContent();\n el.attr({\n scaleX: 0,\n scaleY: 0\n });\n el.animateTo({\n scaleX: 1,\n scaleY: 1\n }, {\n duration: 200,\n setToFinal: true,\n delay: delay\n });\n if (text) {\n text.animateFrom({\n style: {\n opacity: 0\n }\n }, {\n duration: 300,\n delay: delay\n });\n }\n symbolPath.disableLabelAnimation = true;\n }\n });\n };\n LineView.prototype._initOrUpdateEndLabel = function (seriesModel, coordSys, inheritColor) {\n var endLabelModel = seriesModel.getModel('endLabel');\n if (anyStateShowEndLabel(seriesModel)) {\n var data_2 = seriesModel.getData();\n var polyline = this._polyline;\n // series may be filtered.\n var points = data_2.getLayout('points');\n if (!points) {\n polyline.removeTextContent();\n this._endLabel = null;\n return;\n }\n var endLabel = this._endLabel;\n if (!endLabel) {\n endLabel = this._endLabel = new graphic.Text({\n z2: 200 // should be higher than item symbol\n });\n endLabel.ignoreClip = true;\n polyline.setTextContent(this._endLabel);\n polyline.disableLabelAnimation = true;\n }\n // Find last non-NaN data to display data\n var dataIndex = getLastIndexNotNull(points);\n if (dataIndex >= 0) {\n setLabelStyle(polyline, getLabelStatesModels(seriesModel, 'endLabel'), {\n inheritColor: inheritColor,\n labelFetcher: seriesModel,\n labelDataIndex: dataIndex,\n defaultText: function (dataIndex, opt, interpolatedValue) {\n return interpolatedValue != null ? getDefaultInterpolatedLabel(data_2, interpolatedValue) : getDefaultLabel(data_2, dataIndex);\n },\n enableTextSetter: true\n }, getEndLabelStateSpecified(endLabelModel, coordSys));\n polyline.textConfig.position = null;\n }\n } else if (this._endLabel) {\n this._polyline.removeTextContent();\n this._endLabel = null;\n }\n };\n LineView.prototype._endLabelOnDuring = function (percent, clipRect, data, animationRecord, valueAnimation, endLabelModel, coordSys) {\n var endLabel = this._endLabel;\n var polyline = this._polyline;\n if (endLabel) {\n // NOTE: Don't remove percent < 1. percent === 1 means the first frame during render.\n // The label is not prepared at this time.\n if (percent < 1 && animationRecord.originalX == null) {\n animationRecord.originalX = endLabel.x;\n animationRecord.originalY = endLabel.y;\n }\n var points = data.getLayout('points');\n var seriesModel = data.hostModel;\n var connectNulls = seriesModel.get('connectNulls');\n var precision = endLabelModel.get('precision');\n var distance = endLabelModel.get('distance') || 0;\n var baseAxis = coordSys.getBaseAxis();\n var isHorizontal = baseAxis.isHorizontal();\n var isBaseInversed = baseAxis.inverse;\n var clipShape = clipRect.shape;\n var xOrY = isBaseInversed ? isHorizontal ? clipShape.x : clipShape.y + clipShape.height : isHorizontal ? clipShape.x + clipShape.width : clipShape.y;\n var distanceX = (isHorizontal ? distance : 0) * (isBaseInversed ? -1 : 1);\n var distanceY = (isHorizontal ? 0 : -distance) * (isBaseInversed ? -1 : 1);\n var dim = isHorizontal ? 'x' : 'y';\n var dataIndexRange = getIndexRange(points, xOrY, dim);\n var indices = dataIndexRange.range;\n var diff = indices[1] - indices[0];\n var value = void 0;\n if (diff >= 1) {\n // diff > 1 && connectNulls, which is on the null data.\n if (diff > 1 && !connectNulls) {\n var pt = getPointAtIndex(points, indices[0]);\n endLabel.attr({\n x: pt[0] + distanceX,\n y: pt[1] + distanceY\n });\n valueAnimation && (value = seriesModel.getRawValue(indices[0]));\n } else {\n var pt = polyline.getPointOn(xOrY, dim);\n pt && endLabel.attr({\n x: pt[0] + distanceX,\n y: pt[1] + distanceY\n });\n var startValue = seriesModel.getRawValue(indices[0]);\n var endValue = seriesModel.getRawValue(indices[1]);\n valueAnimation && (value = modelUtil.interpolateRawValues(data, precision, startValue, endValue, dataIndexRange.t));\n }\n animationRecord.lastFrameIndex = indices[0];\n } else {\n // If diff <= 0, which is the range is not found(Include NaN)\n // Choose the first point or last point.\n var idx = percent === 1 || animationRecord.lastFrameIndex > 0 ? indices[0] : 0;\n var pt = getPointAtIndex(points, idx);\n valueAnimation && (value = seriesModel.getRawValue(idx));\n endLabel.attr({\n x: pt[0] + distanceX,\n y: pt[1] + distanceY\n });\n }\n if (valueAnimation) {\n var inner = labelInner(endLabel);\n if (typeof inner.setLabelText === 'function') {\n inner.setLabelText(value);\n }\n }\n }\n };\n /**\n * @private\n */\n // FIXME Two value axis\n LineView.prototype._doUpdateAnimation = function (data, stackedOnPoints, coordSys, api, step, valueOrigin, connectNulls) {\n var polyline = this._polyline;\n var polygon = this._polygon;\n var seriesModel = data.hostModel;\n var diff = lineAnimationDiff(this._data, data, this._stackedOnPoints, stackedOnPoints, this._coordSys, coordSys, this._valueOrigin, valueOrigin);\n var current = diff.current;\n var stackedOnCurrent = diff.stackedOnCurrent;\n var next = diff.next;\n var stackedOnNext = diff.stackedOnNext;\n if (step) {\n // TODO If stacked series is not step\n current = turnPointsIntoStep(diff.current, coordSys, step, connectNulls);\n stackedOnCurrent = turnPointsIntoStep(diff.stackedOnCurrent, coordSys, step, connectNulls);\n next = turnPointsIntoStep(diff.next, coordSys, step, connectNulls);\n stackedOnNext = turnPointsIntoStep(diff.stackedOnNext, coordSys, step, connectNulls);\n }\n // Don't apply animation if diff is large.\n // For better result and avoid memory explosion problems like\n // https://github.com/apache/incubator-echarts/issues/12229\n if (getBoundingDiff(current, next) > 3000 || polygon && getBoundingDiff(stackedOnCurrent, stackedOnNext) > 3000) {\n polyline.stopAnimation();\n polyline.setShape({\n points: next\n });\n if (polygon) {\n polygon.stopAnimation();\n polygon.setShape({\n points: next,\n stackedOnPoints: stackedOnNext\n });\n }\n return;\n }\n polyline.shape.__points = diff.current;\n polyline.shape.points = current;\n var target = {\n shape: {\n points: next\n }\n };\n // Also animate the original points.\n // If points reference is changed when turning into step line.\n if (diff.current !== current) {\n target.shape.__points = diff.next;\n }\n // Stop previous animation.\n polyline.stopAnimation();\n graphic.updateProps(polyline, target, seriesModel);\n if (polygon) {\n polygon.setShape({\n // Reuse the points with polyline.\n points: current,\n stackedOnPoints: stackedOnCurrent\n });\n polygon.stopAnimation();\n graphic.updateProps(polygon, {\n shape: {\n stackedOnPoints: stackedOnNext\n }\n }, seriesModel);\n // If use attr directly in updateProps.\n if (polyline.shape.points !== polygon.shape.points) {\n polygon.shape.points = polyline.shape.points;\n }\n }\n var updatedDataInfo = [];\n var diffStatus = diff.status;\n for (var i = 0; i < diffStatus.length; i++) {\n var cmd = diffStatus[i].cmd;\n if (cmd === '=') {\n var el = data.getItemGraphicEl(diffStatus[i].idx1);\n if (el) {\n updatedDataInfo.push({\n el: el,\n ptIdx: i // Index of points\n });\n }\n }\n }\n if (polyline.animators && polyline.animators.length) {\n polyline.animators[0].during(function () {\n polygon && polygon.dirtyShape();\n var points = polyline.shape.__points;\n for (var i = 0; i < updatedDataInfo.length; i++) {\n var el = updatedDataInfo[i].el;\n var offset = updatedDataInfo[i].ptIdx * 2;\n el.x = points[offset];\n el.y = points[offset + 1];\n el.markRedraw();\n }\n });\n }\n };\n LineView.prototype.remove = function (ecModel) {\n var group = this.group;\n var oldData = this._data;\n this._lineGroup.removeAll();\n this._symbolDraw.remove(true);\n // Remove temporary created elements when highlighting\n oldData && oldData.eachItemGraphicEl(function (el, idx) {\n if (el.__temp) {\n group.remove(el);\n oldData.setItemGraphicEl(idx, null);\n }\n });\n this._polyline = this._polygon = this._coordSys = this._points = this._stackedOnPoints = this._endLabel = this._data = null;\n };\n LineView.type = 'line';\n return LineView;\n}(ChartView);\nexport default LineView;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { map } from 'zrender/lib/core/util.js';\nimport createRenderPlanner from '../chart/helper/createRenderPlanner.js';\nimport { isDimensionStacked } from '../data/helper/dataStackHelper.js';\nimport { createFloat32Array } from '../util/vendor.js';\nexport default function pointsLayout(seriesType, forceStoreInTypedArray) {\n return {\n seriesType: seriesType,\n plan: createRenderPlanner(),\n reset: function (seriesModel) {\n var data = seriesModel.getData();\n var coordSys = seriesModel.coordinateSystem;\n var pipelineContext = seriesModel.pipelineContext;\n var useTypedArray = forceStoreInTypedArray || pipelineContext.large;\n if (!coordSys) {\n return;\n }\n var dims = map(coordSys.dimensions, function (dim) {\n return data.mapDimension(dim);\n }).slice(0, 2);\n var dimLen = dims.length;\n var stackResultDim = data.getCalculationInfo('stackResultDimension');\n if (isDimensionStacked(data, dims[0])) {\n dims[0] = stackResultDim;\n }\n if (isDimensionStacked(data, dims[1])) {\n dims[1] = stackResultDim;\n }\n var store = data.getStore();\n var dimIdx0 = data.getDimensionIndex(dims[0]);\n var dimIdx1 = data.getDimensionIndex(dims[1]);\n return dimLen && {\n progress: function (params, data) {\n var segCount = params.end - params.start;\n var points = useTypedArray && createFloat32Array(segCount * dimLen);\n var tmpIn = [];\n var tmpOut = [];\n for (var i = params.start, offset = 0; i < params.end; i++) {\n var point = void 0;\n if (dimLen === 1) {\n var x = store.get(dimIdx0, i);\n // NOTE: Make sure the second parameter is null to use default strategy.\n point = coordSys.dataToPoint(x, null, tmpOut);\n } else {\n tmpIn[0] = store.get(dimIdx0, i);\n tmpIn[1] = store.get(dimIdx1, i);\n // Let coordinate system to handle the NaN data.\n point = coordSys.dataToPoint(tmpIn, null, tmpOut);\n }\n if (useTypedArray) {\n points[offset++] = point[0];\n points[offset++] = point[1];\n } else {\n data.setItemLayout(i, point.slice());\n }\n }\n useTypedArray && data.setLayout('points', points);\n }\n };\n }\n };\n}\n;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { isFunction, isString } from 'zrender/lib/core/util.js';\nvar samplers = {\n average: function (frame) {\n var sum = 0;\n var count = 0;\n for (var i = 0; i < frame.length; i++) {\n if (!isNaN(frame[i])) {\n sum += frame[i];\n count++;\n }\n }\n // Return NaN if count is 0\n return count === 0 ? NaN : sum / count;\n },\n sum: function (frame) {\n var sum = 0;\n for (var i = 0; i < frame.length; i++) {\n // Ignore NaN\n sum += frame[i] || 0;\n }\n return sum;\n },\n max: function (frame) {\n var max = -Infinity;\n for (var i = 0; i < frame.length; i++) {\n frame[i] > max && (max = frame[i]);\n }\n // NaN will cause illegal axis extent.\n return isFinite(max) ? max : NaN;\n },\n min: function (frame) {\n var min = Infinity;\n for (var i = 0; i < frame.length; i++) {\n frame[i] < min && (min = frame[i]);\n }\n // NaN will cause illegal axis extent.\n return isFinite(min) ? min : NaN;\n },\n minmax: function (frame) {\n var turningPointAbsoluteValue = -Infinity;\n var turningPointOriginalValue = -Infinity;\n for (var i = 0; i < frame.length; i++) {\n var originalValue = frame[i];\n var absoluteValue = Math.abs(originalValue);\n if (absoluteValue > turningPointAbsoluteValue) {\n turningPointAbsoluteValue = absoluteValue;\n turningPointOriginalValue = originalValue;\n }\n }\n return isFinite(turningPointOriginalValue) ? turningPointOriginalValue : NaN;\n },\n // TODO\n // Median\n nearest: function (frame) {\n return frame[0];\n }\n};\nvar indexSampler = function (frame) {\n return Math.round(frame.length / 2);\n};\nexport default function dataSample(seriesType) {\n return {\n seriesType: seriesType,\n // FIXME:TS never used, so comment it\n // modifyOutputEnd: true,\n reset: function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n var sampling = seriesModel.get('sampling');\n var coordSys = seriesModel.coordinateSystem;\n var count = data.count();\n // Only cartesian2d support down sampling. Disable it when there is few data.\n if (count > 10 && coordSys.type === 'cartesian2d' && sampling) {\n var baseAxis = coordSys.getBaseAxis();\n var valueAxis = coordSys.getOtherAxis(baseAxis);\n var extent = baseAxis.getExtent();\n var dpr = api.getDevicePixelRatio();\n // Coordinste system has been resized\n var size = Math.abs(extent[1] - extent[0]) * (dpr || 1);\n var rate = Math.round(count / size);\n if (isFinite(rate) && rate > 1) {\n if (sampling === 'lttb') {\n seriesModel.setData(data.lttbDownSample(data.mapDimension(valueAxis.dim), 1 / rate));\n }\n var sampler = void 0;\n if (isString(sampling)) {\n sampler = samplers[sampling];\n } else if (isFunction(sampling)) {\n sampler = sampling;\n }\n if (sampler) {\n // Only support sample the first dim mapped from value axis.\n seriesModel.setData(data.downSample(data.mapDimension(valueAxis.dim), 1 / rate, sampler, indexSampler));\n }\n }\n }\n }\n };\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport LineSeries from './LineSeries.js';\nimport LineView from './LineView.js';\n// In case developer forget to include grid component\nimport layoutPoints from '../../layout/points.js';\nimport dataSample from '../../processor/dataSample.js';\nexport function install(registers) {\n registers.registerChartView(LineView);\n registers.registerSeriesModel(LineSeries);\n registers.registerLayout(layoutPoints('line', true));\n registers.registerVisual({\n seriesType: 'line',\n reset: function (seriesModel) {\n var data = seriesModel.getData();\n // Visual coding for legend\n var lineStyle = seriesModel.getModel('lineStyle').getLineStyle();\n if (lineStyle && !lineStyle.stroke) {\n // Fill in visual should be palette color if\n // has color callback\n lineStyle.stroke = data.getVisual('style').fill;\n }\n data.setVisual('legendLineStyle', lineStyle);\n }\n });\n // Down sample after filter\n registers.registerProcessor(registers.PRIORITY.PROCESSOR.STATISTIC, dataSample('line'));\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport SeriesModel from '../../model/Series.js';\nimport createSeriesData from '../helper/createSeriesData.js';\nimport { each } from 'zrender/lib/core/util.js';\nvar BaseBarSeriesModel = /** @class */function (_super) {\n __extends(BaseBarSeriesModel, _super);\n function BaseBarSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = BaseBarSeriesModel.type;\n return _this;\n }\n BaseBarSeriesModel.prototype.getInitialData = function (option, ecModel) {\n return createSeriesData(null, this, {\n useEncodeDefaulter: true\n });\n };\n BaseBarSeriesModel.prototype.getMarkerPosition = function (value, dims, startingAtTick) {\n var coordSys = this.coordinateSystem;\n if (coordSys && coordSys.clampData) {\n // PENDING if clamp ?\n var clampData_1 = coordSys.clampData(value);\n var pt_1 = coordSys.dataToPoint(clampData_1);\n if (startingAtTick) {\n each(coordSys.getAxes(), function (axis, idx) {\n // If axis type is category, use tick coords instead\n if (axis.type === 'category' && dims != null) {\n var tickCoords = axis.getTicksCoords();\n var alignTicksWithLabel = axis.getTickModel().get('alignWithLabel');\n var targetTickId = clampData_1[idx];\n // The index of rightmost tick of markArea is 1 larger than x1/y1 index\n var isEnd = dims[idx] === 'x1' || dims[idx] === 'y1';\n if (isEnd && !alignTicksWithLabel) {\n targetTickId += 1;\n }\n // The only contains one tick, tickCoords is\n // like [{coord: 0, tickValue: 0}, {coord: 0}]\n // to the length should always be larger than 1\n if (tickCoords.length < 2) {\n return;\n } else if (tickCoords.length === 2) {\n // The left value and right value of the axis are\n // the same. coord is 0 in both items. Use the max\n // value of the axis as the coord\n pt_1[idx] = axis.toGlobalCoord(axis.getExtent()[isEnd ? 1 : 0]);\n return;\n }\n var leftCoord = void 0;\n var coord = void 0;\n var stepTickValue = 1;\n for (var i = 0; i < tickCoords.length; i++) {\n var tickCoord = tickCoords[i].coord;\n // The last item of tickCoords doesn't contain\n // tickValue\n var tickValue = i === tickCoords.length - 1 ? tickCoords[i - 1].tickValue + stepTickValue : tickCoords[i].tickValue;\n if (tickValue === targetTickId) {\n coord = tickCoord;\n break;\n } else if (tickValue < targetTickId) {\n leftCoord = tickCoord;\n } else if (leftCoord != null && tickValue > targetTickId) {\n coord = (tickCoord + leftCoord) / 2;\n break;\n }\n if (i === 1) {\n // Here we assume the step of category axes is\n // the same\n stepTickValue = tickValue - tickCoords[0].tickValue;\n }\n }\n if (coord == null) {\n if (!leftCoord) {\n // targetTickId is smaller than all tick ids in the\n // visible area, use the leftmost tick coord\n coord = tickCoords[0].coord;\n } else if (leftCoord) {\n // targetTickId is larger than all tick ids in the\n // visible area, use the rightmost tick coord\n coord = tickCoords[tickCoords.length - 1].coord;\n }\n }\n pt_1[idx] = axis.toGlobalCoord(coord);\n }\n });\n } else {\n var data = this.getData();\n var offset = data.getLayout('offset');\n var size = data.getLayout('size');\n var offsetIndex = coordSys.getBaseAxis().isHorizontal() ? 0 : 1;\n pt_1[offsetIndex] += offset + size / 2;\n }\n return pt_1;\n }\n return [NaN, NaN];\n };\n BaseBarSeriesModel.type = 'series.__base_bar__';\n BaseBarSeriesModel.defaultOption = {\n // zlevel: 0,\n z: 2,\n coordinateSystem: 'cartesian2d',\n legendHoverLink: true,\n // stack: null\n // Cartesian coordinate system\n // xAxisIndex: 0,\n // yAxisIndex: 0,\n barMinHeight: 0,\n barMinAngle: 0,\n // cursor: null,\n large: false,\n largeThreshold: 400,\n progressive: 3e3,\n progressiveChunkMode: 'mod'\n };\n return BaseBarSeriesModel;\n}(SeriesModel);\nSeriesModel.registerClass(BaseBarSeriesModel);\nexport default BaseBarSeriesModel;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport BaseBarSeriesModel from './BaseBarSeries.js';\nimport createSeriesData from '../helper/createSeriesData.js';\nimport { inheritDefaultOption } from '../../util/component.js';\nvar BarSeriesModel = /** @class */function (_super) {\n __extends(BarSeriesModel, _super);\n function BarSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = BarSeriesModel.type;\n return _this;\n }\n BarSeriesModel.prototype.getInitialData = function () {\n return createSeriesData(null, this, {\n useEncodeDefaulter: true,\n createInvertedIndices: !!this.get('realtimeSort', true) || null\n });\n };\n /**\n * @override\n */\n BarSeriesModel.prototype.getProgressive = function () {\n // Do not support progressive in normal mode.\n return this.get('large') ? this.get('progressive') : false;\n };\n /**\n * @override\n */\n BarSeriesModel.prototype.getProgressiveThreshold = function () {\n // Do not support progressive in normal mode.\n var progressiveThreshold = this.get('progressiveThreshold');\n var largeThreshold = this.get('largeThreshold');\n if (largeThreshold > progressiveThreshold) {\n progressiveThreshold = largeThreshold;\n }\n return progressiveThreshold;\n };\n BarSeriesModel.prototype.brushSelector = function (dataIndex, data, selectors) {\n return selectors.rect(data.getItemLayout(dataIndex));\n };\n BarSeriesModel.type = 'series.bar';\n BarSeriesModel.dependencies = ['grid', 'polar'];\n BarSeriesModel.defaultOption = inheritDefaultOption(BaseBarSeriesModel.defaultOption, {\n // If clipped\n // Only available on cartesian2d\n clip: true,\n roundCap: false,\n showBackground: false,\n backgroundStyle: {\n color: 'rgba(180, 180, 180, 0.2)',\n borderColor: null,\n borderWidth: 0,\n borderType: 'solid',\n borderRadius: 0,\n shadowBlur: 0,\n shadowColor: null,\n shadowOffsetX: 0,\n shadowOffsetY: 0,\n opacity: 1\n },\n select: {\n itemStyle: {\n borderColor: '#212121'\n }\n },\n realtimeSort: false\n });\n return BarSeriesModel;\n}(BaseBarSeriesModel);\nexport default BarSeriesModel;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport { Path } from '../graphic.js';\n/**\n * Sausage: similar to sector, but have half circle on both sides\n */\nvar SausageShape = /** @class */function () {\n function SausageShape() {\n this.cx = 0;\n this.cy = 0;\n this.r0 = 0;\n this.r = 0;\n this.startAngle = 0;\n this.endAngle = Math.PI * 2;\n this.clockwise = true;\n }\n return SausageShape;\n}();\nvar SausagePath = /** @class */function (_super) {\n __extends(SausagePath, _super);\n function SausagePath(opts) {\n var _this = _super.call(this, opts) || this;\n _this.type = 'sausage';\n return _this;\n }\n SausagePath.prototype.getDefaultShape = function () {\n return new SausageShape();\n };\n SausagePath.prototype.buildPath = function (ctx, shape) {\n var cx = shape.cx;\n var cy = shape.cy;\n var r0 = Math.max(shape.r0 || 0, 0);\n var r = Math.max(shape.r, 0);\n var dr = (r - r0) * 0.5;\n var rCenter = r0 + dr;\n var startAngle = shape.startAngle;\n var endAngle = shape.endAngle;\n var clockwise = shape.clockwise;\n var PI2 = Math.PI * 2;\n var lessThanCircle = clockwise ? endAngle - startAngle < PI2 : startAngle - endAngle < PI2;\n if (!lessThanCircle) {\n // Normalize angles\n startAngle = endAngle - (clockwise ? PI2 : -PI2);\n }\n var unitStartX = Math.cos(startAngle);\n var unitStartY = Math.sin(startAngle);\n var unitEndX = Math.cos(endAngle);\n var unitEndY = Math.sin(endAngle);\n if (lessThanCircle) {\n ctx.moveTo(unitStartX * r0 + cx, unitStartY * r0 + cy);\n ctx.arc(unitStartX * rCenter + cx, unitStartY * rCenter + cy, dr, -Math.PI + startAngle, startAngle, !clockwise);\n } else {\n ctx.moveTo(unitStartX * r + cx, unitStartY * r + cy);\n }\n ctx.arc(cx, cy, r, startAngle, endAngle, !clockwise);\n ctx.arc(unitEndX * rCenter + cx, unitEndY * rCenter + cy, dr, endAngle - Math.PI * 2, endAngle - Math.PI, !clockwise);\n if (r0 !== 0) {\n ctx.arc(cx, cy, r0, endAngle, startAngle, clockwise);\n }\n // ctx.closePath();\n };\n return SausagePath;\n}(Path);\nexport default SausagePath;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { calculateTextPosition } from 'zrender/lib/contain/text.js';\nimport { isArray, isNumber } from 'zrender/lib/core/util.js';\nexport function createSectorCalculateTextPosition(positionMapping, opts) {\n opts = opts || {};\n var isRoundCap = opts.isRoundCap;\n return function (out, opts, boundingRect) {\n var textPosition = opts.position;\n if (!textPosition || textPosition instanceof Array) {\n return calculateTextPosition(out, opts, boundingRect);\n }\n var mappedSectorPosition = positionMapping(textPosition);\n var distance = opts.distance != null ? opts.distance : 5;\n var sector = this.shape;\n var cx = sector.cx;\n var cy = sector.cy;\n var r = sector.r;\n var r0 = sector.r0;\n var middleR = (r + r0) / 2;\n var startAngle = sector.startAngle;\n var endAngle = sector.endAngle;\n var middleAngle = (startAngle + endAngle) / 2;\n var extraDist = isRoundCap ? Math.abs(r - r0) / 2 : 0;\n var mathCos = Math.cos;\n var mathSin = Math.sin;\n // base position: top-left\n var x = cx + r * mathCos(startAngle);\n var y = cy + r * mathSin(startAngle);\n var textAlign = 'left';\n var textVerticalAlign = 'top';\n switch (mappedSectorPosition) {\n case 'startArc':\n x = cx + (r0 - distance) * mathCos(middleAngle);\n y = cy + (r0 - distance) * mathSin(middleAngle);\n textAlign = 'center';\n textVerticalAlign = 'top';\n break;\n case 'insideStartArc':\n x = cx + (r0 + distance) * mathCos(middleAngle);\n y = cy + (r0 + distance) * mathSin(middleAngle);\n textAlign = 'center';\n textVerticalAlign = 'bottom';\n break;\n case 'startAngle':\n x = cx + middleR * mathCos(startAngle) + adjustAngleDistanceX(startAngle, distance + extraDist, false);\n y = cy + middleR * mathSin(startAngle) + adjustAngleDistanceY(startAngle, distance + extraDist, false);\n textAlign = 'right';\n textVerticalAlign = 'middle';\n break;\n case 'insideStartAngle':\n x = cx + middleR * mathCos(startAngle) + adjustAngleDistanceX(startAngle, -distance + extraDist, false);\n y = cy + middleR * mathSin(startAngle) + adjustAngleDistanceY(startAngle, -distance + extraDist, false);\n textAlign = 'left';\n textVerticalAlign = 'middle';\n break;\n case 'middle':\n x = cx + middleR * mathCos(middleAngle);\n y = cy + middleR * mathSin(middleAngle);\n textAlign = 'center';\n textVerticalAlign = 'middle';\n break;\n case 'endArc':\n x = cx + (r + distance) * mathCos(middleAngle);\n y = cy + (r + distance) * mathSin(middleAngle);\n textAlign = 'center';\n textVerticalAlign = 'bottom';\n break;\n case 'insideEndArc':\n x = cx + (r - distance) * mathCos(middleAngle);\n y = cy + (r - distance) * mathSin(middleAngle);\n textAlign = 'center';\n textVerticalAlign = 'top';\n break;\n case 'endAngle':\n x = cx + middleR * mathCos(endAngle) + adjustAngleDistanceX(endAngle, distance + extraDist, true);\n y = cy + middleR * mathSin(endAngle) + adjustAngleDistanceY(endAngle, distance + extraDist, true);\n textAlign = 'left';\n textVerticalAlign = 'middle';\n break;\n case 'insideEndAngle':\n x = cx + middleR * mathCos(endAngle) + adjustAngleDistanceX(endAngle, -distance + extraDist, true);\n y = cy + middleR * mathSin(endAngle) + adjustAngleDistanceY(endAngle, -distance + extraDist, true);\n textAlign = 'right';\n textVerticalAlign = 'middle';\n break;\n default:\n return calculateTextPosition(out, opts, boundingRect);\n }\n out = out || {};\n out.x = x;\n out.y = y;\n out.align = textAlign;\n out.verticalAlign = textVerticalAlign;\n return out;\n };\n}\nexport function setSectorTextRotation(sector, textPosition, positionMapping, rotateType) {\n if (isNumber(rotateType)) {\n // user-set rotation\n sector.setTextConfig({\n rotation: rotateType\n });\n return;\n } else if (isArray(textPosition)) {\n // user-set position, use 0 as auto rotation\n sector.setTextConfig({\n rotation: 0\n });\n return;\n }\n var shape = sector.shape;\n var startAngle = shape.clockwise ? shape.startAngle : shape.endAngle;\n var endAngle = shape.clockwise ? shape.endAngle : shape.startAngle;\n var middleAngle = (startAngle + endAngle) / 2;\n var anchorAngle;\n var mappedSectorPosition = positionMapping(textPosition);\n switch (mappedSectorPosition) {\n case 'startArc':\n case 'insideStartArc':\n case 'middle':\n case 'insideEndArc':\n case 'endArc':\n anchorAngle = middleAngle;\n break;\n case 'startAngle':\n case 'insideStartAngle':\n anchorAngle = startAngle;\n break;\n case 'endAngle':\n case 'insideEndAngle':\n anchorAngle = endAngle;\n break;\n default:\n sector.setTextConfig({\n rotation: 0\n });\n return;\n }\n var rotate = Math.PI * 1.5 - anchorAngle;\n /**\n * TODO: labels with rotate > Math.PI / 2 should be rotate another\n * half round flipped to increase readability. However, only middle\n * position supports this for now, because in other positions, the\n * anchor point is not at the center of the text, so the positions\n * after rotating is not as expected.\n */\n if (mappedSectorPosition === 'middle' && rotate > Math.PI / 2 && rotate < Math.PI * 1.5) {\n rotate -= Math.PI;\n }\n sector.setTextConfig({\n rotation: rotate\n });\n}\nfunction adjustAngleDistanceX(angle, distance, isEnd) {\n return distance * Math.sin(angle) * (isEnd ? -1 : 1);\n}\nfunction adjustAngleDistanceY(angle, distance, isEnd) {\n return distance * Math.cos(angle) * (isEnd ? 1 : -1);\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { isArray, map } from 'zrender/lib/core/util.js';\nimport { parsePercent } from 'zrender/lib/contain/text.js';\nexport function getSectorCornerRadius(model, shape, zeroIfNull) {\n var cornerRadius = model.get('borderRadius');\n if (cornerRadius == null) {\n return zeroIfNull ? {\n cornerRadius: 0\n } : null;\n }\n if (!isArray(cornerRadius)) {\n cornerRadius = [cornerRadius, cornerRadius, cornerRadius, cornerRadius];\n }\n var dr = Math.abs(shape.r || 0 - shape.r0 || 0);\n return {\n cornerRadius: map(cornerRadius, function (cr) {\n return parsePercent(cr, dr);\n })\n };\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport Path from 'zrender/lib/graphic/Path.js';\nimport Group from 'zrender/lib/graphic/Group.js';\nimport { extend, each, map } from 'zrender/lib/core/util.js';\nimport { Rect, Sector, updateProps, initProps, removeElementWithFadeOut, traverseElements } from '../../util/graphic.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { setStatesStylesFromModel, toggleHoverEmphasis } from '../../util/states.js';\nimport { setLabelStyle, getLabelStatesModels, setLabelValueAnimation, labelInner } from '../../label/labelStyle.js';\nimport { throttle } from '../../util/throttle.js';\nimport { createClipPath } from '../helper/createClipPathFromCoordSys.js';\nimport Sausage from '../../util/shape/sausage.js';\nimport ChartView from '../../view/Chart.js';\nimport { isCoordinateSystemType } from '../../coord/CoordinateSystem.js';\nimport { getDefaultLabel, getDefaultInterpolatedLabel } from '../helper/labelHelper.js';\nimport { warn } from '../../util/log.js';\nimport { createSectorCalculateTextPosition, setSectorTextRotation } from '../../label/sectorLabel.js';\nimport { saveOldStyle } from '../../animation/basicTransition.js';\nimport { getSectorCornerRadius } from '../helper/sectorHelper.js';\nvar mathMax = Math.max;\nvar mathMin = Math.min;\nfunction getClipArea(coord, data) {\n var coordSysClipArea = coord.getArea && coord.getArea();\n if (isCoordinateSystemType(coord, 'cartesian2d')) {\n var baseAxis = coord.getBaseAxis();\n // When boundaryGap is false or using time axis. bar may exceed the grid.\n // We should not clip this part.\n // See test/bar2.html\n if (baseAxis.type !== 'category' || !baseAxis.onBand) {\n var expandWidth = data.getLayout('bandWidth');\n if (baseAxis.isHorizontal()) {\n coordSysClipArea.x -= expandWidth;\n coordSysClipArea.width += expandWidth * 2;\n } else {\n coordSysClipArea.y -= expandWidth;\n coordSysClipArea.height += expandWidth * 2;\n }\n }\n }\n return coordSysClipArea;\n}\nvar BarView = /** @class */function (_super) {\n __extends(BarView, _super);\n function BarView() {\n var _this = _super.call(this) || this;\n _this.type = BarView.type;\n _this._isFirstFrame = true;\n return _this;\n }\n BarView.prototype.render = function (seriesModel, ecModel, api, payload) {\n this._model = seriesModel;\n this._removeOnRenderedListener(api);\n this._updateDrawMode(seriesModel);\n var coordinateSystemType = seriesModel.get('coordinateSystem');\n if (coordinateSystemType === 'cartesian2d' || coordinateSystemType === 'polar') {\n // Clear previously rendered progressive elements.\n this._progressiveEls = null;\n this._isLargeDraw ? this._renderLarge(seriesModel, ecModel, api) : this._renderNormal(seriesModel, ecModel, api, payload);\n } else if (process.env.NODE_ENV !== 'production') {\n warn('Only cartesian2d and polar supported for bar.');\n }\n };\n BarView.prototype.incrementalPrepareRender = function (seriesModel) {\n this._clear();\n this._updateDrawMode(seriesModel);\n // incremental also need to clip, otherwise might be overlow.\n // But must not set clip in each frame, otherwise all of the children will be marked redraw.\n this._updateLargeClip(seriesModel);\n };\n BarView.prototype.incrementalRender = function (params, seriesModel) {\n // Reset\n this._progressiveEls = [];\n // Do not support progressive in normal mode.\n this._incrementalRenderLarge(params, seriesModel);\n };\n BarView.prototype.eachRendered = function (cb) {\n traverseElements(this._progressiveEls || this.group, cb);\n };\n BarView.prototype._updateDrawMode = function (seriesModel) {\n var isLargeDraw = seriesModel.pipelineContext.large;\n if (this._isLargeDraw == null || isLargeDraw !== this._isLargeDraw) {\n this._isLargeDraw = isLargeDraw;\n this._clear();\n }\n };\n BarView.prototype._renderNormal = function (seriesModel, ecModel, api, payload) {\n var group = this.group;\n var data = seriesModel.getData();\n var oldData = this._data;\n var coord = seriesModel.coordinateSystem;\n var baseAxis = coord.getBaseAxis();\n var isHorizontalOrRadial;\n if (coord.type === 'cartesian2d') {\n isHorizontalOrRadial = baseAxis.isHorizontal();\n } else if (coord.type === 'polar') {\n isHorizontalOrRadial = baseAxis.dim === 'angle';\n }\n var animationModel = seriesModel.isAnimationEnabled() ? seriesModel : null;\n var realtimeSortCfg = shouldRealtimeSort(seriesModel, coord);\n if (realtimeSortCfg) {\n this._enableRealtimeSort(realtimeSortCfg, data, api);\n }\n var needsClip = seriesModel.get('clip', true) || realtimeSortCfg;\n var coordSysClipArea = getClipArea(coord, data);\n // If there is clipPath created in large mode. Remove it.\n group.removeClipPath();\n // We don't use clipPath in normal mode because we needs a perfect animation\n // And don't want the label are clipped.\n var roundCap = seriesModel.get('roundCap', true);\n var drawBackground = seriesModel.get('showBackground', true);\n var backgroundModel = seriesModel.getModel('backgroundStyle');\n var barBorderRadius = backgroundModel.get('borderRadius') || 0;\n var bgEls = [];\n var oldBgEls = this._backgroundEls;\n var isInitSort = payload && payload.isInitSort;\n var isChangeOrder = payload && payload.type === 'changeAxisOrder';\n function createBackground(dataIndex) {\n var bgLayout = getLayout[coord.type](data, dataIndex);\n var bgEl = createBackgroundEl(coord, isHorizontalOrRadial, bgLayout);\n bgEl.useStyle(backgroundModel.getItemStyle());\n // Only cartesian2d support borderRadius.\n if (coord.type === 'cartesian2d') {\n bgEl.setShape('r', barBorderRadius);\n } else {\n bgEl.setShape('cornerRadius', barBorderRadius);\n }\n bgEls[dataIndex] = bgEl;\n return bgEl;\n }\n ;\n data.diff(oldData).add(function (dataIndex) {\n var itemModel = data.getItemModel(dataIndex);\n var layout = getLayout[coord.type](data, dataIndex, itemModel);\n if (drawBackground) {\n createBackground(dataIndex);\n }\n // If dataZoom in filteMode: 'empty', the baseValue can be set as NaN in \"axisProxy\".\n if (!data.hasValue(dataIndex) || !isValidLayout[coord.type](layout)) {\n return;\n }\n var isClipped = false;\n if (needsClip) {\n // Clip will modify the layout params.\n // And return a boolean to determine if the shape are fully clipped.\n isClipped = clip[coord.type](coordSysClipArea, layout);\n }\n var el = elementCreator[coord.type](seriesModel, data, dataIndex, layout, isHorizontalOrRadial, animationModel, baseAxis.model, false, roundCap);\n if (realtimeSortCfg) {\n /**\n * Force label animation because even if the element is\n * ignored because it's clipped, it may not be clipped after\n * changing order. Then, if not using forceLabelAnimation,\n * the label animation was never started, in which case,\n * the label will be the final value and doesn't have label\n * animation.\n */\n el.forceLabelAnimation = true;\n }\n updateStyle(el, data, dataIndex, itemModel, layout, seriesModel, isHorizontalOrRadial, coord.type === 'polar');\n if (isInitSort) {\n el.attr({\n shape: layout\n });\n } else if (realtimeSortCfg) {\n updateRealtimeAnimation(realtimeSortCfg, animationModel, el, layout, dataIndex, isHorizontalOrRadial, false, false);\n } else {\n initProps(el, {\n shape: layout\n }, seriesModel, dataIndex);\n }\n data.setItemGraphicEl(dataIndex, el);\n group.add(el);\n el.ignore = isClipped;\n }).update(function (newIndex, oldIndex) {\n var itemModel = data.getItemModel(newIndex);\n var layout = getLayout[coord.type](data, newIndex, itemModel);\n if (drawBackground) {\n var bgEl = void 0;\n if (oldBgEls.length === 0) {\n bgEl = createBackground(oldIndex);\n } else {\n bgEl = oldBgEls[oldIndex];\n bgEl.useStyle(backgroundModel.getItemStyle());\n // Only cartesian2d support borderRadius.\n if (coord.type === 'cartesian2d') {\n bgEl.setShape('r', barBorderRadius);\n } else {\n bgEl.setShape('cornerRadius', barBorderRadius);\n }\n bgEls[newIndex] = bgEl;\n }\n var bgLayout = getLayout[coord.type](data, newIndex);\n var shape = createBackgroundShape(isHorizontalOrRadial, bgLayout, coord);\n updateProps(bgEl, {\n shape: shape\n }, animationModel, newIndex);\n }\n var el = oldData.getItemGraphicEl(oldIndex);\n if (!data.hasValue(newIndex) || !isValidLayout[coord.type](layout)) {\n group.remove(el);\n return;\n }\n var isClipped = false;\n if (needsClip) {\n isClipped = clip[coord.type](coordSysClipArea, layout);\n if (isClipped) {\n group.remove(el);\n }\n }\n if (!el) {\n el = elementCreator[coord.type](seriesModel, data, newIndex, layout, isHorizontalOrRadial, animationModel, baseAxis.model, !!el, roundCap);\n } else {\n saveOldStyle(el);\n }\n if (realtimeSortCfg) {\n el.forceLabelAnimation = true;\n }\n if (isChangeOrder) {\n var textEl = el.getTextContent();\n if (textEl) {\n var labelInnerStore = labelInner(textEl);\n if (labelInnerStore.prevValue != null) {\n /**\n * Set preValue to be value so that no new label\n * should be started, otherwise, it will take a full\n * `animationDurationUpdate` time to finish the\n * animation, which is not expected.\n */\n labelInnerStore.prevValue = labelInnerStore.value;\n }\n }\n }\n // Not change anything if only order changed.\n // Especially not change label.\n else {\n updateStyle(el, data, newIndex, itemModel, layout, seriesModel, isHorizontalOrRadial, coord.type === 'polar');\n }\n if (isInitSort) {\n el.attr({\n shape: layout\n });\n } else if (realtimeSortCfg) {\n updateRealtimeAnimation(realtimeSortCfg, animationModel, el, layout, newIndex, isHorizontalOrRadial, true, isChangeOrder);\n } else {\n updateProps(el, {\n shape: layout\n }, seriesModel, newIndex, null);\n }\n data.setItemGraphicEl(newIndex, el);\n el.ignore = isClipped;\n group.add(el);\n }).remove(function (dataIndex) {\n var el = oldData.getItemGraphicEl(dataIndex);\n el && removeElementWithFadeOut(el, seriesModel, dataIndex);\n }).execute();\n var bgGroup = this._backgroundGroup || (this._backgroundGroup = new Group());\n bgGroup.removeAll();\n for (var i = 0; i < bgEls.length; ++i) {\n bgGroup.add(bgEls[i]);\n }\n group.add(bgGroup);\n this._backgroundEls = bgEls;\n this._data = data;\n };\n BarView.prototype._renderLarge = function (seriesModel, ecModel, api) {\n this._clear();\n createLarge(seriesModel, this.group);\n this._updateLargeClip(seriesModel);\n };\n BarView.prototype._incrementalRenderLarge = function (params, seriesModel) {\n this._removeBackground();\n createLarge(seriesModel, this.group, this._progressiveEls, true);\n };\n BarView.prototype._updateLargeClip = function (seriesModel) {\n // Use clipPath in large mode.\n var clipPath = seriesModel.get('clip', true) && createClipPath(seriesModel.coordinateSystem, false, seriesModel);\n var group = this.group;\n if (clipPath) {\n group.setClipPath(clipPath);\n } else {\n group.removeClipPath();\n }\n };\n BarView.prototype._enableRealtimeSort = function (realtimeSortCfg, data, api) {\n var _this = this;\n // If no data in the first frame, wait for data to initSort\n if (!data.count()) {\n return;\n }\n var baseAxis = realtimeSortCfg.baseAxis;\n if (this._isFirstFrame) {\n this._dispatchInitSort(data, realtimeSortCfg, api);\n this._isFirstFrame = false;\n } else {\n var orderMapping_1 = function (idx) {\n var el = data.getItemGraphicEl(idx);\n var shape = el && el.shape;\n return shape &&\n // The result should be consistent with the initial sort by data value.\n // Do not support the case that both positive and negative exist.\n Math.abs(baseAxis.isHorizontal() ? shape.height : shape.width)\n // If data is NaN, shape.xxx may be NaN, so use || 0 here in case\n || 0;\n };\n this._onRendered = function () {\n _this._updateSortWithinSameData(data, orderMapping_1, baseAxis, api);\n };\n api.getZr().on('rendered', this._onRendered);\n }\n };\n BarView.prototype._dataSort = function (data, baseAxis, orderMapping) {\n var info = [];\n data.each(data.mapDimension(baseAxis.dim), function (ordinalNumber, dataIdx) {\n var mappedValue = orderMapping(dataIdx);\n mappedValue = mappedValue == null ? NaN : mappedValue;\n info.push({\n dataIndex: dataIdx,\n mappedValue: mappedValue,\n ordinalNumber: ordinalNumber\n });\n });\n info.sort(function (a, b) {\n // If NaN, it will be treated as min val.\n return b.mappedValue - a.mappedValue;\n });\n return {\n ordinalNumbers: map(info, function (item) {\n return item.ordinalNumber;\n })\n };\n };\n BarView.prototype._isOrderChangedWithinSameData = function (data, orderMapping, baseAxis) {\n var scale = baseAxis.scale;\n var ordinalDataDim = data.mapDimension(baseAxis.dim);\n var lastValue = Number.MAX_VALUE;\n for (var tickNum = 0, len = scale.getOrdinalMeta().categories.length; tickNum < len; ++tickNum) {\n var rawIdx = data.rawIndexOf(ordinalDataDim, scale.getRawOrdinalNumber(tickNum));\n var value = rawIdx < 0\n // If some tick have no bar, the tick will be treated as min.\n ? Number.MIN_VALUE\n // PENDING: if dataZoom on baseAxis exits, is it a performance issue?\n : orderMapping(data.indexOfRawIndex(rawIdx));\n if (value > lastValue) {\n return true;\n }\n lastValue = value;\n }\n return false;\n };\n /*\n * Consider the case when A and B changed order, whose representing\n * bars are both out of sight, we don't wish to trigger reorder action\n * as long as the order in the view doesn't change.\n */\n BarView.prototype._isOrderDifferentInView = function (orderInfo, baseAxis) {\n var scale = baseAxis.scale;\n var extent = scale.getExtent();\n var tickNum = Math.max(0, extent[0]);\n var tickMax = Math.min(extent[1], scale.getOrdinalMeta().categories.length - 1);\n for (; tickNum <= tickMax; ++tickNum) {\n if (orderInfo.ordinalNumbers[tickNum] !== scale.getRawOrdinalNumber(tickNum)) {\n return true;\n }\n }\n };\n BarView.prototype._updateSortWithinSameData = function (data, orderMapping, baseAxis, api) {\n if (!this._isOrderChangedWithinSameData(data, orderMapping, baseAxis)) {\n return;\n }\n var sortInfo = this._dataSort(data, baseAxis, orderMapping);\n if (this._isOrderDifferentInView(sortInfo, baseAxis)) {\n this._removeOnRenderedListener(api);\n api.dispatchAction({\n type: 'changeAxisOrder',\n componentType: baseAxis.dim + 'Axis',\n axisId: baseAxis.index,\n sortInfo: sortInfo\n });\n }\n };\n BarView.prototype._dispatchInitSort = function (data, realtimeSortCfg, api) {\n var baseAxis = realtimeSortCfg.baseAxis;\n var sortResult = this._dataSort(data, baseAxis, function (dataIdx) {\n return data.get(data.mapDimension(realtimeSortCfg.otherAxis.dim), dataIdx);\n });\n api.dispatchAction({\n type: 'changeAxisOrder',\n componentType: baseAxis.dim + 'Axis',\n isInitSort: true,\n axisId: baseAxis.index,\n sortInfo: sortResult\n });\n };\n BarView.prototype.remove = function (ecModel, api) {\n this._clear(this._model);\n this._removeOnRenderedListener(api);\n };\n BarView.prototype.dispose = function (ecModel, api) {\n this._removeOnRenderedListener(api);\n };\n BarView.prototype._removeOnRenderedListener = function (api) {\n if (this._onRendered) {\n api.getZr().off('rendered', this._onRendered);\n this._onRendered = null;\n }\n };\n BarView.prototype._clear = function (model) {\n var group = this.group;\n var data = this._data;\n if (model && model.isAnimationEnabled() && data && !this._isLargeDraw) {\n this._removeBackground();\n this._backgroundEls = [];\n data.eachItemGraphicEl(function (el) {\n removeElementWithFadeOut(el, model, getECData(el).dataIndex);\n });\n } else {\n group.removeAll();\n }\n this._data = null;\n this._isFirstFrame = true;\n };\n BarView.prototype._removeBackground = function () {\n this.group.remove(this._backgroundGroup);\n this._backgroundGroup = null;\n };\n BarView.type = 'bar';\n return BarView;\n}(ChartView);\nvar clip = {\n cartesian2d: function (coordSysBoundingRect, layout) {\n var signWidth = layout.width < 0 ? -1 : 1;\n var signHeight = layout.height < 0 ? -1 : 1;\n // Needs positive width and height\n if (signWidth < 0) {\n layout.x += layout.width;\n layout.width = -layout.width;\n }\n if (signHeight < 0) {\n layout.y += layout.height;\n layout.height = -layout.height;\n }\n var coordSysX2 = coordSysBoundingRect.x + coordSysBoundingRect.width;\n var coordSysY2 = coordSysBoundingRect.y + coordSysBoundingRect.height;\n var x = mathMax(layout.x, coordSysBoundingRect.x);\n var x2 = mathMin(layout.x + layout.width, coordSysX2);\n var y = mathMax(layout.y, coordSysBoundingRect.y);\n var y2 = mathMin(layout.y + layout.height, coordSysY2);\n var xClipped = x2 < x;\n var yClipped = y2 < y;\n // When xClipped or yClipped, the element will be marked as `ignore`.\n // But we should also place the element at the edge of the coord sys bounding rect.\n // Because if data changed and the bar shows again, its transition animation\n // will begin at this place.\n layout.x = xClipped && x > coordSysX2 ? x2 : x;\n layout.y = yClipped && y > coordSysY2 ? y2 : y;\n layout.width = xClipped ? 0 : x2 - x;\n layout.height = yClipped ? 0 : y2 - y;\n // Reverse back\n if (signWidth < 0) {\n layout.x += layout.width;\n layout.width = -layout.width;\n }\n if (signHeight < 0) {\n layout.y += layout.height;\n layout.height = -layout.height;\n }\n return xClipped || yClipped;\n },\n polar: function (coordSysClipArea, layout) {\n var signR = layout.r0 <= layout.r ? 1 : -1;\n // Make sure r is larger than r0\n if (signR < 0) {\n var tmp = layout.r;\n layout.r = layout.r0;\n layout.r0 = tmp;\n }\n var r = mathMin(layout.r, coordSysClipArea.r);\n var r0 = mathMax(layout.r0, coordSysClipArea.r0);\n layout.r = r;\n layout.r0 = r0;\n var clipped = r - r0 < 0;\n // Reverse back\n if (signR < 0) {\n var tmp = layout.r;\n layout.r = layout.r0;\n layout.r0 = tmp;\n }\n return clipped;\n }\n};\nvar elementCreator = {\n cartesian2d: function (seriesModel, data, newIndex, layout, isHorizontal, animationModel, axisModel, isUpdate, roundCap) {\n var rect = new Rect({\n shape: extend({}, layout),\n z2: 1\n });\n rect.__dataIndex = newIndex;\n rect.name = 'item';\n if (animationModel) {\n var rectShape = rect.shape;\n var animateProperty = isHorizontal ? 'height' : 'width';\n rectShape[animateProperty] = 0;\n }\n return rect;\n },\n polar: function (seriesModel, data, newIndex, layout, isRadial, animationModel, axisModel, isUpdate, roundCap) {\n var ShapeClass = !isRadial && roundCap ? Sausage : Sector;\n var sector = new ShapeClass({\n shape: layout,\n z2: 1\n });\n sector.name = 'item';\n var positionMap = createPolarPositionMapping(isRadial);\n sector.calculateTextPosition = createSectorCalculateTextPosition(positionMap, {\n isRoundCap: ShapeClass === Sausage\n });\n // Animation\n if (animationModel) {\n var sectorShape = sector.shape;\n var animateProperty = isRadial ? 'r' : 'endAngle';\n var animateTarget = {};\n sectorShape[animateProperty] = isRadial ? layout.r0 : layout.startAngle;\n animateTarget[animateProperty] = layout[animateProperty];\n (isUpdate ? updateProps : initProps)(sector, {\n shape: animateTarget\n // __value: typeof dataValue === 'string' ? parseInt(dataValue, 10) : dataValue\n }, animationModel);\n }\n return sector;\n }\n};\nfunction shouldRealtimeSort(seriesModel, coordSys) {\n var realtimeSortOption = seriesModel.get('realtimeSort', true);\n var baseAxis = coordSys.getBaseAxis();\n if (process.env.NODE_ENV !== 'production') {\n if (realtimeSortOption) {\n if (baseAxis.type !== 'category') {\n warn('`realtimeSort` will not work because this bar series is not based on a category axis.');\n }\n if (coordSys.type !== 'cartesian2d') {\n warn('`realtimeSort` will not work because this bar series is not on cartesian2d.');\n }\n }\n }\n if (realtimeSortOption && baseAxis.type === 'category' && coordSys.type === 'cartesian2d') {\n return {\n baseAxis: baseAxis,\n otherAxis: coordSys.getOtherAxis(baseAxis)\n };\n }\n}\nfunction updateRealtimeAnimation(realtimeSortCfg, seriesAnimationModel, el, layout, newIndex, isHorizontal, isUpdate, isChangeOrder) {\n var seriesTarget;\n var axisTarget;\n if (isHorizontal) {\n axisTarget = {\n x: layout.x,\n width: layout.width\n };\n seriesTarget = {\n y: layout.y,\n height: layout.height\n };\n } else {\n axisTarget = {\n y: layout.y,\n height: layout.height\n };\n seriesTarget = {\n x: layout.x,\n width: layout.width\n };\n }\n if (!isChangeOrder) {\n // Keep the original growth animation if only axis order changed.\n // Not start a new animation.\n (isUpdate ? updateProps : initProps)(el, {\n shape: seriesTarget\n }, seriesAnimationModel, newIndex, null);\n }\n var axisAnimationModel = seriesAnimationModel ? realtimeSortCfg.baseAxis.model : null;\n (isUpdate ? updateProps : initProps)(el, {\n shape: axisTarget\n }, axisAnimationModel, newIndex);\n}\nfunction checkPropertiesNotValid(obj, props) {\n for (var i = 0; i < props.length; i++) {\n if (!isFinite(obj[props[i]])) {\n return true;\n }\n }\n return false;\n}\nvar rectPropties = ['x', 'y', 'width', 'height'];\nvar polarPropties = ['cx', 'cy', 'r', 'startAngle', 'endAngle'];\nvar isValidLayout = {\n cartesian2d: function (layout) {\n return !checkPropertiesNotValid(layout, rectPropties);\n },\n polar: function (layout) {\n return !checkPropertiesNotValid(layout, polarPropties);\n }\n};\nvar getLayout = {\n // itemModel is only used to get borderWidth, which is not needed\n // when calculating bar background layout.\n cartesian2d: function (data, dataIndex, itemModel) {\n var layout = data.getItemLayout(dataIndex);\n var fixedLineWidth = itemModel ? getLineWidth(itemModel, layout) : 0;\n // fix layout with lineWidth\n var signX = layout.width > 0 ? 1 : -1;\n var signY = layout.height > 0 ? 1 : -1;\n return {\n x: layout.x + signX * fixedLineWidth / 2,\n y: layout.y + signY * fixedLineWidth / 2,\n width: layout.width - signX * fixedLineWidth,\n height: layout.height - signY * fixedLineWidth\n };\n },\n polar: function (data, dataIndex, itemModel) {\n var layout = data.getItemLayout(dataIndex);\n return {\n cx: layout.cx,\n cy: layout.cy,\n r0: layout.r0,\n r: layout.r,\n startAngle: layout.startAngle,\n endAngle: layout.endAngle,\n clockwise: layout.clockwise\n };\n }\n};\nfunction isZeroOnPolar(layout) {\n return layout.startAngle != null && layout.endAngle != null && layout.startAngle === layout.endAngle;\n}\nfunction createPolarPositionMapping(isRadial) {\n return function (isRadial) {\n var arcOrAngle = isRadial ? 'Arc' : 'Angle';\n return function (position) {\n switch (position) {\n case 'start':\n case 'insideStart':\n case 'end':\n case 'insideEnd':\n return position + arcOrAngle;\n default:\n return position;\n }\n };\n }(isRadial);\n}\nfunction updateStyle(el, data, dataIndex, itemModel, layout, seriesModel, isHorizontalOrRadial, isPolar) {\n var style = data.getItemVisual(dataIndex, 'style');\n if (!isPolar) {\n var borderRadius = itemModel.get(['itemStyle', 'borderRadius']) || 0;\n el.setShape('r', borderRadius);\n } else if (!seriesModel.get('roundCap')) {\n var sectorShape = el.shape;\n var cornerRadius = getSectorCornerRadius(itemModel.getModel('itemStyle'), sectorShape, true);\n extend(sectorShape, cornerRadius);\n el.setShape(sectorShape);\n }\n el.useStyle(style);\n var cursorStyle = itemModel.getShallow('cursor');\n cursorStyle && el.attr('cursor', cursorStyle);\n var labelPositionOutside = isPolar ? isHorizontalOrRadial ? layout.r >= layout.r0 ? 'endArc' : 'startArc' : layout.endAngle >= layout.startAngle ? 'endAngle' : 'startAngle' : isHorizontalOrRadial ? layout.height >= 0 ? 'bottom' : 'top' : layout.width >= 0 ? 'right' : 'left';\n var labelStatesModels = getLabelStatesModels(itemModel);\n setLabelStyle(el, labelStatesModels, {\n labelFetcher: seriesModel,\n labelDataIndex: dataIndex,\n defaultText: getDefaultLabel(seriesModel.getData(), dataIndex),\n inheritColor: style.fill,\n defaultOpacity: style.opacity,\n defaultOutsidePosition: labelPositionOutside\n });\n var label = el.getTextContent();\n if (isPolar && label) {\n var position = itemModel.get(['label', 'position']);\n el.textConfig.inside = position === 'middle' ? true : null;\n setSectorTextRotation(el, position === 'outside' ? labelPositionOutside : position, createPolarPositionMapping(isHorizontalOrRadial), itemModel.get(['label', 'rotate']));\n }\n setLabelValueAnimation(label, labelStatesModels, seriesModel.getRawValue(dataIndex), function (value) {\n return getDefaultInterpolatedLabel(data, value);\n });\n var emphasisModel = itemModel.getModel(['emphasis']);\n toggleHoverEmphasis(el, emphasisModel.get('focus'), emphasisModel.get('blurScope'), emphasisModel.get('disabled'));\n setStatesStylesFromModel(el, itemModel);\n if (isZeroOnPolar(layout)) {\n el.style.fill = 'none';\n el.style.stroke = 'none';\n each(el.states, function (state) {\n if (state.style) {\n state.style.fill = state.style.stroke = 'none';\n }\n });\n }\n}\n// In case width or height are too small.\nfunction getLineWidth(itemModel, rawLayout) {\n // Has no border.\n var borderColor = itemModel.get(['itemStyle', 'borderColor']);\n if (!borderColor || borderColor === 'none') {\n return 0;\n }\n var lineWidth = itemModel.get(['itemStyle', 'borderWidth']) || 0;\n // width or height may be NaN for empty data\n var width = isNaN(rawLayout.width) ? Number.MAX_VALUE : Math.abs(rawLayout.width);\n var height = isNaN(rawLayout.height) ? Number.MAX_VALUE : Math.abs(rawLayout.height);\n return Math.min(lineWidth, width, height);\n}\nvar LagePathShape = /** @class */function () {\n function LagePathShape() {}\n return LagePathShape;\n}();\nvar LargePath = /** @class */function (_super) {\n __extends(LargePath, _super);\n function LargePath(opts) {\n var _this = _super.call(this, opts) || this;\n _this.type = 'largeBar';\n return _this;\n }\n LargePath.prototype.getDefaultShape = function () {\n return new LagePathShape();\n };\n LargePath.prototype.buildPath = function (ctx, shape) {\n // Drawing lines is more efficient than drawing\n // a whole line or drawing rects.\n var points = shape.points;\n var baseDimIdx = this.baseDimIdx;\n var valueDimIdx = 1 - this.baseDimIdx;\n var startPoint = [];\n var size = [];\n var barWidth = this.barWidth;\n for (var i = 0; i < points.length; i += 3) {\n size[baseDimIdx] = barWidth;\n size[valueDimIdx] = points[i + 2];\n startPoint[baseDimIdx] = points[i + baseDimIdx];\n startPoint[valueDimIdx] = points[i + valueDimIdx];\n ctx.rect(startPoint[0], startPoint[1], size[0], size[1]);\n }\n };\n return LargePath;\n}(Path);\nfunction createLarge(seriesModel, group, progressiveEls, incremental) {\n // TODO support polar\n var data = seriesModel.getData();\n var baseDimIdx = data.getLayout('valueAxisHorizontal') ? 1 : 0;\n var largeDataIndices = data.getLayout('largeDataIndices');\n var barWidth = data.getLayout('size');\n var backgroundModel = seriesModel.getModel('backgroundStyle');\n var bgPoints = data.getLayout('largeBackgroundPoints');\n if (bgPoints) {\n var bgEl = new LargePath({\n shape: {\n points: bgPoints\n },\n incremental: !!incremental,\n silent: true,\n z2: 0\n });\n bgEl.baseDimIdx = baseDimIdx;\n bgEl.largeDataIndices = largeDataIndices;\n bgEl.barWidth = barWidth;\n bgEl.useStyle(backgroundModel.getItemStyle());\n group.add(bgEl);\n progressiveEls && progressiveEls.push(bgEl);\n }\n var el = new LargePath({\n shape: {\n points: data.getLayout('largePoints')\n },\n incremental: !!incremental,\n ignoreCoarsePointer: true,\n z2: 1\n });\n el.baseDimIdx = baseDimIdx;\n el.largeDataIndices = largeDataIndices;\n el.barWidth = barWidth;\n group.add(el);\n el.useStyle(data.getVisual('style'));\n // Enable tooltip and user mouse/touch event handlers.\n getECData(el).seriesIndex = seriesModel.seriesIndex;\n if (!seriesModel.get('silent')) {\n el.on('mousedown', largePathUpdateDataIndex);\n el.on('mousemove', largePathUpdateDataIndex);\n }\n progressiveEls && progressiveEls.push(el);\n}\n// Use throttle to avoid frequently traverse to find dataIndex.\nvar largePathUpdateDataIndex = throttle(function (event) {\n var largePath = this;\n var dataIndex = largePathFindDataIndex(largePath, event.offsetX, event.offsetY);\n getECData(largePath).dataIndex = dataIndex >= 0 ? dataIndex : null;\n}, 30, false);\nfunction largePathFindDataIndex(largePath, x, y) {\n var baseDimIdx = largePath.baseDimIdx;\n var valueDimIdx = 1 - baseDimIdx;\n var points = largePath.shape.points;\n var largeDataIndices = largePath.largeDataIndices;\n var startPoint = [];\n var size = [];\n var barWidth = largePath.barWidth;\n for (var i = 0, len = points.length / 3; i < len; i++) {\n var ii = i * 3;\n size[baseDimIdx] = barWidth;\n size[valueDimIdx] = points[ii + 2];\n startPoint[baseDimIdx] = points[ii + baseDimIdx];\n startPoint[valueDimIdx] = points[ii + valueDimIdx];\n if (size[valueDimIdx] < 0) {\n startPoint[valueDimIdx] += size[valueDimIdx];\n size[valueDimIdx] = -size[valueDimIdx];\n }\n if (x >= startPoint[0] && x <= startPoint[0] + size[0] && y >= startPoint[1] && y <= startPoint[1] + size[1]) {\n return largeDataIndices[i];\n }\n }\n return -1;\n}\nfunction createBackgroundShape(isHorizontalOrRadial, layout, coord) {\n if (isCoordinateSystemType(coord, 'cartesian2d')) {\n var rectShape = layout;\n var coordLayout = coord.getArea();\n return {\n x: isHorizontalOrRadial ? rectShape.x : coordLayout.x,\n y: isHorizontalOrRadial ? coordLayout.y : rectShape.y,\n width: isHorizontalOrRadial ? rectShape.width : coordLayout.width,\n height: isHorizontalOrRadial ? coordLayout.height : rectShape.height\n };\n } else {\n var coordLayout = coord.getArea();\n var sectorShape = layout;\n return {\n cx: coordLayout.cx,\n cy: coordLayout.cy,\n r0: isHorizontalOrRadial ? coordLayout.r0 : sectorShape.r0,\n r: isHorizontalOrRadial ? coordLayout.r : sectorShape.r,\n startAngle: isHorizontalOrRadial ? sectorShape.startAngle : 0,\n endAngle: isHorizontalOrRadial ? sectorShape.endAngle : Math.PI * 2\n };\n }\n}\nfunction createBackgroundEl(coord, isHorizontalOrRadial, layout) {\n var ElementClz = coord.type === 'polar' ? Sector : Rect;\n return new ElementClz({\n shape: createBackgroundShape(isHorizontalOrRadial, layout, coord),\n silent: true,\n z2: 0\n });\n}\nexport default BarView;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { layout, createProgressiveLayout } from '../../layout/barGrid.js';\nimport dataSample from '../../processor/dataSample.js';\nimport BarSeries from './BarSeries.js';\nimport BarView from './BarView.js';\nexport function install(registers) {\n registers.registerChartView(BarView);\n registers.registerSeriesModel(BarSeries);\n registers.registerLayout(registers.PRIORITY.VISUAL.LAYOUT, zrUtil.curry(layout, 'bar'));\n // Do layout after other overall layout, which can prepare some information.\n registers.registerLayout(registers.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT, createProgressiveLayout('bar'));\n // Down sample after filter\n registers.registerProcessor(registers.PRIORITY.PROCESSOR.STATISTIC, dataSample('bar'));\n /**\n * @payload\n * @property {string} [componentType=series]\n * @property {number} [dx]\n * @property {number} [dy]\n * @property {number} [zoom]\n * @property {number} [originX]\n * @property {number} [originY]\n */\n registers.registerAction({\n type: 'changeAxisOrder',\n event: 'changeAxisOrder',\n update: 'update'\n }, function (payload, ecModel) {\n var componentType = payload.componentType || 'series';\n ecModel.eachComponent({\n mainType: componentType,\n query: payload\n }, function (componentModel) {\n if (payload.sortInfo) {\n componentModel.axis.setCategorySortInfo(payload.sortInfo);\n }\n });\n });\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport createSeriesData from '../helper/createSeriesData.js';\nimport SeriesModel from '../../model/Series.js';\nvar ScatterSeriesModel = /** @class */function (_super) {\n __extends(ScatterSeriesModel, _super);\n function ScatterSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = ScatterSeriesModel.type;\n _this.hasSymbolVisual = true;\n return _this;\n }\n ScatterSeriesModel.prototype.getInitialData = function (option, ecModel) {\n return createSeriesData(null, this, {\n useEncodeDefaulter: true\n });\n };\n ScatterSeriesModel.prototype.getProgressive = function () {\n var progressive = this.option.progressive;\n if (progressive == null) {\n // PENDING\n return this.option.large ? 5e3 : this.get('progressive');\n }\n return progressive;\n };\n ScatterSeriesModel.prototype.getProgressiveThreshold = function () {\n var progressiveThreshold = this.option.progressiveThreshold;\n if (progressiveThreshold == null) {\n // PENDING\n return this.option.large ? 1e4 : this.get('progressiveThreshold');\n }\n return progressiveThreshold;\n };\n ScatterSeriesModel.prototype.brushSelector = function (dataIndex, data, selectors) {\n return selectors.point(data.getItemLayout(dataIndex));\n };\n ScatterSeriesModel.prototype.getZLevelKey = function () {\n // Each progressive series has individual key.\n return this.getData().count() > this.getProgressiveThreshold() ? this.id : '';\n };\n ScatterSeriesModel.type = 'series.scatter';\n ScatterSeriesModel.dependencies = ['grid', 'polar', 'geo', 'singleAxis', 'calendar'];\n ScatterSeriesModel.defaultOption = {\n coordinateSystem: 'cartesian2d',\n // zlevel: 0,\n z: 2,\n legendHoverLink: true,\n symbolSize: 10,\n // symbolRotate: null, // 图形旋转控制\n large: false,\n // Available when large is true\n largeThreshold: 2000,\n // cursor: null,\n itemStyle: {\n opacity: 0.8\n // color: 各异\n },\n emphasis: {\n scale: true\n },\n // If clip the overflow graphics\n // Works on cartesian / polar series\n clip: true,\n select: {\n itemStyle: {\n borderColor: '#212121'\n }\n },\n universalTransition: {\n divideShape: 'clone'\n }\n // progressive: null\n };\n return ScatterSeriesModel;\n}(SeriesModel);\nexport default ScatterSeriesModel;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\n/* global Float32Array */\n// TODO Batch by color\nimport * as graphic from '../../util/graphic.js';\nimport { createSymbol } from '../../util/symbol.js';\nimport { getECData } from '../../util/innerStore.js';\nvar BOOST_SIZE_THRESHOLD = 4;\nvar LargeSymbolPathShape = /** @class */function () {\n function LargeSymbolPathShape() {}\n return LargeSymbolPathShape;\n}();\nvar LargeSymbolPath = /** @class */function (_super) {\n __extends(LargeSymbolPath, _super);\n function LargeSymbolPath(opts) {\n var _this = _super.call(this, opts) || this;\n _this._off = 0;\n _this.hoverDataIdx = -1;\n return _this;\n }\n LargeSymbolPath.prototype.getDefaultShape = function () {\n return new LargeSymbolPathShape();\n };\n LargeSymbolPath.prototype.reset = function () {\n this.notClear = false;\n this._off = 0;\n };\n LargeSymbolPath.prototype.buildPath = function (path, shape) {\n var points = shape.points;\n var size = shape.size;\n var symbolProxy = this.symbolProxy;\n var symbolProxyShape = symbolProxy.shape;\n var ctx = path.getContext ? path.getContext() : path;\n var canBoost = ctx && size[0] < BOOST_SIZE_THRESHOLD;\n var softClipShape = this.softClipShape;\n var i;\n // Do draw in afterBrush.\n if (canBoost) {\n this._ctx = ctx;\n return;\n }\n this._ctx = null;\n for (i = this._off; i < points.length;) {\n var x = points[i++];\n var y = points[i++];\n if (isNaN(x) || isNaN(y)) {\n continue;\n }\n if (softClipShape && !softClipShape.contain(x, y)) {\n continue;\n }\n symbolProxyShape.x = x - size[0] / 2;\n symbolProxyShape.y = y - size[1] / 2;\n symbolProxyShape.width = size[0];\n symbolProxyShape.height = size[1];\n symbolProxy.buildPath(path, symbolProxyShape, true);\n }\n if (this.incremental) {\n this._off = i;\n this.notClear = true;\n }\n };\n LargeSymbolPath.prototype.afterBrush = function () {\n var shape = this.shape;\n var points = shape.points;\n var size = shape.size;\n var ctx = this._ctx;\n var softClipShape = this.softClipShape;\n var i;\n if (!ctx) {\n return;\n }\n // PENDING If style or other canvas status changed?\n for (i = this._off; i < points.length;) {\n var x = points[i++];\n var y = points[i++];\n if (isNaN(x) || isNaN(y)) {\n continue;\n }\n if (softClipShape && !softClipShape.contain(x, y)) {\n continue;\n }\n // fillRect is faster than building a rect path and draw.\n // And it support light globalCompositeOperation.\n ctx.fillRect(x - size[0] / 2, y - size[1] / 2, size[0], size[1]);\n }\n if (this.incremental) {\n this._off = i;\n this.notClear = true;\n }\n };\n LargeSymbolPath.prototype.findDataIndex = function (x, y) {\n // TODO ???\n // Consider transform\n var shape = this.shape;\n var points = shape.points;\n var size = shape.size;\n var w = Math.max(size[0], 4);\n var h = Math.max(size[1], 4);\n // Not consider transform\n // Treat each element as a rect\n // top down traverse\n for (var idx = points.length / 2 - 1; idx >= 0; idx--) {\n var i = idx * 2;\n var x0 = points[i] - w / 2;\n var y0 = points[i + 1] - h / 2;\n if (x >= x0 && y >= y0 && x <= x0 + w && y <= y0 + h) {\n return idx;\n }\n }\n return -1;\n };\n LargeSymbolPath.prototype.contain = function (x, y) {\n var localPos = this.transformCoordToLocal(x, y);\n var rect = this.getBoundingRect();\n x = localPos[0];\n y = localPos[1];\n if (rect.contain(x, y)) {\n // Cache found data index.\n var dataIdx = this.hoverDataIdx = this.findDataIndex(x, y);\n return dataIdx >= 0;\n }\n this.hoverDataIdx = -1;\n return false;\n };\n LargeSymbolPath.prototype.getBoundingRect = function () {\n // Ignore stroke for large symbol draw.\n var rect = this._rect;\n if (!rect) {\n var shape = this.shape;\n var points = shape.points;\n var size = shape.size;\n var w = size[0];\n var h = size[1];\n var minX = Infinity;\n var minY = Infinity;\n var maxX = -Infinity;\n var maxY = -Infinity;\n for (var i = 0; i < points.length;) {\n var x = points[i++];\n var y = points[i++];\n minX = Math.min(x, minX);\n maxX = Math.max(x, maxX);\n minY = Math.min(y, minY);\n maxY = Math.max(y, maxY);\n }\n rect = this._rect = new graphic.BoundingRect(minX - w / 2, minY - h / 2, maxX - minX + w, maxY - minY + h);\n }\n return rect;\n };\n return LargeSymbolPath;\n}(graphic.Path);\nvar LargeSymbolDraw = /** @class */function () {\n function LargeSymbolDraw() {\n this.group = new graphic.Group();\n }\n /**\n * Update symbols draw by new data\n */\n LargeSymbolDraw.prototype.updateData = function (data, opt) {\n this._clear();\n var symbolEl = this._create();\n symbolEl.setShape({\n points: data.getLayout('points')\n });\n this._setCommon(symbolEl, data, opt);\n };\n LargeSymbolDraw.prototype.updateLayout = function (data) {\n var points = data.getLayout('points');\n this.group.eachChild(function (child) {\n if (child.startIndex != null) {\n var len = (child.endIndex - child.startIndex) * 2;\n var byteOffset = child.startIndex * 4 * 2;\n points = new Float32Array(points.buffer, byteOffset, len);\n }\n child.setShape('points', points);\n // Reset draw cursor.\n child.reset();\n });\n };\n LargeSymbolDraw.prototype.incrementalPrepareUpdate = function (data) {\n this._clear();\n };\n LargeSymbolDraw.prototype.incrementalUpdate = function (taskParams, data, opt) {\n var lastAdded = this._newAdded[0];\n var points = data.getLayout('points');\n var oldPoints = lastAdded && lastAdded.shape.points;\n // Merging the exists. Each element has 1e4 points.\n // Consider the performance balance between too much elements and too much points in one shape(may affect hover optimization)\n if (oldPoints && oldPoints.length < 2e4) {\n var oldLen = oldPoints.length;\n var newPoints = new Float32Array(oldLen + points.length);\n // Concat two array\n newPoints.set(oldPoints);\n newPoints.set(points, oldLen);\n // Update endIndex\n lastAdded.endIndex = taskParams.end;\n lastAdded.setShape({\n points: newPoints\n });\n } else {\n // Clear\n this._newAdded = [];\n var symbolEl = this._create();\n symbolEl.startIndex = taskParams.start;\n symbolEl.endIndex = taskParams.end;\n symbolEl.incremental = true;\n symbolEl.setShape({\n points: points\n });\n this._setCommon(symbolEl, data, opt);\n }\n };\n LargeSymbolDraw.prototype.eachRendered = function (cb) {\n this._newAdded[0] && cb(this._newAdded[0]);\n };\n LargeSymbolDraw.prototype._create = function () {\n var symbolEl = new LargeSymbolPath({\n cursor: 'default'\n });\n symbolEl.ignoreCoarsePointer = true;\n this.group.add(symbolEl);\n this._newAdded.push(symbolEl);\n return symbolEl;\n };\n LargeSymbolDraw.prototype._setCommon = function (symbolEl, data, opt) {\n var hostModel = data.hostModel;\n opt = opt || {};\n var size = data.getVisual('symbolSize');\n symbolEl.setShape('size', size instanceof Array ? size : [size, size]);\n symbolEl.softClipShape = opt.clipShape || null;\n // Create symbolProxy to build path for each data\n symbolEl.symbolProxy = createSymbol(data.getVisual('symbol'), 0, 0, 0, 0);\n // Use symbolProxy setColor method\n symbolEl.setColor = symbolEl.symbolProxy.setColor;\n var extrudeShadow = symbolEl.shape.size[0] < BOOST_SIZE_THRESHOLD;\n symbolEl.useStyle(\n // Draw shadow when doing fillRect is extremely slow.\n hostModel.getModel('itemStyle').getItemStyle(extrudeShadow ? ['color', 'shadowBlur', 'shadowColor'] : ['color']));\n var globalStyle = data.getVisual('style');\n var visualColor = globalStyle && globalStyle.fill;\n if (visualColor) {\n symbolEl.setColor(visualColor);\n }\n var ecData = getECData(symbolEl);\n // Enable tooltip\n // PENDING May have performance issue when path is extremely large\n ecData.seriesIndex = hostModel.seriesIndex;\n symbolEl.on('mousemove', function (e) {\n ecData.dataIndex = null;\n var dataIndex = symbolEl.hoverDataIdx;\n if (dataIndex >= 0) {\n // Provide dataIndex for tooltip\n ecData.dataIndex = dataIndex + (symbolEl.startIndex || 0);\n }\n });\n };\n LargeSymbolDraw.prototype.remove = function () {\n this._clear();\n };\n LargeSymbolDraw.prototype._clear = function () {\n this._newAdded = [];\n this.group.removeAll();\n };\n return LargeSymbolDraw;\n}();\nexport default LargeSymbolDraw;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport SymbolDraw from '../helper/SymbolDraw.js';\nimport LargeSymbolDraw from '../helper/LargeSymbolDraw.js';\nimport pointsLayout from '../../layout/points.js';\nimport ChartView from '../../view/Chart.js';\nvar ScatterView = /** @class */function (_super) {\n __extends(ScatterView, _super);\n function ScatterView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = ScatterView.type;\n return _this;\n }\n ScatterView.prototype.render = function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n var symbolDraw = this._updateSymbolDraw(data, seriesModel);\n symbolDraw.updateData(data, {\n // TODO\n // If this parameter should be a shape or a bounding volume\n // shape will be more general.\n // But bounding volume like bounding rect will be much faster in the contain calculation\n clipShape: this._getClipShape(seriesModel)\n });\n this._finished = true;\n };\n ScatterView.prototype.incrementalPrepareRender = function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n var symbolDraw = this._updateSymbolDraw(data, seriesModel);\n symbolDraw.incrementalPrepareUpdate(data);\n this._finished = false;\n };\n ScatterView.prototype.incrementalRender = function (taskParams, seriesModel, ecModel) {\n this._symbolDraw.incrementalUpdate(taskParams, seriesModel.getData(), {\n clipShape: this._getClipShape(seriesModel)\n });\n this._finished = taskParams.end === seriesModel.getData().count();\n };\n ScatterView.prototype.updateTransform = function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n // Must mark group dirty and make sure the incremental layer will be cleared\n // PENDING\n this.group.dirty();\n if (!this._finished || data.count() > 1e4) {\n return {\n update: true\n };\n } else {\n var res = pointsLayout('').reset(seriesModel, ecModel, api);\n if (res.progress) {\n res.progress({\n start: 0,\n end: data.count(),\n count: data.count()\n }, data);\n }\n this._symbolDraw.updateLayout(data);\n }\n };\n ScatterView.prototype.eachRendered = function (cb) {\n this._symbolDraw && this._symbolDraw.eachRendered(cb);\n };\n ScatterView.prototype._getClipShape = function (seriesModel) {\n if (!seriesModel.get('clip', true)) {\n return;\n }\n var coordSys = seriesModel.coordinateSystem;\n // PENDING make `0.1` configurable, for example, `clipTolerance`?\n return coordSys && coordSys.getArea && coordSys.getArea(.1);\n };\n ScatterView.prototype._updateSymbolDraw = function (data, seriesModel) {\n var symbolDraw = this._symbolDraw;\n var pipelineContext = seriesModel.pipelineContext;\n var isLargeDraw = pipelineContext.large;\n if (!symbolDraw || isLargeDraw !== this._isLargeDraw) {\n symbolDraw && symbolDraw.remove();\n symbolDraw = this._symbolDraw = isLargeDraw ? new LargeSymbolDraw() : new SymbolDraw();\n this._isLargeDraw = isLargeDraw;\n this.group.removeAll();\n }\n this.group.add(symbolDraw.group);\n return symbolDraw;\n };\n ScatterView.prototype.remove = function (ecModel, api) {\n this._symbolDraw && this._symbolDraw.remove(true);\n this._symbolDraw = null;\n };\n ScatterView.prototype.dispose = function () {};\n ScatterView.type = 'scatter';\n return ScatterView;\n}(ChartView);\nexport default ScatterView;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport ComponentModel from '../../model/Component.js';\nvar GridModel = /** @class */function (_super) {\n __extends(GridModel, _super);\n function GridModel() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n GridModel.type = 'grid';\n GridModel.dependencies = ['xAxis', 'yAxis'];\n GridModel.layoutMode = 'box';\n GridModel.defaultOption = {\n show: false,\n // zlevel: 0,\n z: 0,\n left: '10%',\n top: 60,\n right: '10%',\n bottom: 70,\n // If grid size contain label\n containLabel: false,\n // width: {totalWidth} - left - right,\n // height: {totalHeight} - top - bottom,\n backgroundColor: 'rgba(0,0,0,0)',\n borderWidth: 1,\n borderColor: '#ccc'\n };\n return GridModel;\n}(ComponentModel);\nexport default GridModel;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport ComponentModel from '../../model/Component.js';\nimport { AxisModelCommonMixin } from '../axisModelCommonMixin.js';\nimport { SINGLE_REFERRING } from '../../util/model.js';\nvar CartesianAxisModel = /** @class */function (_super) {\n __extends(CartesianAxisModel, _super);\n function CartesianAxisModel() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n CartesianAxisModel.prototype.getCoordSysModel = function () {\n return this.getReferringComponents('grid', SINGLE_REFERRING).models[0];\n };\n CartesianAxisModel.type = 'cartesian2dAxis';\n return CartesianAxisModel;\n}(ComponentModel);\nexport { CartesianAxisModel };\nzrUtil.mixin(CartesianAxisModel, AxisModelCommonMixin);\nexport default CartesianAxisModel;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nvar defaultOption = {\n show: true,\n // zlevel: 0,\n z: 0,\n // Inverse the axis.\n inverse: false,\n // Axis name displayed.\n name: '',\n // 'start' | 'middle' | 'end'\n nameLocation: 'end',\n // By degree. By default auto rotate by nameLocation.\n nameRotate: null,\n nameTruncate: {\n maxWidth: null,\n ellipsis: '...',\n placeholder: '.'\n },\n // Use global text style by default.\n nameTextStyle: {},\n // The gap between axisName and axisLine.\n nameGap: 15,\n // Default `false` to support tooltip.\n silent: false,\n // Default `false` to avoid legacy user event listener fail.\n triggerEvent: false,\n tooltip: {\n show: false\n },\n axisPointer: {},\n axisLine: {\n show: true,\n onZero: true,\n onZeroAxisIndex: null,\n lineStyle: {\n color: '#6E7079',\n width: 1,\n type: 'solid'\n },\n // The arrow at both ends the the axis.\n symbol: ['none', 'none'],\n symbolSize: [10, 15]\n },\n axisTick: {\n show: true,\n // Whether axisTick is inside the grid or outside the grid.\n inside: false,\n // The length of axisTick.\n length: 5,\n lineStyle: {\n width: 1\n }\n },\n axisLabel: {\n show: true,\n // Whether axisLabel is inside the grid or outside the grid.\n inside: false,\n rotate: 0,\n // true | false | null/undefined (auto)\n showMinLabel: null,\n // true | false | null/undefined (auto)\n showMaxLabel: null,\n margin: 8,\n // formatter: null,\n fontSize: 12\n },\n splitLine: {\n show: true,\n lineStyle: {\n color: ['#E0E6F1'],\n width: 1,\n type: 'solid'\n }\n },\n splitArea: {\n show: false,\n areaStyle: {\n color: ['rgba(250,250,250,0.2)', 'rgba(210,219,238,0.2)']\n }\n }\n};\nvar categoryAxis = zrUtil.merge({\n // The gap at both ends of the axis. For categoryAxis, boolean.\n boundaryGap: true,\n // Set false to faster category collection.\n deduplication: null,\n // splitArea: {\n // show: false\n // },\n splitLine: {\n show: false\n },\n axisTick: {\n // If tick is align with label when boundaryGap is true\n alignWithLabel: false,\n interval: 'auto'\n },\n axisLabel: {\n interval: 'auto'\n }\n}, defaultOption);\nvar valueAxis = zrUtil.merge({\n boundaryGap: [0, 0],\n axisLine: {\n // Not shown when other axis is categoryAxis in cartesian\n show: 'auto'\n },\n axisTick: {\n // Not shown when other axis is categoryAxis in cartesian\n show: 'auto'\n },\n // TODO\n // min/max: [30, datamin, 60] or [20, datamin] or [datamin, 60]\n splitNumber: 5,\n minorTick: {\n // Minor tick, not available for cateogry axis.\n show: false,\n // Split number of minor ticks. The value should be in range of (0, 100)\n splitNumber: 5,\n // Length of minor tick\n length: 3,\n // Line style\n lineStyle: {\n // Default to be same with axisTick\n }\n },\n minorSplitLine: {\n show: false,\n lineStyle: {\n color: '#F4F7FD',\n width: 1\n }\n }\n}, defaultOption);\nvar timeAxis = zrUtil.merge({\n splitNumber: 6,\n axisLabel: {\n // To eliminate labels that are not nice\n showMinLabel: false,\n showMaxLabel: false,\n rich: {\n primary: {\n fontWeight: 'bold'\n }\n }\n },\n splitLine: {\n show: false\n }\n}, valueAxis);\nvar logAxis = zrUtil.defaults({\n logBase: 10\n}, valueAxis);\nexport default {\n category: categoryAxis,\n value: valueAxis,\n time: timeAxis,\n log: logAxis\n};","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nexport var AXIS_TYPES = {\n value: 1,\n category: 1,\n time: 1,\n log: 1\n};","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport axisDefault from './axisDefault.js';\nimport { getLayoutParams, mergeLayoutParam, fetchLayoutMode } from '../util/layout.js';\nimport OrdinalMeta from '../data/OrdinalMeta.js';\nimport { AXIS_TYPES } from './axisCommonTypes.js';\nimport { each, merge } from 'zrender/lib/core/util.js';\n/**\n * Generate sub axis model class\n * @param axisName 'x' 'y' 'radius' 'angle' 'parallel' ...\n */\nexport default function axisModelCreator(registers, axisName, BaseAxisModelClass, extraDefaultOption) {\n each(AXIS_TYPES, function (v, axisType) {\n var defaultOption = merge(merge({}, axisDefault[axisType], true), extraDefaultOption, true);\n var AxisModel = /** @class */function (_super) {\n __extends(AxisModel, _super);\n function AxisModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = axisName + 'Axis.' + axisType;\n return _this;\n }\n AxisModel.prototype.mergeDefaultAndTheme = function (option, ecModel) {\n var layoutMode = fetchLayoutMode(this);\n var inputPositionParams = layoutMode ? getLayoutParams(option) : {};\n var themeModel = ecModel.getTheme();\n merge(option, themeModel.get(axisType + 'Axis'));\n merge(option, this.getDefaultOption());\n option.type = getAxisType(option);\n if (layoutMode) {\n mergeLayoutParam(option, inputPositionParams, layoutMode);\n }\n };\n AxisModel.prototype.optionUpdated = function () {\n var thisOption = this.option;\n if (thisOption.type === 'category') {\n this.__ordinalMeta = OrdinalMeta.createByAxisModel(this);\n }\n };\n /**\n * Should not be called before all of 'getInitailData' finished.\n * Because categories are collected during initializing data.\n */\n AxisModel.prototype.getCategories = function (rawData) {\n var option = this.option;\n // FIXME\n // warning if called before all of 'getInitailData' finished.\n if (option.type === 'category') {\n if (rawData) {\n return option.data;\n }\n return this.__ordinalMeta.categories;\n }\n };\n AxisModel.prototype.getOrdinalMeta = function () {\n return this.__ordinalMeta;\n };\n AxisModel.type = axisName + 'Axis.' + axisType;\n AxisModel.defaultOption = defaultOption;\n return AxisModel;\n }(BaseAxisModelClass);\n registers.registerComponentModel(AxisModel);\n });\n registers.registerSubTypeDefaulter(axisName + 'Axis', getAxisType);\n}\nfunction getAxisType(option) {\n // Default axis with data is category axis\n return option.type || (option.data ? 'category' : 'value');\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nvar Cartesian = /** @class */function () {\n function Cartesian(name) {\n this.type = 'cartesian';\n this._dimList = [];\n this._axes = {};\n this.name = name || '';\n }\n Cartesian.prototype.getAxis = function (dim) {\n return this._axes[dim];\n };\n Cartesian.prototype.getAxes = function () {\n return zrUtil.map(this._dimList, function (dim) {\n return this._axes[dim];\n }, this);\n };\n Cartesian.prototype.getAxesByScale = function (scaleType) {\n scaleType = scaleType.toLowerCase();\n return zrUtil.filter(this.getAxes(), function (axis) {\n return axis.scale.type === scaleType;\n });\n };\n Cartesian.prototype.addAxis = function (axis) {\n var dim = axis.dim;\n this._axes[dim] = axis;\n this._dimList.push(dim);\n };\n return Cartesian;\n}();\n;\nexport default Cartesian;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport BoundingRect from 'zrender/lib/core/BoundingRect.js';\nimport Cartesian from './Cartesian.js';\nimport { invert } from 'zrender/lib/core/matrix.js';\nimport { applyTransform } from 'zrender/lib/core/vector.js';\nexport var cartesian2DDimensions = ['x', 'y'];\nfunction canCalculateAffineTransform(scale) {\n return scale.type === 'interval' || scale.type === 'time';\n}\nvar Cartesian2D = /** @class */function (_super) {\n __extends(Cartesian2D, _super);\n function Cartesian2D() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'cartesian2d';\n _this.dimensions = cartesian2DDimensions;\n return _this;\n }\n /**\n * Calculate an affine transform matrix if two axes are time or value.\n * It's mainly for accelartion on the large time series data.\n */\n Cartesian2D.prototype.calcAffineTransform = function () {\n this._transform = this._invTransform = null;\n var xAxisScale = this.getAxis('x').scale;\n var yAxisScale = this.getAxis('y').scale;\n if (!canCalculateAffineTransform(xAxisScale) || !canCalculateAffineTransform(yAxisScale)) {\n return;\n }\n var xScaleExtent = xAxisScale.getExtent();\n var yScaleExtent = yAxisScale.getExtent();\n var start = this.dataToPoint([xScaleExtent[0], yScaleExtent[0]]);\n var end = this.dataToPoint([xScaleExtent[1], yScaleExtent[1]]);\n var xScaleSpan = xScaleExtent[1] - xScaleExtent[0];\n var yScaleSpan = yScaleExtent[1] - yScaleExtent[0];\n if (!xScaleSpan || !yScaleSpan) {\n return;\n }\n // Accelerate data to point calculation on the special large time series data.\n var scaleX = (end[0] - start[0]) / xScaleSpan;\n var scaleY = (end[1] - start[1]) / yScaleSpan;\n var translateX = start[0] - xScaleExtent[0] * scaleX;\n var translateY = start[1] - yScaleExtent[0] * scaleY;\n var m = this._transform = [scaleX, 0, 0, scaleY, translateX, translateY];\n this._invTransform = invert([], m);\n };\n /**\n * Base axis will be used on stacking.\n */\n Cartesian2D.prototype.getBaseAxis = function () {\n return this.getAxesByScale('ordinal')[0] || this.getAxesByScale('time')[0] || this.getAxis('x');\n };\n Cartesian2D.prototype.containPoint = function (point) {\n var axisX = this.getAxis('x');\n var axisY = this.getAxis('y');\n return axisX.contain(axisX.toLocalCoord(point[0])) && axisY.contain(axisY.toLocalCoord(point[1]));\n };\n Cartesian2D.prototype.containData = function (data) {\n return this.getAxis('x').containData(data[0]) && this.getAxis('y').containData(data[1]);\n };\n Cartesian2D.prototype.containZone = function (data1, data2) {\n var zoneDiag1 = this.dataToPoint(data1);\n var zoneDiag2 = this.dataToPoint(data2);\n var area = this.getArea();\n var zone = new BoundingRect(zoneDiag1[0], zoneDiag1[1], zoneDiag2[0] - zoneDiag1[0], zoneDiag2[1] - zoneDiag1[1]);\n return area.intersect(zone);\n };\n Cartesian2D.prototype.dataToPoint = function (data, clamp, out) {\n out = out || [];\n var xVal = data[0];\n var yVal = data[1];\n // Fast path\n if (this._transform\n // It's supported that if data is like `[Inifity, 123]`, where only Y pixel calculated.\n && xVal != null && isFinite(xVal) && yVal != null && isFinite(yVal)) {\n return applyTransform(out, data, this._transform);\n }\n var xAxis = this.getAxis('x');\n var yAxis = this.getAxis('y');\n out[0] = xAxis.toGlobalCoord(xAxis.dataToCoord(xVal, clamp));\n out[1] = yAxis.toGlobalCoord(yAxis.dataToCoord(yVal, clamp));\n return out;\n };\n Cartesian2D.prototype.clampData = function (data, out) {\n var xScale = this.getAxis('x').scale;\n var yScale = this.getAxis('y').scale;\n var xAxisExtent = xScale.getExtent();\n var yAxisExtent = yScale.getExtent();\n var x = xScale.parse(data[0]);\n var y = yScale.parse(data[1]);\n out = out || [];\n out[0] = Math.min(Math.max(Math.min(xAxisExtent[0], xAxisExtent[1]), x), Math.max(xAxisExtent[0], xAxisExtent[1]));\n out[1] = Math.min(Math.max(Math.min(yAxisExtent[0], yAxisExtent[1]), y), Math.max(yAxisExtent[0], yAxisExtent[1]));\n return out;\n };\n Cartesian2D.prototype.pointToData = function (point, clamp) {\n var out = [];\n if (this._invTransform) {\n return applyTransform(out, point, this._invTransform);\n }\n var xAxis = this.getAxis('x');\n var yAxis = this.getAxis('y');\n out[0] = xAxis.coordToData(xAxis.toLocalCoord(point[0]), clamp);\n out[1] = yAxis.coordToData(yAxis.toLocalCoord(point[1]), clamp);\n return out;\n };\n Cartesian2D.prototype.getOtherAxis = function (axis) {\n return this.getAxis(axis.dim === 'x' ? 'y' : 'x');\n };\n /**\n * Get rect area of cartesian.\n * Area will have a contain function to determine if a point is in the coordinate system.\n */\n Cartesian2D.prototype.getArea = function (tolerance) {\n tolerance = tolerance || 0;\n var xExtent = this.getAxis('x').getGlobalExtent();\n var yExtent = this.getAxis('y').getGlobalExtent();\n var x = Math.min(xExtent[0], xExtent[1]) - tolerance;\n var y = Math.min(yExtent[0], yExtent[1]) - tolerance;\n var width = Math.max(xExtent[0], xExtent[1]) - x + tolerance;\n var height = Math.max(yExtent[0], yExtent[1]) - y + tolerance;\n return new BoundingRect(x, y, width, height);\n };\n return Cartesian2D;\n}(Cartesian);\n;\nexport default Cartesian2D;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport Axis from '../Axis.js';\nvar Axis2D = /** @class */function (_super) {\n __extends(Axis2D, _super);\n function Axis2D(dim, scale, coordExtent, axisType, position) {\n var _this = _super.call(this, dim, scale, coordExtent) || this;\n /**\n * Index of axis, can be used as key\n * Injected outside.\n */\n _this.index = 0;\n _this.type = axisType || 'value';\n _this.position = position || 'bottom';\n return _this;\n }\n Axis2D.prototype.isHorizontal = function () {\n var position = this.position;\n return position === 'top' || position === 'bottom';\n };\n /**\n * Each item cooresponds to this.getExtent(), which\n * means globalExtent[0] may greater than globalExtent[1],\n * unless `asc` is input.\n *\n * @param {boolean} [asc]\n * @return {Array.}\n */\n Axis2D.prototype.getGlobalExtent = function (asc) {\n var ret = this.getExtent();\n ret[0] = this.toGlobalCoord(ret[0]);\n ret[1] = this.toGlobalCoord(ret[1]);\n asc && ret[0] > ret[1] && ret.reverse();\n return ret;\n };\n Axis2D.prototype.pointToData = function (point, clamp) {\n return this.coordToData(this.toLocalCoord(point[this.dim === 'x' ? 0 : 1]), clamp);\n };\n /**\n * Set ordinalSortInfo\n * @param info new OrdinalSortInfo\n */\n Axis2D.prototype.setCategorySortInfo = function (info) {\n if (this.type !== 'category') {\n return false;\n }\n this.model.option.categorySortInfo = info;\n this.scale.setSortInfo(info);\n };\n return Axis2D;\n}(Axis);\nexport default Axis2D;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { SINGLE_REFERRING } from '../../util/model.js';\n/**\n * Can only be called after coordinate system creation stage.\n * (Can be called before coordinate system update stage).\n */\nexport function layout(gridModel, axisModel, opt) {\n opt = opt || {};\n var grid = gridModel.coordinateSystem;\n var axis = axisModel.axis;\n var layout = {};\n var otherAxisOnZeroOf = axis.getAxesOnZeroOf()[0];\n var rawAxisPosition = axis.position;\n var axisPosition = otherAxisOnZeroOf ? 'onZero' : rawAxisPosition;\n var axisDim = axis.dim;\n var rect = grid.getRect();\n var rectBound = [rect.x, rect.x + rect.width, rect.y, rect.y + rect.height];\n var idx = {\n left: 0,\n right: 1,\n top: 0,\n bottom: 1,\n onZero: 2\n };\n var axisOffset = axisModel.get('offset') || 0;\n var posBound = axisDim === 'x' ? [rectBound[2] - axisOffset, rectBound[3] + axisOffset] : [rectBound[0] - axisOffset, rectBound[1] + axisOffset];\n if (otherAxisOnZeroOf) {\n var onZeroCoord = otherAxisOnZeroOf.toGlobalCoord(otherAxisOnZeroOf.dataToCoord(0));\n posBound[idx.onZero] = Math.max(Math.min(onZeroCoord, posBound[1]), posBound[0]);\n }\n // Axis position\n layout.position = [axisDim === 'y' ? posBound[idx[axisPosition]] : rectBound[0], axisDim === 'x' ? posBound[idx[axisPosition]] : rectBound[3]];\n // Axis rotation\n layout.rotation = Math.PI / 2 * (axisDim === 'x' ? 0 : 1);\n // Tick and label direction, x y is axisDim\n var dirMap = {\n top: -1,\n bottom: 1,\n left: -1,\n right: 1\n };\n layout.labelDirection = layout.tickDirection = layout.nameDirection = dirMap[rawAxisPosition];\n layout.labelOffset = otherAxisOnZeroOf ? posBound[idx[rawAxisPosition]] - posBound[idx.onZero] : 0;\n if (axisModel.get(['axisTick', 'inside'])) {\n layout.tickDirection = -layout.tickDirection;\n }\n if (zrUtil.retrieve(opt.labelInside, axisModel.get(['axisLabel', 'inside']))) {\n layout.labelDirection = -layout.labelDirection;\n }\n // Special label rotation\n var labelRotate = axisModel.get(['axisLabel', 'rotate']);\n layout.labelRotate = axisPosition === 'top' ? -labelRotate : labelRotate;\n // Over splitLine and splitArea\n layout.z2 = 1;\n return layout;\n}\nexport function isCartesian2DSeries(seriesModel) {\n return seriesModel.get('coordinateSystem') === 'cartesian2d';\n}\nexport function findAxisModels(seriesModel) {\n var axisModelMap = {\n xAxisModel: null,\n yAxisModel: null\n };\n zrUtil.each(axisModelMap, function (v, key) {\n var axisType = key.replace(/Model$/, '');\n var axisModel = seriesModel.getReferringComponents(axisType, SINGLE_REFERRING).models[0];\n if (process.env.NODE_ENV !== 'production') {\n if (!axisModel) {\n throw new Error(axisType + ' \"' + zrUtil.retrieve3(seriesModel.get(axisType + 'Index'), seriesModel.get(axisType + 'Id'), 0) + '\" not found');\n }\n }\n axisModelMap[key] = axisModel;\n });\n return axisModelMap;\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { getPrecisionSafe, round } from '../util/number.js';\nimport IntervalScale from '../scale/Interval.js';\nimport { getScaleExtent } from './axisHelper.js';\nimport { warn } from '../util/log.js';\nimport { increaseInterval, isValueNice } from '../scale/helper.js';\nvar mathLog = Math.log;\nexport function alignScaleTicks(scale, axisModel, alignToScale) {\n var intervalScaleProto = IntervalScale.prototype;\n // NOTE: There is a precondition for log scale here:\n // In log scale we store _interval and _extent of exponent value.\n // So if we use the method of InternalScale to set/get these data.\n // It process the exponent value, which is linear and what we want here.\n var alignToTicks = intervalScaleProto.getTicks.call(alignToScale);\n var alignToNicedTicks = intervalScaleProto.getTicks.call(alignToScale, true);\n var alignToSplitNumber = alignToTicks.length - 1;\n var alignToInterval = intervalScaleProto.getInterval.call(alignToScale);\n var scaleExtent = getScaleExtent(scale, axisModel);\n var rawExtent = scaleExtent.extent;\n var isMinFixed = scaleExtent.fixMin;\n var isMaxFixed = scaleExtent.fixMax;\n if (scale.type === 'log') {\n var logBase = mathLog(scale.base);\n rawExtent = [mathLog(rawExtent[0]) / logBase, mathLog(rawExtent[1]) / logBase];\n }\n scale.setExtent(rawExtent[0], rawExtent[1]);\n scale.calcNiceExtent({\n splitNumber: alignToSplitNumber,\n fixMin: isMinFixed,\n fixMax: isMaxFixed\n });\n var extent = intervalScaleProto.getExtent.call(scale);\n // Need to update the rawExtent.\n // Because value in rawExtent may be not parsed. e.g. 'dataMin', 'dataMax'\n if (isMinFixed) {\n rawExtent[0] = extent[0];\n }\n if (isMaxFixed) {\n rawExtent[1] = extent[1];\n }\n var interval = intervalScaleProto.getInterval.call(scale);\n var min = rawExtent[0];\n var max = rawExtent[1];\n if (isMinFixed && isMaxFixed) {\n // User set min, max, divide to get new interval\n interval = (max - min) / alignToSplitNumber;\n } else if (isMinFixed) {\n max = rawExtent[0] + interval * alignToSplitNumber;\n // User set min, expand extent on the other side\n while (max < rawExtent[1] && isFinite(max) && isFinite(rawExtent[1])) {\n interval = increaseInterval(interval);\n max = rawExtent[0] + interval * alignToSplitNumber;\n }\n } else if (isMaxFixed) {\n // User set max, expand extent on the other side\n min = rawExtent[1] - interval * alignToSplitNumber;\n while (min > rawExtent[0] && isFinite(min) && isFinite(rawExtent[0])) {\n interval = increaseInterval(interval);\n min = rawExtent[1] - interval * alignToSplitNumber;\n }\n } else {\n var nicedSplitNumber = scale.getTicks().length - 1;\n if (nicedSplitNumber > alignToSplitNumber) {\n interval = increaseInterval(interval);\n }\n var range = interval * alignToSplitNumber;\n max = Math.ceil(rawExtent[1] / interval) * interval;\n min = round(max - range);\n // Not change the result that crossing zero.\n if (min < 0 && rawExtent[0] >= 0) {\n min = 0;\n max = round(range);\n } else if (max > 0 && rawExtent[1] <= 0) {\n max = 0;\n min = -round(range);\n }\n }\n // Adjust min, max based on the extent of alignTo. When min or max is set in alignTo scale\n var t0 = (alignToTicks[0].value - alignToNicedTicks[0].value) / alignToInterval;\n var t1 = (alignToTicks[alignToSplitNumber].value - alignToNicedTicks[alignToSplitNumber].value) / alignToInterval;\n // NOTE: Must in setExtent -> setInterval -> setNiceExtent order.\n intervalScaleProto.setExtent.call(scale, min + interval * t0, max + interval * t1);\n intervalScaleProto.setInterval.call(scale, interval);\n if (t0 || t1) {\n intervalScaleProto.setNiceExtent.call(scale, min + interval, max - interval);\n }\n if (process.env.NODE_ENV !== 'production') {\n var ticks = intervalScaleProto.getTicks.call(scale);\n if (ticks[1] && (!isValueNice(interval) || getPrecisionSafe(ticks[1].value) > getPrecisionSafe(interval))) {\n warn(\n // eslint-disable-next-line\n \"The ticks may be not readable when set min: \" + axisModel.get('min') + \", max: \" + axisModel.get('max') + \" and alignTicks: true\");\n }\n }\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/**\n * Grid is a region which contains at most 4 cartesian systems\n *\n * TODO Default cartesian\n */\nimport { isObject, each, indexOf, retrieve3, keys } from 'zrender/lib/core/util.js';\nimport { getLayoutRect } from '../../util/layout.js';\nimport { createScaleByModel, ifAxisCrossZero, niceScaleExtent, estimateLabelUnionRect, getDataDimensionsOnAxis } from '../../coord/axisHelper.js';\nimport Cartesian2D, { cartesian2DDimensions } from './Cartesian2D.js';\nimport Axis2D from './Axis2D.js';\nimport { SINGLE_REFERRING } from '../../util/model.js';\nimport { isCartesian2DSeries, findAxisModels } from './cartesianAxisHelper.js';\nimport { isIntervalOrLogScale } from '../../scale/helper.js';\nimport { alignScaleTicks } from '../axisAlignTicks.js';\nvar Grid = /** @class */function () {\n function Grid(gridModel, ecModel, api) {\n // FIXME:TS where used (different from registered type 'cartesian2d')?\n this.type = 'grid';\n this._coordsMap = {};\n this._coordsList = [];\n this._axesMap = {};\n this._axesList = [];\n this.axisPointerEnabled = true;\n this.dimensions = cartesian2DDimensions;\n this._initCartesian(gridModel, ecModel, api);\n this.model = gridModel;\n }\n Grid.prototype.getRect = function () {\n return this._rect;\n };\n Grid.prototype.update = function (ecModel, api) {\n var axesMap = this._axesMap;\n this._updateScale(ecModel, this.model);\n function updateAxisTicks(axes) {\n var alignTo;\n // Axis is added in order of axisIndex.\n var axesIndices = keys(axes);\n var len = axesIndices.length;\n if (!len) {\n return;\n }\n var axisNeedsAlign = [];\n // Process once and calculate the ticks for those don't use alignTicks.\n for (var i = len - 1; i >= 0; i--) {\n var idx = +axesIndices[i]; // Convert to number.\n var axis = axes[idx];\n var model = axis.model;\n var scale = axis.scale;\n if (\n // Only value and log axis without interval support alignTicks.\n isIntervalOrLogScale(scale) && model.get('alignTicks') && model.get('interval') == null) {\n axisNeedsAlign.push(axis);\n } else {\n niceScaleExtent(scale, model);\n if (isIntervalOrLogScale(scale)) {\n // Can only align to interval or log axis.\n alignTo = axis;\n }\n }\n }\n ;\n // All axes has set alignTicks. Pick the first one.\n // PENDING. Should we find the axis that both set interval, min, max and align to this one?\n if (axisNeedsAlign.length) {\n if (!alignTo) {\n alignTo = axisNeedsAlign.pop();\n niceScaleExtent(alignTo.scale, alignTo.model);\n }\n each(axisNeedsAlign, function (axis) {\n alignScaleTicks(axis.scale, axis.model, alignTo.scale);\n });\n }\n }\n updateAxisTicks(axesMap.x);\n updateAxisTicks(axesMap.y);\n // Key: axisDim_axisIndex, value: boolean, whether onZero target.\n var onZeroRecords = {};\n each(axesMap.x, function (xAxis) {\n fixAxisOnZero(axesMap, 'y', xAxis, onZeroRecords);\n });\n each(axesMap.y, function (yAxis) {\n fixAxisOnZero(axesMap, 'x', yAxis, onZeroRecords);\n });\n // Resize again if containLabel is enabled\n // FIXME It may cause getting wrong grid size in data processing stage\n this.resize(this.model, api);\n };\n /**\n * Resize the grid\n */\n Grid.prototype.resize = function (gridModel, api, ignoreContainLabel) {\n var boxLayoutParams = gridModel.getBoxLayoutParams();\n var isContainLabel = !ignoreContainLabel && gridModel.get('containLabel');\n var gridRect = getLayoutRect(boxLayoutParams, {\n width: api.getWidth(),\n height: api.getHeight()\n });\n this._rect = gridRect;\n var axesList = this._axesList;\n adjustAxes();\n // Minus label size\n if (isContainLabel) {\n each(axesList, function (axis) {\n if (!axis.model.get(['axisLabel', 'inside'])) {\n var labelUnionRect = estimateLabelUnionRect(axis);\n if (labelUnionRect) {\n var dim = axis.isHorizontal() ? 'height' : 'width';\n var margin = axis.model.get(['axisLabel', 'margin']);\n gridRect[dim] -= labelUnionRect[dim] + margin;\n if (axis.position === 'top') {\n gridRect.y += labelUnionRect.height + margin;\n } else if (axis.position === 'left') {\n gridRect.x += labelUnionRect.width + margin;\n }\n }\n }\n });\n adjustAxes();\n }\n each(this._coordsList, function (coord) {\n // Calculate affine matrix to accelerate the data to point transform.\n // If all the axes scales are time or value.\n coord.calcAffineTransform();\n });\n function adjustAxes() {\n each(axesList, function (axis) {\n var isHorizontal = axis.isHorizontal();\n var extent = isHorizontal ? [0, gridRect.width] : [0, gridRect.height];\n var idx = axis.inverse ? 1 : 0;\n axis.setExtent(extent[idx], extent[1 - idx]);\n updateAxisTransform(axis, isHorizontal ? gridRect.x : gridRect.y);\n });\n }\n };\n Grid.prototype.getAxis = function (dim, axisIndex) {\n var axesMapOnDim = this._axesMap[dim];\n if (axesMapOnDim != null) {\n return axesMapOnDim[axisIndex || 0];\n }\n };\n Grid.prototype.getAxes = function () {\n return this._axesList.slice();\n };\n Grid.prototype.getCartesian = function (xAxisIndex, yAxisIndex) {\n if (xAxisIndex != null && yAxisIndex != null) {\n var key = 'x' + xAxisIndex + 'y' + yAxisIndex;\n return this._coordsMap[key];\n }\n if (isObject(xAxisIndex)) {\n yAxisIndex = xAxisIndex.yAxisIndex;\n xAxisIndex = xAxisIndex.xAxisIndex;\n }\n for (var i = 0, coordList = this._coordsList; i < coordList.length; i++) {\n if (coordList[i].getAxis('x').index === xAxisIndex || coordList[i].getAxis('y').index === yAxisIndex) {\n return coordList[i];\n }\n }\n };\n Grid.prototype.getCartesians = function () {\n return this._coordsList.slice();\n };\n /**\n * @implements\n */\n Grid.prototype.convertToPixel = function (ecModel, finder, value) {\n var target = this._findConvertTarget(finder);\n return target.cartesian ? target.cartesian.dataToPoint(value) : target.axis ? target.axis.toGlobalCoord(target.axis.dataToCoord(value)) : null;\n };\n /**\n * @implements\n */\n Grid.prototype.convertFromPixel = function (ecModel, finder, value) {\n var target = this._findConvertTarget(finder);\n return target.cartesian ? target.cartesian.pointToData(value) : target.axis ? target.axis.coordToData(target.axis.toLocalCoord(value)) : null;\n };\n Grid.prototype._findConvertTarget = function (finder) {\n var seriesModel = finder.seriesModel;\n var xAxisModel = finder.xAxisModel || seriesModel && seriesModel.getReferringComponents('xAxis', SINGLE_REFERRING).models[0];\n var yAxisModel = finder.yAxisModel || seriesModel && seriesModel.getReferringComponents('yAxis', SINGLE_REFERRING).models[0];\n var gridModel = finder.gridModel;\n var coordsList = this._coordsList;\n var cartesian;\n var axis;\n if (seriesModel) {\n cartesian = seriesModel.coordinateSystem;\n indexOf(coordsList, cartesian) < 0 && (cartesian = null);\n } else if (xAxisModel && yAxisModel) {\n cartesian = this.getCartesian(xAxisModel.componentIndex, yAxisModel.componentIndex);\n } else if (xAxisModel) {\n axis = this.getAxis('x', xAxisModel.componentIndex);\n } else if (yAxisModel) {\n axis = this.getAxis('y', yAxisModel.componentIndex);\n }\n // Lowest priority.\n else if (gridModel) {\n var grid = gridModel.coordinateSystem;\n if (grid === this) {\n cartesian = this._coordsList[0];\n }\n }\n return {\n cartesian: cartesian,\n axis: axis\n };\n };\n /**\n * @implements\n */\n Grid.prototype.containPoint = function (point) {\n var coord = this._coordsList[0];\n if (coord) {\n return coord.containPoint(point);\n }\n };\n /**\n * Initialize cartesian coordinate systems\n */\n Grid.prototype._initCartesian = function (gridModel, ecModel, api) {\n var _this = this;\n var grid = this;\n var axisPositionUsed = {\n left: false,\n right: false,\n top: false,\n bottom: false\n };\n var axesMap = {\n x: {},\n y: {}\n };\n var axesCount = {\n x: 0,\n y: 0\n };\n // Create axis\n ecModel.eachComponent('xAxis', createAxisCreator('x'), this);\n ecModel.eachComponent('yAxis', createAxisCreator('y'), this);\n if (!axesCount.x || !axesCount.y) {\n // Roll back when there no either x or y axis\n this._axesMap = {};\n this._axesList = [];\n return;\n }\n this._axesMap = axesMap;\n // Create cartesian2d\n each(axesMap.x, function (xAxis, xAxisIndex) {\n each(axesMap.y, function (yAxis, yAxisIndex) {\n var key = 'x' + xAxisIndex + 'y' + yAxisIndex;\n var cartesian = new Cartesian2D(key);\n cartesian.master = _this;\n cartesian.model = gridModel;\n _this._coordsMap[key] = cartesian;\n _this._coordsList.push(cartesian);\n cartesian.addAxis(xAxis);\n cartesian.addAxis(yAxis);\n });\n });\n function createAxisCreator(dimName) {\n return function (axisModel, idx) {\n if (!isAxisUsedInTheGrid(axisModel, gridModel)) {\n return;\n }\n var axisPosition = axisModel.get('position');\n if (dimName === 'x') {\n // Fix position\n if (axisPosition !== 'top' && axisPosition !== 'bottom') {\n // Default bottom of X\n axisPosition = axisPositionUsed.bottom ? 'top' : 'bottom';\n }\n } else {\n // Fix position\n if (axisPosition !== 'left' && axisPosition !== 'right') {\n // Default left of Y\n axisPosition = axisPositionUsed.left ? 'right' : 'left';\n }\n }\n axisPositionUsed[axisPosition] = true;\n var axis = new Axis2D(dimName, createScaleByModel(axisModel), [0, 0], axisModel.get('type'), axisPosition);\n var isCategory = axis.type === 'category';\n axis.onBand = isCategory && axisModel.get('boundaryGap');\n axis.inverse = axisModel.get('inverse');\n // Inject axis into axisModel\n axisModel.axis = axis;\n // Inject axisModel into axis\n axis.model = axisModel;\n // Inject grid info axis\n axis.grid = grid;\n // Index of axis, can be used as key\n axis.index = idx;\n grid._axesList.push(axis);\n axesMap[dimName][idx] = axis;\n axesCount[dimName]++;\n };\n }\n };\n /**\n * Update cartesian properties from series.\n */\n Grid.prototype._updateScale = function (ecModel, gridModel) {\n // Reset scale\n each(this._axesList, function (axis) {\n axis.scale.setExtent(Infinity, -Infinity);\n if (axis.type === 'category') {\n var categorySortInfo = axis.model.get('categorySortInfo');\n axis.scale.setSortInfo(categorySortInfo);\n }\n });\n ecModel.eachSeries(function (seriesModel) {\n if (isCartesian2DSeries(seriesModel)) {\n var axesModelMap = findAxisModels(seriesModel);\n var xAxisModel = axesModelMap.xAxisModel;\n var yAxisModel = axesModelMap.yAxisModel;\n if (!isAxisUsedInTheGrid(xAxisModel, gridModel) || !isAxisUsedInTheGrid(yAxisModel, gridModel)) {\n return;\n }\n var cartesian = this.getCartesian(xAxisModel.componentIndex, yAxisModel.componentIndex);\n var data = seriesModel.getData();\n var xAxis = cartesian.getAxis('x');\n var yAxis = cartesian.getAxis('y');\n unionExtent(data, xAxis);\n unionExtent(data, yAxis);\n }\n }, this);\n function unionExtent(data, axis) {\n each(getDataDimensionsOnAxis(data, axis.dim), function (dim) {\n axis.scale.unionExtentFromData(data, dim);\n });\n }\n };\n /**\n * @param dim 'x' or 'y' or 'auto' or null/undefined\n */\n Grid.prototype.getTooltipAxes = function (dim) {\n var baseAxes = [];\n var otherAxes = [];\n each(this.getCartesians(), function (cartesian) {\n var baseAxis = dim != null && dim !== 'auto' ? cartesian.getAxis(dim) : cartesian.getBaseAxis();\n var otherAxis = cartesian.getOtherAxis(baseAxis);\n indexOf(baseAxes, baseAxis) < 0 && baseAxes.push(baseAxis);\n indexOf(otherAxes, otherAxis) < 0 && otherAxes.push(otherAxis);\n });\n return {\n baseAxes: baseAxes,\n otherAxes: otherAxes\n };\n };\n Grid.create = function (ecModel, api) {\n var grids = [];\n ecModel.eachComponent('grid', function (gridModel, idx) {\n var grid = new Grid(gridModel, ecModel, api);\n grid.name = 'grid_' + idx;\n // dataSampling requires axis extent, so resize\n // should be performed in create stage.\n grid.resize(gridModel, api, true);\n gridModel.coordinateSystem = grid;\n grids.push(grid);\n });\n // Inject the coordinateSystems into seriesModel\n ecModel.eachSeries(function (seriesModel) {\n if (!isCartesian2DSeries(seriesModel)) {\n return;\n }\n var axesModelMap = findAxisModels(seriesModel);\n var xAxisModel = axesModelMap.xAxisModel;\n var yAxisModel = axesModelMap.yAxisModel;\n var gridModel = xAxisModel.getCoordSysModel();\n if (process.env.NODE_ENV !== 'production') {\n if (!gridModel) {\n throw new Error('Grid \"' + retrieve3(xAxisModel.get('gridIndex'), xAxisModel.get('gridId'), 0) + '\" not found');\n }\n if (xAxisModel.getCoordSysModel() !== yAxisModel.getCoordSysModel()) {\n throw new Error('xAxis and yAxis must use the same grid');\n }\n }\n var grid = gridModel.coordinateSystem;\n seriesModel.coordinateSystem = grid.getCartesian(xAxisModel.componentIndex, yAxisModel.componentIndex);\n });\n return grids;\n };\n // For deciding which dimensions to use when creating list data\n Grid.dimensions = cartesian2DDimensions;\n return Grid;\n}();\n/**\n * Check if the axis is used in the specified grid.\n */\nfunction isAxisUsedInTheGrid(axisModel, gridModel) {\n return axisModel.getCoordSysModel() === gridModel;\n}\nfunction fixAxisOnZero(axesMap, otherAxisDim, axis,\n// Key: see `getOnZeroRecordKey`\nonZeroRecords) {\n axis.getAxesOnZeroOf = function () {\n // TODO: onZero of multiple axes.\n return otherAxisOnZeroOf ? [otherAxisOnZeroOf] : [];\n };\n // onZero can not be enabled in these two situations:\n // 1. When any other axis is a category axis.\n // 2. When no axis is cross 0 point.\n var otherAxes = axesMap[otherAxisDim];\n var otherAxisOnZeroOf;\n var axisModel = axis.model;\n var onZero = axisModel.get(['axisLine', 'onZero']);\n var onZeroAxisIndex = axisModel.get(['axisLine', 'onZeroAxisIndex']);\n if (!onZero) {\n return;\n }\n // If target axis is specified.\n if (onZeroAxisIndex != null) {\n if (canOnZeroToAxis(otherAxes[onZeroAxisIndex])) {\n otherAxisOnZeroOf = otherAxes[onZeroAxisIndex];\n }\n } else {\n // Find the first available other axis.\n for (var idx in otherAxes) {\n if (otherAxes.hasOwnProperty(idx) && canOnZeroToAxis(otherAxes[idx])\n // Consider that two Y axes on one value axis,\n // if both onZero, the two Y axes overlap.\n && !onZeroRecords[getOnZeroRecordKey(otherAxes[idx])]) {\n otherAxisOnZeroOf = otherAxes[idx];\n break;\n }\n }\n }\n if (otherAxisOnZeroOf) {\n onZeroRecords[getOnZeroRecordKey(otherAxisOnZeroOf)] = true;\n }\n function getOnZeroRecordKey(axis) {\n return axis.dim + '_' + axis.index;\n }\n}\nfunction canOnZeroToAxis(axis) {\n return axis && axis.type !== 'category' && axis.type !== 'time' && ifAxisCrossZero(axis);\n}\nfunction updateAxisTransform(axis, coordBase) {\n var axisExtent = axis.getExtent();\n var axisExtentSum = axisExtent[0] + axisExtent[1];\n // Fast transform\n axis.toGlobalCoord = axis.dim === 'x' ? function (coord) {\n return coord + coordBase;\n } : function (coord) {\n return axisExtentSum - coord + coordBase;\n };\n axis.toLocalCoord = axis.dim === 'x' ? function (coord) {\n return coord - coordBase;\n } : function (coord) {\n return axisExtentSum - coord + coordBase;\n };\n}\nexport default Grid;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { retrieve, defaults, extend, each, isObject, map, isString, isNumber, isFunction, retrieve2 } from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { createTextStyle } from '../../label/labelStyle.js';\nimport Model from '../../model/Model.js';\nimport { isRadianAroundZero, remRadian } from '../../util/number.js';\nimport { createSymbol, normalizeSymbolOffset } from '../../util/symbol.js';\nimport * as matrixUtil from 'zrender/lib/core/matrix.js';\nimport { applyTransform as v2ApplyTransform } from 'zrender/lib/core/vector.js';\nimport { shouldShowAllLabels } from '../../coord/axisHelper.js';\nimport { prepareLayoutList, hideOverlap } from '../../label/labelLayoutHelper.js';\nvar PI = Math.PI;\n/**\n * A final axis is translated and rotated from a \"standard axis\".\n * So opt.position and opt.rotation is required.\n *\n * A standard axis is and axis from [0, 0] to [0, axisExtent[1]],\n * for example: (0, 0) ------------> (0, 50)\n *\n * nameDirection or tickDirection or labelDirection is 1 means tick\n * or label is below the standard axis, whereas is -1 means above\n * the standard axis. labelOffset means offset between label and axis,\n * which is useful when 'onZero', where axisLabel is in the grid and\n * label in outside grid.\n *\n * Tips: like always,\n * positive rotation represents anticlockwise, and negative rotation\n * represents clockwise.\n * The direction of position coordinate is the same as the direction\n * of screen coordinate.\n *\n * Do not need to consider axis 'inverse', which is auto processed by\n * axis extent.\n */\nvar AxisBuilder = /** @class */function () {\n function AxisBuilder(axisModel, opt) {\n this.group = new graphic.Group();\n this.opt = opt;\n this.axisModel = axisModel;\n // Default value\n defaults(opt, {\n labelOffset: 0,\n nameDirection: 1,\n tickDirection: 1,\n labelDirection: 1,\n silent: true,\n handleAutoShown: function () {\n return true;\n }\n });\n // FIXME Not use a separate text group?\n var transformGroup = new graphic.Group({\n x: opt.position[0],\n y: opt.position[1],\n rotation: opt.rotation\n });\n // this.group.add(transformGroup);\n // this._transformGroup = transformGroup;\n transformGroup.updateTransform();\n this._transformGroup = transformGroup;\n }\n AxisBuilder.prototype.hasBuilder = function (name) {\n return !!builders[name];\n };\n AxisBuilder.prototype.add = function (name) {\n builders[name](this.opt, this.axisModel, this.group, this._transformGroup);\n };\n AxisBuilder.prototype.getGroup = function () {\n return this.group;\n };\n AxisBuilder.innerTextLayout = function (axisRotation, textRotation, direction) {\n var rotationDiff = remRadian(textRotation - axisRotation);\n var textAlign;\n var textVerticalAlign;\n if (isRadianAroundZero(rotationDiff)) {\n // Label is parallel with axis line.\n textVerticalAlign = direction > 0 ? 'top' : 'bottom';\n textAlign = 'center';\n } else if (isRadianAroundZero(rotationDiff - PI)) {\n // Label is inverse parallel with axis line.\n textVerticalAlign = direction > 0 ? 'bottom' : 'top';\n textAlign = 'center';\n } else {\n textVerticalAlign = 'middle';\n if (rotationDiff > 0 && rotationDiff < PI) {\n textAlign = direction > 0 ? 'right' : 'left';\n } else {\n textAlign = direction > 0 ? 'left' : 'right';\n }\n }\n return {\n rotation: rotationDiff,\n textAlign: textAlign,\n textVerticalAlign: textVerticalAlign\n };\n };\n AxisBuilder.makeAxisEventDataBase = function (axisModel) {\n var eventData = {\n componentType: axisModel.mainType,\n componentIndex: axisModel.componentIndex\n };\n eventData[axisModel.mainType + 'Index'] = axisModel.componentIndex;\n return eventData;\n };\n AxisBuilder.isLabelSilent = function (axisModel) {\n var tooltipOpt = axisModel.get('tooltip');\n return axisModel.get('silent')\n // Consider mouse cursor, add these restrictions.\n || !(axisModel.get('triggerEvent') || tooltipOpt && tooltipOpt.show);\n };\n return AxisBuilder;\n}();\n;\nvar builders = {\n axisLine: function (opt, axisModel, group, transformGroup) {\n var shown = axisModel.get(['axisLine', 'show']);\n if (shown === 'auto' && opt.handleAutoShown) {\n shown = opt.handleAutoShown('axisLine');\n }\n if (!shown) {\n return;\n }\n var extent = axisModel.axis.getExtent();\n var matrix = transformGroup.transform;\n var pt1 = [extent[0], 0];\n var pt2 = [extent[1], 0];\n var inverse = pt1[0] > pt2[0];\n if (matrix) {\n v2ApplyTransform(pt1, pt1, matrix);\n v2ApplyTransform(pt2, pt2, matrix);\n }\n var lineStyle = extend({\n lineCap: 'round'\n }, axisModel.getModel(['axisLine', 'lineStyle']).getLineStyle());\n var line = new graphic.Line({\n shape: {\n x1: pt1[0],\n y1: pt1[1],\n x2: pt2[0],\n y2: pt2[1]\n },\n style: lineStyle,\n strokeContainThreshold: opt.strokeContainThreshold || 5,\n silent: true,\n z2: 1\n });\n graphic.subPixelOptimizeLine(line.shape, line.style.lineWidth);\n line.anid = 'line';\n group.add(line);\n var arrows = axisModel.get(['axisLine', 'symbol']);\n if (arrows != null) {\n var arrowSize = axisModel.get(['axisLine', 'symbolSize']);\n if (isString(arrows)) {\n // Use the same arrow for start and end point\n arrows = [arrows, arrows];\n }\n if (isString(arrowSize) || isNumber(arrowSize)) {\n // Use the same size for width and height\n arrowSize = [arrowSize, arrowSize];\n }\n var arrowOffset = normalizeSymbolOffset(axisModel.get(['axisLine', 'symbolOffset']) || 0, arrowSize);\n var symbolWidth_1 = arrowSize[0];\n var symbolHeight_1 = arrowSize[1];\n each([{\n rotate: opt.rotation + Math.PI / 2,\n offset: arrowOffset[0],\n r: 0\n }, {\n rotate: opt.rotation - Math.PI / 2,\n offset: arrowOffset[1],\n r: Math.sqrt((pt1[0] - pt2[0]) * (pt1[0] - pt2[0]) + (pt1[1] - pt2[1]) * (pt1[1] - pt2[1]))\n }], function (point, index) {\n if (arrows[index] !== 'none' && arrows[index] != null) {\n var symbol = createSymbol(arrows[index], -symbolWidth_1 / 2, -symbolHeight_1 / 2, symbolWidth_1, symbolHeight_1, lineStyle.stroke, true);\n // Calculate arrow position with offset\n var r = point.r + point.offset;\n var pt = inverse ? pt2 : pt1;\n symbol.attr({\n rotation: point.rotate,\n x: pt[0] + r * Math.cos(opt.rotation),\n y: pt[1] - r * Math.sin(opt.rotation),\n silent: true,\n z2: 11\n });\n group.add(symbol);\n }\n });\n }\n },\n axisTickLabel: function (opt, axisModel, group, transformGroup) {\n var ticksEls = buildAxisMajorTicks(group, transformGroup, axisModel, opt);\n var labelEls = buildAxisLabel(group, transformGroup, axisModel, opt);\n fixMinMaxLabelShow(axisModel, labelEls, ticksEls);\n buildAxisMinorTicks(group, transformGroup, axisModel, opt.tickDirection);\n // This bit fixes the label overlap issue for the time chart.\n // See https://github.com/apache/echarts/issues/14266 for more.\n if (axisModel.get(['axisLabel', 'hideOverlap'])) {\n var labelList = prepareLayoutList(map(labelEls, function (label) {\n return {\n label: label,\n priority: label.z2,\n defaultAttr: {\n ignore: label.ignore\n }\n };\n }));\n hideOverlap(labelList);\n }\n },\n axisName: function (opt, axisModel, group, transformGroup) {\n var name = retrieve(opt.axisName, axisModel.get('name'));\n if (!name) {\n return;\n }\n var nameLocation = axisModel.get('nameLocation');\n var nameDirection = opt.nameDirection;\n var textStyleModel = axisModel.getModel('nameTextStyle');\n var gap = axisModel.get('nameGap') || 0;\n var extent = axisModel.axis.getExtent();\n var gapSignal = extent[0] > extent[1] ? -1 : 1;\n var pos = [nameLocation === 'start' ? extent[0] - gapSignal * gap : nameLocation === 'end' ? extent[1] + gapSignal * gap : (extent[0] + extent[1]) / 2,\n // Reuse labelOffset.\n isNameLocationCenter(nameLocation) ? opt.labelOffset + nameDirection * gap : 0];\n var labelLayout;\n var nameRotation = axisModel.get('nameRotate');\n if (nameRotation != null) {\n nameRotation = nameRotation * PI / 180; // To radian.\n }\n var axisNameAvailableWidth;\n if (isNameLocationCenter(nameLocation)) {\n labelLayout = AxisBuilder.innerTextLayout(opt.rotation, nameRotation != null ? nameRotation : opt.rotation,\n // Adapt to axis.\n nameDirection);\n } else {\n labelLayout = endTextLayout(opt.rotation, nameLocation, nameRotation || 0, extent);\n axisNameAvailableWidth = opt.axisNameAvailableWidth;\n if (axisNameAvailableWidth != null) {\n axisNameAvailableWidth = Math.abs(axisNameAvailableWidth / Math.sin(labelLayout.rotation));\n !isFinite(axisNameAvailableWidth) && (axisNameAvailableWidth = null);\n }\n }\n var textFont = textStyleModel.getFont();\n var truncateOpt = axisModel.get('nameTruncate', true) || {};\n var ellipsis = truncateOpt.ellipsis;\n var maxWidth = retrieve(opt.nameTruncateMaxWidth, truncateOpt.maxWidth, axisNameAvailableWidth);\n var textEl = new graphic.Text({\n x: pos[0],\n y: pos[1],\n rotation: labelLayout.rotation,\n silent: AxisBuilder.isLabelSilent(axisModel),\n style: createTextStyle(textStyleModel, {\n text: name,\n font: textFont,\n overflow: 'truncate',\n width: maxWidth,\n ellipsis: ellipsis,\n fill: textStyleModel.getTextColor() || axisModel.get(['axisLine', 'lineStyle', 'color']),\n align: textStyleModel.get('align') || labelLayout.textAlign,\n verticalAlign: textStyleModel.get('verticalAlign') || labelLayout.textVerticalAlign\n }),\n z2: 1\n });\n graphic.setTooltipConfig({\n el: textEl,\n componentModel: axisModel,\n itemName: name\n });\n textEl.__fullText = name;\n // Id for animation\n textEl.anid = 'name';\n if (axisModel.get('triggerEvent')) {\n var eventData = AxisBuilder.makeAxisEventDataBase(axisModel);\n eventData.targetType = 'axisName';\n eventData.name = name;\n getECData(textEl).eventData = eventData;\n }\n // FIXME\n transformGroup.add(textEl);\n textEl.updateTransform();\n group.add(textEl);\n textEl.decomposeTransform();\n }\n};\nfunction endTextLayout(rotation, textPosition, textRotate, extent) {\n var rotationDiff = remRadian(textRotate - rotation);\n var textAlign;\n var textVerticalAlign;\n var inverse = extent[0] > extent[1];\n var onLeft = textPosition === 'start' && !inverse || textPosition !== 'start' && inverse;\n if (isRadianAroundZero(rotationDiff - PI / 2)) {\n textVerticalAlign = onLeft ? 'bottom' : 'top';\n textAlign = 'center';\n } else if (isRadianAroundZero(rotationDiff - PI * 1.5)) {\n textVerticalAlign = onLeft ? 'top' : 'bottom';\n textAlign = 'center';\n } else {\n textVerticalAlign = 'middle';\n if (rotationDiff < PI * 1.5 && rotationDiff > PI / 2) {\n textAlign = onLeft ? 'left' : 'right';\n } else {\n textAlign = onLeft ? 'right' : 'left';\n }\n }\n return {\n rotation: rotationDiff,\n textAlign: textAlign,\n textVerticalAlign: textVerticalAlign\n };\n}\nfunction fixMinMaxLabelShow(axisModel, labelEls, tickEls) {\n if (shouldShowAllLabels(axisModel.axis)) {\n return;\n }\n // If min or max are user set, we need to check\n // If the tick on min(max) are overlap on their neighbour tick\n // If they are overlapped, we need to hide the min(max) tick label\n var showMinLabel = axisModel.get(['axisLabel', 'showMinLabel']);\n var showMaxLabel = axisModel.get(['axisLabel', 'showMaxLabel']);\n // FIXME\n // Have not consider onBand yet, where tick els is more than label els.\n labelEls = labelEls || [];\n tickEls = tickEls || [];\n var firstLabel = labelEls[0];\n var nextLabel = labelEls[1];\n var lastLabel = labelEls[labelEls.length - 1];\n var prevLabel = labelEls[labelEls.length - 2];\n var firstTick = tickEls[0];\n var nextTick = tickEls[1];\n var lastTick = tickEls[tickEls.length - 1];\n var prevTick = tickEls[tickEls.length - 2];\n if (showMinLabel === false) {\n ignoreEl(firstLabel);\n ignoreEl(firstTick);\n } else if (isTwoLabelOverlapped(firstLabel, nextLabel)) {\n if (showMinLabel) {\n ignoreEl(nextLabel);\n ignoreEl(nextTick);\n } else {\n ignoreEl(firstLabel);\n ignoreEl(firstTick);\n }\n }\n if (showMaxLabel === false) {\n ignoreEl(lastLabel);\n ignoreEl(lastTick);\n } else if (isTwoLabelOverlapped(prevLabel, lastLabel)) {\n if (showMaxLabel) {\n ignoreEl(prevLabel);\n ignoreEl(prevTick);\n } else {\n ignoreEl(lastLabel);\n ignoreEl(lastTick);\n }\n }\n}\nfunction ignoreEl(el) {\n el && (el.ignore = true);\n}\nfunction isTwoLabelOverlapped(current, next) {\n // current and next has the same rotation.\n var firstRect = current && current.getBoundingRect().clone();\n var nextRect = next && next.getBoundingRect().clone();\n if (!firstRect || !nextRect) {\n return;\n }\n // When checking intersect of two rotated labels, we use mRotationBack\n // to avoid that boundingRect is enlarge when using `boundingRect.applyTransform`.\n var mRotationBack = matrixUtil.identity([]);\n matrixUtil.rotate(mRotationBack, mRotationBack, -current.rotation);\n firstRect.applyTransform(matrixUtil.mul([], mRotationBack, current.getLocalTransform()));\n nextRect.applyTransform(matrixUtil.mul([], mRotationBack, next.getLocalTransform()));\n return firstRect.intersect(nextRect);\n}\nfunction isNameLocationCenter(nameLocation) {\n return nameLocation === 'middle' || nameLocation === 'center';\n}\nfunction createTicks(ticksCoords, tickTransform, tickEndCoord, tickLineStyle, anidPrefix) {\n var tickEls = [];\n var pt1 = [];\n var pt2 = [];\n for (var i = 0; i < ticksCoords.length; i++) {\n var tickCoord = ticksCoords[i].coord;\n pt1[0] = tickCoord;\n pt1[1] = 0;\n pt2[0] = tickCoord;\n pt2[1] = tickEndCoord;\n if (tickTransform) {\n v2ApplyTransform(pt1, pt1, tickTransform);\n v2ApplyTransform(pt2, pt2, tickTransform);\n }\n // Tick line, Not use group transform to have better line draw\n var tickEl = new graphic.Line({\n shape: {\n x1: pt1[0],\n y1: pt1[1],\n x2: pt2[0],\n y2: pt2[1]\n },\n style: tickLineStyle,\n z2: 2,\n autoBatch: true,\n silent: true\n });\n graphic.subPixelOptimizeLine(tickEl.shape, tickEl.style.lineWidth);\n tickEl.anid = anidPrefix + '_' + ticksCoords[i].tickValue;\n tickEls.push(tickEl);\n }\n return tickEls;\n}\nfunction buildAxisMajorTicks(group, transformGroup, axisModel, opt) {\n var axis = axisModel.axis;\n var tickModel = axisModel.getModel('axisTick');\n var shown = tickModel.get('show');\n if (shown === 'auto' && opt.handleAutoShown) {\n shown = opt.handleAutoShown('axisTick');\n }\n if (!shown || axis.scale.isBlank()) {\n return;\n }\n var lineStyleModel = tickModel.getModel('lineStyle');\n var tickEndCoord = opt.tickDirection * tickModel.get('length');\n var ticksCoords = axis.getTicksCoords();\n var ticksEls = createTicks(ticksCoords, transformGroup.transform, tickEndCoord, defaults(lineStyleModel.getLineStyle(), {\n stroke: axisModel.get(['axisLine', 'lineStyle', 'color'])\n }), 'ticks');\n for (var i = 0; i < ticksEls.length; i++) {\n group.add(ticksEls[i]);\n }\n return ticksEls;\n}\nfunction buildAxisMinorTicks(group, transformGroup, axisModel, tickDirection) {\n var axis = axisModel.axis;\n var minorTickModel = axisModel.getModel('minorTick');\n if (!minorTickModel.get('show') || axis.scale.isBlank()) {\n return;\n }\n var minorTicksCoords = axis.getMinorTicksCoords();\n if (!minorTicksCoords.length) {\n return;\n }\n var lineStyleModel = minorTickModel.getModel('lineStyle');\n var tickEndCoord = tickDirection * minorTickModel.get('length');\n var minorTickLineStyle = defaults(lineStyleModel.getLineStyle(), defaults(axisModel.getModel('axisTick').getLineStyle(), {\n stroke: axisModel.get(['axisLine', 'lineStyle', 'color'])\n }));\n for (var i = 0; i < minorTicksCoords.length; i++) {\n var minorTicksEls = createTicks(minorTicksCoords[i], transformGroup.transform, tickEndCoord, minorTickLineStyle, 'minorticks_' + i);\n for (var k = 0; k < minorTicksEls.length; k++) {\n group.add(minorTicksEls[k]);\n }\n }\n}\nfunction buildAxisLabel(group, transformGroup, axisModel, opt) {\n var axis = axisModel.axis;\n var show = retrieve(opt.axisLabelShow, axisModel.get(['axisLabel', 'show']));\n if (!show || axis.scale.isBlank()) {\n return;\n }\n var labelModel = axisModel.getModel('axisLabel');\n var labelMargin = labelModel.get('margin');\n var labels = axis.getViewLabels();\n // Special label rotate.\n var labelRotation = (retrieve(opt.labelRotate, labelModel.get('rotate')) || 0) * PI / 180;\n var labelLayout = AxisBuilder.innerTextLayout(opt.rotation, labelRotation, opt.labelDirection);\n var rawCategoryData = axisModel.getCategories && axisModel.getCategories(true);\n var labelEls = [];\n var silent = AxisBuilder.isLabelSilent(axisModel);\n var triggerEvent = axisModel.get('triggerEvent');\n each(labels, function (labelItem, index) {\n var tickValue = axis.scale.type === 'ordinal' ? axis.scale.getRawOrdinalNumber(labelItem.tickValue) : labelItem.tickValue;\n var formattedLabel = labelItem.formattedLabel;\n var rawLabel = labelItem.rawLabel;\n var itemLabelModel = labelModel;\n if (rawCategoryData && rawCategoryData[tickValue]) {\n var rawCategoryItem = rawCategoryData[tickValue];\n if (isObject(rawCategoryItem) && rawCategoryItem.textStyle) {\n itemLabelModel = new Model(rawCategoryItem.textStyle, labelModel, axisModel.ecModel);\n }\n }\n var textColor = itemLabelModel.getTextColor() || axisModel.get(['axisLine', 'lineStyle', 'color']);\n var tickCoord = axis.dataToCoord(tickValue);\n var align = itemLabelModel.getShallow('align', true) || labelLayout.textAlign;\n var alignMin = retrieve2(itemLabelModel.getShallow('alignMinLabel', true), align);\n var alignMax = retrieve2(itemLabelModel.getShallow('alignMaxLabel', true), align);\n var verticalAlign = itemLabelModel.getShallow('verticalAlign', true) || itemLabelModel.getShallow('baseline', true) || labelLayout.textVerticalAlign;\n var verticalAlignMin = retrieve2(itemLabelModel.getShallow('verticalAlignMinLabel', true), verticalAlign);\n var verticalAlignMax = retrieve2(itemLabelModel.getShallow('verticalAlignMaxLabel', true), verticalAlign);\n var textEl = new graphic.Text({\n x: tickCoord,\n y: opt.labelOffset + opt.labelDirection * labelMargin,\n rotation: labelLayout.rotation,\n silent: silent,\n z2: 10 + (labelItem.level || 0),\n style: createTextStyle(itemLabelModel, {\n text: formattedLabel,\n align: index === 0 ? alignMin : index === labels.length - 1 ? alignMax : align,\n verticalAlign: index === 0 ? verticalAlignMin : index === labels.length - 1 ? verticalAlignMax : verticalAlign,\n fill: isFunction(textColor) ? textColor(\n // (1) In category axis with data zoom, tick is not the original\n // index of axis.data. So tick should not be exposed to user\n // in category axis.\n // (2) Compatible with previous version, which always use formatted label as\n // input. But in interval scale the formatted label is like '223,445', which\n // maked user replace ','. So we modify it to return original val but remain\n // it as 'string' to avoid error in replacing.\n axis.type === 'category' ? rawLabel : axis.type === 'value' ? tickValue + '' : tickValue, index) : textColor\n })\n });\n textEl.anid = 'label_' + tickValue;\n // Pack data for mouse event\n if (triggerEvent) {\n var eventData = AxisBuilder.makeAxisEventDataBase(axisModel);\n eventData.targetType = 'axisLabel';\n eventData.value = rawLabel;\n eventData.tickIndex = index;\n if (axis.type === 'category') {\n eventData.dataIndex = tickValue;\n }\n getECData(textEl).eventData = eventData;\n }\n // FIXME\n transformGroup.add(textEl);\n textEl.updateTransform();\n labelEls.push(textEl);\n group.add(textEl);\n textEl.decomposeTransform();\n });\n return labelEls;\n}\nexport default AxisBuilder;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport Model from '../../model/Model.js';\nimport { each, curry, clone, defaults, isArray, indexOf } from 'zrender/lib/core/util.js';\n// Build axisPointerModel, mergin tooltip.axisPointer model for each axis.\n// allAxesInfo should be updated when setOption performed.\nexport function collect(ecModel, api) {\n var result = {\n /**\n * key: makeKey(axis.model)\n * value: {\n * axis,\n * coordSys,\n * axisPointerModel,\n * triggerTooltip,\n * triggerEmphasis,\n * involveSeries,\n * snap,\n * seriesModels,\n * seriesDataCount\n * }\n */\n axesInfo: {},\n seriesInvolved: false,\n /**\n * key: makeKey(coordSys.model)\n * value: Object: key makeKey(axis.model), value: axisInfo\n */\n coordSysAxesInfo: {},\n coordSysMap: {}\n };\n collectAxesInfo(result, ecModel, api);\n // Check seriesInvolved for performance, in case too many series in some chart.\n result.seriesInvolved && collectSeriesInfo(result, ecModel);\n return result;\n}\nfunction collectAxesInfo(result, ecModel, api) {\n var globalTooltipModel = ecModel.getComponent('tooltip');\n var globalAxisPointerModel = ecModel.getComponent('axisPointer');\n // links can only be set on global.\n var linksOption = globalAxisPointerModel.get('link', true) || [];\n var linkGroups = [];\n // Collect axes info.\n each(api.getCoordinateSystems(), function (coordSys) {\n // Some coordinate system do not support axes, like geo.\n if (!coordSys.axisPointerEnabled) {\n return;\n }\n var coordSysKey = makeKey(coordSys.model);\n var axesInfoInCoordSys = result.coordSysAxesInfo[coordSysKey] = {};\n result.coordSysMap[coordSysKey] = coordSys;\n // Set tooltip (like 'cross') is a convenient way to show axisPointer\n // for user. So we enable setting tooltip on coordSys model.\n var coordSysModel = coordSys.model;\n var baseTooltipModel = coordSysModel.getModel('tooltip', globalTooltipModel);\n each(coordSys.getAxes(), curry(saveTooltipAxisInfo, false, null));\n // If axis tooltip used, choose tooltip axis for each coordSys.\n // Notice this case: coordSys is `grid` but not `cartesian2D` here.\n if (coordSys.getTooltipAxes && globalTooltipModel\n // If tooltip.showContent is set as false, tooltip will not\n // show but axisPointer will show as normal.\n && baseTooltipModel.get('show')) {\n // Compatible with previous logic. But series.tooltip.trigger: 'axis'\n // or series.data[n].tooltip.trigger: 'axis' are not support any more.\n var triggerAxis = baseTooltipModel.get('trigger') === 'axis';\n var cross = baseTooltipModel.get(['axisPointer', 'type']) === 'cross';\n var tooltipAxes = coordSys.getTooltipAxes(baseTooltipModel.get(['axisPointer', 'axis']));\n if (triggerAxis || cross) {\n each(tooltipAxes.baseAxes, curry(saveTooltipAxisInfo, cross ? 'cross' : true, triggerAxis));\n }\n if (cross) {\n each(tooltipAxes.otherAxes, curry(saveTooltipAxisInfo, 'cross', false));\n }\n }\n // fromTooltip: true | false | 'cross'\n // triggerTooltip: true | false | null\n function saveTooltipAxisInfo(fromTooltip, triggerTooltip, axis) {\n var axisPointerModel = axis.model.getModel('axisPointer', globalAxisPointerModel);\n var axisPointerShow = axisPointerModel.get('show');\n if (!axisPointerShow || axisPointerShow === 'auto' && !fromTooltip && !isHandleTrigger(axisPointerModel)) {\n return;\n }\n if (triggerTooltip == null) {\n triggerTooltip = axisPointerModel.get('triggerTooltip');\n }\n axisPointerModel = fromTooltip ? makeAxisPointerModel(axis, baseTooltipModel, globalAxisPointerModel, ecModel, fromTooltip, triggerTooltip) : axisPointerModel;\n var snap = axisPointerModel.get('snap');\n var triggerEmphasis = axisPointerModel.get('triggerEmphasis');\n var axisKey = makeKey(axis.model);\n var involveSeries = triggerTooltip || snap || axis.type === 'category';\n // If result.axesInfo[key] exist, override it (tooltip has higher priority).\n var axisInfo = result.axesInfo[axisKey] = {\n key: axisKey,\n axis: axis,\n coordSys: coordSys,\n axisPointerModel: axisPointerModel,\n triggerTooltip: triggerTooltip,\n triggerEmphasis: triggerEmphasis,\n involveSeries: involveSeries,\n snap: snap,\n useHandle: isHandleTrigger(axisPointerModel),\n seriesModels: [],\n linkGroup: null\n };\n axesInfoInCoordSys[axisKey] = axisInfo;\n result.seriesInvolved = result.seriesInvolved || involveSeries;\n var groupIndex = getLinkGroupIndex(linksOption, axis);\n if (groupIndex != null) {\n var linkGroup = linkGroups[groupIndex] || (linkGroups[groupIndex] = {\n axesInfo: {}\n });\n linkGroup.axesInfo[axisKey] = axisInfo;\n linkGroup.mapper = linksOption[groupIndex].mapper;\n axisInfo.linkGroup = linkGroup;\n }\n }\n });\n}\nfunction makeAxisPointerModel(axis, baseTooltipModel, globalAxisPointerModel, ecModel, fromTooltip, triggerTooltip) {\n var tooltipAxisPointerModel = baseTooltipModel.getModel('axisPointer');\n var fields = ['type', 'snap', 'lineStyle', 'shadowStyle', 'label', 'animation', 'animationDurationUpdate', 'animationEasingUpdate', 'z'];\n var volatileOption = {};\n each(fields, function (field) {\n volatileOption[field] = clone(tooltipAxisPointerModel.get(field));\n });\n // category axis do not auto snap, otherwise some tick that do not\n // has value can not be hovered. value/time/log axis default snap if\n // triggered from tooltip and trigger tooltip.\n volatileOption.snap = axis.type !== 'category' && !!triggerTooltip;\n // Compatible with previous behavior, tooltip axis does not show label by default.\n // Only these properties can be overridden from tooltip to axisPointer.\n if (tooltipAxisPointerModel.get('type') === 'cross') {\n volatileOption.type = 'line';\n }\n var labelOption = volatileOption.label || (volatileOption.label = {});\n // Follow the convention, do not show label when triggered by tooltip by default.\n labelOption.show == null && (labelOption.show = false);\n if (fromTooltip === 'cross') {\n // When 'cross', both axes show labels.\n var tooltipAxisPointerLabelShow = tooltipAxisPointerModel.get(['label', 'show']);\n labelOption.show = tooltipAxisPointerLabelShow != null ? tooltipAxisPointerLabelShow : true;\n // If triggerTooltip, this is a base axis, which should better not use cross style\n // (cross style is dashed by default)\n if (!triggerTooltip) {\n var crossStyle = volatileOption.lineStyle = tooltipAxisPointerModel.get('crossStyle');\n crossStyle && defaults(labelOption, crossStyle.textStyle);\n }\n }\n return axis.model.getModel('axisPointer', new Model(volatileOption, globalAxisPointerModel, ecModel));\n}\nfunction collectSeriesInfo(result, ecModel) {\n // Prepare data for axis trigger\n ecModel.eachSeries(function (seriesModel) {\n // Notice this case: this coordSys is `cartesian2D` but not `grid`.\n var coordSys = seriesModel.coordinateSystem;\n var seriesTooltipTrigger = seriesModel.get(['tooltip', 'trigger'], true);\n var seriesTooltipShow = seriesModel.get(['tooltip', 'show'], true);\n if (!coordSys || seriesTooltipTrigger === 'none' || seriesTooltipTrigger === false || seriesTooltipTrigger === 'item' || seriesTooltipShow === false || seriesModel.get(['axisPointer', 'show'], true) === false) {\n return;\n }\n each(result.coordSysAxesInfo[makeKey(coordSys.model)], function (axisInfo) {\n var axis = axisInfo.axis;\n if (coordSys.getAxis(axis.dim) === axis) {\n axisInfo.seriesModels.push(seriesModel);\n axisInfo.seriesDataCount == null && (axisInfo.seriesDataCount = 0);\n axisInfo.seriesDataCount += seriesModel.getData().count();\n }\n });\n });\n}\n/**\n * For example:\n * {\n * axisPointer: {\n * links: [{\n * xAxisIndex: [2, 4],\n * yAxisIndex: 'all'\n * }, {\n * xAxisId: ['a5', 'a7'],\n * xAxisName: 'xxx'\n * }]\n * }\n * }\n */\nfunction getLinkGroupIndex(linksOption, axis) {\n var axisModel = axis.model;\n var dim = axis.dim;\n for (var i = 0; i < linksOption.length; i++) {\n var linkOption = linksOption[i] || {};\n if (checkPropInLink(linkOption[dim + 'AxisId'], axisModel.id) || checkPropInLink(linkOption[dim + 'AxisIndex'], axisModel.componentIndex) || checkPropInLink(linkOption[dim + 'AxisName'], axisModel.name)) {\n return i;\n }\n }\n}\nfunction checkPropInLink(linkPropValue, axisPropValue) {\n return linkPropValue === 'all' || isArray(linkPropValue) && indexOf(linkPropValue, axisPropValue) >= 0 || linkPropValue === axisPropValue;\n}\nexport function fixValue(axisModel) {\n var axisInfo = getAxisInfo(axisModel);\n if (!axisInfo) {\n return;\n }\n var axisPointerModel = axisInfo.axisPointerModel;\n var scale = axisInfo.axis.scale;\n var option = axisPointerModel.option;\n var status = axisPointerModel.get('status');\n var value = axisPointerModel.get('value');\n // Parse init value for category and time axis.\n if (value != null) {\n value = scale.parse(value);\n }\n var useHandle = isHandleTrigger(axisPointerModel);\n // If `handle` used, `axisPointer` will always be displayed, so value\n // and status should be initialized.\n if (status == null) {\n option.status = useHandle ? 'show' : 'hide';\n }\n var extent = scale.getExtent().slice();\n extent[0] > extent[1] && extent.reverse();\n if (\n // Pick a value on axis when initializing.\n value == null\n // If both `handle` and `dataZoom` are used, value may be out of axis extent,\n // where we should re-pick a value to keep `handle` displaying normally.\n || value > extent[1]) {\n // Make handle displayed on the end of the axis when init, which looks better.\n value = extent[1];\n }\n if (value < extent[0]) {\n value = extent[0];\n }\n option.value = value;\n if (useHandle) {\n option.status = axisInfo.axis.scale.isBlank() ? 'hide' : 'show';\n }\n}\nexport function getAxisInfo(axisModel) {\n var coordSysAxesInfo = (axisModel.ecModel.getComponent('axisPointer') || {}).coordSysAxesInfo;\n return coordSysAxesInfo && coordSysAxesInfo.axesInfo[makeKey(axisModel)];\n}\nexport function getAxisPointerModel(axisModel) {\n var axisInfo = getAxisInfo(axisModel);\n return axisInfo && axisInfo.axisPointerModel;\n}\nfunction isHandleTrigger(axisPointerModel) {\n return !!axisPointerModel.get(['handle', 'show']);\n}\n/**\n * @param {module:echarts/model/Model} model\n * @return {string} unique key\n */\nexport function makeKey(model) {\n return model.type + '||' + model.id;\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as axisPointerModelHelper from '../axisPointer/modelHelper.js';\nimport ComponentView from '../../view/Component.js';\nvar axisPointerClazz = {};\n/**\n * Base class of AxisView.\n */\nvar AxisView = /** @class */function (_super) {\n __extends(AxisView, _super);\n function AxisView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = AxisView.type;\n return _this;\n }\n /**\n * @override\n */\n AxisView.prototype.render = function (axisModel, ecModel, api, payload) {\n // FIXME\n // This process should proformed after coordinate systems updated\n // (axis scale updated), and should be performed each time update.\n // So put it here temporarily, although it is not appropriate to\n // put a model-writing procedure in `view`.\n this.axisPointerClass && axisPointerModelHelper.fixValue(axisModel);\n _super.prototype.render.apply(this, arguments);\n this._doUpdateAxisPointerClass(axisModel, api, true);\n };\n /**\n * Action handler.\n */\n AxisView.prototype.updateAxisPointer = function (axisModel, ecModel, api, payload) {\n this._doUpdateAxisPointerClass(axisModel, api, false);\n };\n /**\n * @override\n */\n AxisView.prototype.remove = function (ecModel, api) {\n var axisPointer = this._axisPointer;\n axisPointer && axisPointer.remove(api);\n };\n /**\n * @override\n */\n AxisView.prototype.dispose = function (ecModel, api) {\n this._disposeAxisPointer(api);\n _super.prototype.dispose.apply(this, arguments);\n };\n AxisView.prototype._doUpdateAxisPointerClass = function (axisModel, api, forceRender) {\n var Clazz = AxisView.getAxisPointerClass(this.axisPointerClass);\n if (!Clazz) {\n return;\n }\n var axisPointerModel = axisPointerModelHelper.getAxisPointerModel(axisModel);\n axisPointerModel ? (this._axisPointer || (this._axisPointer = new Clazz())).render(axisModel, axisPointerModel, api, forceRender) : this._disposeAxisPointer(api);\n };\n AxisView.prototype._disposeAxisPointer = function (api) {\n this._axisPointer && this._axisPointer.dispose(api);\n this._axisPointer = null;\n };\n AxisView.registerAxisPointerClass = function (type, clazz) {\n if (process.env.NODE_ENV !== 'production') {\n if (axisPointerClazz[type]) {\n throw new Error('axisPointer ' + type + ' exists');\n }\n }\n axisPointerClazz[type] = clazz;\n };\n ;\n AxisView.getAxisPointerClass = function (type) {\n return type && axisPointerClazz[type];\n };\n ;\n AxisView.type = 'axis';\n return AxisView;\n}(ComponentView);\nexport default AxisView;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport { makeInner } from '../../util/model.js';\nvar inner = makeInner();\nexport function rectCoordAxisBuildSplitArea(axisView, axisGroup, axisModel, gridModel) {\n var axis = axisModel.axis;\n if (axis.scale.isBlank()) {\n return;\n }\n // TODO: TYPE\n var splitAreaModel = axisModel.getModel('splitArea');\n var areaStyleModel = splitAreaModel.getModel('areaStyle');\n var areaColors = areaStyleModel.get('color');\n var gridRect = gridModel.coordinateSystem.getRect();\n var ticksCoords = axis.getTicksCoords({\n tickModel: splitAreaModel,\n clamp: true\n });\n if (!ticksCoords.length) {\n return;\n }\n // For Making appropriate splitArea animation, the color and anid\n // should be corresponding to previous one if possible.\n var areaColorsLen = areaColors.length;\n var lastSplitAreaColors = inner(axisView).splitAreaColors;\n var newSplitAreaColors = zrUtil.createHashMap();\n var colorIndex = 0;\n if (lastSplitAreaColors) {\n for (var i = 0; i < ticksCoords.length; i++) {\n var cIndex = lastSplitAreaColors.get(ticksCoords[i].tickValue);\n if (cIndex != null) {\n colorIndex = (cIndex + (areaColorsLen - 1) * i) % areaColorsLen;\n break;\n }\n }\n }\n var prev = axis.toGlobalCoord(ticksCoords[0].coord);\n var areaStyle = areaStyleModel.getAreaStyle();\n areaColors = zrUtil.isArray(areaColors) ? areaColors : [areaColors];\n for (var i = 1; i < ticksCoords.length; i++) {\n var tickCoord = axis.toGlobalCoord(ticksCoords[i].coord);\n var x = void 0;\n var y = void 0;\n var width = void 0;\n var height = void 0;\n if (axis.isHorizontal()) {\n x = prev;\n y = gridRect.y;\n width = tickCoord - x;\n height = gridRect.height;\n prev = x + width;\n } else {\n x = gridRect.x;\n y = prev;\n width = gridRect.width;\n height = tickCoord - y;\n prev = y + height;\n }\n var tickValue = ticksCoords[i - 1].tickValue;\n tickValue != null && newSplitAreaColors.set(tickValue, colorIndex);\n axisGroup.add(new graphic.Rect({\n anid: tickValue != null ? 'area_' + tickValue : null,\n shape: {\n x: x,\n y: y,\n width: width,\n height: height\n },\n style: zrUtil.defaults({\n fill: areaColors[colorIndex]\n }, areaStyle),\n autoBatch: true,\n silent: true\n }));\n colorIndex = (colorIndex + 1) % areaColorsLen;\n }\n inner(axisView).splitAreaColors = newSplitAreaColors;\n}\nexport function rectCoordAxisHandleRemove(axisView) {\n inner(axisView).splitAreaColors = null;\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport AxisBuilder from './AxisBuilder.js';\nimport AxisView from './AxisView.js';\nimport * as cartesianAxisHelper from '../../coord/cartesian/cartesianAxisHelper.js';\nimport { rectCoordAxisBuildSplitArea, rectCoordAxisHandleRemove } from './axisSplitHelper.js';\nimport { isIntervalOrLogScale } from '../../scale/helper.js';\nvar axisBuilderAttrs = ['axisLine', 'axisTickLabel', 'axisName'];\nvar selfBuilderAttrs = ['splitArea', 'splitLine', 'minorSplitLine'];\nvar CartesianAxisView = /** @class */function (_super) {\n __extends(CartesianAxisView, _super);\n function CartesianAxisView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = CartesianAxisView.type;\n _this.axisPointerClass = 'CartesianAxisPointer';\n return _this;\n }\n /**\n * @override\n */\n CartesianAxisView.prototype.render = function (axisModel, ecModel, api, payload) {\n this.group.removeAll();\n var oldAxisGroup = this._axisGroup;\n this._axisGroup = new graphic.Group();\n this.group.add(this._axisGroup);\n if (!axisModel.get('show')) {\n return;\n }\n var gridModel = axisModel.getCoordSysModel();\n var layout = cartesianAxisHelper.layout(gridModel, axisModel);\n var axisBuilder = new AxisBuilder(axisModel, zrUtil.extend({\n handleAutoShown: function (elementType) {\n var cartesians = gridModel.coordinateSystem.getCartesians();\n for (var i = 0; i < cartesians.length; i++) {\n if (isIntervalOrLogScale(cartesians[i].getOtherAxis(axisModel.axis).scale)) {\n // Still show axis tick or axisLine if other axis is value / log\n return true;\n }\n }\n // Not show axisTick or axisLine if other axis is category / time\n return false;\n }\n }, layout));\n zrUtil.each(axisBuilderAttrs, axisBuilder.add, axisBuilder);\n this._axisGroup.add(axisBuilder.getGroup());\n zrUtil.each(selfBuilderAttrs, function (name) {\n if (axisModel.get([name, 'show'])) {\n axisElementBuilders[name](this, this._axisGroup, axisModel, gridModel);\n }\n }, this);\n // THIS is a special case for bar racing chart.\n // Update the axis label from the natural initial layout to\n // sorted layout should has no animation.\n var isInitialSortFromBarRacing = payload && payload.type === 'changeAxisOrder' && payload.isInitSort;\n if (!isInitialSortFromBarRacing) {\n graphic.groupTransition(oldAxisGroup, this._axisGroup, axisModel);\n }\n _super.prototype.render.call(this, axisModel, ecModel, api, payload);\n };\n CartesianAxisView.prototype.remove = function () {\n rectCoordAxisHandleRemove(this);\n };\n CartesianAxisView.type = 'cartesianAxis';\n return CartesianAxisView;\n}(AxisView);\nvar axisElementBuilders = {\n splitLine: function (axisView, axisGroup, axisModel, gridModel) {\n var axis = axisModel.axis;\n if (axis.scale.isBlank()) {\n return;\n }\n var splitLineModel = axisModel.getModel('splitLine');\n var lineStyleModel = splitLineModel.getModel('lineStyle');\n var lineColors = lineStyleModel.get('color');\n lineColors = zrUtil.isArray(lineColors) ? lineColors : [lineColors];\n var gridRect = gridModel.coordinateSystem.getRect();\n var isHorizontal = axis.isHorizontal();\n var lineCount = 0;\n var ticksCoords = axis.getTicksCoords({\n tickModel: splitLineModel\n });\n var p1 = [];\n var p2 = [];\n var lineStyle = lineStyleModel.getLineStyle();\n for (var i = 0; i < ticksCoords.length; i++) {\n var tickCoord = axis.toGlobalCoord(ticksCoords[i].coord);\n if (isHorizontal) {\n p1[0] = tickCoord;\n p1[1] = gridRect.y;\n p2[0] = tickCoord;\n p2[1] = gridRect.y + gridRect.height;\n } else {\n p1[0] = gridRect.x;\n p1[1] = tickCoord;\n p2[0] = gridRect.x + gridRect.width;\n p2[1] = tickCoord;\n }\n var colorIndex = lineCount++ % lineColors.length;\n var tickValue = ticksCoords[i].tickValue;\n var line = new graphic.Line({\n anid: tickValue != null ? 'line_' + ticksCoords[i].tickValue : null,\n autoBatch: true,\n shape: {\n x1: p1[0],\n y1: p1[1],\n x2: p2[0],\n y2: p2[1]\n },\n style: zrUtil.defaults({\n stroke: lineColors[colorIndex]\n }, lineStyle),\n silent: true\n });\n graphic.subPixelOptimizeLine(line.shape, lineStyle.lineWidth);\n axisGroup.add(line);\n }\n },\n minorSplitLine: function (axisView, axisGroup, axisModel, gridModel) {\n var axis = axisModel.axis;\n var minorSplitLineModel = axisModel.getModel('minorSplitLine');\n var lineStyleModel = minorSplitLineModel.getModel('lineStyle');\n var gridRect = gridModel.coordinateSystem.getRect();\n var isHorizontal = axis.isHorizontal();\n var minorTicksCoords = axis.getMinorTicksCoords();\n if (!minorTicksCoords.length) {\n return;\n }\n var p1 = [];\n var p2 = [];\n var lineStyle = lineStyleModel.getLineStyle();\n for (var i = 0; i < minorTicksCoords.length; i++) {\n for (var k = 0; k < minorTicksCoords[i].length; k++) {\n var tickCoord = axis.toGlobalCoord(minorTicksCoords[i][k].coord);\n if (isHorizontal) {\n p1[0] = tickCoord;\n p1[1] = gridRect.y;\n p2[0] = tickCoord;\n p2[1] = gridRect.y + gridRect.height;\n } else {\n p1[0] = gridRect.x;\n p1[1] = tickCoord;\n p2[0] = gridRect.x + gridRect.width;\n p2[1] = tickCoord;\n }\n var line = new graphic.Line({\n anid: 'minor_line_' + minorTicksCoords[i][k].tickValue,\n autoBatch: true,\n shape: {\n x1: p1[0],\n y1: p1[1],\n x2: p2[0],\n y2: p2[1]\n },\n style: lineStyle,\n silent: true\n });\n graphic.subPixelOptimizeLine(line.shape, lineStyle.lineWidth);\n axisGroup.add(line);\n }\n }\n },\n splitArea: function (axisView, axisGroup, axisModel, gridModel) {\n rectCoordAxisBuildSplitArea(axisView, axisGroup, axisModel, gridModel);\n }\n};\nvar CartesianXAxisView = /** @class */function (_super) {\n __extends(CartesianXAxisView, _super);\n function CartesianXAxisView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = CartesianXAxisView.type;\n return _this;\n }\n CartesianXAxisView.type = 'xAxis';\n return CartesianXAxisView;\n}(CartesianAxisView);\nexport { CartesianXAxisView };\nvar CartesianYAxisView = /** @class */function (_super) {\n __extends(CartesianYAxisView, _super);\n function CartesianYAxisView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = CartesianXAxisView.type;\n return _this;\n }\n CartesianYAxisView.type = 'yAxis';\n return CartesianYAxisView;\n}(CartesianAxisView);\nexport { CartesianYAxisView };\nexport default CartesianAxisView;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport ComponentView from '../../view/Component.js';\nimport GridModel from '../../coord/cartesian/GridModel.js';\nimport { Rect } from '../../util/graphic.js';\nimport { defaults } from 'zrender/lib/core/util.js';\nimport { CartesianAxisModel } from '../../coord/cartesian/AxisModel.js';\nimport axisModelCreator from '../../coord/axisModelCreator.js';\nimport Grid from '../../coord/cartesian/Grid.js';\nimport { CartesianXAxisView, CartesianYAxisView } from '../axis/CartesianAxisView.js';\n// Grid view\nvar GridView = /** @class */function (_super) {\n __extends(GridView, _super);\n function GridView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'grid';\n return _this;\n }\n GridView.prototype.render = function (gridModel, ecModel) {\n this.group.removeAll();\n if (gridModel.get('show')) {\n this.group.add(new Rect({\n shape: gridModel.coordinateSystem.getRect(),\n style: defaults({\n fill: gridModel.get('backgroundColor')\n }, gridModel.getItemStyle()),\n silent: true,\n z2: -1\n }));\n }\n };\n GridView.type = 'grid';\n return GridView;\n}(ComponentView);\nvar extraOption = {\n // gridIndex: 0,\n // gridId: '',\n offset: 0\n};\nexport function install(registers) {\n registers.registerComponentView(GridView);\n registers.registerComponentModel(GridModel);\n registers.registerCoordinateSystem('cartesian2d', Grid);\n axisModelCreator(registers, 'x', CartesianAxisModel, extraOption);\n axisModelCreator(registers, 'y', CartesianAxisModel, extraOption);\n registers.registerComponentView(CartesianXAxisView);\n registers.registerComponentView(CartesianYAxisView);\n registers.registerPreprocessor(function (option) {\n // Only create grid when need\n if (option.xAxis && option.yAxis && !option.grid) {\n option.grid = {};\n }\n });\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { use } from '../../extension.js';\nimport ScatterSeriesModel from './ScatterSeries.js';\nimport ScatterView from './ScatterView.js';\nimport { install as installGridSimple } from '../../component/grid/installSimple.js';\nimport layoutPoints from '../../layout/points.js';\nexport function install(registers) {\n // In case developer forget to include grid component\n use(installGridSimple);\n registers.registerSeriesModel(ScatterSeriesModel);\n registers.registerChartView(ScatterView);\n registers.registerLayout(layoutPoints('scatter'));\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport * as axisPointerModelHelper from './modelHelper.js';\nimport * as eventTool from 'zrender/lib/core/event.js';\nimport * as throttleUtil from '../../util/throttle.js';\nimport { makeInner } from '../../util/model.js';\nvar inner = makeInner();\nvar clone = zrUtil.clone;\nvar bind = zrUtil.bind;\n/**\n * Base axis pointer class in 2D.\n */\nvar BaseAxisPointer = /** @class */function () {\n function BaseAxisPointer() {\n this._dragging = false;\n /**\n * In px, arbitrary value. Do not set too small,\n * no animation is ok for most cases.\n */\n this.animationThreshold = 15;\n }\n /**\n * @implement\n */\n BaseAxisPointer.prototype.render = function (axisModel, axisPointerModel, api, forceRender) {\n var value = axisPointerModel.get('value');\n var status = axisPointerModel.get('status');\n // Bind them to `this`, not in closure, otherwise they will not\n // be replaced when user calling setOption in not merge mode.\n this._axisModel = axisModel;\n this._axisPointerModel = axisPointerModel;\n this._api = api;\n // Optimize: `render` will be called repeatedly during mouse move.\n // So it is power consuming if performing `render` each time,\n // especially on mobile device.\n if (!forceRender && this._lastValue === value && this._lastStatus === status) {\n return;\n }\n this._lastValue = value;\n this._lastStatus = status;\n var group = this._group;\n var handle = this._handle;\n if (!status || status === 'hide') {\n // Do not clear here, for animation better.\n group && group.hide();\n handle && handle.hide();\n return;\n }\n group && group.show();\n handle && handle.show();\n // Otherwise status is 'show'\n var elOption = {};\n this.makeElOption(elOption, value, axisModel, axisPointerModel, api);\n // Enable change axis pointer type.\n var graphicKey = elOption.graphicKey;\n if (graphicKey !== this._lastGraphicKey) {\n this.clear(api);\n }\n this._lastGraphicKey = graphicKey;\n var moveAnimation = this._moveAnimation = this.determineAnimation(axisModel, axisPointerModel);\n if (!group) {\n group = this._group = new graphic.Group();\n this.createPointerEl(group, elOption, axisModel, axisPointerModel);\n this.createLabelEl(group, elOption, axisModel, axisPointerModel);\n api.getZr().add(group);\n } else {\n var doUpdateProps = zrUtil.curry(updateProps, axisPointerModel, moveAnimation);\n this.updatePointerEl(group, elOption, doUpdateProps);\n this.updateLabelEl(group, elOption, doUpdateProps, axisPointerModel);\n }\n updateMandatoryProps(group, axisPointerModel, true);\n this._renderHandle(value);\n };\n /**\n * @implement\n */\n BaseAxisPointer.prototype.remove = function (api) {\n this.clear(api);\n };\n /**\n * @implement\n */\n BaseAxisPointer.prototype.dispose = function (api) {\n this.clear(api);\n };\n /**\n * @protected\n */\n BaseAxisPointer.prototype.determineAnimation = function (axisModel, axisPointerModel) {\n var animation = axisPointerModel.get('animation');\n var axis = axisModel.axis;\n var isCategoryAxis = axis.type === 'category';\n var useSnap = axisPointerModel.get('snap');\n // Value axis without snap always do not snap.\n if (!useSnap && !isCategoryAxis) {\n return false;\n }\n if (animation === 'auto' || animation == null) {\n var animationThreshold = this.animationThreshold;\n if (isCategoryAxis && axis.getBandWidth() > animationThreshold) {\n return true;\n }\n // It is important to auto animation when snap used. Consider if there is\n // a dataZoom, animation will be disabled when too many points exist, while\n // it will be enabled for better visual effect when little points exist.\n if (useSnap) {\n var seriesDataCount = axisPointerModelHelper.getAxisInfo(axisModel).seriesDataCount;\n var axisExtent = axis.getExtent();\n // Approximate band width\n return Math.abs(axisExtent[0] - axisExtent[1]) / seriesDataCount > animationThreshold;\n }\n return false;\n }\n return animation === true;\n };\n /**\n * add {pointer, label, graphicKey} to elOption\n * @protected\n */\n BaseAxisPointer.prototype.makeElOption = function (elOption, value, axisModel, axisPointerModel, api) {\n // Should be implemenented by sub-class.\n };\n /**\n * @protected\n */\n BaseAxisPointer.prototype.createPointerEl = function (group, elOption, axisModel, axisPointerModel) {\n var pointerOption = elOption.pointer;\n if (pointerOption) {\n var pointerEl = inner(group).pointerEl = new graphic[pointerOption.type](clone(elOption.pointer));\n group.add(pointerEl);\n }\n };\n /**\n * @protected\n */\n BaseAxisPointer.prototype.createLabelEl = function (group, elOption, axisModel, axisPointerModel) {\n if (elOption.label) {\n var labelEl = inner(group).labelEl = new graphic.Text(clone(elOption.label));\n group.add(labelEl);\n updateLabelShowHide(labelEl, axisPointerModel);\n }\n };\n /**\n * @protected\n */\n BaseAxisPointer.prototype.updatePointerEl = function (group, elOption, updateProps) {\n var pointerEl = inner(group).pointerEl;\n if (pointerEl && elOption.pointer) {\n pointerEl.setStyle(elOption.pointer.style);\n updateProps(pointerEl, {\n shape: elOption.pointer.shape\n });\n }\n };\n /**\n * @protected\n */\n BaseAxisPointer.prototype.updateLabelEl = function (group, elOption, updateProps, axisPointerModel) {\n var labelEl = inner(group).labelEl;\n if (labelEl) {\n labelEl.setStyle(elOption.label.style);\n updateProps(labelEl, {\n // Consider text length change in vertical axis, animation should\n // be used on shape, otherwise the effect will be weird.\n // TODOTODO\n // shape: elOption.label.shape,\n x: elOption.label.x,\n y: elOption.label.y\n });\n updateLabelShowHide(labelEl, axisPointerModel);\n }\n };\n /**\n * @private\n */\n BaseAxisPointer.prototype._renderHandle = function (value) {\n if (this._dragging || !this.updateHandleTransform) {\n return;\n }\n var axisPointerModel = this._axisPointerModel;\n var zr = this._api.getZr();\n var handle = this._handle;\n var handleModel = axisPointerModel.getModel('handle');\n var status = axisPointerModel.get('status');\n if (!handleModel.get('show') || !status || status === 'hide') {\n handle && zr.remove(handle);\n this._handle = null;\n return;\n }\n var isInit;\n if (!this._handle) {\n isInit = true;\n handle = this._handle = graphic.createIcon(handleModel.get('icon'), {\n cursor: 'move',\n draggable: true,\n onmousemove: function (e) {\n // For mobile device, prevent screen slider on the button.\n eventTool.stop(e.event);\n },\n onmousedown: bind(this._onHandleDragMove, this, 0, 0),\n drift: bind(this._onHandleDragMove, this),\n ondragend: bind(this._onHandleDragEnd, this)\n });\n zr.add(handle);\n }\n updateMandatoryProps(handle, axisPointerModel, false);\n // update style\n handle.setStyle(handleModel.getItemStyle(null, ['color', 'borderColor', 'borderWidth', 'opacity', 'shadowColor', 'shadowBlur', 'shadowOffsetX', 'shadowOffsetY']));\n // update position\n var handleSize = handleModel.get('size');\n if (!zrUtil.isArray(handleSize)) {\n handleSize = [handleSize, handleSize];\n }\n handle.scaleX = handleSize[0] / 2;\n handle.scaleY = handleSize[1] / 2;\n throttleUtil.createOrUpdate(this, '_doDispatchAxisPointer', handleModel.get('throttle') || 0, 'fixRate');\n this._moveHandleToValue(value, isInit);\n };\n BaseAxisPointer.prototype._moveHandleToValue = function (value, isInit) {\n updateProps(this._axisPointerModel, !isInit && this._moveAnimation, this._handle, getHandleTransProps(this.getHandleTransform(value, this._axisModel, this._axisPointerModel)));\n };\n BaseAxisPointer.prototype._onHandleDragMove = function (dx, dy) {\n var handle = this._handle;\n if (!handle) {\n return;\n }\n this._dragging = true;\n // Persistent for throttle.\n var trans = this.updateHandleTransform(getHandleTransProps(handle), [dx, dy], this._axisModel, this._axisPointerModel);\n this._payloadInfo = trans;\n handle.stopAnimation();\n handle.attr(getHandleTransProps(trans));\n inner(handle).lastProp = null;\n this._doDispatchAxisPointer();\n };\n /**\n * Throttled method.\n */\n BaseAxisPointer.prototype._doDispatchAxisPointer = function () {\n var handle = this._handle;\n if (!handle) {\n return;\n }\n var payloadInfo = this._payloadInfo;\n var axisModel = this._axisModel;\n this._api.dispatchAction({\n type: 'updateAxisPointer',\n x: payloadInfo.cursorPoint[0],\n y: payloadInfo.cursorPoint[1],\n tooltipOption: payloadInfo.tooltipOption,\n axesInfo: [{\n axisDim: axisModel.axis.dim,\n axisIndex: axisModel.componentIndex\n }]\n });\n };\n BaseAxisPointer.prototype._onHandleDragEnd = function () {\n this._dragging = false;\n var handle = this._handle;\n if (!handle) {\n return;\n }\n var value = this._axisPointerModel.get('value');\n // Consider snap or categroy axis, handle may be not consistent with\n // axisPointer. So move handle to align the exact value position when\n // drag ended.\n this._moveHandleToValue(value);\n // For the effect: tooltip will be shown when finger holding on handle\n // button, and will be hidden after finger left handle button.\n this._api.dispatchAction({\n type: 'hideTip'\n });\n };\n /**\n * @private\n */\n BaseAxisPointer.prototype.clear = function (api) {\n this._lastValue = null;\n this._lastStatus = null;\n var zr = api.getZr();\n var group = this._group;\n var handle = this._handle;\n if (zr && group) {\n this._lastGraphicKey = null;\n group && zr.remove(group);\n handle && zr.remove(handle);\n this._group = null;\n this._handle = null;\n this._payloadInfo = null;\n }\n throttleUtil.clear(this, '_doDispatchAxisPointer');\n };\n /**\n * @protected\n */\n BaseAxisPointer.prototype.doClear = function () {\n // Implemented by sub-class if necessary.\n };\n BaseAxisPointer.prototype.buildLabel = function (xy, wh, xDimIndex) {\n xDimIndex = xDimIndex || 0;\n return {\n x: xy[xDimIndex],\n y: xy[1 - xDimIndex],\n width: wh[xDimIndex],\n height: wh[1 - xDimIndex]\n };\n };\n return BaseAxisPointer;\n}();\nfunction updateProps(animationModel, moveAnimation, el, props) {\n // Animation optimize.\n if (!propsEqual(inner(el).lastProp, props)) {\n inner(el).lastProp = props;\n moveAnimation ? graphic.updateProps(el, props, animationModel) : (el.stopAnimation(), el.attr(props));\n }\n}\nfunction propsEqual(lastProps, newProps) {\n if (zrUtil.isObject(lastProps) && zrUtil.isObject(newProps)) {\n var equals_1 = true;\n zrUtil.each(newProps, function (item, key) {\n equals_1 = equals_1 && propsEqual(lastProps[key], item);\n });\n return !!equals_1;\n } else {\n return lastProps === newProps;\n }\n}\nfunction updateLabelShowHide(labelEl, axisPointerModel) {\n labelEl[axisPointerModel.get(['label', 'show']) ? 'show' : 'hide']();\n}\nfunction getHandleTransProps(trans) {\n return {\n x: trans.x || 0,\n y: trans.y || 0,\n rotation: trans.rotation || 0\n };\n}\nfunction updateMandatoryProps(group, axisPointerModel, silent) {\n var z = axisPointerModel.get('z');\n var zlevel = axisPointerModel.get('zlevel');\n group && group.traverse(function (el) {\n if (el.type !== 'group') {\n z != null && (el.z = z);\n zlevel != null && (el.zlevel = zlevel);\n el.silent = silent;\n }\n });\n}\nexport default BaseAxisPointer;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport * as textContain from 'zrender/lib/contain/text.js';\nimport * as formatUtil from '../../util/format.js';\nimport * as matrix from 'zrender/lib/core/matrix.js';\nimport * as axisHelper from '../../coord/axisHelper.js';\nimport AxisBuilder from '../axis/AxisBuilder.js';\nimport { createTextStyle } from '../../label/labelStyle.js';\nexport function buildElStyle(axisPointerModel) {\n var axisPointerType = axisPointerModel.get('type');\n var styleModel = axisPointerModel.getModel(axisPointerType + 'Style');\n var style;\n if (axisPointerType === 'line') {\n style = styleModel.getLineStyle();\n style.fill = null;\n } else if (axisPointerType === 'shadow') {\n style = styleModel.getAreaStyle();\n style.stroke = null;\n }\n return style;\n}\n/**\n * @param {Function} labelPos {align, verticalAlign, position}\n */\nexport function buildLabelElOption(elOption, axisModel, axisPointerModel, api, labelPos) {\n var value = axisPointerModel.get('value');\n var text = getValueLabel(value, axisModel.axis, axisModel.ecModel, axisPointerModel.get('seriesDataIndices'), {\n precision: axisPointerModel.get(['label', 'precision']),\n formatter: axisPointerModel.get(['label', 'formatter'])\n });\n var labelModel = axisPointerModel.getModel('label');\n var paddings = formatUtil.normalizeCssArray(labelModel.get('padding') || 0);\n var font = labelModel.getFont();\n var textRect = textContain.getBoundingRect(text, font);\n var position = labelPos.position;\n var width = textRect.width + paddings[1] + paddings[3];\n var height = textRect.height + paddings[0] + paddings[2];\n // Adjust by align.\n var align = labelPos.align;\n align === 'right' && (position[0] -= width);\n align === 'center' && (position[0] -= width / 2);\n var verticalAlign = labelPos.verticalAlign;\n verticalAlign === 'bottom' && (position[1] -= height);\n verticalAlign === 'middle' && (position[1] -= height / 2);\n // Not overflow ec container\n confineInContainer(position, width, height, api);\n var bgColor = labelModel.get('backgroundColor');\n if (!bgColor || bgColor === 'auto') {\n bgColor = axisModel.get(['axisLine', 'lineStyle', 'color']);\n }\n elOption.label = {\n // shape: {x: 0, y: 0, width: width, height: height, r: labelModel.get('borderRadius')},\n x: position[0],\n y: position[1],\n style: createTextStyle(labelModel, {\n text: text,\n font: font,\n fill: labelModel.getTextColor(),\n padding: paddings,\n backgroundColor: bgColor\n }),\n // Label should be over axisPointer.\n z2: 10\n };\n}\n// Do not overflow ec container\nfunction confineInContainer(position, width, height, api) {\n var viewWidth = api.getWidth();\n var viewHeight = api.getHeight();\n position[0] = Math.min(position[0] + width, viewWidth) - width;\n position[1] = Math.min(position[1] + height, viewHeight) - height;\n position[0] = Math.max(position[0], 0);\n position[1] = Math.max(position[1], 0);\n}\nexport function getValueLabel(value, axis, ecModel, seriesDataIndices, opt) {\n value = axis.scale.parse(value);\n var text = axis.scale.getLabel({\n value: value\n }, {\n // If `precision` is set, width can be fixed (like '12.00500'), which\n // helps to debounce when when moving label.\n precision: opt.precision\n });\n var formatter = opt.formatter;\n if (formatter) {\n var params_1 = {\n value: axisHelper.getAxisRawValue(axis, {\n value: value\n }),\n axisDimension: axis.dim,\n axisIndex: axis.index,\n seriesData: []\n };\n zrUtil.each(seriesDataIndices, function (idxItem) {\n var series = ecModel.getSeriesByIndex(idxItem.seriesIndex);\n var dataIndex = idxItem.dataIndexInside;\n var dataParams = series && series.getDataParams(dataIndex);\n dataParams && params_1.seriesData.push(dataParams);\n });\n if (zrUtil.isString(formatter)) {\n text = formatter.replace('{value}', text);\n } else if (zrUtil.isFunction(formatter)) {\n text = formatter(params_1);\n }\n }\n return text;\n}\nexport function getTransformedPosition(axis, value, layoutInfo) {\n var transform = matrix.create();\n matrix.rotate(transform, transform, layoutInfo.rotation);\n matrix.translate(transform, transform, layoutInfo.position);\n return graphic.applyTransform([axis.dataToCoord(value), (layoutInfo.labelOffset || 0) + (layoutInfo.labelDirection || 1) * (layoutInfo.labelMargin || 0)], transform);\n}\nexport function buildCartesianSingleLabelElOption(value, elOption, layoutInfo, axisModel, axisPointerModel, api) {\n // @ts-ignore\n var textLayout = AxisBuilder.innerTextLayout(layoutInfo.rotation, 0, layoutInfo.labelDirection);\n layoutInfo.labelMargin = axisPointerModel.get(['label', 'margin']);\n buildLabelElOption(elOption, axisModel, axisPointerModel, api, {\n position: getTransformedPosition(axisModel.axis, value, layoutInfo),\n align: textLayout.textAlign,\n verticalAlign: textLayout.textVerticalAlign\n });\n}\nexport function makeLineShape(p1, p2, xDimIndex) {\n xDimIndex = xDimIndex || 0;\n return {\n x1: p1[xDimIndex],\n y1: p1[1 - xDimIndex],\n x2: p2[xDimIndex],\n y2: p2[1 - xDimIndex]\n };\n}\nexport function makeRectShape(xy, wh, xDimIndex) {\n xDimIndex = xDimIndex || 0;\n return {\n x: xy[xDimIndex],\n y: xy[1 - xDimIndex],\n width: wh[xDimIndex],\n height: wh[1 - xDimIndex]\n };\n}\nexport function makeSectorShape(cx, cy, r0, r, startAngle, endAngle) {\n return {\n cx: cx,\n cy: cy,\n r0: r0,\n r: r,\n startAngle: startAngle,\n endAngle: endAngle,\n clockwise: true\n };\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport BaseAxisPointer from './BaseAxisPointer.js';\nimport * as viewHelper from './viewHelper.js';\nimport * as cartesianAxisHelper from '../../coord/cartesian/cartesianAxisHelper.js';\nvar CartesianAxisPointer = /** @class */function (_super) {\n __extends(CartesianAxisPointer, _super);\n function CartesianAxisPointer() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @override\n */\n CartesianAxisPointer.prototype.makeElOption = function (elOption, value, axisModel, axisPointerModel, api) {\n var axis = axisModel.axis;\n var grid = axis.grid;\n var axisPointerType = axisPointerModel.get('type');\n var otherExtent = getCartesian(grid, axis).getOtherAxis(axis).getGlobalExtent();\n var pixelValue = axis.toGlobalCoord(axis.dataToCoord(value, true));\n if (axisPointerType && axisPointerType !== 'none') {\n var elStyle = viewHelper.buildElStyle(axisPointerModel);\n var pointerOption = pointerShapeBuilder[axisPointerType](axis, pixelValue, otherExtent);\n pointerOption.style = elStyle;\n elOption.graphicKey = pointerOption.type;\n elOption.pointer = pointerOption;\n }\n var layoutInfo = cartesianAxisHelper.layout(grid.model, axisModel);\n viewHelper.buildCartesianSingleLabelElOption(\n // @ts-ignore\n value, elOption, layoutInfo, axisModel, axisPointerModel, api);\n };\n /**\n * @override\n */\n CartesianAxisPointer.prototype.getHandleTransform = function (value, axisModel, axisPointerModel) {\n var layoutInfo = cartesianAxisHelper.layout(axisModel.axis.grid.model, axisModel, {\n labelInside: false\n });\n // @ts-ignore\n layoutInfo.labelMargin = axisPointerModel.get(['handle', 'margin']);\n var pos = viewHelper.getTransformedPosition(axisModel.axis, value, layoutInfo);\n return {\n x: pos[0],\n y: pos[1],\n rotation: layoutInfo.rotation + (layoutInfo.labelDirection < 0 ? Math.PI : 0)\n };\n };\n /**\n * @override\n */\n CartesianAxisPointer.prototype.updateHandleTransform = function (transform, delta, axisModel, axisPointerModel) {\n var axis = axisModel.axis;\n var grid = axis.grid;\n var axisExtent = axis.getGlobalExtent(true);\n var otherExtent = getCartesian(grid, axis).getOtherAxis(axis).getGlobalExtent();\n var dimIndex = axis.dim === 'x' ? 0 : 1;\n var currPosition = [transform.x, transform.y];\n currPosition[dimIndex] += delta[dimIndex];\n currPosition[dimIndex] = Math.min(axisExtent[1], currPosition[dimIndex]);\n currPosition[dimIndex] = Math.max(axisExtent[0], currPosition[dimIndex]);\n var cursorOtherValue = (otherExtent[1] + otherExtent[0]) / 2;\n var cursorPoint = [cursorOtherValue, cursorOtherValue];\n cursorPoint[dimIndex] = currPosition[dimIndex];\n // Make tooltip do not overlap axisPointer and in the middle of the grid.\n var tooltipOptions = [{\n verticalAlign: 'middle'\n }, {\n align: 'center'\n }];\n return {\n x: currPosition[0],\n y: currPosition[1],\n rotation: transform.rotation,\n cursorPoint: cursorPoint,\n tooltipOption: tooltipOptions[dimIndex]\n };\n };\n return CartesianAxisPointer;\n}(BaseAxisPointer);\nfunction getCartesian(grid, axis) {\n var opt = {};\n opt[axis.dim + 'AxisIndex'] = axis.index;\n return grid.getCartesian(opt);\n}\nvar pointerShapeBuilder = {\n line: function (axis, pixelValue, otherExtent) {\n var targetShape = viewHelper.makeLineShape([pixelValue, otherExtent[0]], [pixelValue, otherExtent[1]], getAxisDimIndex(axis));\n return {\n type: 'Line',\n subPixelOptimize: true,\n shape: targetShape\n };\n },\n shadow: function (axis, pixelValue, otherExtent) {\n var bandWidth = Math.max(1, axis.getBandWidth());\n var span = otherExtent[1] - otherExtent[0];\n return {\n type: 'Rect',\n shape: viewHelper.makeRectShape([pixelValue - bandWidth / 2, otherExtent[0]], [bandWidth, span], getAxisDimIndex(axis))\n };\n }\n};\nfunction getAxisDimIndex(axis) {\n return axis.dim === 'x' ? 0 : 1;\n}\nexport default CartesianAxisPointer;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport ComponentModel from '../../model/Component.js';\nvar AxisPointerModel = /** @class */function (_super) {\n __extends(AxisPointerModel, _super);\n function AxisPointerModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = AxisPointerModel.type;\n return _this;\n }\n AxisPointerModel.type = 'axisPointer';\n AxisPointerModel.defaultOption = {\n // 'auto' means that show when triggered by tooltip or handle.\n show: 'auto',\n // zlevel: 0,\n z: 50,\n type: 'line',\n // axispointer triggered by tootip determine snap automatically,\n // see `modelHelper`.\n snap: false,\n triggerTooltip: true,\n triggerEmphasis: true,\n value: null,\n status: null,\n link: [],\n // Do not set 'auto' here, otherwise global animation: false\n // will not effect at this axispointer.\n animation: null,\n animationDurationUpdate: 200,\n lineStyle: {\n color: '#B9BEC9',\n width: 1,\n type: 'dashed'\n },\n shadowStyle: {\n color: 'rgba(210,219,238,0.2)'\n },\n label: {\n show: true,\n formatter: null,\n precision: 'auto',\n margin: 3,\n color: '#fff',\n padding: [5, 7, 5, 7],\n backgroundColor: 'auto',\n borderColor: null,\n borderWidth: 0,\n borderRadius: 3\n },\n handle: {\n show: false,\n // eslint-disable-next-line\n icon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z',\n size: 45,\n // handle margin is from symbol center to axis, which is stable when circular move.\n margin: 50,\n // color: '#1b8bbd'\n // color: '#2f4554'\n color: '#333',\n shadowBlur: 3,\n shadowColor: '#aaa',\n shadowOffsetX: 0,\n shadowOffsetY: 2,\n // For mobile performance\n throttle: 40\n }\n };\n return AxisPointerModel;\n}(ComponentModel);\nexport default AxisPointerModel;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport env from 'zrender/lib/core/env.js';\nimport { makeInner } from '../../util/model.js';\nvar inner = makeInner();\nvar each = zrUtil.each;\n/**\n * @param {string} key\n * @param {module:echarts/ExtensionAPI} api\n * @param {Function} handler\n * param: {string} currTrigger\n * param: {Array.} point\n */\nexport function register(key, api, handler) {\n if (env.node) {\n return;\n }\n var zr = api.getZr();\n inner(zr).records || (inner(zr).records = {});\n initGlobalListeners(zr, api);\n var record = inner(zr).records[key] || (inner(zr).records[key] = {});\n record.handler = handler;\n}\nfunction initGlobalListeners(zr, api) {\n if (inner(zr).initialized) {\n return;\n }\n inner(zr).initialized = true;\n useHandler('click', zrUtil.curry(doEnter, 'click'));\n useHandler('mousemove', zrUtil.curry(doEnter, 'mousemove'));\n // useHandler('mouseout', onLeave);\n useHandler('globalout', onLeave);\n function useHandler(eventType, cb) {\n zr.on(eventType, function (e) {\n var dis = makeDispatchAction(api);\n each(inner(zr).records, function (record) {\n record && cb(record, e, dis.dispatchAction);\n });\n dispatchTooltipFinally(dis.pendings, api);\n });\n }\n}\nfunction dispatchTooltipFinally(pendings, api) {\n var showLen = pendings.showTip.length;\n var hideLen = pendings.hideTip.length;\n var actuallyPayload;\n if (showLen) {\n actuallyPayload = pendings.showTip[showLen - 1];\n } else if (hideLen) {\n actuallyPayload = pendings.hideTip[hideLen - 1];\n }\n if (actuallyPayload) {\n actuallyPayload.dispatchAction = null;\n api.dispatchAction(actuallyPayload);\n }\n}\nfunction onLeave(record, e, dispatchAction) {\n record.handler('leave', null, dispatchAction);\n}\nfunction doEnter(currTrigger, record, e, dispatchAction) {\n record.handler(currTrigger, e, dispatchAction);\n}\nfunction makeDispatchAction(api) {\n var pendings = {\n showTip: [],\n hideTip: []\n };\n // FIXME\n // better approach?\n // 'showTip' and 'hideTip' can be triggered by axisPointer and tooltip,\n // which may be conflict, (axisPointer call showTip but tooltip call hideTip);\n // So we have to add \"final stage\" to merge those dispatched actions.\n var dispatchAction = function (payload) {\n var pendingList = pendings[payload.type];\n if (pendingList) {\n pendingList.push(payload);\n } else {\n payload.dispatchAction = dispatchAction;\n api.dispatchAction(payload);\n }\n };\n return {\n dispatchAction: dispatchAction,\n pendings: pendings\n };\n}\nexport function unregister(key, api) {\n if (env.node) {\n return;\n }\n var zr = api.getZr();\n var record = (inner(zr).records || {})[key];\n if (record) {\n inner(zr).records[key] = null;\n }\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as globalListener from './globalListener.js';\nimport ComponentView from '../../view/Component.js';\nvar AxisPointerView = /** @class */function (_super) {\n __extends(AxisPointerView, _super);\n function AxisPointerView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = AxisPointerView.type;\n return _this;\n }\n AxisPointerView.prototype.render = function (globalAxisPointerModel, ecModel, api) {\n var globalTooltipModel = ecModel.getComponent('tooltip');\n var triggerOn = globalAxisPointerModel.get('triggerOn') || globalTooltipModel && globalTooltipModel.get('triggerOn') || 'mousemove|click';\n // Register global listener in AxisPointerView to enable\n // AxisPointerView to be independent to Tooltip.\n globalListener.register('axisPointer', api, function (currTrigger, e, dispatchAction) {\n // If 'none', it is not controlled by mouse totally.\n if (triggerOn !== 'none' && (currTrigger === 'leave' || triggerOn.indexOf(currTrigger) >= 0)) {\n dispatchAction({\n type: 'updateAxisPointer',\n currTrigger: currTrigger,\n x: e && e.offsetX,\n y: e && e.offsetY\n });\n }\n });\n };\n AxisPointerView.prototype.remove = function (ecModel, api) {\n globalListener.unregister('axisPointer', api);\n };\n AxisPointerView.prototype.dispose = function (ecModel, api) {\n globalListener.unregister('axisPointer', api);\n };\n AxisPointerView.type = 'axisPointer';\n return AxisPointerView;\n}(ComponentView);\nexport default AxisPointerView;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as modelUtil from '../../util/model.js';\n/**\n * @param finder contains {seriesIndex, dataIndex, dataIndexInside}\n * @param ecModel\n * @return {point: [x, y], el: ...} point Will not be null.\n */\nexport default function findPointFromSeries(finder, ecModel) {\n var point = [];\n var seriesIndex = finder.seriesIndex;\n var seriesModel;\n if (seriesIndex == null || !(seriesModel = ecModel.getSeriesByIndex(seriesIndex))) {\n return {\n point: []\n };\n }\n var data = seriesModel.getData();\n var dataIndex = modelUtil.queryDataIndex(data, finder);\n if (dataIndex == null || dataIndex < 0 || zrUtil.isArray(dataIndex)) {\n return {\n point: []\n };\n }\n var el = data.getItemGraphicEl(dataIndex);\n var coordSys = seriesModel.coordinateSystem;\n if (seriesModel.getTooltipPosition) {\n point = seriesModel.getTooltipPosition(dataIndex) || [];\n } else if (coordSys && coordSys.dataToPoint) {\n if (finder.isStacked) {\n var baseAxis = coordSys.getBaseAxis();\n var valueAxis = coordSys.getOtherAxis(baseAxis);\n var valueAxisDim = valueAxis.dim;\n var baseAxisDim = baseAxis.dim;\n var baseDataOffset = valueAxisDim === 'x' || valueAxisDim === 'radius' ? 1 : 0;\n var baseDim = data.mapDimension(baseAxisDim);\n var stackedData = [];\n stackedData[baseDataOffset] = data.get(baseDim, dataIndex);\n stackedData[1 - baseDataOffset] = data.get(data.getCalculationInfo('stackResultDimension'), dataIndex);\n point = coordSys.dataToPoint(stackedData) || [];\n } else {\n point = coordSys.dataToPoint(data.getValues(zrUtil.map(coordSys.dimensions, function (dim) {\n return data.mapDimension(dim);\n }), dataIndex)) || [];\n }\n } else if (el) {\n // Use graphic bounding rect\n var rect = el.getBoundingRect().clone();\n rect.applyTransform(el.transform);\n point = [rect.x + rect.width / 2, rect.y + rect.height / 2];\n }\n return {\n point: point,\n el: el\n };\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { makeInner } from '../../util/model.js';\nimport * as modelHelper from './modelHelper.js';\nimport findPointFromSeries from './findPointFromSeries.js';\nimport { each, curry, bind, extend } from 'zrender/lib/core/util.js';\nvar inner = makeInner();\n/**\n * Basic logic: check all axis, if they do not demand show/highlight,\n * then hide/downplay them.\n *\n * @return content of event obj for echarts.connect.\n */\nexport default function axisTrigger(payload, ecModel, api) {\n var currTrigger = payload.currTrigger;\n var point = [payload.x, payload.y];\n var finder = payload;\n var dispatchAction = payload.dispatchAction || bind(api.dispatchAction, api);\n var coordSysAxesInfo = ecModel.getComponent('axisPointer').coordSysAxesInfo;\n // Pending\n // See #6121. But we are not able to reproduce it yet.\n if (!coordSysAxesInfo) {\n return;\n }\n if (illegalPoint(point)) {\n // Used in the default behavior of `connection`: use the sample seriesIndex\n // and dataIndex. And also used in the tooltipView trigger.\n point = findPointFromSeries({\n seriesIndex: finder.seriesIndex,\n // Do not use dataIndexInside from other ec instance.\n // FIXME: auto detect it?\n dataIndex: finder.dataIndex\n }, ecModel).point;\n }\n var isIllegalPoint = illegalPoint(point);\n // Axis and value can be specified when calling dispatchAction({type: 'updateAxisPointer'}).\n // Notice: In this case, it is difficult to get the `point` (which is necessary to show\n // tooltip, so if point is not given, we just use the point found by sample seriesIndex\n // and dataIndex.\n var inputAxesInfo = finder.axesInfo;\n var axesInfo = coordSysAxesInfo.axesInfo;\n var shouldHide = currTrigger === 'leave' || illegalPoint(point);\n var outputPayload = {};\n var showValueMap = {};\n var dataByCoordSys = {\n list: [],\n map: {}\n };\n var updaters = {\n showPointer: curry(showPointer, showValueMap),\n showTooltip: curry(showTooltip, dataByCoordSys)\n };\n // Process for triggered axes.\n each(coordSysAxesInfo.coordSysMap, function (coordSys, coordSysKey) {\n // If a point given, it must be contained by the coordinate system.\n var coordSysContainsPoint = isIllegalPoint || coordSys.containPoint(point);\n each(coordSysAxesInfo.coordSysAxesInfo[coordSysKey], function (axisInfo, key) {\n var axis = axisInfo.axis;\n var inputAxisInfo = findInputAxisInfo(inputAxesInfo, axisInfo);\n // If no inputAxesInfo, no axis is restricted.\n if (!shouldHide && coordSysContainsPoint && (!inputAxesInfo || inputAxisInfo)) {\n var val = inputAxisInfo && inputAxisInfo.value;\n if (val == null && !isIllegalPoint) {\n val = axis.pointToData(point);\n }\n val != null && processOnAxis(axisInfo, val, updaters, false, outputPayload);\n }\n });\n });\n // Process for linked axes.\n var linkTriggers = {};\n each(axesInfo, function (tarAxisInfo, tarKey) {\n var linkGroup = tarAxisInfo.linkGroup;\n // If axis has been triggered in the previous stage, it should not be triggered by link.\n if (linkGroup && !showValueMap[tarKey]) {\n each(linkGroup.axesInfo, function (srcAxisInfo, srcKey) {\n var srcValItem = showValueMap[srcKey];\n // If srcValItem exist, source axis is triggered, so link to target axis.\n if (srcAxisInfo !== tarAxisInfo && srcValItem) {\n var val = srcValItem.value;\n linkGroup.mapper && (val = tarAxisInfo.axis.scale.parse(linkGroup.mapper(val, makeMapperParam(srcAxisInfo), makeMapperParam(tarAxisInfo))));\n linkTriggers[tarAxisInfo.key] = val;\n }\n });\n }\n });\n each(linkTriggers, function (val, tarKey) {\n processOnAxis(axesInfo[tarKey], val, updaters, true, outputPayload);\n });\n updateModelActually(showValueMap, axesInfo, outputPayload);\n dispatchTooltipActually(dataByCoordSys, point, payload, dispatchAction);\n dispatchHighDownActually(axesInfo, dispatchAction, api);\n return outputPayload;\n}\nfunction processOnAxis(axisInfo, newValue, updaters, noSnap, outputFinder) {\n var axis = axisInfo.axis;\n if (axis.scale.isBlank() || !axis.containData(newValue)) {\n return;\n }\n if (!axisInfo.involveSeries) {\n updaters.showPointer(axisInfo, newValue);\n return;\n }\n // Heavy calculation. So put it after axis.containData checking.\n var payloadInfo = buildPayloadsBySeries(newValue, axisInfo);\n var payloadBatch = payloadInfo.payloadBatch;\n var snapToValue = payloadInfo.snapToValue;\n // Fill content of event obj for echarts.connect.\n // By default use the first involved series data as a sample to connect.\n if (payloadBatch[0] && outputFinder.seriesIndex == null) {\n extend(outputFinder, payloadBatch[0]);\n }\n // If no linkSource input, this process is for collecting link\n // target, where snap should not be accepted.\n if (!noSnap && axisInfo.snap) {\n if (axis.containData(snapToValue) && snapToValue != null) {\n newValue = snapToValue;\n }\n }\n updaters.showPointer(axisInfo, newValue, payloadBatch);\n // Tooltip should always be snapToValue, otherwise there will be\n // incorrect \"axis value ~ series value\" mapping displayed in tooltip.\n updaters.showTooltip(axisInfo, payloadInfo, snapToValue);\n}\nfunction buildPayloadsBySeries(value, axisInfo) {\n var axis = axisInfo.axis;\n var dim = axis.dim;\n var snapToValue = value;\n var payloadBatch = [];\n var minDist = Number.MAX_VALUE;\n var minDiff = -1;\n each(axisInfo.seriesModels, function (series, idx) {\n var dataDim = series.getData().mapDimensionsAll(dim);\n var seriesNestestValue;\n var dataIndices;\n if (series.getAxisTooltipData) {\n var result = series.getAxisTooltipData(dataDim, value, axis);\n dataIndices = result.dataIndices;\n seriesNestestValue = result.nestestValue;\n } else {\n dataIndices = series.getData().indicesOfNearest(dataDim[0], value,\n // Add a threshold to avoid find the wrong dataIndex\n // when data length is not same.\n // false,\n axis.type === 'category' ? 0.5 : null);\n if (!dataIndices.length) {\n return;\n }\n seriesNestestValue = series.getData().get(dataDim[0], dataIndices[0]);\n }\n if (seriesNestestValue == null || !isFinite(seriesNestestValue)) {\n return;\n }\n var diff = value - seriesNestestValue;\n var dist = Math.abs(diff);\n // Consider category case\n if (dist <= minDist) {\n if (dist < minDist || diff >= 0 && minDiff < 0) {\n minDist = dist;\n minDiff = diff;\n snapToValue = seriesNestestValue;\n payloadBatch.length = 0;\n }\n each(dataIndices, function (dataIndex) {\n payloadBatch.push({\n seriesIndex: series.seriesIndex,\n dataIndexInside: dataIndex,\n dataIndex: series.getData().getRawIndex(dataIndex)\n });\n });\n }\n });\n return {\n payloadBatch: payloadBatch,\n snapToValue: snapToValue\n };\n}\nfunction showPointer(showValueMap, axisInfo, value, payloadBatch) {\n showValueMap[axisInfo.key] = {\n value: value,\n payloadBatch: payloadBatch\n };\n}\nfunction showTooltip(dataByCoordSys, axisInfo, payloadInfo, value) {\n var payloadBatch = payloadInfo.payloadBatch;\n var axis = axisInfo.axis;\n var axisModel = axis.model;\n var axisPointerModel = axisInfo.axisPointerModel;\n // If no data, do not create anything in dataByCoordSys,\n // whose length will be used to judge whether dispatch action.\n if (!axisInfo.triggerTooltip || !payloadBatch.length) {\n return;\n }\n var coordSysModel = axisInfo.coordSys.model;\n var coordSysKey = modelHelper.makeKey(coordSysModel);\n var coordSysItem = dataByCoordSys.map[coordSysKey];\n if (!coordSysItem) {\n coordSysItem = dataByCoordSys.map[coordSysKey] = {\n coordSysId: coordSysModel.id,\n coordSysIndex: coordSysModel.componentIndex,\n coordSysType: coordSysModel.type,\n coordSysMainType: coordSysModel.mainType,\n dataByAxis: []\n };\n dataByCoordSys.list.push(coordSysItem);\n }\n coordSysItem.dataByAxis.push({\n axisDim: axis.dim,\n axisIndex: axisModel.componentIndex,\n axisType: axisModel.type,\n axisId: axisModel.id,\n value: value,\n // Caustion: viewHelper.getValueLabel is actually on \"view stage\", which\n // depends that all models have been updated. So it should not be performed\n // here. Considering axisPointerModel used here is volatile, which is hard\n // to be retrieve in TooltipView, we prepare parameters here.\n valueLabelOpt: {\n precision: axisPointerModel.get(['label', 'precision']),\n formatter: axisPointerModel.get(['label', 'formatter'])\n },\n seriesDataIndices: payloadBatch.slice()\n });\n}\nfunction updateModelActually(showValueMap, axesInfo, outputPayload) {\n var outputAxesInfo = outputPayload.axesInfo = [];\n // Basic logic: If no 'show' required, 'hide' this axisPointer.\n each(axesInfo, function (axisInfo, key) {\n var option = axisInfo.axisPointerModel.option;\n var valItem = showValueMap[key];\n if (valItem) {\n !axisInfo.useHandle && (option.status = 'show');\n option.value = valItem.value;\n // For label formatter param and highlight.\n option.seriesDataIndices = (valItem.payloadBatch || []).slice();\n }\n // When always show (e.g., handle used), remain\n // original value and status.\n else {\n // If hide, value still need to be set, consider\n // click legend to toggle axis blank.\n !axisInfo.useHandle && (option.status = 'hide');\n }\n // If status is 'hide', should be no info in payload.\n option.status === 'show' && outputAxesInfo.push({\n axisDim: axisInfo.axis.dim,\n axisIndex: axisInfo.axis.model.componentIndex,\n value: option.value\n });\n });\n}\nfunction dispatchTooltipActually(dataByCoordSys, point, payload, dispatchAction) {\n // Basic logic: If no showTip required, hideTip will be dispatched.\n if (illegalPoint(point) || !dataByCoordSys.list.length) {\n dispatchAction({\n type: 'hideTip'\n });\n return;\n }\n // In most case only one axis (or event one series is used). It is\n // convenient to fetch payload.seriesIndex and payload.dataIndex\n // directly. So put the first seriesIndex and dataIndex of the first\n // axis on the payload.\n var sampleItem = ((dataByCoordSys.list[0].dataByAxis[0] || {}).seriesDataIndices || [])[0] || {};\n dispatchAction({\n type: 'showTip',\n escapeConnect: true,\n x: point[0],\n y: point[1],\n tooltipOption: payload.tooltipOption,\n position: payload.position,\n dataIndexInside: sampleItem.dataIndexInside,\n dataIndex: sampleItem.dataIndex,\n seriesIndex: sampleItem.seriesIndex,\n dataByCoordSys: dataByCoordSys.list\n });\n}\nfunction dispatchHighDownActually(axesInfo, dispatchAction, api) {\n // FIXME\n // highlight status modification should be a stage of main process?\n // (Consider confilct (e.g., legend and axisPointer) and setOption)\n var zr = api.getZr();\n var highDownKey = 'axisPointerLastHighlights';\n var lastHighlights = inner(zr)[highDownKey] || {};\n var newHighlights = inner(zr)[highDownKey] = {};\n // Update highlight/downplay status according to axisPointer model.\n // Build hash map and remove duplicate incidentally.\n each(axesInfo, function (axisInfo, key) {\n var option = axisInfo.axisPointerModel.option;\n option.status === 'show' && axisInfo.triggerEmphasis && each(option.seriesDataIndices, function (batchItem) {\n var key = batchItem.seriesIndex + ' | ' + batchItem.dataIndex;\n newHighlights[key] = batchItem;\n });\n });\n // Diff.\n var toHighlight = [];\n var toDownplay = [];\n each(lastHighlights, function (batchItem, key) {\n !newHighlights[key] && toDownplay.push(batchItem);\n });\n each(newHighlights, function (batchItem, key) {\n !lastHighlights[key] && toHighlight.push(batchItem);\n });\n toDownplay.length && api.dispatchAction({\n type: 'downplay',\n escapeConnect: true,\n // Not blur others when highlight in axisPointer.\n notBlur: true,\n batch: toDownplay\n });\n toHighlight.length && api.dispatchAction({\n type: 'highlight',\n escapeConnect: true,\n // Not blur others when highlight in axisPointer.\n notBlur: true,\n batch: toHighlight\n });\n}\nfunction findInputAxisInfo(inputAxesInfo, axisInfo) {\n for (var i = 0; i < (inputAxesInfo || []).length; i++) {\n var inputAxisInfo = inputAxesInfo[i];\n if (axisInfo.axis.dim === inputAxisInfo.axisDim && axisInfo.axis.model.componentIndex === inputAxisInfo.axisIndex) {\n return inputAxisInfo;\n }\n }\n}\nfunction makeMapperParam(axisInfo) {\n var axisModel = axisInfo.axis.model;\n var item = {};\n var dim = item.axisDim = axisInfo.axis.dim;\n item.axisIndex = item[dim + 'AxisIndex'] = axisModel.componentIndex;\n item.axisName = item[dim + 'AxisName'] = axisModel.name;\n item.axisId = item[dim + 'AxisId'] = axisModel.id;\n return item;\n}\nfunction illegalPoint(point) {\n return !point || point[0] == null || isNaN(point[0]) || point[1] == null || isNaN(point[1]);\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport AxisView from '../axis/AxisView.js';\nimport CartesianAxisPointer from './CartesianAxisPointer.js';\nimport AxisPointerModel from './AxisPointerModel.js';\nimport AxisPointerView from './AxisPointerView.js';\nimport { isArray } from 'zrender/lib/core/util.js';\nimport { collect } from './modelHelper.js';\nimport axisTrigger from './axisTrigger.js';\nexport function install(registers) {\n // CartesianAxisPointer is not supposed to be required here. But consider\n // echarts.simple.js and online build tooltip, which only require gridSimple,\n // CartesianAxisPointer should be able to required somewhere.\n AxisView.registerAxisPointerClass('CartesianAxisPointer', CartesianAxisPointer);\n registers.registerComponentModel(AxisPointerModel);\n registers.registerComponentView(AxisPointerView);\n registers.registerPreprocessor(function (option) {\n // Always has a global axisPointerModel for default setting.\n if (option) {\n (!option.axisPointer || option.axisPointer.length === 0) && (option.axisPointer = {});\n var link = option.axisPointer.link;\n // Normalize to array to avoid object mergin. But if link\n // is not set, remain null/undefined, otherwise it will\n // override existent link setting.\n if (link && !isArray(link)) {\n option.axisPointer.link = [link];\n }\n }\n });\n // This process should proformed after coordinate systems created\n // and series data processed. So put it on statistic processing stage.\n registers.registerProcessor(registers.PRIORITY.PROCESSOR.STATISTIC, function (ecModel, api) {\n // Build axisPointerModel, mergin tooltip.axisPointer model for each axis.\n // allAxesInfo should be updated when setOption performed.\n ecModel.getComponent('axisPointer').coordSysAxesInfo = collect(ecModel, api);\n });\n // Broadcast to all views.\n registers.registerAction({\n type: 'updateAxisPointer',\n event: 'updateAxisPointer',\n update: ':updateAxisPointer'\n }, axisTrigger);\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { install as installSimple } from './installSimple.js';\nimport { install as installAxisPointer } from '../axisPointer/install.js';\nimport { use } from '../../extension.js';\nexport function install(registers) {\n use(installSimple);\n use(installAxisPointer);\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport BaseAxisPointer from './BaseAxisPointer.js';\nimport * as graphic from '../../util/graphic.js';\nimport * as viewHelper from './viewHelper.js';\nimport * as matrix from 'zrender/lib/core/matrix.js';\nimport AxisBuilder from '../axis/AxisBuilder.js';\nvar PolarAxisPointer = /** @class */function (_super) {\n __extends(PolarAxisPointer, _super);\n function PolarAxisPointer() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @override\n */\n PolarAxisPointer.prototype.makeElOption = function (elOption, value, axisModel, axisPointerModel, api) {\n var axis = axisModel.axis;\n if (axis.dim === 'angle') {\n this.animationThreshold = Math.PI / 18;\n }\n var polar = axis.polar;\n var otherAxis = polar.getOtherAxis(axis);\n var otherExtent = otherAxis.getExtent();\n var coordValue = axis.dataToCoord(value);\n var axisPointerType = axisPointerModel.get('type');\n if (axisPointerType && axisPointerType !== 'none') {\n var elStyle = viewHelper.buildElStyle(axisPointerModel);\n var pointerOption = pointerShapeBuilder[axisPointerType](axis, polar, coordValue, otherExtent);\n pointerOption.style = elStyle;\n elOption.graphicKey = pointerOption.type;\n elOption.pointer = pointerOption;\n }\n var labelMargin = axisPointerModel.get(['label', 'margin']);\n var labelPos = getLabelPosition(value, axisModel, axisPointerModel, polar, labelMargin);\n viewHelper.buildLabelElOption(elOption, axisModel, axisPointerModel, api, labelPos);\n };\n return PolarAxisPointer;\n}(BaseAxisPointer);\n;\nfunction getLabelPosition(value, axisModel, axisPointerModel, polar, labelMargin) {\n var axis = axisModel.axis;\n var coord = axis.dataToCoord(value);\n var axisAngle = polar.getAngleAxis().getExtent()[0];\n axisAngle = axisAngle / 180 * Math.PI;\n var radiusExtent = polar.getRadiusAxis().getExtent();\n var position;\n var align;\n var verticalAlign;\n if (axis.dim === 'radius') {\n var transform = matrix.create();\n matrix.rotate(transform, transform, axisAngle);\n matrix.translate(transform, transform, [polar.cx, polar.cy]);\n position = graphic.applyTransform([coord, -labelMargin], transform);\n var labelRotation = axisModel.getModel('axisLabel').get('rotate') || 0;\n // @ts-ignore\n var labelLayout = AxisBuilder.innerTextLayout(axisAngle, labelRotation * Math.PI / 180, -1);\n align = labelLayout.textAlign;\n verticalAlign = labelLayout.textVerticalAlign;\n } else {\n // angle axis\n var r = radiusExtent[1];\n position = polar.coordToPoint([r + labelMargin, coord]);\n var cx = polar.cx;\n var cy = polar.cy;\n align = Math.abs(position[0] - cx) / r < 0.3 ? 'center' : position[0] > cx ? 'left' : 'right';\n verticalAlign = Math.abs(position[1] - cy) / r < 0.3 ? 'middle' : position[1] > cy ? 'top' : 'bottom';\n }\n return {\n position: position,\n align: align,\n verticalAlign: verticalAlign\n };\n}\nvar pointerShapeBuilder = {\n line: function (axis, polar, coordValue, otherExtent) {\n return axis.dim === 'angle' ? {\n type: 'Line',\n shape: viewHelper.makeLineShape(polar.coordToPoint([otherExtent[0], coordValue]), polar.coordToPoint([otherExtent[1], coordValue]))\n } : {\n type: 'Circle',\n shape: {\n cx: polar.cx,\n cy: polar.cy,\n r: coordValue\n }\n };\n },\n shadow: function (axis, polar, coordValue, otherExtent) {\n var bandWidth = Math.max(1, axis.getBandWidth());\n var radian = Math.PI / 180;\n return axis.dim === 'angle' ? {\n type: 'Sector',\n shape: viewHelper.makeSectorShape(polar.cx, polar.cy, otherExtent[0], otherExtent[1],\n // In ECharts y is negative if angle is positive\n (-coordValue - bandWidth / 2) * radian, (-coordValue + bandWidth / 2) * radian)\n } : {\n type: 'Sector',\n shape: viewHelper.makeSectorShape(polar.cx, polar.cy, coordValue - bandWidth / 2, coordValue + bandWidth / 2, 0, Math.PI * 2)\n };\n }\n};\nexport default PolarAxisPointer;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport ComponentModel from '../../model/Component.js';\nvar PolarModel = /** @class */function (_super) {\n __extends(PolarModel, _super);\n function PolarModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = PolarModel.type;\n return _this;\n }\n PolarModel.prototype.findAxisModel = function (axisType) {\n var foundAxisModel;\n var ecModel = this.ecModel;\n ecModel.eachComponent(axisType, function (axisModel) {\n if (axisModel.getCoordSysModel() === this) {\n foundAxisModel = axisModel;\n }\n }, this);\n return foundAxisModel;\n };\n PolarModel.type = 'polar';\n PolarModel.dependencies = ['radiusAxis', 'angleAxis'];\n PolarModel.defaultOption = {\n // zlevel: 0,\n z: 0,\n center: ['50%', '50%'],\n radius: '80%'\n };\n return PolarModel;\n}(ComponentModel);\nexport default PolarModel;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport ComponentModel from '../../model/Component.js';\nimport { AxisModelCommonMixin } from '../axisModelCommonMixin.js';\nimport { SINGLE_REFERRING } from '../../util/model.js';\nvar PolarAxisModel = /** @class */function (_super) {\n __extends(PolarAxisModel, _super);\n function PolarAxisModel() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n PolarAxisModel.prototype.getCoordSysModel = function () {\n return this.getReferringComponents('polar', SINGLE_REFERRING).models[0];\n };\n PolarAxisModel.type = 'polarAxis';\n return PolarAxisModel;\n}(ComponentModel);\nzrUtil.mixin(PolarAxisModel, AxisModelCommonMixin);\nexport { PolarAxisModel };\nvar AngleAxisModel = /** @class */function (_super) {\n __extends(AngleAxisModel, _super);\n function AngleAxisModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = AngleAxisModel.type;\n return _this;\n }\n AngleAxisModel.type = 'angleAxis';\n return AngleAxisModel;\n}(PolarAxisModel);\nexport { AngleAxisModel };\nvar RadiusAxisModel = /** @class */function (_super) {\n __extends(RadiusAxisModel, _super);\n function RadiusAxisModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = RadiusAxisModel.type;\n return _this;\n }\n RadiusAxisModel.type = 'radiusAxis';\n return RadiusAxisModel;\n}(PolarAxisModel);\nexport { RadiusAxisModel };","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport Axis from '../Axis.js';\nvar RadiusAxis = /** @class */function (_super) {\n __extends(RadiusAxis, _super);\n function RadiusAxis(scale, radiusExtent) {\n return _super.call(this, 'radius', scale, radiusExtent) || this;\n }\n RadiusAxis.prototype.pointToData = function (point, clamp) {\n return this.polar.pointToData(point, clamp)[this.dim === 'radius' ? 0 : 1];\n };\n return RadiusAxis;\n}(Axis);\nRadiusAxis.prototype.dataToRadius = Axis.prototype.dataToCoord;\nRadiusAxis.prototype.radiusToData = Axis.prototype.coordToData;\nexport default RadiusAxis;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as textContain from 'zrender/lib/contain/text.js';\nimport Axis from '../Axis.js';\nimport { makeInner } from '../../util/model.js';\nvar inner = makeInner();\nvar AngleAxis = /** @class */function (_super) {\n __extends(AngleAxis, _super);\n function AngleAxis(scale, angleExtent) {\n return _super.call(this, 'angle', scale, angleExtent || [0, 360]) || this;\n }\n AngleAxis.prototype.pointToData = function (point, clamp) {\n return this.polar.pointToData(point, clamp)[this.dim === 'radius' ? 0 : 1];\n };\n /**\n * Only be called in category axis.\n * Angle axis uses text height to decide interval\n *\n * @override\n * @return {number} Auto interval for cateogry axis tick and label\n */\n AngleAxis.prototype.calculateCategoryInterval = function () {\n var axis = this;\n var labelModel = axis.getLabelModel();\n var ordinalScale = axis.scale;\n var ordinalExtent = ordinalScale.getExtent();\n // Providing this method is for optimization:\n // avoid generating a long array by `getTicks`\n // in large category data case.\n var tickCount = ordinalScale.count();\n if (ordinalExtent[1] - ordinalExtent[0] < 1) {\n return 0;\n }\n var tickValue = ordinalExtent[0];\n var unitSpan = axis.dataToCoord(tickValue + 1) - axis.dataToCoord(tickValue);\n var unitH = Math.abs(unitSpan);\n // Not precise, just use height as text width\n // and each distance from axis line yet.\n var rect = textContain.getBoundingRect(tickValue == null ? '' : tickValue + '', labelModel.getFont(), 'center', 'top');\n var maxH = Math.max(rect.height, 7);\n var dh = maxH / unitH;\n // 0/0 is NaN, 1/0 is Infinity.\n isNaN(dh) && (dh = Infinity);\n var interval = Math.max(0, Math.floor(dh));\n var cache = inner(axis.model);\n var lastAutoInterval = cache.lastAutoInterval;\n var lastTickCount = cache.lastTickCount;\n // Use cache to keep interval stable while moving zoom window,\n // otherwise the calculated interval might jitter when the zoom\n // window size is close to the interval-changing size.\n if (lastAutoInterval != null && lastTickCount != null && Math.abs(lastAutoInterval - interval) <= 1 && Math.abs(lastTickCount - tickCount) <= 1\n // Always choose the bigger one, otherwise the critical\n // point is not the same when zooming in or zooming out.\n && lastAutoInterval > interval) {\n interval = lastAutoInterval;\n }\n // Only update cache if cache not used, otherwise the\n // changing of interval is too insensitive.\n else {\n cache.lastTickCount = tickCount;\n cache.lastAutoInterval = interval;\n }\n return interval;\n };\n return AngleAxis;\n}(Axis);\nAngleAxis.prototype.dataToAngle = Axis.prototype.dataToCoord;\nAngleAxis.prototype.angleToData = Axis.prototype.coordToData;\nexport default AngleAxis;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport RadiusAxis from './RadiusAxis.js';\nimport AngleAxis from './AngleAxis.js';\nexport var polarDimensions = ['radius', 'angle'];\nvar Polar = /** @class */function () {\n function Polar(name) {\n this.dimensions = polarDimensions;\n this.type = 'polar';\n /**\n * x of polar center\n */\n this.cx = 0;\n /**\n * y of polar center\n */\n this.cy = 0;\n this._radiusAxis = new RadiusAxis();\n this._angleAxis = new AngleAxis();\n this.axisPointerEnabled = true;\n this.name = name || '';\n this._radiusAxis.polar = this._angleAxis.polar = this;\n }\n /**\n * If contain coord\n */\n Polar.prototype.containPoint = function (point) {\n var coord = this.pointToCoord(point);\n return this._radiusAxis.contain(coord[0]) && this._angleAxis.contain(coord[1]);\n };\n /**\n * If contain data\n */\n Polar.prototype.containData = function (data) {\n return this._radiusAxis.containData(data[0]) && this._angleAxis.containData(data[1]);\n };\n Polar.prototype.getAxis = function (dim) {\n var key = '_' + dim + 'Axis';\n return this[key];\n };\n Polar.prototype.getAxes = function () {\n return [this._radiusAxis, this._angleAxis];\n };\n /**\n * Get axes by type of scale\n */\n Polar.prototype.getAxesByScale = function (scaleType) {\n var axes = [];\n var angleAxis = this._angleAxis;\n var radiusAxis = this._radiusAxis;\n angleAxis.scale.type === scaleType && axes.push(angleAxis);\n radiusAxis.scale.type === scaleType && axes.push(radiusAxis);\n return axes;\n };\n Polar.prototype.getAngleAxis = function () {\n return this._angleAxis;\n };\n Polar.prototype.getRadiusAxis = function () {\n return this._radiusAxis;\n };\n Polar.prototype.getOtherAxis = function (axis) {\n var angleAxis = this._angleAxis;\n return axis === angleAxis ? this._radiusAxis : angleAxis;\n };\n /**\n * Base axis will be used on stacking.\n *\n */\n Polar.prototype.getBaseAxis = function () {\n return this.getAxesByScale('ordinal')[0] || this.getAxesByScale('time')[0] || this.getAngleAxis();\n };\n Polar.prototype.getTooltipAxes = function (dim) {\n var baseAxis = dim != null && dim !== 'auto' ? this.getAxis(dim) : this.getBaseAxis();\n return {\n baseAxes: [baseAxis],\n otherAxes: [this.getOtherAxis(baseAxis)]\n };\n };\n /**\n * Convert a single data item to (x, y) point.\n * Parameter data is an array which the first element is radius and the second is angle\n */\n Polar.prototype.dataToPoint = function (data, clamp) {\n return this.coordToPoint([this._radiusAxis.dataToRadius(data[0], clamp), this._angleAxis.dataToAngle(data[1], clamp)]);\n };\n /**\n * Convert a (x, y) point to data\n */\n Polar.prototype.pointToData = function (point, clamp) {\n var coord = this.pointToCoord(point);\n return [this._radiusAxis.radiusToData(coord[0], clamp), this._angleAxis.angleToData(coord[1], clamp)];\n };\n /**\n * Convert a (x, y) point to (radius, angle) coord\n */\n Polar.prototype.pointToCoord = function (point) {\n var dx = point[0] - this.cx;\n var dy = point[1] - this.cy;\n var angleAxis = this.getAngleAxis();\n var extent = angleAxis.getExtent();\n var minAngle = Math.min(extent[0], extent[1]);\n var maxAngle = Math.max(extent[0], extent[1]);\n // Fix fixed extent in polarCreator\n // FIXME\n angleAxis.inverse ? minAngle = maxAngle - 360 : maxAngle = minAngle + 360;\n var radius = Math.sqrt(dx * dx + dy * dy);\n dx /= radius;\n dy /= radius;\n var radian = Math.atan2(-dy, dx) / Math.PI * 180;\n // move to angleExtent\n var dir = radian < minAngle ? 1 : -1;\n while (radian < minAngle || radian > maxAngle) {\n radian += dir * 360;\n }\n return [radius, radian];\n };\n /**\n * Convert a (radius, angle) coord to (x, y) point\n */\n Polar.prototype.coordToPoint = function (coord) {\n var radius = coord[0];\n var radian = coord[1] / 180 * Math.PI;\n var x = Math.cos(radian) * radius + this.cx;\n // Inverse the y\n var y = -Math.sin(radian) * radius + this.cy;\n return [x, y];\n };\n /**\n * Get ring area of cartesian.\n * Area will have a contain function to determine if a point is in the coordinate system.\n */\n Polar.prototype.getArea = function () {\n var angleAxis = this.getAngleAxis();\n var radiusAxis = this.getRadiusAxis();\n var radiusExtent = radiusAxis.getExtent().slice();\n radiusExtent[0] > radiusExtent[1] && radiusExtent.reverse();\n var angleExtent = angleAxis.getExtent();\n var RADIAN = Math.PI / 180;\n return {\n cx: this.cx,\n cy: this.cy,\n r0: radiusExtent[0],\n r: radiusExtent[1],\n startAngle: -angleExtent[0] * RADIAN,\n endAngle: -angleExtent[1] * RADIAN,\n clockwise: angleAxis.inverse,\n contain: function (x, y) {\n // It's a ring shape.\n // Start angle and end angle don't matter\n var dx = x - this.cx;\n var dy = y - this.cy;\n // minus a tiny value 1e-4 to avoid being clipped unexpectedly\n var d2 = dx * dx + dy * dy - 1e-4;\n var r = this.r;\n var r0 = this.r0;\n return d2 <= r * r && d2 >= r0 * r0;\n }\n };\n };\n Polar.prototype.convertToPixel = function (ecModel, finder, value) {\n var coordSys = getCoordSys(finder);\n return coordSys === this ? this.dataToPoint(value) : null;\n };\n Polar.prototype.convertFromPixel = function (ecModel, finder, pixel) {\n var coordSys = getCoordSys(finder);\n return coordSys === this ? this.pointToData(pixel) : null;\n };\n return Polar;\n}();\nfunction getCoordSys(finder) {\n var seriesModel = finder.seriesModel;\n var polarModel = finder.polarModel;\n return polarModel && polarModel.coordinateSystem || seriesModel && seriesModel.coordinateSystem;\n}\nexport default Polar;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// TODO Axis scale\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport Polar, { polarDimensions } from './Polar.js';\nimport { parsePercent } from '../../util/number.js';\nimport { createScaleByModel, niceScaleExtent, getDataDimensionsOnAxis } from '../../coord/axisHelper.js';\nimport { SINGLE_REFERRING } from '../../util/model.js';\n/**\n * Resize method bound to the polar\n */\nfunction resizePolar(polar, polarModel, api) {\n var center = polarModel.get('center');\n var width = api.getWidth();\n var height = api.getHeight();\n polar.cx = parsePercent(center[0], width);\n polar.cy = parsePercent(center[1], height);\n var radiusAxis = polar.getRadiusAxis();\n var size = Math.min(width, height) / 2;\n var radius = polarModel.get('radius');\n if (radius == null) {\n radius = [0, '100%'];\n } else if (!zrUtil.isArray(radius)) {\n // r0 = 0\n radius = [0, radius];\n }\n var parsedRadius = [parsePercent(radius[0], size), parsePercent(radius[1], size)];\n radiusAxis.inverse ? radiusAxis.setExtent(parsedRadius[1], parsedRadius[0]) : radiusAxis.setExtent(parsedRadius[0], parsedRadius[1]);\n}\n/**\n * Update polar\n */\nfunction updatePolarScale(ecModel, api) {\n var polar = this;\n var angleAxis = polar.getAngleAxis();\n var radiusAxis = polar.getRadiusAxis();\n // Reset scale\n angleAxis.scale.setExtent(Infinity, -Infinity);\n radiusAxis.scale.setExtent(Infinity, -Infinity);\n ecModel.eachSeries(function (seriesModel) {\n if (seriesModel.coordinateSystem === polar) {\n var data_1 = seriesModel.getData();\n zrUtil.each(getDataDimensionsOnAxis(data_1, 'radius'), function (dim) {\n radiusAxis.scale.unionExtentFromData(data_1, dim);\n });\n zrUtil.each(getDataDimensionsOnAxis(data_1, 'angle'), function (dim) {\n angleAxis.scale.unionExtentFromData(data_1, dim);\n });\n }\n });\n niceScaleExtent(angleAxis.scale, angleAxis.model);\n niceScaleExtent(radiusAxis.scale, radiusAxis.model);\n // Fix extent of category angle axis\n if (angleAxis.type === 'category' && !angleAxis.onBand) {\n var extent = angleAxis.getExtent();\n var diff = 360 / angleAxis.scale.count();\n angleAxis.inverse ? extent[1] += diff : extent[1] -= diff;\n angleAxis.setExtent(extent[0], extent[1]);\n }\n}\nfunction isAngleAxisModel(axisModel) {\n return axisModel.mainType === 'angleAxis';\n}\n/**\n * Set common axis properties\n */\nfunction setAxis(axis, axisModel) {\n var _a;\n axis.type = axisModel.get('type');\n axis.scale = createScaleByModel(axisModel);\n axis.onBand = axisModel.get('boundaryGap') && axis.type === 'category';\n axis.inverse = axisModel.get('inverse');\n if (isAngleAxisModel(axisModel)) {\n axis.inverse = axis.inverse !== axisModel.get('clockwise');\n var startAngle = axisModel.get('startAngle');\n var endAngle = (_a = axisModel.get('endAngle')) !== null && _a !== void 0 ? _a : startAngle + (axis.inverse ? -360 : 360);\n axis.setExtent(startAngle, endAngle);\n }\n // Inject axis instance\n axisModel.axis = axis;\n axis.model = axisModel;\n}\nvar polarCreator = {\n dimensions: polarDimensions,\n create: function (ecModel, api) {\n var polarList = [];\n ecModel.eachComponent('polar', function (polarModel, idx) {\n var polar = new Polar(idx + '');\n // Inject resize and update method\n polar.update = updatePolarScale;\n var radiusAxis = polar.getRadiusAxis();\n var angleAxis = polar.getAngleAxis();\n var radiusAxisModel = polarModel.findAxisModel('radiusAxis');\n var angleAxisModel = polarModel.findAxisModel('angleAxis');\n setAxis(radiusAxis, radiusAxisModel);\n setAxis(angleAxis, angleAxisModel);\n resizePolar(polar, polarModel, api);\n polarList.push(polar);\n polarModel.coordinateSystem = polar;\n polar.model = polarModel;\n });\n // Inject coordinateSystem to series\n ecModel.eachSeries(function (seriesModel) {\n if (seriesModel.get('coordinateSystem') === 'polar') {\n var polarModel = seriesModel.getReferringComponents('polar', SINGLE_REFERRING).models[0];\n if (process.env.NODE_ENV !== 'production') {\n if (!polarModel) {\n throw new Error('Polar \"' + zrUtil.retrieve(seriesModel.get('polarIndex'), seriesModel.get('polarId'), 0) + '\" not found');\n }\n }\n seriesModel.coordinateSystem = polarModel.coordinateSystem;\n }\n });\n return polarList;\n }\n};\nexport default polarCreator;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport { createTextStyle } from '../../label/labelStyle.js';\nimport Model from '../../model/Model.js';\nimport AxisView from './AxisView.js';\nimport AxisBuilder from './AxisBuilder.js';\nimport { getECData } from '../../util/innerStore.js';\nvar elementList = ['axisLine', 'axisLabel', 'axisTick', 'minorTick', 'splitLine', 'minorSplitLine', 'splitArea'];\nfunction getAxisLineShape(polar, rExtent, angle) {\n rExtent[1] > rExtent[0] && (rExtent = rExtent.slice().reverse());\n var start = polar.coordToPoint([rExtent[0], angle]);\n var end = polar.coordToPoint([rExtent[1], angle]);\n return {\n x1: start[0],\n y1: start[1],\n x2: end[0],\n y2: end[1]\n };\n}\nfunction getRadiusIdx(polar) {\n var radiusAxis = polar.getRadiusAxis();\n return radiusAxis.inverse ? 0 : 1;\n}\n// Remove the last tick which will overlap the first tick\nfunction fixAngleOverlap(list) {\n var firstItem = list[0];\n var lastItem = list[list.length - 1];\n if (firstItem && lastItem && Math.abs(Math.abs(firstItem.coord - lastItem.coord) - 360) < 1e-4) {\n list.pop();\n }\n}\nvar AngleAxisView = /** @class */function (_super) {\n __extends(AngleAxisView, _super);\n function AngleAxisView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = AngleAxisView.type;\n _this.axisPointerClass = 'PolarAxisPointer';\n return _this;\n }\n AngleAxisView.prototype.render = function (angleAxisModel, ecModel) {\n this.group.removeAll();\n if (!angleAxisModel.get('show')) {\n return;\n }\n var angleAxis = angleAxisModel.axis;\n var polar = angleAxis.polar;\n var radiusExtent = polar.getRadiusAxis().getExtent();\n var ticksAngles = angleAxis.getTicksCoords();\n var minorTickAngles = angleAxis.getMinorTicksCoords();\n var labels = zrUtil.map(angleAxis.getViewLabels(), function (labelItem) {\n labelItem = zrUtil.clone(labelItem);\n var scale = angleAxis.scale;\n var tickValue = scale.type === 'ordinal' ? scale.getRawOrdinalNumber(labelItem.tickValue) : labelItem.tickValue;\n labelItem.coord = angleAxis.dataToCoord(tickValue);\n return labelItem;\n });\n fixAngleOverlap(labels);\n fixAngleOverlap(ticksAngles);\n zrUtil.each(elementList, function (name) {\n if (angleAxisModel.get([name, 'show']) && (!angleAxis.scale.isBlank() || name === 'axisLine')) {\n angelAxisElementsBuilders[name](this.group, angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent, labels);\n }\n }, this);\n };\n AngleAxisView.type = 'angleAxis';\n return AngleAxisView;\n}(AxisView);\nvar angelAxisElementsBuilders = {\n axisLine: function (group, angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent) {\n var lineStyleModel = angleAxisModel.getModel(['axisLine', 'lineStyle']);\n var angleAxis = polar.getAngleAxis();\n var RADIAN = Math.PI / 180;\n var angleExtent = angleAxis.getExtent();\n // extent id of the axis radius (r0 and r)\n var rId = getRadiusIdx(polar);\n var r0Id = rId ? 0 : 1;\n var shape;\n var shapeType = Math.abs(angleExtent[1] - angleExtent[0]) === 360 ? 'Circle' : 'Arc';\n if (radiusExtent[r0Id] === 0) {\n shape = new graphic[shapeType]({\n shape: {\n cx: polar.cx,\n cy: polar.cy,\n r: radiusExtent[rId],\n startAngle: -angleExtent[0] * RADIAN,\n endAngle: -angleExtent[1] * RADIAN,\n clockwise: angleAxis.inverse\n },\n style: lineStyleModel.getLineStyle(),\n z2: 1,\n silent: true\n });\n } else {\n shape = new graphic.Ring({\n shape: {\n cx: polar.cx,\n cy: polar.cy,\n r: radiusExtent[rId],\n r0: radiusExtent[r0Id]\n },\n style: lineStyleModel.getLineStyle(),\n z2: 1,\n silent: true\n });\n }\n shape.style.fill = null;\n group.add(shape);\n },\n axisTick: function (group, angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent) {\n var tickModel = angleAxisModel.getModel('axisTick');\n var tickLen = (tickModel.get('inside') ? -1 : 1) * tickModel.get('length');\n var radius = radiusExtent[getRadiusIdx(polar)];\n var lines = zrUtil.map(ticksAngles, function (tickAngleItem) {\n return new graphic.Line({\n shape: getAxisLineShape(polar, [radius, radius + tickLen], tickAngleItem.coord)\n });\n });\n group.add(graphic.mergePath(lines, {\n style: zrUtil.defaults(tickModel.getModel('lineStyle').getLineStyle(), {\n stroke: angleAxisModel.get(['axisLine', 'lineStyle', 'color'])\n })\n }));\n },\n minorTick: function (group, angleAxisModel, polar, tickAngles, minorTickAngles, radiusExtent) {\n if (!minorTickAngles.length) {\n return;\n }\n var tickModel = angleAxisModel.getModel('axisTick');\n var minorTickModel = angleAxisModel.getModel('minorTick');\n var tickLen = (tickModel.get('inside') ? -1 : 1) * minorTickModel.get('length');\n var radius = radiusExtent[getRadiusIdx(polar)];\n var lines = [];\n for (var i = 0; i < minorTickAngles.length; i++) {\n for (var k = 0; k < minorTickAngles[i].length; k++) {\n lines.push(new graphic.Line({\n shape: getAxisLineShape(polar, [radius, radius + tickLen], minorTickAngles[i][k].coord)\n }));\n }\n }\n group.add(graphic.mergePath(lines, {\n style: zrUtil.defaults(minorTickModel.getModel('lineStyle').getLineStyle(), zrUtil.defaults(tickModel.getLineStyle(), {\n stroke: angleAxisModel.get(['axisLine', 'lineStyle', 'color'])\n }))\n }));\n },\n axisLabel: function (group, angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent, labels) {\n var rawCategoryData = angleAxisModel.getCategories(true);\n var commonLabelModel = angleAxisModel.getModel('axisLabel');\n var labelMargin = commonLabelModel.get('margin');\n var triggerEvent = angleAxisModel.get('triggerEvent');\n // Use length of ticksAngles because it may remove the last tick to avoid overlapping\n zrUtil.each(labels, function (labelItem, idx) {\n var labelModel = commonLabelModel;\n var tickValue = labelItem.tickValue;\n var r = radiusExtent[getRadiusIdx(polar)];\n var p = polar.coordToPoint([r + labelMargin, labelItem.coord]);\n var cx = polar.cx;\n var cy = polar.cy;\n var labelTextAlign = Math.abs(p[0] - cx) / r < 0.3 ? 'center' : p[0] > cx ? 'left' : 'right';\n var labelTextVerticalAlign = Math.abs(p[1] - cy) / r < 0.3 ? 'middle' : p[1] > cy ? 'top' : 'bottom';\n if (rawCategoryData && rawCategoryData[tickValue]) {\n var rawCategoryItem = rawCategoryData[tickValue];\n if (zrUtil.isObject(rawCategoryItem) && rawCategoryItem.textStyle) {\n labelModel = new Model(rawCategoryItem.textStyle, commonLabelModel, commonLabelModel.ecModel);\n }\n }\n var textEl = new graphic.Text({\n silent: AxisBuilder.isLabelSilent(angleAxisModel),\n style: createTextStyle(labelModel, {\n x: p[0],\n y: p[1],\n fill: labelModel.getTextColor() || angleAxisModel.get(['axisLine', 'lineStyle', 'color']),\n text: labelItem.formattedLabel,\n align: labelTextAlign,\n verticalAlign: labelTextVerticalAlign\n })\n });\n group.add(textEl);\n // Pack data for mouse event\n if (triggerEvent) {\n var eventData = AxisBuilder.makeAxisEventDataBase(angleAxisModel);\n eventData.targetType = 'axisLabel';\n eventData.value = labelItem.rawLabel;\n getECData(textEl).eventData = eventData;\n }\n }, this);\n },\n splitLine: function (group, angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent) {\n var splitLineModel = angleAxisModel.getModel('splitLine');\n var lineStyleModel = splitLineModel.getModel('lineStyle');\n var lineColors = lineStyleModel.get('color');\n var lineCount = 0;\n lineColors = lineColors instanceof Array ? lineColors : [lineColors];\n var splitLines = [];\n for (var i = 0; i < ticksAngles.length; i++) {\n var colorIndex = lineCount++ % lineColors.length;\n splitLines[colorIndex] = splitLines[colorIndex] || [];\n splitLines[colorIndex].push(new graphic.Line({\n shape: getAxisLineShape(polar, radiusExtent, ticksAngles[i].coord)\n }));\n }\n // Simple optimization\n // Batching the lines if color are the same\n for (var i = 0; i < splitLines.length; i++) {\n group.add(graphic.mergePath(splitLines[i], {\n style: zrUtil.defaults({\n stroke: lineColors[i % lineColors.length]\n }, lineStyleModel.getLineStyle()),\n silent: true,\n z: angleAxisModel.get('z')\n }));\n }\n },\n minorSplitLine: function (group, angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent) {\n if (!minorTickAngles.length) {\n return;\n }\n var minorSplitLineModel = angleAxisModel.getModel('minorSplitLine');\n var lineStyleModel = minorSplitLineModel.getModel('lineStyle');\n var lines = [];\n for (var i = 0; i < minorTickAngles.length; i++) {\n for (var k = 0; k < minorTickAngles[i].length; k++) {\n lines.push(new graphic.Line({\n shape: getAxisLineShape(polar, radiusExtent, minorTickAngles[i][k].coord)\n }));\n }\n }\n group.add(graphic.mergePath(lines, {\n style: lineStyleModel.getLineStyle(),\n silent: true,\n z: angleAxisModel.get('z')\n }));\n },\n splitArea: function (group, angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent) {\n if (!ticksAngles.length) {\n return;\n }\n var splitAreaModel = angleAxisModel.getModel('splitArea');\n var areaStyleModel = splitAreaModel.getModel('areaStyle');\n var areaColors = areaStyleModel.get('color');\n var lineCount = 0;\n areaColors = areaColors instanceof Array ? areaColors : [areaColors];\n var splitAreas = [];\n var RADIAN = Math.PI / 180;\n var prevAngle = -ticksAngles[0].coord * RADIAN;\n var r0 = Math.min(radiusExtent[0], radiusExtent[1]);\n var r1 = Math.max(radiusExtent[0], radiusExtent[1]);\n var clockwise = angleAxisModel.get('clockwise');\n for (var i = 1, len = ticksAngles.length; i <= len; i++) {\n var coord = i === len ? ticksAngles[0].coord : ticksAngles[i].coord;\n var colorIndex = lineCount++ % areaColors.length;\n splitAreas[colorIndex] = splitAreas[colorIndex] || [];\n splitAreas[colorIndex].push(new graphic.Sector({\n shape: {\n cx: polar.cx,\n cy: polar.cy,\n r0: r0,\n r: r1,\n startAngle: prevAngle,\n endAngle: -coord * RADIAN,\n clockwise: clockwise\n },\n silent: true\n }));\n prevAngle = -coord * RADIAN;\n }\n // Simple optimization\n // Batching the lines if color are the same\n for (var i = 0; i < splitAreas.length; i++) {\n group.add(graphic.mergePath(splitAreas[i], {\n style: zrUtil.defaults({\n fill: areaColors[i % areaColors.length]\n }, areaStyleModel.getAreaStyle()),\n silent: true\n }));\n }\n }\n};\nexport default AngleAxisView;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport AxisBuilder from './AxisBuilder.js';\nimport AxisView from './AxisView.js';\nvar axisBuilderAttrs = ['axisLine', 'axisTickLabel', 'axisName'];\nvar selfBuilderAttrs = ['splitLine', 'splitArea', 'minorSplitLine'];\nvar RadiusAxisView = /** @class */function (_super) {\n __extends(RadiusAxisView, _super);\n function RadiusAxisView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = RadiusAxisView.type;\n _this.axisPointerClass = 'PolarAxisPointer';\n return _this;\n }\n RadiusAxisView.prototype.render = function (radiusAxisModel, ecModel) {\n this.group.removeAll();\n if (!radiusAxisModel.get('show')) {\n return;\n }\n var oldAxisGroup = this._axisGroup;\n var newAxisGroup = this._axisGroup = new graphic.Group();\n this.group.add(newAxisGroup);\n var radiusAxis = radiusAxisModel.axis;\n var polar = radiusAxis.polar;\n var angleAxis = polar.getAngleAxis();\n var ticksCoords = radiusAxis.getTicksCoords();\n var minorTicksCoords = radiusAxis.getMinorTicksCoords();\n var axisAngle = angleAxis.getExtent()[0];\n var radiusExtent = radiusAxis.getExtent();\n var layout = layoutAxis(polar, radiusAxisModel, axisAngle);\n var axisBuilder = new AxisBuilder(radiusAxisModel, layout);\n zrUtil.each(axisBuilderAttrs, axisBuilder.add, axisBuilder);\n newAxisGroup.add(axisBuilder.getGroup());\n graphic.groupTransition(oldAxisGroup, newAxisGroup, radiusAxisModel);\n zrUtil.each(selfBuilderAttrs, function (name) {\n if (radiusAxisModel.get([name, 'show']) && !radiusAxis.scale.isBlank()) {\n axisElementBuilders[name](this.group, radiusAxisModel, polar, axisAngle, radiusExtent, ticksCoords, minorTicksCoords);\n }\n }, this);\n };\n RadiusAxisView.type = 'radiusAxis';\n return RadiusAxisView;\n}(AxisView);\nvar axisElementBuilders = {\n splitLine: function (group, radiusAxisModel, polar, axisAngle, radiusExtent, ticksCoords) {\n var splitLineModel = radiusAxisModel.getModel('splitLine');\n var lineStyleModel = splitLineModel.getModel('lineStyle');\n var lineColors = lineStyleModel.get('color');\n var lineCount = 0;\n var angleAxis = polar.getAngleAxis();\n var RADIAN = Math.PI / 180;\n var angleExtent = angleAxis.getExtent();\n var shapeType = Math.abs(angleExtent[1] - angleExtent[0]) === 360 ? 'Circle' : 'Arc';\n lineColors = lineColors instanceof Array ? lineColors : [lineColors];\n var splitLines = [];\n for (var i = 0; i < ticksCoords.length; i++) {\n var colorIndex = lineCount++ % lineColors.length;\n splitLines[colorIndex] = splitLines[colorIndex] || [];\n splitLines[colorIndex].push(new graphic[shapeType]({\n shape: {\n cx: polar.cx,\n cy: polar.cy,\n // ensure circle radius >= 0\n r: Math.max(ticksCoords[i].coord, 0),\n startAngle: -angleExtent[0] * RADIAN,\n endAngle: -angleExtent[1] * RADIAN,\n clockwise: angleAxis.inverse\n }\n }));\n }\n // Simple optimization\n // Batching the lines if color are the same\n for (var i = 0; i < splitLines.length; i++) {\n group.add(graphic.mergePath(splitLines[i], {\n style: zrUtil.defaults({\n stroke: lineColors[i % lineColors.length],\n fill: null\n }, lineStyleModel.getLineStyle()),\n silent: true\n }));\n }\n },\n minorSplitLine: function (group, radiusAxisModel, polar, axisAngle, radiusExtent, ticksCoords, minorTicksCoords) {\n if (!minorTicksCoords.length) {\n return;\n }\n var minorSplitLineModel = radiusAxisModel.getModel('minorSplitLine');\n var lineStyleModel = minorSplitLineModel.getModel('lineStyle');\n var lines = [];\n for (var i = 0; i < minorTicksCoords.length; i++) {\n for (var k = 0; k < minorTicksCoords[i].length; k++) {\n lines.push(new graphic.Circle({\n shape: {\n cx: polar.cx,\n cy: polar.cy,\n r: minorTicksCoords[i][k].coord\n }\n }));\n }\n }\n group.add(graphic.mergePath(lines, {\n style: zrUtil.defaults({\n fill: null\n }, lineStyleModel.getLineStyle()),\n silent: true\n }));\n },\n splitArea: function (group, radiusAxisModel, polar, axisAngle, radiusExtent, ticksCoords) {\n if (!ticksCoords.length) {\n return;\n }\n var splitAreaModel = radiusAxisModel.getModel('splitArea');\n var areaStyleModel = splitAreaModel.getModel('areaStyle');\n var areaColors = areaStyleModel.get('color');\n var lineCount = 0;\n areaColors = areaColors instanceof Array ? areaColors : [areaColors];\n var splitAreas = [];\n var prevRadius = ticksCoords[0].coord;\n for (var i = 1; i < ticksCoords.length; i++) {\n var colorIndex = lineCount++ % areaColors.length;\n splitAreas[colorIndex] = splitAreas[colorIndex] || [];\n splitAreas[colorIndex].push(new graphic.Sector({\n shape: {\n cx: polar.cx,\n cy: polar.cy,\n r0: prevRadius,\n r: ticksCoords[i].coord,\n startAngle: 0,\n endAngle: Math.PI * 2\n },\n silent: true\n }));\n prevRadius = ticksCoords[i].coord;\n }\n // Simple optimization\n // Batching the lines if color are the same\n for (var i = 0; i < splitAreas.length; i++) {\n group.add(graphic.mergePath(splitAreas[i], {\n style: zrUtil.defaults({\n fill: areaColors[i % areaColors.length]\n }, areaStyleModel.getAreaStyle()),\n silent: true\n }));\n }\n }\n};\n/**\n * @inner\n */\nfunction layoutAxis(polar, radiusAxisModel, axisAngle) {\n return {\n position: [polar.cx, polar.cy],\n rotation: axisAngle / 180 * Math.PI,\n labelDirection: -1,\n tickDirection: -1,\n nameDirection: 1,\n labelRotate: radiusAxisModel.getModel('axisLabel').get('rotate'),\n // Over splitLine and splitArea\n z2: 1\n };\n}\nexport default RadiusAxisView;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { parsePercent } from '../util/number.js';\nimport { isDimensionStacked } from '../data/helper/dataStackHelper.js';\nfunction getSeriesStackId(seriesModel) {\n return seriesModel.get('stack') || '__ec_stack_' + seriesModel.seriesIndex;\n}\nfunction getAxisKey(polar, axis) {\n return axis.dim + polar.model.componentIndex;\n}\nfunction barLayoutPolar(seriesType, ecModel, api) {\n var lastStackCoords = {};\n var barWidthAndOffset = calRadialBar(zrUtil.filter(ecModel.getSeriesByType(seriesType), function (seriesModel) {\n return !ecModel.isSeriesFiltered(seriesModel) && seriesModel.coordinateSystem && seriesModel.coordinateSystem.type === 'polar';\n }));\n ecModel.eachSeriesByType(seriesType, function (seriesModel) {\n // Check series coordinate, do layout for polar only\n if (seriesModel.coordinateSystem.type !== 'polar') {\n return;\n }\n var data = seriesModel.getData();\n var polar = seriesModel.coordinateSystem;\n var baseAxis = polar.getBaseAxis();\n var axisKey = getAxisKey(polar, baseAxis);\n var stackId = getSeriesStackId(seriesModel);\n var columnLayoutInfo = barWidthAndOffset[axisKey][stackId];\n var columnOffset = columnLayoutInfo.offset;\n var columnWidth = columnLayoutInfo.width;\n var valueAxis = polar.getOtherAxis(baseAxis);\n var cx = seriesModel.coordinateSystem.cx;\n var cy = seriesModel.coordinateSystem.cy;\n var barMinHeight = seriesModel.get('barMinHeight') || 0;\n var barMinAngle = seriesModel.get('barMinAngle') || 0;\n lastStackCoords[stackId] = lastStackCoords[stackId] || [];\n var valueDim = data.mapDimension(valueAxis.dim);\n var baseDim = data.mapDimension(baseAxis.dim);\n var stacked = isDimensionStacked(data, valueDim /* , baseDim */);\n var clampLayout = baseAxis.dim !== 'radius' || !seriesModel.get('roundCap', true);\n var valueAxisModel = valueAxis.model;\n var startValue = valueAxisModel.get('startValue');\n var valueAxisStart = valueAxis.dataToCoord(startValue || 0);\n for (var idx = 0, len = data.count(); idx < len; idx++) {\n var value = data.get(valueDim, idx);\n var baseValue = data.get(baseDim, idx);\n var sign = value >= 0 ? 'p' : 'n';\n var baseCoord = valueAxisStart;\n // Because of the barMinHeight, we can not use the value in\n // stackResultDimension directly.\n // Only ordinal axis can be stacked.\n if (stacked) {\n if (!lastStackCoords[stackId][baseValue]) {\n lastStackCoords[stackId][baseValue] = {\n p: valueAxisStart,\n n: valueAxisStart // Negative stack\n };\n }\n // Should also consider #4243\n baseCoord = lastStackCoords[stackId][baseValue][sign];\n }\n var r0 = void 0;\n var r = void 0;\n var startAngle = void 0;\n var endAngle = void 0;\n // radial sector\n if (valueAxis.dim === 'radius') {\n var radiusSpan = valueAxis.dataToCoord(value) - valueAxisStart;\n var angle = baseAxis.dataToCoord(baseValue);\n if (Math.abs(radiusSpan) < barMinHeight) {\n radiusSpan = (radiusSpan < 0 ? -1 : 1) * barMinHeight;\n }\n r0 = baseCoord;\n r = baseCoord + radiusSpan;\n startAngle = angle - columnOffset;\n endAngle = startAngle - columnWidth;\n stacked && (lastStackCoords[stackId][baseValue][sign] = r);\n }\n // tangential sector\n else {\n var angleSpan = valueAxis.dataToCoord(value, clampLayout) - valueAxisStart;\n var radius = baseAxis.dataToCoord(baseValue);\n if (Math.abs(angleSpan) < barMinAngle) {\n angleSpan = (angleSpan < 0 ? -1 : 1) * barMinAngle;\n }\n r0 = radius + columnOffset;\n r = r0 + columnWidth;\n startAngle = baseCoord;\n endAngle = baseCoord + angleSpan;\n // if the previous stack is at the end of the ring,\n // add a round to differentiate it from origin\n // let extent = angleAxis.getExtent();\n // let stackCoord = angle;\n // if (stackCoord === extent[0] && value > 0) {\n // stackCoord = extent[1];\n // }\n // else if (stackCoord === extent[1] && value < 0) {\n // stackCoord = extent[0];\n // }\n stacked && (lastStackCoords[stackId][baseValue][sign] = endAngle);\n }\n data.setItemLayout(idx, {\n cx: cx,\n cy: cy,\n r0: r0,\n r: r,\n // Consider that positive angle is anti-clockwise,\n // while positive radian of sector is clockwise\n startAngle: -startAngle * Math.PI / 180,\n endAngle: -endAngle * Math.PI / 180,\n /**\n * Keep the same logic with bar in catesion: use end value to\n * control direction. Notice that if clockwise is true (by\n * default), the sector will always draw clockwisely, no matter\n * whether endAngle is greater or less than startAngle.\n */\n clockwise: startAngle >= endAngle\n });\n }\n });\n}\n/**\n * Calculate bar width and offset for radial bar charts\n */\nfunction calRadialBar(barSeries) {\n // Columns info on each category axis. Key is polar name\n var columnsMap = {};\n zrUtil.each(barSeries, function (seriesModel, idx) {\n var data = seriesModel.getData();\n var polar = seriesModel.coordinateSystem;\n var baseAxis = polar.getBaseAxis();\n var axisKey = getAxisKey(polar, baseAxis);\n var axisExtent = baseAxis.getExtent();\n var bandWidth = baseAxis.type === 'category' ? baseAxis.getBandWidth() : Math.abs(axisExtent[1] - axisExtent[0]) / data.count();\n var columnsOnAxis = columnsMap[axisKey] || {\n bandWidth: bandWidth,\n remainedWidth: bandWidth,\n autoWidthCount: 0,\n categoryGap: '20%',\n gap: '30%',\n stacks: {}\n };\n var stacks = columnsOnAxis.stacks;\n columnsMap[axisKey] = columnsOnAxis;\n var stackId = getSeriesStackId(seriesModel);\n if (!stacks[stackId]) {\n columnsOnAxis.autoWidthCount++;\n }\n stacks[stackId] = stacks[stackId] || {\n width: 0,\n maxWidth: 0\n };\n var barWidth = parsePercent(seriesModel.get('barWidth'), bandWidth);\n var barMaxWidth = parsePercent(seriesModel.get('barMaxWidth'), bandWidth);\n var barGap = seriesModel.get('barGap');\n var barCategoryGap = seriesModel.get('barCategoryGap');\n if (barWidth && !stacks[stackId].width) {\n barWidth = Math.min(columnsOnAxis.remainedWidth, barWidth);\n stacks[stackId].width = barWidth;\n columnsOnAxis.remainedWidth -= barWidth;\n }\n barMaxWidth && (stacks[stackId].maxWidth = barMaxWidth);\n barGap != null && (columnsOnAxis.gap = barGap);\n barCategoryGap != null && (columnsOnAxis.categoryGap = barCategoryGap);\n });\n var result = {};\n zrUtil.each(columnsMap, function (columnsOnAxis, coordSysName) {\n result[coordSysName] = {};\n var stacks = columnsOnAxis.stacks;\n var bandWidth = columnsOnAxis.bandWidth;\n var categoryGap = parsePercent(columnsOnAxis.categoryGap, bandWidth);\n var barGapPercent = parsePercent(columnsOnAxis.gap, 1);\n var remainedWidth = columnsOnAxis.remainedWidth;\n var autoWidthCount = columnsOnAxis.autoWidthCount;\n var autoWidth = (remainedWidth - categoryGap) / (autoWidthCount + (autoWidthCount - 1) * barGapPercent);\n autoWidth = Math.max(autoWidth, 0);\n // Find if any auto calculated bar exceeded maxBarWidth\n zrUtil.each(stacks, function (column, stack) {\n var maxWidth = column.maxWidth;\n if (maxWidth && maxWidth < autoWidth) {\n maxWidth = Math.min(maxWidth, remainedWidth);\n if (column.width) {\n maxWidth = Math.min(maxWidth, column.width);\n }\n remainedWidth -= maxWidth;\n column.width = maxWidth;\n autoWidthCount--;\n }\n });\n // Recalculate width again\n autoWidth = (remainedWidth - categoryGap) / (autoWidthCount + (autoWidthCount - 1) * barGapPercent);\n autoWidth = Math.max(autoWidth, 0);\n var widthSum = 0;\n var lastColumn;\n zrUtil.each(stacks, function (column, idx) {\n if (!column.width) {\n column.width = autoWidth;\n }\n lastColumn = column;\n widthSum += column.width * (1 + barGapPercent);\n });\n if (lastColumn) {\n widthSum -= lastColumn.width * barGapPercent;\n }\n var offset = -widthSum / 2;\n zrUtil.each(stacks, function (column, stackId) {\n result[coordSysName][stackId] = result[coordSysName][stackId] || {\n offset: offset,\n width: column.width\n };\n offset += column.width * (1 + barGapPercent);\n });\n });\n return result;\n}\nexport default barLayoutPolar;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport { use } from '../../extension.js';\nimport AxisView from '../axis/AxisView.js';\nimport PolarAxisPointer from '../axisPointer/PolarAxisPointer.js';\nimport { install as installAxisPointer } from '../axisPointer/install.js';\nimport PolarModel from '../../coord/polar/PolarModel.js';\nimport axisModelCreator from '../../coord/axisModelCreator.js';\nimport { AngleAxisModel, RadiusAxisModel } from '../../coord/polar/AxisModel.js';\nimport polarCreator from '../../coord/polar/polarCreator.js';\nimport AngleAxisView from '../axis/AngleAxisView.js';\nimport RadiusAxisView from '../axis/RadiusAxisView.js';\nimport ComponentView from '../../view/Component.js';\nimport { curry } from 'zrender/lib/core/util.js';\nimport barLayoutPolar from '../../layout/barPolar.js';\nvar angleAxisExtraOption = {\n startAngle: 90,\n clockwise: true,\n splitNumber: 12,\n axisLabel: {\n rotate: 0\n }\n};\nvar radiusAxisExtraOption = {\n splitNumber: 5\n};\nvar PolarView = /** @class */function (_super) {\n __extends(PolarView, _super);\n function PolarView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = PolarView.type;\n return _this;\n }\n PolarView.type = 'polar';\n return PolarView;\n}(ComponentView);\nexport function install(registers) {\n use(installAxisPointer);\n AxisView.registerAxisPointerClass('PolarAxisPointer', PolarAxisPointer);\n registers.registerCoordinateSystem('polar', polarCreator);\n registers.registerComponentModel(PolarModel);\n registers.registerComponentView(PolarView);\n // Model and view for angleAxis and radiusAxis\n axisModelCreator(registers, 'angle', AngleAxisModel, angleAxisExtraOption);\n axisModelCreator(registers, 'radius', RadiusAxisModel, radiusAxisExtraOption);\n registers.registerComponentView(AngleAxisView);\n registers.registerComponentView(RadiusAxisView);\n registers.registerLayout(curry(barLayoutPolar, 'bar'));\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nexport function layout(axisModel, opt) {\n opt = opt || {};\n var single = axisModel.coordinateSystem;\n var axis = axisModel.axis;\n var layout = {};\n var axisPosition = axis.position;\n var orient = axis.orient;\n var rect = single.getRect();\n var rectBound = [rect.x, rect.x + rect.width, rect.y, rect.y + rect.height];\n var positionMap = {\n horizontal: {\n top: rectBound[2],\n bottom: rectBound[3]\n },\n vertical: {\n left: rectBound[0],\n right: rectBound[1]\n }\n };\n layout.position = [orient === 'vertical' ? positionMap.vertical[axisPosition] : rectBound[0], orient === 'horizontal' ? positionMap.horizontal[axisPosition] : rectBound[3]];\n var r = {\n horizontal: 0,\n vertical: 1\n };\n layout.rotation = Math.PI / 2 * r[orient];\n var directionMap = {\n top: -1,\n bottom: 1,\n right: 1,\n left: -1\n };\n layout.labelDirection = layout.tickDirection = layout.nameDirection = directionMap[axisPosition];\n if (axisModel.get(['axisTick', 'inside'])) {\n layout.tickDirection = -layout.tickDirection;\n }\n if (zrUtil.retrieve(opt.labelInside, axisModel.get(['axisLabel', 'inside']))) {\n layout.labelDirection = -layout.labelDirection;\n }\n var labelRotation = opt.rotate;\n labelRotation == null && (labelRotation = axisModel.get(['axisLabel', 'rotate']));\n layout.labelRotation = axisPosition === 'top' ? -labelRotation : labelRotation;\n layout.z2 = 1;\n return layout;\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport AxisBuilder from './AxisBuilder.js';\nimport * as graphic from '../../util/graphic.js';\nimport * as singleAxisHelper from '../../coord/single/singleAxisHelper.js';\nimport AxisView from './AxisView.js';\nimport { rectCoordAxisBuildSplitArea, rectCoordAxisHandleRemove } from './axisSplitHelper.js';\nvar axisBuilderAttrs = ['axisLine', 'axisTickLabel', 'axisName'];\nvar selfBuilderAttrs = ['splitArea', 'splitLine'];\nvar SingleAxisView = /** @class */function (_super) {\n __extends(SingleAxisView, _super);\n function SingleAxisView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = SingleAxisView.type;\n _this.axisPointerClass = 'SingleAxisPointer';\n return _this;\n }\n SingleAxisView.prototype.render = function (axisModel, ecModel, api, payload) {\n var group = this.group;\n group.removeAll();\n var oldAxisGroup = this._axisGroup;\n this._axisGroup = new graphic.Group();\n var layout = singleAxisHelper.layout(axisModel);\n var axisBuilder = new AxisBuilder(axisModel, layout);\n zrUtil.each(axisBuilderAttrs, axisBuilder.add, axisBuilder);\n group.add(this._axisGroup);\n group.add(axisBuilder.getGroup());\n zrUtil.each(selfBuilderAttrs, function (name) {\n if (axisModel.get([name, 'show'])) {\n axisElementBuilders[name](this, this.group, this._axisGroup, axisModel);\n }\n }, this);\n graphic.groupTransition(oldAxisGroup, this._axisGroup, axisModel);\n _super.prototype.render.call(this, axisModel, ecModel, api, payload);\n };\n SingleAxisView.prototype.remove = function () {\n rectCoordAxisHandleRemove(this);\n };\n SingleAxisView.type = 'singleAxis';\n return SingleAxisView;\n}(AxisView);\nvar axisElementBuilders = {\n splitLine: function (axisView, group, axisGroup, axisModel) {\n var axis = axisModel.axis;\n if (axis.scale.isBlank()) {\n return;\n }\n var splitLineModel = axisModel.getModel('splitLine');\n var lineStyleModel = splitLineModel.getModel('lineStyle');\n var lineColors = lineStyleModel.get('color');\n lineColors = lineColors instanceof Array ? lineColors : [lineColors];\n var lineWidth = lineStyleModel.get('width');\n var gridRect = axisModel.coordinateSystem.getRect();\n var isHorizontal = axis.isHorizontal();\n var splitLines = [];\n var lineCount = 0;\n var ticksCoords = axis.getTicksCoords({\n tickModel: splitLineModel\n });\n var p1 = [];\n var p2 = [];\n for (var i = 0; i < ticksCoords.length; ++i) {\n var tickCoord = axis.toGlobalCoord(ticksCoords[i].coord);\n if (isHorizontal) {\n p1[0] = tickCoord;\n p1[1] = gridRect.y;\n p2[0] = tickCoord;\n p2[1] = gridRect.y + gridRect.height;\n } else {\n p1[0] = gridRect.x;\n p1[1] = tickCoord;\n p2[0] = gridRect.x + gridRect.width;\n p2[1] = tickCoord;\n }\n var line = new graphic.Line({\n shape: {\n x1: p1[0],\n y1: p1[1],\n x2: p2[0],\n y2: p2[1]\n },\n silent: true\n });\n graphic.subPixelOptimizeLine(line.shape, lineWidth);\n var colorIndex = lineCount++ % lineColors.length;\n splitLines[colorIndex] = splitLines[colorIndex] || [];\n splitLines[colorIndex].push(line);\n }\n var lineStyle = lineStyleModel.getLineStyle(['color']);\n for (var i = 0; i < splitLines.length; ++i) {\n group.add(graphic.mergePath(splitLines[i], {\n style: zrUtil.defaults({\n stroke: lineColors[i % lineColors.length]\n }, lineStyle),\n silent: true\n }));\n }\n },\n splitArea: function (axisView, group, axisGroup, axisModel) {\n rectCoordAxisBuildSplitArea(axisView, axisGroup, axisModel, axisModel);\n }\n};\nexport default SingleAxisView;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport ComponentModel from '../../model/Component.js';\nimport { AxisModelCommonMixin } from '../axisModelCommonMixin.js';\nimport { mixin } from 'zrender/lib/core/util.js';\nvar SingleAxisModel = /** @class */function (_super) {\n __extends(SingleAxisModel, _super);\n function SingleAxisModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = SingleAxisModel.type;\n return _this;\n }\n SingleAxisModel.prototype.getCoordSysModel = function () {\n return this;\n };\n SingleAxisModel.type = 'singleAxis';\n SingleAxisModel.layoutMode = 'box';\n SingleAxisModel.defaultOption = {\n left: '5%',\n top: '5%',\n right: '5%',\n bottom: '5%',\n type: 'value',\n position: 'bottom',\n orient: 'horizontal',\n axisLine: {\n show: true,\n lineStyle: {\n width: 1,\n type: 'solid'\n }\n },\n // Single coordinate system and single axis is the,\n // which is used as the parent tooltip model.\n // same model, so we set default tooltip show as true.\n tooltip: {\n show: true\n },\n axisTick: {\n show: true,\n length: 6,\n lineStyle: {\n width: 1\n }\n },\n axisLabel: {\n show: true,\n interval: 'auto'\n },\n splitLine: {\n show: true,\n lineStyle: {\n type: 'dashed',\n opacity: 0.2\n }\n }\n };\n return SingleAxisModel;\n}(ComponentModel);\nmixin(SingleAxisModel, AxisModelCommonMixin.prototype);\nexport default SingleAxisModel;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport Axis from '../Axis.js';\nvar SingleAxis = /** @class */function (_super) {\n __extends(SingleAxis, _super);\n function SingleAxis(dim, scale, coordExtent, axisType, position) {\n var _this = _super.call(this, dim, scale, coordExtent) || this;\n _this.type = axisType || 'value';\n _this.position = position || 'bottom';\n return _this;\n }\n /**\n * Judge the orient of the axis.\n */\n SingleAxis.prototype.isHorizontal = function () {\n var position = this.position;\n return position === 'top' || position === 'bottom';\n };\n SingleAxis.prototype.pointToData = function (point, clamp) {\n return this.coordinateSystem.pointToData(point)[0];\n };\n return SingleAxis;\n}(Axis);\nexport default SingleAxis;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/**\n * Single coordinates system.\n */\nimport SingleAxis from './SingleAxis.js';\nimport * as axisHelper from '../axisHelper.js';\nimport { getLayoutRect } from '../../util/layout.js';\nimport { each } from 'zrender/lib/core/util.js';\nexport var singleDimensions = ['single'];\n/**\n * Create a single coordinates system.\n */\nvar Single = /** @class */function () {\n function Single(axisModel, ecModel, api) {\n this.type = 'single';\n this.dimension = 'single';\n /**\n * Add it just for draw tooltip.\n */\n this.dimensions = singleDimensions;\n this.axisPointerEnabled = true;\n this.model = axisModel;\n this._init(axisModel, ecModel, api);\n }\n /**\n * Initialize single coordinate system.\n */\n Single.prototype._init = function (axisModel, ecModel, api) {\n var dim = this.dimension;\n var axis = new SingleAxis(dim, axisHelper.createScaleByModel(axisModel), [0, 0], axisModel.get('type'), axisModel.get('position'));\n var isCategory = axis.type === 'category';\n axis.onBand = isCategory && axisModel.get('boundaryGap');\n axis.inverse = axisModel.get('inverse');\n axis.orient = axisModel.get('orient');\n axisModel.axis = axis;\n axis.model = axisModel;\n axis.coordinateSystem = this;\n this._axis = axis;\n };\n /**\n * Update axis scale after data processed\n */\n Single.prototype.update = function (ecModel, api) {\n ecModel.eachSeries(function (seriesModel) {\n if (seriesModel.coordinateSystem === this) {\n var data_1 = seriesModel.getData();\n each(data_1.mapDimensionsAll(this.dimension), function (dim) {\n this._axis.scale.unionExtentFromData(data_1, dim);\n }, this);\n axisHelper.niceScaleExtent(this._axis.scale, this._axis.model);\n }\n }, this);\n };\n /**\n * Resize the single coordinate system.\n */\n Single.prototype.resize = function (axisModel, api) {\n this._rect = getLayoutRect({\n left: axisModel.get('left'),\n top: axisModel.get('top'),\n right: axisModel.get('right'),\n bottom: axisModel.get('bottom'),\n width: axisModel.get('width'),\n height: axisModel.get('height')\n }, {\n width: api.getWidth(),\n height: api.getHeight()\n });\n this._adjustAxis();\n };\n Single.prototype.getRect = function () {\n return this._rect;\n };\n Single.prototype._adjustAxis = function () {\n var rect = this._rect;\n var axis = this._axis;\n var isHorizontal = axis.isHorizontal();\n var extent = isHorizontal ? [0, rect.width] : [0, rect.height];\n var idx = axis.inverse ? 1 : 0;\n axis.setExtent(extent[idx], extent[1 - idx]);\n this._updateAxisTransform(axis, isHorizontal ? rect.x : rect.y);\n };\n Single.prototype._updateAxisTransform = function (axis, coordBase) {\n var axisExtent = axis.getExtent();\n var extentSum = axisExtent[0] + axisExtent[1];\n var isHorizontal = axis.isHorizontal();\n axis.toGlobalCoord = isHorizontal ? function (coord) {\n return coord + coordBase;\n } : function (coord) {\n return extentSum - coord + coordBase;\n };\n axis.toLocalCoord = isHorizontal ? function (coord) {\n return coord - coordBase;\n } : function (coord) {\n return extentSum - coord + coordBase;\n };\n };\n /**\n * Get axis.\n */\n Single.prototype.getAxis = function () {\n return this._axis;\n };\n /**\n * Get axis, add it just for draw tooltip.\n */\n Single.prototype.getBaseAxis = function () {\n return this._axis;\n };\n Single.prototype.getAxes = function () {\n return [this._axis];\n };\n Single.prototype.getTooltipAxes = function () {\n return {\n baseAxes: [this.getAxis()],\n // Empty otherAxes\n otherAxes: []\n };\n };\n /**\n * If contain point.\n */\n Single.prototype.containPoint = function (point) {\n var rect = this.getRect();\n var axis = this.getAxis();\n var orient = axis.orient;\n if (orient === 'horizontal') {\n return axis.contain(axis.toLocalCoord(point[0])) && point[1] >= rect.y && point[1] <= rect.y + rect.height;\n } else {\n return axis.contain(axis.toLocalCoord(point[1])) && point[0] >= rect.y && point[0] <= rect.y + rect.height;\n }\n };\n Single.prototype.pointToData = function (point) {\n var axis = this.getAxis();\n return [axis.coordToData(axis.toLocalCoord(point[axis.orient === 'horizontal' ? 0 : 1]))];\n };\n /**\n * Convert the series data to concrete point.\n * Can be [val] | val\n */\n Single.prototype.dataToPoint = function (val) {\n var axis = this.getAxis();\n var rect = this.getRect();\n var pt = [];\n var idx = axis.orient === 'horizontal' ? 0 : 1;\n if (val instanceof Array) {\n val = val[0];\n }\n pt[idx] = axis.toGlobalCoord(axis.dataToCoord(+val));\n pt[1 - idx] = idx === 0 ? rect.y + rect.height / 2 : rect.x + rect.width / 2;\n return pt;\n };\n Single.prototype.convertToPixel = function (ecModel, finder, value) {\n var coordSys = getCoordSys(finder);\n return coordSys === this ? this.dataToPoint(value) : null;\n };\n Single.prototype.convertFromPixel = function (ecModel, finder, pixel) {\n var coordSys = getCoordSys(finder);\n return coordSys === this ? this.pointToData(pixel) : null;\n };\n return Single;\n}();\nfunction getCoordSys(finder) {\n var seriesModel = finder.seriesModel;\n var singleModel = finder.singleAxisModel;\n return singleModel && singleModel.coordinateSystem || seriesModel && seriesModel.coordinateSystem;\n}\nexport default Single;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/**\n * Single coordinate system creator.\n */\nimport Single, { singleDimensions } from './Single.js';\nimport { SINGLE_REFERRING } from '../../util/model.js';\n/**\n * Create single coordinate system and inject it into seriesModel.\n */\nfunction create(ecModel, api) {\n var singles = [];\n ecModel.eachComponent('singleAxis', function (axisModel, idx) {\n var single = new Single(axisModel, ecModel, api);\n single.name = 'single_' + idx;\n single.resize(axisModel, api);\n axisModel.coordinateSystem = single;\n singles.push(single);\n });\n ecModel.eachSeries(function (seriesModel) {\n if (seriesModel.get('coordinateSystem') === 'singleAxis') {\n var singleAxisModel = seriesModel.getReferringComponents('singleAxis', SINGLE_REFERRING).models[0];\n seriesModel.coordinateSystem = singleAxisModel && singleAxisModel.coordinateSystem;\n }\n });\n return singles;\n}\nvar singleCreator = {\n create: create,\n dimensions: singleDimensions\n};\nexport default singleCreator;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport BaseAxisPointer from './BaseAxisPointer.js';\nimport * as viewHelper from './viewHelper.js';\nimport * as singleAxisHelper from '../../coord/single/singleAxisHelper.js';\nvar XY = ['x', 'y'];\nvar WH = ['width', 'height'];\nvar SingleAxisPointer = /** @class */function (_super) {\n __extends(SingleAxisPointer, _super);\n function SingleAxisPointer() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @override\n */\n SingleAxisPointer.prototype.makeElOption = function (elOption, value, axisModel, axisPointerModel, api) {\n var axis = axisModel.axis;\n var coordSys = axis.coordinateSystem;\n var otherExtent = getGlobalExtent(coordSys, 1 - getPointDimIndex(axis));\n var pixelValue = coordSys.dataToPoint(value)[0];\n var axisPointerType = axisPointerModel.get('type');\n if (axisPointerType && axisPointerType !== 'none') {\n var elStyle = viewHelper.buildElStyle(axisPointerModel);\n var pointerOption = pointerShapeBuilder[axisPointerType](axis, pixelValue, otherExtent);\n pointerOption.style = elStyle;\n elOption.graphicKey = pointerOption.type;\n elOption.pointer = pointerOption;\n }\n var layoutInfo = singleAxisHelper.layout(axisModel);\n viewHelper.buildCartesianSingleLabelElOption(\n // @ts-ignore\n value, elOption, layoutInfo, axisModel, axisPointerModel, api);\n };\n /**\n * @override\n */\n SingleAxisPointer.prototype.getHandleTransform = function (value, axisModel, axisPointerModel) {\n var layoutInfo = singleAxisHelper.layout(axisModel, {\n labelInside: false\n });\n // @ts-ignore\n layoutInfo.labelMargin = axisPointerModel.get(['handle', 'margin']);\n var position = viewHelper.getTransformedPosition(axisModel.axis, value, layoutInfo);\n return {\n x: position[0],\n y: position[1],\n rotation: layoutInfo.rotation + (layoutInfo.labelDirection < 0 ? Math.PI : 0)\n };\n };\n /**\n * @override\n */\n SingleAxisPointer.prototype.updateHandleTransform = function (transform, delta, axisModel, axisPointerModel) {\n var axis = axisModel.axis;\n var coordSys = axis.coordinateSystem;\n var dimIndex = getPointDimIndex(axis);\n var axisExtent = getGlobalExtent(coordSys, dimIndex);\n var currPosition = [transform.x, transform.y];\n currPosition[dimIndex] += delta[dimIndex];\n currPosition[dimIndex] = Math.min(axisExtent[1], currPosition[dimIndex]);\n currPosition[dimIndex] = Math.max(axisExtent[0], currPosition[dimIndex]);\n var otherExtent = getGlobalExtent(coordSys, 1 - dimIndex);\n var cursorOtherValue = (otherExtent[1] + otherExtent[0]) / 2;\n var cursorPoint = [cursorOtherValue, cursorOtherValue];\n cursorPoint[dimIndex] = currPosition[dimIndex];\n return {\n x: currPosition[0],\n y: currPosition[1],\n rotation: transform.rotation,\n cursorPoint: cursorPoint,\n tooltipOption: {\n verticalAlign: 'middle'\n }\n };\n };\n return SingleAxisPointer;\n}(BaseAxisPointer);\nvar pointerShapeBuilder = {\n line: function (axis, pixelValue, otherExtent) {\n var targetShape = viewHelper.makeLineShape([pixelValue, otherExtent[0]], [pixelValue, otherExtent[1]], getPointDimIndex(axis));\n return {\n type: 'Line',\n subPixelOptimize: true,\n shape: targetShape\n };\n },\n shadow: function (axis, pixelValue, otherExtent) {\n var bandWidth = axis.getBandWidth();\n var span = otherExtent[1] - otherExtent[0];\n return {\n type: 'Rect',\n shape: viewHelper.makeRectShape([pixelValue - bandWidth / 2, otherExtent[0]], [bandWidth, span], getPointDimIndex(axis))\n };\n }\n};\nfunction getPointDimIndex(axis) {\n return axis.isHorizontal() ? 0 : 1;\n}\nfunction getGlobalExtent(coordSys, dimIndex) {\n var rect = coordSys.getRect();\n return [rect[XY[dimIndex]], rect[XY[dimIndex]] + rect[WH[dimIndex]]];\n}\nexport default SingleAxisPointer;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport { use } from '../../extension.js';\nimport ComponentView from '../../view/Component.js';\nimport SingleAxisView from '../axis/SingleAxisView.js';\nimport axisModelCreator from '../../coord/axisModelCreator.js';\nimport SingleAxisModel from '../../coord/single/AxisModel.js';\nimport singleCreator from '../../coord/single/singleCreator.js';\nimport { install as installAxisPointer } from '../axisPointer/install.js';\nimport AxisView from '../axis/AxisView.js';\nimport SingleAxisPointer from '../axisPointer/SingleAxisPointer.js';\nvar SingleView = /** @class */function (_super) {\n __extends(SingleView, _super);\n function SingleView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = SingleView.type;\n return _this;\n }\n SingleView.type = 'single';\n return SingleView;\n}(ComponentView);\nexport function install(registers) {\n use(installAxisPointer);\n AxisView.registerAxisPointerClass('SingleAxisPointer', SingleAxisPointer);\n registers.registerComponentView(SingleView);\n // Axis\n registers.registerComponentView(SingleAxisView);\n registers.registerComponentModel(SingleAxisModel);\n axisModelCreator(registers, 'single', SingleAxisModel, SingleAxisModel.defaultOption);\n registers.registerCoordinateSystem('single', singleCreator);\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// @ts-nocheck\nimport { getLayoutRect, box as layoutBox, positionElement } from '../../util/layout.js';\nimport * as formatUtil from '../../util/format.js';\nimport * as graphic from '../../util/graphic.js';\n/**\n * Layout list like component.\n * It will box layout each items in group of component and then position the whole group in the viewport\n * @param {module:zrender/group/Group} group\n * @param {module:echarts/model/Component} componentModel\n * @param {module:echarts/ExtensionAPI}\n */\nexport function layout(group, componentModel, api) {\n var boxLayoutParams = componentModel.getBoxLayoutParams();\n var padding = componentModel.get('padding');\n var viewportSize = {\n width: api.getWidth(),\n height: api.getHeight()\n };\n var rect = getLayoutRect(boxLayoutParams, viewportSize, padding);\n layoutBox(componentModel.get('orient'), group, componentModel.get('itemGap'), rect.width, rect.height);\n positionElement(group, boxLayoutParams, viewportSize, padding);\n}\nexport function makeBackground(rect, componentModel) {\n var padding = formatUtil.normalizeCssArray(componentModel.get('padding'));\n var style = componentModel.getItemStyle(['color', 'opacity']);\n style.fill = componentModel.get('backgroundColor');\n rect = new graphic.Rect({\n shape: {\n x: rect.x - padding[3],\n y: rect.y - padding[0],\n width: rect.width + padding[1] + padding[3],\n height: rect.height + padding[0] + padding[2],\n r: componentModel.get('borderRadius')\n },\n style: style,\n silent: true,\n z2: -1\n });\n // FIXME\n // `subPixelOptimizeRect` may bring some gap between edge of viewpart\n // and background rect when setting like `left: 0`, `top: 0`.\n // graphic.subPixelOptimizeRect(rect);\n return rect;\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport ComponentModel from '../../model/Component.js';\nvar TooltipModel = /** @class */function (_super) {\n __extends(TooltipModel, _super);\n function TooltipModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = TooltipModel.type;\n return _this;\n }\n TooltipModel.type = 'tooltip';\n TooltipModel.dependencies = ['axisPointer'];\n TooltipModel.defaultOption = {\n // zlevel: 0,\n z: 60,\n show: true,\n // tooltip main content\n showContent: true,\n // 'trigger' only works on coordinate system.\n // 'item' | 'axis' | 'none'\n trigger: 'item',\n // 'click' | 'mousemove' | 'none'\n triggerOn: 'mousemove|click',\n alwaysShowContent: false,\n displayMode: 'single',\n renderMode: 'auto',\n // whether restraint content inside viewRect.\n // If renderMode: 'richText', default true.\n // If renderMode: 'html', defaut false (for backward compat).\n confine: null,\n showDelay: 0,\n hideDelay: 100,\n // Animation transition time, unit is second\n transitionDuration: 0.4,\n enterable: false,\n backgroundColor: '#fff',\n // box shadow\n shadowBlur: 10,\n shadowColor: 'rgba(0, 0, 0, .2)',\n shadowOffsetX: 1,\n shadowOffsetY: 2,\n // tooltip border radius, unit is px, default is 4\n borderRadius: 4,\n // tooltip border width, unit is px, default is 0 (no border)\n borderWidth: 1,\n // Tooltip inside padding, default is 5 for all direction\n // Array is allowed to set up, right, bottom, left, same with css\n // The default value: See `tooltip/tooltipMarkup.ts#getPaddingFromTooltipModel`.\n padding: null,\n // Extra css text\n extraCssText: '',\n // axis indicator, trigger by axis\n axisPointer: {\n // default is line\n // legal values: 'line' | 'shadow' | 'cross'\n type: 'line',\n // Valid when type is line, appoint tooltip line locate on which line. Optional\n // legal values: 'x' | 'y' | 'angle' | 'radius' | 'auto'\n // default is 'auto', chose the axis which type is category.\n // for multiply y axis, cartesian coord chose x axis, polar chose angle axis\n axis: 'auto',\n animation: 'auto',\n animationDurationUpdate: 200,\n animationEasingUpdate: 'exponentialOut',\n crossStyle: {\n color: '#999',\n width: 1,\n type: 'dashed',\n // TODO formatter\n textStyle: {}\n }\n // lineStyle and shadowStyle should not be specified here,\n // otherwise it will always override those styles on option.axisPointer.\n },\n textStyle: {\n color: '#666',\n fontSize: 14\n }\n };\n return TooltipModel;\n}(ComponentModel);\nexport default TooltipModel;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { toCamelCase } from '../../util/format.js';\nimport env from 'zrender/lib/core/env.js';\n/* global document */\nexport function shouldTooltipConfine(tooltipModel) {\n var confineOption = tooltipModel.get('confine');\n return confineOption != null ? !!confineOption\n // In richText mode, the outside part can not be visible.\n : tooltipModel.get('renderMode') === 'richText';\n}\nfunction testStyle(styleProps) {\n if (!env.domSupported) {\n return;\n }\n var style = document.documentElement.style;\n for (var i = 0, len = styleProps.length; i < len; i++) {\n if (styleProps[i] in style) {\n return styleProps[i];\n }\n }\n}\nexport var TRANSFORM_VENDOR = testStyle(['transform', 'webkitTransform', 'OTransform', 'MozTransform', 'msTransform']);\nexport var TRANSITION_VENDOR = testStyle(['webkitTransition', 'transition', 'OTransition', 'MozTransition', 'msTransition']);\nexport function toCSSVendorPrefix(styleVendor, styleProp) {\n if (!styleVendor) {\n return styleProp;\n }\n styleProp = toCamelCase(styleProp, true);\n var idx = styleVendor.indexOf(styleProp);\n styleVendor = idx === -1 ? styleProp : \"-\" + styleVendor.slice(0, idx) + \"-\" + styleProp;\n return styleVendor.toLowerCase();\n}\nexport function getComputedStyle(el, style) {\n var stl = el.currentStyle || document.defaultView && document.defaultView.getComputedStyle(el);\n return stl ? style ? stl[style] : stl : null;\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { isString, indexOf, each, bind, isFunction, isArray, isDom } from 'zrender/lib/core/util.js';\nimport { normalizeEvent } from 'zrender/lib/core/event.js';\nimport { transformLocalCoord } from 'zrender/lib/core/dom.js';\nimport env from 'zrender/lib/core/env.js';\nimport { convertToColorString, toCamelCase, normalizeCssArray } from '../../util/format.js';\nimport { shouldTooltipConfine, toCSSVendorPrefix, getComputedStyle, TRANSFORM_VENDOR, TRANSITION_VENDOR } from './helper.js';\nimport { getPaddingFromTooltipModel } from './tooltipMarkup.js';\n/* global document, window */\nvar CSS_TRANSITION_VENDOR = toCSSVendorPrefix(TRANSITION_VENDOR, 'transition');\nvar CSS_TRANSFORM_VENDOR = toCSSVendorPrefix(TRANSFORM_VENDOR, 'transform');\n// eslint-disable-next-line\nvar gCssText = \"position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;\" + (env.transform3dSupported ? 'will-change:transform;' : '');\nfunction mirrorPos(pos) {\n pos = pos === 'left' ? 'right' : pos === 'right' ? 'left' : pos === 'top' ? 'bottom' : 'top';\n return pos;\n}\nfunction assembleArrow(tooltipModel, borderColor, arrowPosition) {\n if (!isString(arrowPosition) || arrowPosition === 'inside') {\n return '';\n }\n var backgroundColor = tooltipModel.get('backgroundColor');\n var borderWidth = tooltipModel.get('borderWidth');\n borderColor = convertToColorString(borderColor);\n var arrowPos = mirrorPos(arrowPosition);\n var arrowSize = Math.max(Math.round(borderWidth) * 1.5, 6);\n var positionStyle = '';\n var transformStyle = CSS_TRANSFORM_VENDOR + ':';\n var rotateDeg;\n if (indexOf(['left', 'right'], arrowPos) > -1) {\n positionStyle += 'top:50%';\n transformStyle += \"translateY(-50%) rotate(\" + (rotateDeg = arrowPos === 'left' ? -225 : -45) + \"deg)\";\n } else {\n positionStyle += 'left:50%';\n transformStyle += \"translateX(-50%) rotate(\" + (rotateDeg = arrowPos === 'top' ? 225 : 45) + \"deg)\";\n }\n var rotateRadian = rotateDeg * Math.PI / 180;\n var arrowWH = arrowSize + borderWidth;\n var rotatedWH = arrowWH * Math.abs(Math.cos(rotateRadian)) + arrowWH * Math.abs(Math.sin(rotateRadian));\n var arrowOffset = Math.round(((rotatedWH - Math.SQRT2 * borderWidth) / 2 + Math.SQRT2 * borderWidth - (rotatedWH - arrowWH) / 2) * 100) / 100;\n positionStyle += \";\" + arrowPos + \":-\" + arrowOffset + \"px\";\n var borderStyle = borderColor + \" solid \" + borderWidth + \"px;\";\n var styleCss = [\"position:absolute;width:\" + arrowSize + \"px;height:\" + arrowSize + \"px;z-index:-1;\", positionStyle + \";\" + transformStyle + \";\", \"border-bottom:\" + borderStyle, \"border-right:\" + borderStyle, \"background-color:\" + backgroundColor + \";\"];\n return \"
\";\n}\nfunction assembleTransition(duration, onlyFade) {\n var transitionCurve = 'cubic-bezier(0.23,1,0.32,1)';\n var transitionOption = \" \" + duration / 2 + \"s \" + transitionCurve;\n var transitionText = \"opacity\" + transitionOption + \",visibility\" + transitionOption;\n if (!onlyFade) {\n transitionOption = \" \" + duration + \"s \" + transitionCurve;\n transitionText += env.transformSupported ? \",\" + CSS_TRANSFORM_VENDOR + transitionOption : \",left\" + transitionOption + \",top\" + transitionOption;\n }\n return CSS_TRANSITION_VENDOR + ':' + transitionText;\n}\nfunction assembleTransform(x, y, toString) {\n // If using float on style, the final width of the dom might\n // keep changing slightly while mouse move. So `toFixed(0)` them.\n var x0 = x.toFixed(0) + 'px';\n var y0 = y.toFixed(0) + 'px';\n // not support transform, use `left` and `top` instead.\n if (!env.transformSupported) {\n return toString ? \"top:\" + y0 + \";left:\" + x0 + \";\" : [['top', y0], ['left', x0]];\n }\n // support transform\n var is3d = env.transform3dSupported;\n var translate = \"translate\" + (is3d ? '3d' : '') + \"(\" + x0 + \",\" + y0 + (is3d ? ',0' : '') + \")\";\n return toString ? 'top:0;left:0;' + CSS_TRANSFORM_VENDOR + ':' + translate + ';' : [['top', 0], ['left', 0], [TRANSFORM_VENDOR, translate]];\n}\n/**\n * @param {Object} textStyle\n * @return {string}\n * @inner\n */\nfunction assembleFont(textStyleModel) {\n var cssText = [];\n var fontSize = textStyleModel.get('fontSize');\n var color = textStyleModel.getTextColor();\n color && cssText.push('color:' + color);\n cssText.push('font:' + textStyleModel.getFont());\n fontSize\n // @ts-ignore, leave it to the tooltip refactor.\n && cssText.push('line-height:' + Math.round(fontSize * 3 / 2) + 'px');\n var shadowColor = textStyleModel.get('textShadowColor');\n var shadowBlur = textStyleModel.get('textShadowBlur') || 0;\n var shadowOffsetX = textStyleModel.get('textShadowOffsetX') || 0;\n var shadowOffsetY = textStyleModel.get('textShadowOffsetY') || 0;\n shadowColor && shadowBlur && cssText.push('text-shadow:' + shadowOffsetX + 'px ' + shadowOffsetY + 'px ' + shadowBlur + 'px ' + shadowColor);\n each(['decoration', 'align'], function (name) {\n var val = textStyleModel.get(name);\n val && cssText.push('text-' + name + ':' + val);\n });\n return cssText.join(';');\n}\nfunction assembleCssText(tooltipModel, enableTransition, onlyFade) {\n var cssText = [];\n var transitionDuration = tooltipModel.get('transitionDuration');\n var backgroundColor = tooltipModel.get('backgroundColor');\n var shadowBlur = tooltipModel.get('shadowBlur');\n var shadowColor = tooltipModel.get('shadowColor');\n var shadowOffsetX = tooltipModel.get('shadowOffsetX');\n var shadowOffsetY = tooltipModel.get('shadowOffsetY');\n var textStyleModel = tooltipModel.getModel('textStyle');\n var padding = getPaddingFromTooltipModel(tooltipModel, 'html');\n var boxShadow = shadowOffsetX + \"px \" + shadowOffsetY + \"px \" + shadowBlur + \"px \" + shadowColor;\n cssText.push('box-shadow:' + boxShadow);\n // Animation transition. Do not animate when transitionDuration is 0.\n enableTransition && transitionDuration && cssText.push(assembleTransition(transitionDuration, onlyFade));\n if (backgroundColor) {\n cssText.push('background-color:' + backgroundColor);\n }\n // Border style\n each(['width', 'color', 'radius'], function (name) {\n var borderName = 'border-' + name;\n var camelCase = toCamelCase(borderName);\n var val = tooltipModel.get(camelCase);\n val != null && cssText.push(borderName + ':' + val + (name === 'color' ? '' : 'px'));\n });\n // Text style\n cssText.push(assembleFont(textStyleModel));\n // Padding\n if (padding != null) {\n cssText.push('padding:' + normalizeCssArray(padding).join('px ') + 'px');\n }\n return cssText.join(';') + ';';\n}\n// If not able to make, do not modify the input `out`.\nfunction makeStyleCoord(out, zr, container, zrX, zrY) {\n var zrPainter = zr && zr.painter;\n if (container) {\n var zrViewportRoot = zrPainter && zrPainter.getViewportRoot();\n if (zrViewportRoot) {\n // Some APPs might use scale on body, so we support CSS transform here.\n transformLocalCoord(out, zrViewportRoot, container, zrX, zrY);\n }\n } else {\n out[0] = zrX;\n out[1] = zrY;\n // xy should be based on canvas root. But tooltipContent is\n // the sibling of canvas root. So padding of ec container\n // should be considered here.\n var viewportRootOffset = zrPainter && zrPainter.getViewportRootOffset();\n if (viewportRootOffset) {\n out[0] += viewportRootOffset.offsetLeft;\n out[1] += viewportRootOffset.offsetTop;\n }\n }\n out[2] = out[0] / zr.getWidth();\n out[3] = out[1] / zr.getHeight();\n}\nvar TooltipHTMLContent = /** @class */function () {\n function TooltipHTMLContent(api, opt) {\n this._show = false;\n this._styleCoord = [0, 0, 0, 0];\n this._enterable = true;\n this._alwaysShowContent = false;\n this._firstShow = true;\n this._longHide = true;\n if (env.wxa) {\n return null;\n }\n var el = document.createElement('div');\n // TODO: TYPE\n el.domBelongToZr = true;\n this.el = el;\n var zr = this._zr = api.getZr();\n var appendTo = opt.appendTo;\n var container = appendTo && (isString(appendTo) ? document.querySelector(appendTo) : isDom(appendTo) ? appendTo : isFunction(appendTo) && appendTo(api.getDom()));\n makeStyleCoord(this._styleCoord, zr, container, api.getWidth() / 2, api.getHeight() / 2);\n (container || api.getDom()).appendChild(el);\n this._api = api;\n this._container = container;\n // FIXME\n // Is it needed to trigger zr event manually if\n // the browser do not support `pointer-events: none`.\n var self = this;\n el.onmouseenter = function () {\n // clear the timeout in hideLater and keep showing tooltip\n if (self._enterable) {\n clearTimeout(self._hideTimeout);\n self._show = true;\n }\n self._inContent = true;\n };\n el.onmousemove = function (e) {\n e = e || window.event;\n if (!self._enterable) {\n // `pointer-events: none` is set to tooltip content div\n // if `enterable` is set as `false`, and `el.onmousemove`\n // can not be triggered. But in browser that do not\n // support `pointer-events`, we need to do this:\n // Try trigger zrender event to avoid mouse\n // in and out shape too frequently\n var handler = zr.handler;\n var zrViewportRoot = zr.painter.getViewportRoot();\n normalizeEvent(zrViewportRoot, e, true);\n handler.dispatch('mousemove', e);\n }\n };\n el.onmouseleave = function () {\n // set `_inContent` to `false` before `hideLater`\n self._inContent = false;\n if (self._enterable) {\n if (self._show) {\n self.hideLater(self._hideDelay);\n }\n }\n };\n }\n /**\n * Update when tooltip is rendered\n */\n TooltipHTMLContent.prototype.update = function (tooltipModel) {\n // FIXME\n // Move this logic to ec main?\n if (!this._container) {\n var container = this._api.getDom();\n var position = getComputedStyle(container, 'position');\n var domStyle = container.style;\n if (domStyle.position !== 'absolute' && position !== 'absolute') {\n domStyle.position = 'relative';\n }\n }\n // move tooltip if chart resized\n var alwaysShowContent = tooltipModel.get('alwaysShowContent');\n alwaysShowContent && this._moveIfResized();\n // update alwaysShowContent\n this._alwaysShowContent = alwaysShowContent;\n // update className\n this.el.className = tooltipModel.get('className') || '';\n // Hide the tooltip\n // PENDING\n // this.hide();\n };\n TooltipHTMLContent.prototype.show = function (tooltipModel, nearPointColor) {\n clearTimeout(this._hideTimeout);\n clearTimeout(this._longHideTimeout);\n var el = this.el;\n var style = el.style;\n var styleCoord = this._styleCoord;\n if (!el.innerHTML) {\n style.display = 'none';\n } else {\n style.cssText = gCssText + assembleCssText(tooltipModel, !this._firstShow, this._longHide)\n // initial transform\n + assembleTransform(styleCoord[0], styleCoord[1], true) + (\"border-color:\" + convertToColorString(nearPointColor) + \";\") + (tooltipModel.get('extraCssText') || '')\n // If mouse occasionally move over the tooltip, a mouseout event will be\n // triggered by canvas, and cause some unexpectable result like dragging\n // stop, \"unfocusAdjacency\". Here `pointer-events: none` is used to solve\n // it. Although it is not supported by IE8~IE10, fortunately it is a rare\n // scenario.\n + (\";pointer-events:\" + (this._enterable ? 'auto' : 'none'));\n }\n this._show = true;\n this._firstShow = false;\n this._longHide = false;\n };\n TooltipHTMLContent.prototype.setContent = function (content, markers, tooltipModel, borderColor, arrowPosition) {\n var el = this.el;\n if (content == null) {\n el.innerHTML = '';\n return;\n }\n var arrow = '';\n if (isString(arrowPosition) && tooltipModel.get('trigger') === 'item' && !shouldTooltipConfine(tooltipModel)) {\n arrow = assembleArrow(tooltipModel, borderColor, arrowPosition);\n }\n if (isString(content)) {\n el.innerHTML = content + arrow;\n } else if (content) {\n // Clear previous\n el.innerHTML = '';\n if (!isArray(content)) {\n content = [content];\n }\n for (var i = 0; i < content.length; i++) {\n if (isDom(content[i]) && content[i].parentNode !== el) {\n el.appendChild(content[i]);\n }\n }\n // no arrow if empty\n if (arrow && el.childNodes.length) {\n // no need to create a new parent element, but it's not supported by IE 10 and older.\n // const arrowEl = document.createRange().createContextualFragment(arrow);\n var arrowEl = document.createElement('div');\n arrowEl.innerHTML = arrow;\n el.appendChild(arrowEl);\n }\n }\n };\n TooltipHTMLContent.prototype.setEnterable = function (enterable) {\n this._enterable = enterable;\n };\n TooltipHTMLContent.prototype.getSize = function () {\n var el = this.el;\n return [el.offsetWidth, el.offsetHeight];\n };\n TooltipHTMLContent.prototype.moveTo = function (zrX, zrY) {\n var styleCoord = this._styleCoord;\n makeStyleCoord(styleCoord, this._zr, this._container, zrX, zrY);\n if (styleCoord[0] != null && styleCoord[1] != null) {\n var style_1 = this.el.style;\n var transforms = assembleTransform(styleCoord[0], styleCoord[1]);\n each(transforms, function (transform) {\n style_1[transform[0]] = transform[1];\n });\n }\n };\n /**\n * when `alwaysShowContent` is true,\n * move the tooltip after chart resized\n */\n TooltipHTMLContent.prototype._moveIfResized = function () {\n // The ratio of left to width\n var ratioX = this._styleCoord[2];\n // The ratio of top to height\n var ratioY = this._styleCoord[3];\n this.moveTo(ratioX * this._zr.getWidth(), ratioY * this._zr.getHeight());\n };\n TooltipHTMLContent.prototype.hide = function () {\n var _this = this;\n var style = this.el.style;\n style.visibility = 'hidden';\n style.opacity = '0';\n env.transform3dSupported && (style.willChange = '');\n this._show = false;\n this._longHideTimeout = setTimeout(function () {\n return _this._longHide = true;\n }, 500);\n };\n TooltipHTMLContent.prototype.hideLater = function (time) {\n if (this._show && !(this._inContent && this._enterable) && !this._alwaysShowContent) {\n if (time) {\n this._hideDelay = time;\n // Set show false to avoid invoke hideLater multiple times\n this._show = false;\n this._hideTimeout = setTimeout(bind(this.hide, this), time);\n } else {\n this.hide();\n }\n }\n };\n TooltipHTMLContent.prototype.isShow = function () {\n return this._show;\n };\n TooltipHTMLContent.prototype.dispose = function () {\n clearTimeout(this._hideTimeout);\n clearTimeout(this._longHideTimeout);\n var parentNode = this.el.parentNode;\n parentNode && parentNode.removeChild(this.el);\n this.el = this._container = null;\n };\n return TooltipHTMLContent;\n}();\nexport default TooltipHTMLContent;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport ZRText from 'zrender/lib/graphic/Text.js';\nimport { getPaddingFromTooltipModel } from './tooltipMarkup.js';\nimport { throwError } from '../../util/log.js';\nvar TooltipRichContent = /** @class */function () {\n function TooltipRichContent(api) {\n this._show = false;\n this._styleCoord = [0, 0, 0, 0];\n this._alwaysShowContent = false;\n this._enterable = true;\n this._zr = api.getZr();\n makeStyleCoord(this._styleCoord, this._zr, api.getWidth() / 2, api.getHeight() / 2);\n }\n /**\n * Update when tooltip is rendered\n */\n TooltipRichContent.prototype.update = function (tooltipModel) {\n var alwaysShowContent = tooltipModel.get('alwaysShowContent');\n alwaysShowContent && this._moveIfResized();\n // update alwaysShowContent\n this._alwaysShowContent = alwaysShowContent;\n };\n TooltipRichContent.prototype.show = function () {\n if (this._hideTimeout) {\n clearTimeout(this._hideTimeout);\n }\n this.el.show();\n this._show = true;\n };\n /**\n * Set tooltip content\n */\n TooltipRichContent.prototype.setContent = function (content, markupStyleCreator, tooltipModel, borderColor, arrowPosition) {\n var _this = this;\n if (zrUtil.isObject(content)) {\n throwError(process.env.NODE_ENV !== 'production' ? 'Passing DOM nodes as content is not supported in richText tooltip!' : '');\n }\n if (this.el) {\n this._zr.remove(this.el);\n }\n var textStyleModel = tooltipModel.getModel('textStyle');\n this.el = new ZRText({\n style: {\n rich: markupStyleCreator.richTextStyles,\n text: content,\n lineHeight: 22,\n borderWidth: 1,\n borderColor: borderColor,\n textShadowColor: textStyleModel.get('textShadowColor'),\n fill: tooltipModel.get(['textStyle', 'color']),\n padding: getPaddingFromTooltipModel(tooltipModel, 'richText'),\n verticalAlign: 'top',\n align: 'left'\n },\n z: tooltipModel.get('z')\n });\n zrUtil.each(['backgroundColor', 'borderRadius', 'shadowColor', 'shadowBlur', 'shadowOffsetX', 'shadowOffsetY'], function (propName) {\n _this.el.style[propName] = tooltipModel.get(propName);\n });\n zrUtil.each(['textShadowBlur', 'textShadowOffsetX', 'textShadowOffsetY'], function (propName) {\n _this.el.style[propName] = textStyleModel.get(propName) || 0;\n });\n this._zr.add(this.el);\n var self = this;\n this.el.on('mouseover', function () {\n // clear the timeout in hideLater and keep showing tooltip\n if (self._enterable) {\n clearTimeout(self._hideTimeout);\n self._show = true;\n }\n self._inContent = true;\n });\n this.el.on('mouseout', function () {\n if (self._enterable) {\n if (self._show) {\n self.hideLater(self._hideDelay);\n }\n }\n self._inContent = false;\n });\n };\n TooltipRichContent.prototype.setEnterable = function (enterable) {\n this._enterable = enterable;\n };\n TooltipRichContent.prototype.getSize = function () {\n var el = this.el;\n var bounding = this.el.getBoundingRect();\n // bounding rect does not include shadow. For renderMode richText,\n // if overflow, it will be cut. So calculate them accurately.\n var shadowOuterSize = calcShadowOuterSize(el.style);\n return [bounding.width + shadowOuterSize.left + shadowOuterSize.right, bounding.height + shadowOuterSize.top + shadowOuterSize.bottom];\n };\n TooltipRichContent.prototype.moveTo = function (x, y) {\n var el = this.el;\n if (el) {\n var styleCoord = this._styleCoord;\n makeStyleCoord(styleCoord, this._zr, x, y);\n x = styleCoord[0];\n y = styleCoord[1];\n var style = el.style;\n var borderWidth = mathMaxWith0(style.borderWidth || 0);\n var shadowOuterSize = calcShadowOuterSize(style);\n // rich text x, y do not include border.\n el.x = x + borderWidth + shadowOuterSize.left;\n el.y = y + borderWidth + shadowOuterSize.top;\n el.markRedraw();\n }\n };\n /**\n * when `alwaysShowContent` is true,\n * move the tooltip after chart resized\n */\n TooltipRichContent.prototype._moveIfResized = function () {\n // The ratio of left to width\n var ratioX = this._styleCoord[2];\n // The ratio of top to height\n var ratioY = this._styleCoord[3];\n this.moveTo(ratioX * this._zr.getWidth(), ratioY * this._zr.getHeight());\n };\n TooltipRichContent.prototype.hide = function () {\n if (this.el) {\n this.el.hide();\n }\n this._show = false;\n };\n TooltipRichContent.prototype.hideLater = function (time) {\n if (this._show && !(this._inContent && this._enterable) && !this._alwaysShowContent) {\n if (time) {\n this._hideDelay = time;\n // Set show false to avoid invoke hideLater multiple times\n this._show = false;\n this._hideTimeout = setTimeout(zrUtil.bind(this.hide, this), time);\n } else {\n this.hide();\n }\n }\n };\n TooltipRichContent.prototype.isShow = function () {\n return this._show;\n };\n TooltipRichContent.prototype.dispose = function () {\n this._zr.remove(this.el);\n };\n return TooltipRichContent;\n}();\nfunction mathMaxWith0(val) {\n return Math.max(0, val);\n}\nfunction calcShadowOuterSize(style) {\n var shadowBlur = mathMaxWith0(style.shadowBlur || 0);\n var shadowOffsetX = mathMaxWith0(style.shadowOffsetX || 0);\n var shadowOffsetY = mathMaxWith0(style.shadowOffsetY || 0);\n return {\n left: mathMaxWith0(shadowBlur - shadowOffsetX),\n right: mathMaxWith0(shadowBlur + shadowOffsetX),\n top: mathMaxWith0(shadowBlur - shadowOffsetY),\n bottom: mathMaxWith0(shadowBlur + shadowOffsetY)\n };\n}\nfunction makeStyleCoord(out, zr, zrX, zrY) {\n out[0] = zrX;\n out[1] = zrY;\n out[2] = out[0] / zr.getWidth();\n out[3] = out[1] / zr.getHeight();\n}\nexport default TooltipRichContent;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\nimport { __extends } from \"tslib\";\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { bind, each, clone, trim, isString, isFunction, isArray, isObject, extend } from 'zrender/lib/core/util.js';\nimport env from 'zrender/lib/core/env.js';\nimport TooltipHTMLContent from './TooltipHTMLContent.js';\nimport TooltipRichContent from './TooltipRichContent.js';\nimport { convertToColorString, encodeHTML, formatTpl } from '../../util/format.js';\nimport { parsePercent } from '../../util/number.js';\nimport { Rect } from '../../util/graphic.js';\nimport findPointFromSeries from '../axisPointer/findPointFromSeries.js';\nimport { getLayoutRect } from '../../util/layout.js';\nimport Model from '../../model/Model.js';\nimport * as globalListener from '../axisPointer/globalListener.js';\nimport * as axisHelper from '../../coord/axisHelper.js';\nimport * as axisPointerViewHelper from '../axisPointer/viewHelper.js';\nimport { getTooltipRenderMode, preParseFinder, queryReferringComponents } from '../../util/model.js';\nimport ComponentView from '../../view/Component.js';\nimport { format as timeFormat } from '../../util/time.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { shouldTooltipConfine } from './helper.js';\nimport { normalizeTooltipFormatResult } from '../../model/mixin/dataFormat.js';\nimport { createTooltipMarkup, buildTooltipMarkup, TooltipMarkupStyleCreator } from './tooltipMarkup.js';\nimport { findEventDispatcher } from '../../util/event.js';\nimport { clear, createOrUpdate } from '../../util/throttle.js';\nvar proxyRect = new Rect({\n shape: {\n x: -1,\n y: -1,\n width: 2,\n height: 2\n }\n});\nvar TooltipView = /** @class */function (_super) {\n __extends(TooltipView, _super);\n function TooltipView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = TooltipView.type;\n return _this;\n }\n TooltipView.prototype.init = function (ecModel, api) {\n if (env.node || !api.getDom()) {\n return;\n }\n var tooltipModel = ecModel.getComponent('tooltip');\n var renderMode = this._renderMode = getTooltipRenderMode(tooltipModel.get('renderMode'));\n this._tooltipContent = renderMode === 'richText' ? new TooltipRichContent(api) : new TooltipHTMLContent(api, {\n appendTo: tooltipModel.get('appendToBody', true) ? 'body' : tooltipModel.get('appendTo', true)\n });\n };\n TooltipView.prototype.render = function (tooltipModel, ecModel, api) {\n if (env.node || !api.getDom()) {\n return;\n }\n // Reset\n this.group.removeAll();\n this._tooltipModel = tooltipModel;\n this._ecModel = ecModel;\n this._api = api;\n var tooltipContent = this._tooltipContent;\n tooltipContent.update(tooltipModel);\n tooltipContent.setEnterable(tooltipModel.get('enterable'));\n this._initGlobalListener();\n this._keepShow();\n // PENDING\n // `mousemove` event will be triggered very frequently when the mouse moves fast,\n // which causes that the `updatePosition` function was also called frequently.\n // In Chrome with devtools open and Firefox, tooltip looks laggy and shakes. See #14695 #16101\n // To avoid frequent triggering,\n // consider throttling it in 50ms when transition is enabled\n if (this._renderMode !== 'richText' && tooltipModel.get('transitionDuration')) {\n createOrUpdate(this, '_updatePosition', 50, 'fixRate');\n } else {\n clear(this, '_updatePosition');\n }\n };\n TooltipView.prototype._initGlobalListener = function () {\n var tooltipModel = this._tooltipModel;\n var triggerOn = tooltipModel.get('triggerOn');\n globalListener.register('itemTooltip', this._api, bind(function (currTrigger, e, dispatchAction) {\n // If 'none', it is not controlled by mouse totally.\n if (triggerOn !== 'none') {\n if (triggerOn.indexOf(currTrigger) >= 0) {\n this._tryShow(e, dispatchAction);\n } else if (currTrigger === 'leave') {\n this._hide(dispatchAction);\n }\n }\n }, this));\n };\n TooltipView.prototype._keepShow = function () {\n var tooltipModel = this._tooltipModel;\n var ecModel = this._ecModel;\n var api = this._api;\n var triggerOn = tooltipModel.get('triggerOn');\n // Try to keep the tooltip show when refreshing\n if (this._lastX != null && this._lastY != null\n // When user is willing to control tooltip totally using API,\n // self.manuallyShowTip({x, y}) might cause tooltip hide,\n // which is not expected.\n && triggerOn !== 'none' && triggerOn !== 'click') {\n var self_1 = this;\n clearTimeout(this._refreshUpdateTimeout);\n this._refreshUpdateTimeout = setTimeout(function () {\n // Show tip next tick after other charts are rendered\n // In case highlight action has wrong result\n // FIXME\n !api.isDisposed() && self_1.manuallyShowTip(tooltipModel, ecModel, api, {\n x: self_1._lastX,\n y: self_1._lastY,\n dataByCoordSys: self_1._lastDataByCoordSys\n });\n });\n }\n };\n /**\n * Show tip manually by\n * dispatchAction({\n * type: 'showTip',\n * x: 10,\n * y: 10\n * });\n * Or\n * dispatchAction({\n * type: 'showTip',\n * seriesIndex: 0,\n * dataIndex or dataIndexInside or name\n * });\n *\n * TODO Batch\n */\n TooltipView.prototype.manuallyShowTip = function (tooltipModel, ecModel, api, payload) {\n if (payload.from === this.uid || env.node || !api.getDom()) {\n return;\n }\n var dispatchAction = makeDispatchAction(payload, api);\n // Reset ticket\n this._ticket = '';\n // When triggered from axisPointer.\n var dataByCoordSys = payload.dataByCoordSys;\n var cmptRef = findComponentReference(payload, ecModel, api);\n if (cmptRef) {\n var rect = cmptRef.el.getBoundingRect().clone();\n rect.applyTransform(cmptRef.el.transform);\n this._tryShow({\n offsetX: rect.x + rect.width / 2,\n offsetY: rect.y + rect.height / 2,\n target: cmptRef.el,\n position: payload.position,\n // When manully trigger, the mouse is not on the el, so we'd better to\n // position tooltip on the bottom of the el and display arrow is possible.\n positionDefault: 'bottom'\n }, dispatchAction);\n } else if (payload.tooltip && payload.x != null && payload.y != null) {\n var el = proxyRect;\n el.x = payload.x;\n el.y = payload.y;\n el.update();\n getECData(el).tooltipConfig = {\n name: null,\n option: payload.tooltip\n };\n // Manually show tooltip while view is not using zrender elements.\n this._tryShow({\n offsetX: payload.x,\n offsetY: payload.y,\n target: el\n }, dispatchAction);\n } else if (dataByCoordSys) {\n this._tryShow({\n offsetX: payload.x,\n offsetY: payload.y,\n position: payload.position,\n dataByCoordSys: dataByCoordSys,\n tooltipOption: payload.tooltipOption\n }, dispatchAction);\n } else if (payload.seriesIndex != null) {\n if (this._manuallyAxisShowTip(tooltipModel, ecModel, api, payload)) {\n return;\n }\n var pointInfo = findPointFromSeries(payload, ecModel);\n var cx = pointInfo.point[0];\n var cy = pointInfo.point[1];\n if (cx != null && cy != null) {\n this._tryShow({\n offsetX: cx,\n offsetY: cy,\n target: pointInfo.el,\n position: payload.position,\n // When manully trigger, the mouse is not on the el, so we'd better to\n // position tooltip on the bottom of the el and display arrow is possible.\n positionDefault: 'bottom'\n }, dispatchAction);\n }\n } else if (payload.x != null && payload.y != null) {\n // FIXME\n // should wrap dispatchAction like `axisPointer/globalListener` ?\n api.dispatchAction({\n type: 'updateAxisPointer',\n x: payload.x,\n y: payload.y\n });\n this._tryShow({\n offsetX: payload.x,\n offsetY: payload.y,\n position: payload.position,\n target: api.getZr().findHover(payload.x, payload.y).target\n }, dispatchAction);\n }\n };\n TooltipView.prototype.manuallyHideTip = function (tooltipModel, ecModel, api, payload) {\n var tooltipContent = this._tooltipContent;\n if (this._tooltipModel) {\n tooltipContent.hideLater(this._tooltipModel.get('hideDelay'));\n }\n this._lastX = this._lastY = this._lastDataByCoordSys = null;\n if (payload.from !== this.uid) {\n this._hide(makeDispatchAction(payload, api));\n }\n };\n // Be compatible with previous design, that is, when tooltip.type is 'axis' and\n // dispatchAction 'showTip' with seriesIndex and dataIndex will trigger axis pointer\n // and tooltip.\n TooltipView.prototype._manuallyAxisShowTip = function (tooltipModel, ecModel, api, payload) {\n var seriesIndex = payload.seriesIndex;\n var dataIndex = payload.dataIndex;\n // @ts-ignore\n var coordSysAxesInfo = ecModel.getComponent('axisPointer').coordSysAxesInfo;\n if (seriesIndex == null || dataIndex == null || coordSysAxesInfo == null) {\n return;\n }\n var seriesModel = ecModel.getSeriesByIndex(seriesIndex);\n if (!seriesModel) {\n return;\n }\n var data = seriesModel.getData();\n var tooltipCascadedModel = buildTooltipModel([data.getItemModel(dataIndex), seriesModel, (seriesModel.coordinateSystem || {}).model], this._tooltipModel);\n if (tooltipCascadedModel.get('trigger') !== 'axis') {\n return;\n }\n api.dispatchAction({\n type: 'updateAxisPointer',\n seriesIndex: seriesIndex,\n dataIndex: dataIndex,\n position: payload.position\n });\n return true;\n };\n TooltipView.prototype._tryShow = function (e, dispatchAction) {\n var el = e.target;\n var tooltipModel = this._tooltipModel;\n if (!tooltipModel) {\n return;\n }\n // Save mouse x, mouse y. So we can try to keep showing the tip if chart is refreshed\n this._lastX = e.offsetX;\n this._lastY = e.offsetY;\n var dataByCoordSys = e.dataByCoordSys;\n if (dataByCoordSys && dataByCoordSys.length) {\n this._showAxisTooltip(dataByCoordSys, e);\n } else if (el) {\n var ecData = getECData(el);\n if (ecData.ssrType === 'legend') {\n // Don't trigger tooltip for legend tooltip item\n return;\n }\n this._lastDataByCoordSys = null;\n var seriesDispatcher_1;\n var cmptDispatcher_1;\n findEventDispatcher(el, function (target) {\n // Always show item tooltip if mouse is on the element with dataIndex\n if (getECData(target).dataIndex != null) {\n seriesDispatcher_1 = target;\n return true;\n }\n // Tooltip provided directly. Like legend.\n if (getECData(target).tooltipConfig != null) {\n cmptDispatcher_1 = target;\n return true;\n }\n }, true);\n if (seriesDispatcher_1) {\n this._showSeriesItemTooltip(e, seriesDispatcher_1, dispatchAction);\n } else if (cmptDispatcher_1) {\n this._showComponentItemTooltip(e, cmptDispatcher_1, dispatchAction);\n } else {\n this._hide(dispatchAction);\n }\n } else {\n this._lastDataByCoordSys = null;\n this._hide(dispatchAction);\n }\n };\n TooltipView.prototype._showOrMove = function (tooltipModel, cb) {\n // showDelay is used in this case: tooltip.enterable is set\n // as true. User intent to move mouse into tooltip and click\n // something. `showDelay` makes it easier to enter the content\n // but tooltip do not move immediately.\n var delay = tooltipModel.get('showDelay');\n cb = bind(cb, this);\n clearTimeout(this._showTimout);\n delay > 0 ? this._showTimout = setTimeout(cb, delay) : cb();\n };\n TooltipView.prototype._showAxisTooltip = function (dataByCoordSys, e) {\n var ecModel = this._ecModel;\n var globalTooltipModel = this._tooltipModel;\n var point = [e.offsetX, e.offsetY];\n var singleTooltipModel = buildTooltipModel([e.tooltipOption], globalTooltipModel);\n var renderMode = this._renderMode;\n var cbParamsList = [];\n var articleMarkup = createTooltipMarkup('section', {\n blocks: [],\n noHeader: true\n });\n // Only for legacy: `Serise['formatTooltip']` returns a string.\n var markupTextArrLegacy = [];\n var markupStyleCreator = new TooltipMarkupStyleCreator();\n each(dataByCoordSys, function (itemCoordSys) {\n each(itemCoordSys.dataByAxis, function (axisItem) {\n var axisModel = ecModel.getComponent(axisItem.axisDim + 'Axis', axisItem.axisIndex);\n var axisValue = axisItem.value;\n if (!axisModel || axisValue == null) {\n return;\n }\n var axisValueLabel = axisPointerViewHelper.getValueLabel(axisValue, axisModel.axis, ecModel, axisItem.seriesDataIndices, axisItem.valueLabelOpt);\n var axisSectionMarkup = createTooltipMarkup('section', {\n header: axisValueLabel,\n noHeader: !trim(axisValueLabel),\n sortBlocks: true,\n blocks: []\n });\n articleMarkup.blocks.push(axisSectionMarkup);\n each(axisItem.seriesDataIndices, function (idxItem) {\n var series = ecModel.getSeriesByIndex(idxItem.seriesIndex);\n var dataIndex = idxItem.dataIndexInside;\n var cbParams = series.getDataParams(dataIndex);\n // Can't find data.\n if (cbParams.dataIndex < 0) {\n return;\n }\n cbParams.axisDim = axisItem.axisDim;\n cbParams.axisIndex = axisItem.axisIndex;\n cbParams.axisType = axisItem.axisType;\n cbParams.axisId = axisItem.axisId;\n cbParams.axisValue = axisHelper.getAxisRawValue(axisModel.axis, {\n value: axisValue\n });\n cbParams.axisValueLabel = axisValueLabel;\n // Pre-create marker style for makers. Users can assemble richText\n // text in `formatter` callback and use those markers style.\n cbParams.marker = markupStyleCreator.makeTooltipMarker('item', convertToColorString(cbParams.color), renderMode);\n var seriesTooltipResult = normalizeTooltipFormatResult(series.formatTooltip(dataIndex, true, null));\n var frag = seriesTooltipResult.frag;\n if (frag) {\n var valueFormatter = buildTooltipModel([series], globalTooltipModel).get('valueFormatter');\n axisSectionMarkup.blocks.push(valueFormatter ? extend({\n valueFormatter: valueFormatter\n }, frag) : frag);\n }\n if (seriesTooltipResult.text) {\n markupTextArrLegacy.push(seriesTooltipResult.text);\n }\n cbParamsList.push(cbParams);\n });\n });\n });\n // In most cases, the second axis is displays upper on the first one.\n // So we reverse it to look better.\n articleMarkup.blocks.reverse();\n markupTextArrLegacy.reverse();\n var positionExpr = e.position;\n var orderMode = singleTooltipModel.get('order');\n var builtMarkupText = buildTooltipMarkup(articleMarkup, markupStyleCreator, renderMode, orderMode, ecModel.get('useUTC'), singleTooltipModel.get('textStyle'));\n builtMarkupText && markupTextArrLegacy.unshift(builtMarkupText);\n var blockBreak = renderMode === 'richText' ? '\\n\\n' : '
';\n var allMarkupText = markupTextArrLegacy.join(blockBreak);\n this._showOrMove(singleTooltipModel, function () {\n if (this._updateContentNotChangedOnAxis(dataByCoordSys, cbParamsList)) {\n this._updatePosition(singleTooltipModel, positionExpr, point[0], point[1], this._tooltipContent, cbParamsList);\n } else {\n this._showTooltipContent(singleTooltipModel, allMarkupText, cbParamsList, Math.random() + '', point[0], point[1], positionExpr, null, markupStyleCreator);\n }\n });\n // Do not trigger events here, because this branch only be entered\n // from dispatchAction.\n };\n TooltipView.prototype._showSeriesItemTooltip = function (e, dispatcher, dispatchAction) {\n var ecModel = this._ecModel;\n var ecData = getECData(dispatcher);\n // Use dataModel in element if possible\n // Used when mouseover on a element like markPoint or edge\n // In which case, the data is not main data in series.\n var seriesIndex = ecData.seriesIndex;\n var seriesModel = ecModel.getSeriesByIndex(seriesIndex);\n // For example, graph link.\n var dataModel = ecData.dataModel || seriesModel;\n var dataIndex = ecData.dataIndex;\n var dataType = ecData.dataType;\n var data = dataModel.getData(dataType);\n var renderMode = this._renderMode;\n var positionDefault = e.positionDefault;\n var tooltipModel = buildTooltipModel([data.getItemModel(dataIndex), dataModel, seriesModel && (seriesModel.coordinateSystem || {}).model], this._tooltipModel, positionDefault ? {\n position: positionDefault\n } : null);\n var tooltipTrigger = tooltipModel.get('trigger');\n if (tooltipTrigger != null && tooltipTrigger !== 'item') {\n return;\n }\n var params = dataModel.getDataParams(dataIndex, dataType);\n var markupStyleCreator = new TooltipMarkupStyleCreator();\n // Pre-create marker style for makers. Users can assemble richText\n // text in `formatter` callback and use those markers style.\n params.marker = markupStyleCreator.makeTooltipMarker('item', convertToColorString(params.color), renderMode);\n var seriesTooltipResult = normalizeTooltipFormatResult(dataModel.formatTooltip(dataIndex, false, dataType));\n var orderMode = tooltipModel.get('order');\n var valueFormatter = tooltipModel.get('valueFormatter');\n var frag = seriesTooltipResult.frag;\n var markupText = frag ? buildTooltipMarkup(valueFormatter ? extend({\n valueFormatter: valueFormatter\n }, frag) : frag, markupStyleCreator, renderMode, orderMode, ecModel.get('useUTC'), tooltipModel.get('textStyle')) : seriesTooltipResult.text;\n var asyncTicket = 'item_' + dataModel.name + '_' + dataIndex;\n this._showOrMove(tooltipModel, function () {\n this._showTooltipContent(tooltipModel, markupText, params, asyncTicket, e.offsetX, e.offsetY, e.position, e.target, markupStyleCreator);\n });\n // FIXME\n // duplicated showtip if manuallyShowTip is called from dispatchAction.\n dispatchAction({\n type: 'showTip',\n dataIndexInside: dataIndex,\n dataIndex: data.getRawIndex(dataIndex),\n seriesIndex: seriesIndex,\n from: this.uid\n });\n };\n TooltipView.prototype._showComponentItemTooltip = function (e, el, dispatchAction) {\n var isHTMLRenderMode = this._renderMode === 'html';\n var ecData = getECData(el);\n var tooltipConfig = ecData.tooltipConfig;\n var tooltipOpt = tooltipConfig.option || {};\n var encodeHTMLContent = tooltipOpt.encodeHTMLContent;\n if (isString(tooltipOpt)) {\n var content = tooltipOpt;\n tooltipOpt = {\n content: content,\n // Fixed formatter\n formatter: content\n };\n // when `tooltipConfig.option` is a string rather than an object,\n // we can't know if the content needs to be encoded\n // for the sake of security, encode it by default.\n encodeHTMLContent = true;\n }\n if (encodeHTMLContent && isHTMLRenderMode && tooltipOpt.content) {\n // clone might be unnecessary?\n tooltipOpt = clone(tooltipOpt);\n tooltipOpt.content = encodeHTML(tooltipOpt.content);\n }\n var tooltipModelCascade = [tooltipOpt];\n var cmpt = this._ecModel.getComponent(ecData.componentMainType, ecData.componentIndex);\n if (cmpt) {\n tooltipModelCascade.push(cmpt);\n }\n // In most cases, component tooltip formatter has different params with series tooltip formatter,\n // so that they cannot share the same formatter. Since the global tooltip formatter is used for series\n // by convention, we do not use it as the default formatter for component.\n tooltipModelCascade.push({\n formatter: tooltipOpt.content\n });\n var positionDefault = e.positionDefault;\n var subTooltipModel = buildTooltipModel(tooltipModelCascade, this._tooltipModel, positionDefault ? {\n position: positionDefault\n } : null);\n var defaultHtml = subTooltipModel.get('content');\n var asyncTicket = Math.random() + '';\n // PENDING: this case do not support richText style yet.\n var markupStyleCreator = new TooltipMarkupStyleCreator();\n // Do not check whether `trigger` is 'none' here, because `trigger`\n // only works on coordinate system. In fact, we have not found case\n // that requires setting `trigger` nothing on component yet.\n this._showOrMove(subTooltipModel, function () {\n // Use formatterParams from element defined in component\n // Avoid users modify it.\n var formatterParams = clone(subTooltipModel.get('formatterParams') || {});\n this._showTooltipContent(subTooltipModel, defaultHtml, formatterParams, asyncTicket, e.offsetX, e.offsetY, e.position, el, markupStyleCreator);\n });\n // If not dispatch showTip, tip may be hide triggered by axis.\n dispatchAction({\n type: 'showTip',\n from: this.uid\n });\n };\n TooltipView.prototype._showTooltipContent = function (\n // Use Model insteadof TooltipModel because this model may be from series or other options.\n // Instead of top level tooltip.\n tooltipModel, defaultHtml, params, asyncTicket, x, y, positionExpr, el, markupStyleCreator) {\n // Reset ticket\n this._ticket = '';\n if (!tooltipModel.get('showContent') || !tooltipModel.get('show')) {\n return;\n }\n var tooltipContent = this._tooltipContent;\n tooltipContent.setEnterable(tooltipModel.get('enterable'));\n var formatter = tooltipModel.get('formatter');\n positionExpr = positionExpr || tooltipModel.get('position');\n var html = defaultHtml;\n var nearPoint = this._getNearestPoint([x, y], params, tooltipModel.get('trigger'), tooltipModel.get('borderColor'));\n var nearPointColor = nearPoint.color;\n if (formatter) {\n if (isString(formatter)) {\n var useUTC = tooltipModel.ecModel.get('useUTC');\n var params0 = isArray(params) ? params[0] : params;\n var isTimeAxis = params0 && params0.axisType && params0.axisType.indexOf('time') >= 0;\n html = formatter;\n if (isTimeAxis) {\n html = timeFormat(params0.axisValue, html, useUTC);\n }\n html = formatTpl(html, params, true);\n } else if (isFunction(formatter)) {\n var callback = bind(function (cbTicket, html) {\n if (cbTicket === this._ticket) {\n tooltipContent.setContent(html, markupStyleCreator, tooltipModel, nearPointColor, positionExpr);\n this._updatePosition(tooltipModel, positionExpr, x, y, tooltipContent, params, el);\n }\n }, this);\n this._ticket = asyncTicket;\n html = formatter(params, asyncTicket, callback);\n } else {\n html = formatter;\n }\n }\n tooltipContent.setContent(html, markupStyleCreator, tooltipModel, nearPointColor, positionExpr);\n tooltipContent.show(tooltipModel, nearPointColor);\n this._updatePosition(tooltipModel, positionExpr, x, y, tooltipContent, params, el);\n };\n TooltipView.prototype._getNearestPoint = function (point, tooltipDataParams, trigger, borderColor) {\n if (trigger === 'axis' || isArray(tooltipDataParams)) {\n return {\n color: borderColor || (this._renderMode === 'html' ? '#fff' : 'none')\n };\n }\n if (!isArray(tooltipDataParams)) {\n return {\n color: borderColor || tooltipDataParams.color || tooltipDataParams.borderColor\n };\n }\n };\n TooltipView.prototype._updatePosition = function (tooltipModel, positionExpr, x,\n // Mouse x\n y,\n // Mouse y\n content, params, el) {\n var viewWidth = this._api.getWidth();\n var viewHeight = this._api.getHeight();\n positionExpr = positionExpr || tooltipModel.get('position');\n var contentSize = content.getSize();\n var align = tooltipModel.get('align');\n var vAlign = tooltipModel.get('verticalAlign');\n var rect = el && el.getBoundingRect().clone();\n el && rect.applyTransform(el.transform);\n if (isFunction(positionExpr)) {\n // Callback of position can be an array or a string specify the position\n positionExpr = positionExpr([x, y], params, content.el, rect, {\n viewSize: [viewWidth, viewHeight],\n contentSize: contentSize.slice()\n });\n }\n if (isArray(positionExpr)) {\n x = parsePercent(positionExpr[0], viewWidth);\n y = parsePercent(positionExpr[1], viewHeight);\n } else if (isObject(positionExpr)) {\n var boxLayoutPosition = positionExpr;\n boxLayoutPosition.width = contentSize[0];\n boxLayoutPosition.height = contentSize[1];\n var layoutRect = getLayoutRect(boxLayoutPosition, {\n width: viewWidth,\n height: viewHeight\n });\n x = layoutRect.x;\n y = layoutRect.y;\n align = null;\n // When positionExpr is left/top/right/bottom,\n // align and verticalAlign will not work.\n vAlign = null;\n }\n // Specify tooltip position by string 'top' 'bottom' 'left' 'right' around graphic element\n else if (isString(positionExpr) && el) {\n var pos = calcTooltipPosition(positionExpr, rect, contentSize, tooltipModel.get('borderWidth'));\n x = pos[0];\n y = pos[1];\n } else {\n var pos = refixTooltipPosition(x, y, content, viewWidth, viewHeight, align ? null : 20, vAlign ? null : 20);\n x = pos[0];\n y = pos[1];\n }\n align && (x -= isCenterAlign(align) ? contentSize[0] / 2 : align === 'right' ? contentSize[0] : 0);\n vAlign && (y -= isCenterAlign(vAlign) ? contentSize[1] / 2 : vAlign === 'bottom' ? contentSize[1] : 0);\n if (shouldTooltipConfine(tooltipModel)) {\n var pos = confineTooltipPosition(x, y, content, viewWidth, viewHeight);\n x = pos[0];\n y = pos[1];\n }\n content.moveTo(x, y);\n };\n // FIXME\n // Should we remove this but leave this to user?\n TooltipView.prototype._updateContentNotChangedOnAxis = function (dataByCoordSys, cbParamsList) {\n var lastCoordSys = this._lastDataByCoordSys;\n var lastCbParamsList = this._cbParamsList;\n var contentNotChanged = !!lastCoordSys && lastCoordSys.length === dataByCoordSys.length;\n contentNotChanged && each(lastCoordSys, function (lastItemCoordSys, indexCoordSys) {\n var lastDataByAxis = lastItemCoordSys.dataByAxis || [];\n var thisItemCoordSys = dataByCoordSys[indexCoordSys] || {};\n var thisDataByAxis = thisItemCoordSys.dataByAxis || [];\n contentNotChanged = contentNotChanged && lastDataByAxis.length === thisDataByAxis.length;\n contentNotChanged && each(lastDataByAxis, function (lastItem, indexAxis) {\n var thisItem = thisDataByAxis[indexAxis] || {};\n var lastIndices = lastItem.seriesDataIndices || [];\n var newIndices = thisItem.seriesDataIndices || [];\n contentNotChanged = contentNotChanged && lastItem.value === thisItem.value && lastItem.axisType === thisItem.axisType && lastItem.axisId === thisItem.axisId && lastIndices.length === newIndices.length;\n contentNotChanged && each(lastIndices, function (lastIdxItem, j) {\n var newIdxItem = newIndices[j];\n contentNotChanged = contentNotChanged && lastIdxItem.seriesIndex === newIdxItem.seriesIndex && lastIdxItem.dataIndex === newIdxItem.dataIndex;\n });\n // check is cbParams data value changed\n lastCbParamsList && each(lastItem.seriesDataIndices, function (idxItem) {\n var seriesIdx = idxItem.seriesIndex;\n var cbParams = cbParamsList[seriesIdx];\n var lastCbParams = lastCbParamsList[seriesIdx];\n if (cbParams && lastCbParams && lastCbParams.data !== cbParams.data) {\n contentNotChanged = false;\n }\n });\n });\n });\n this._lastDataByCoordSys = dataByCoordSys;\n this._cbParamsList = cbParamsList;\n return !!contentNotChanged;\n };\n TooltipView.prototype._hide = function (dispatchAction) {\n // Do not directly hideLater here, because this behavior may be prevented\n // in dispatchAction when showTip is dispatched.\n // FIXME\n // duplicated hideTip if manuallyHideTip is called from dispatchAction.\n this._lastDataByCoordSys = null;\n dispatchAction({\n type: 'hideTip',\n from: this.uid\n });\n };\n TooltipView.prototype.dispose = function (ecModel, api) {\n if (env.node || !api.getDom()) {\n return;\n }\n clear(this, '_updatePosition');\n this._tooltipContent.dispose();\n globalListener.unregister('itemTooltip', api);\n };\n TooltipView.type = 'tooltip';\n return TooltipView;\n}(ComponentView);\n/**\n * From top to bottom. (the last one should be globalTooltipModel);\n */\nfunction buildTooltipModel(modelCascade, globalTooltipModel, defaultTooltipOption) {\n // Last is always tooltip model.\n var ecModel = globalTooltipModel.ecModel;\n var resultModel;\n if (defaultTooltipOption) {\n resultModel = new Model(defaultTooltipOption, ecModel, ecModel);\n resultModel = new Model(globalTooltipModel.option, resultModel, ecModel);\n } else {\n resultModel = globalTooltipModel;\n }\n for (var i = modelCascade.length - 1; i >= 0; i--) {\n var tooltipOpt = modelCascade[i];\n if (tooltipOpt) {\n if (tooltipOpt instanceof Model) {\n tooltipOpt = tooltipOpt.get('tooltip', true);\n }\n // In each data item tooltip can be simply write:\n // {\n // value: 10,\n // tooltip: 'Something you need to know'\n // }\n if (isString(tooltipOpt)) {\n tooltipOpt = {\n formatter: tooltipOpt\n };\n }\n if (tooltipOpt) {\n resultModel = new Model(tooltipOpt, resultModel, ecModel);\n }\n }\n }\n return resultModel;\n}\nfunction makeDispatchAction(payload, api) {\n return payload.dispatchAction || bind(api.dispatchAction, api);\n}\nfunction refixTooltipPosition(x, y, content, viewWidth, viewHeight, gapH, gapV) {\n var size = content.getSize();\n var width = size[0];\n var height = size[1];\n if (gapH != null) {\n // Add extra 2 pixels for this case:\n // At present the \"values\" in default tooltip are using CSS `float: right`.\n // When the right edge of the tooltip box is on the right side of the\n // viewport, the `float` layout might push the \"values\" to the second line.\n if (x + width + gapH + 2 > viewWidth) {\n x -= width + gapH;\n } else {\n x += gapH;\n }\n }\n if (gapV != null) {\n if (y + height + gapV > viewHeight) {\n y -= height + gapV;\n } else {\n y += gapV;\n }\n }\n return [x, y];\n}\nfunction confineTooltipPosition(x, y, content, viewWidth, viewHeight) {\n var size = content.getSize();\n var width = size[0];\n var height = size[1];\n x = Math.min(x + width, viewWidth) - width;\n y = Math.min(y + height, viewHeight) - height;\n x = Math.max(x, 0);\n y = Math.max(y, 0);\n return [x, y];\n}\nfunction calcTooltipPosition(position, rect, contentSize, borderWidth) {\n var domWidth = contentSize[0];\n var domHeight = contentSize[1];\n var offset = Math.ceil(Math.SQRT2 * borderWidth) + 8;\n var x = 0;\n var y = 0;\n var rectWidth = rect.width;\n var rectHeight = rect.height;\n switch (position) {\n case 'inside':\n x = rect.x + rectWidth / 2 - domWidth / 2;\n y = rect.y + rectHeight / 2 - domHeight / 2;\n break;\n case 'top':\n x = rect.x + rectWidth / 2 - domWidth / 2;\n y = rect.y - domHeight - offset;\n break;\n case 'bottom':\n x = rect.x + rectWidth / 2 - domWidth / 2;\n y = rect.y + rectHeight + offset;\n break;\n case 'left':\n x = rect.x - domWidth - offset;\n y = rect.y + rectHeight / 2 - domHeight / 2;\n break;\n case 'right':\n x = rect.x + rectWidth + offset;\n y = rect.y + rectHeight / 2 - domHeight / 2;\n }\n return [x, y];\n}\nfunction isCenterAlign(align) {\n return align === 'center' || align === 'middle';\n}\n/**\n * Find target component by payload like:\n * ```js\n * { legendId: 'some_id', name: 'xxx' }\n * { toolboxIndex: 1, name: 'xxx' }\n * { geoName: 'some_name', name: 'xxx' }\n * ```\n * PENDING: at present only\n *\n * If not found, return null/undefined.\n */\nfunction findComponentReference(payload, ecModel, api) {\n var queryOptionMap = preParseFinder(payload).queryOptionMap;\n var componentMainType = queryOptionMap.keys()[0];\n if (!componentMainType || componentMainType === 'series') {\n return;\n }\n var queryResult = queryReferringComponents(ecModel, componentMainType, queryOptionMap.get(componentMainType), {\n useDefault: false,\n enableAll: false,\n enableNone: false\n });\n var model = queryResult.models[0];\n if (!model) {\n return;\n }\n var view = api.getViewOfComponentModel(model);\n var el;\n view.group.traverse(function (subEl) {\n var tooltipConfig = getECData(subEl).tooltipConfig;\n if (tooltipConfig && tooltipConfig.name === payload.name) {\n el = subEl;\n return true; // stop\n }\n });\n if (el) {\n return {\n componentMainType: componentMainType,\n componentIndex: model.componentIndex,\n el: el\n };\n }\n}\nexport default TooltipView;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { install as installAxisPointer } from '../axisPointer/install.js';\nimport { use } from '../../extension.js';\nimport TooltipModel from './TooltipModel.js';\nimport TooltipView from './TooltipView.js';\nimport { noop } from 'zrender/lib/core/util.js';\nexport function install(registers) {\n use(installAxisPointer);\n registers.registerComponentModel(TooltipModel);\n registers.registerComponentView(TooltipView);\n /**\n * @action\n * @property {string} type\n * @property {number} seriesIndex\n * @property {number} dataIndex\n * @property {number} [x]\n * @property {number} [y]\n */\n registers.registerAction({\n type: 'showTip',\n event: 'showTip',\n update: 'tooltip:manuallyShowTip'\n }, noop);\n registers.registerAction({\n type: 'hideTip',\n event: 'hideTip',\n update: 'tooltip:manuallyHideTip'\n }, noop);\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { createTextStyle } from '../../label/labelStyle.js';\nimport { getLayoutRect } from '../../util/layout.js';\nimport ComponentModel from '../../model/Component.js';\nimport ComponentView from '../../view/Component.js';\nimport { windowOpen } from '../../util/format.js';\nvar TitleModel = /** @class */function (_super) {\n __extends(TitleModel, _super);\n function TitleModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = TitleModel.type;\n _this.layoutMode = {\n type: 'box',\n ignoreSize: true\n };\n return _this;\n }\n TitleModel.type = 'title';\n TitleModel.defaultOption = {\n // zlevel: 0,\n z: 6,\n show: true,\n text: '',\n target: 'blank',\n subtext: '',\n subtarget: 'blank',\n left: 0,\n top: 0,\n backgroundColor: 'rgba(0,0,0,0)',\n borderColor: '#ccc',\n borderWidth: 0,\n padding: 5,\n itemGap: 10,\n textStyle: {\n fontSize: 18,\n fontWeight: 'bold',\n color: '#464646'\n },\n subtextStyle: {\n fontSize: 12,\n color: '#6E7079'\n }\n };\n return TitleModel;\n}(ComponentModel);\n// View\nvar TitleView = /** @class */function (_super) {\n __extends(TitleView, _super);\n function TitleView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = TitleView.type;\n return _this;\n }\n TitleView.prototype.render = function (titleModel, ecModel, api) {\n this.group.removeAll();\n if (!titleModel.get('show')) {\n return;\n }\n var group = this.group;\n var textStyleModel = titleModel.getModel('textStyle');\n var subtextStyleModel = titleModel.getModel('subtextStyle');\n var textAlign = titleModel.get('textAlign');\n var textVerticalAlign = zrUtil.retrieve2(titleModel.get('textBaseline'), titleModel.get('textVerticalAlign'));\n var textEl = new graphic.Text({\n style: createTextStyle(textStyleModel, {\n text: titleModel.get('text'),\n fill: textStyleModel.getTextColor()\n }, {\n disableBox: true\n }),\n z2: 10\n });\n var textRect = textEl.getBoundingRect();\n var subText = titleModel.get('subtext');\n var subTextEl = new graphic.Text({\n style: createTextStyle(subtextStyleModel, {\n text: subText,\n fill: subtextStyleModel.getTextColor(),\n y: textRect.height + titleModel.get('itemGap'),\n verticalAlign: 'top'\n }, {\n disableBox: true\n }),\n z2: 10\n });\n var link = titleModel.get('link');\n var sublink = titleModel.get('sublink');\n var triggerEvent = titleModel.get('triggerEvent', true);\n textEl.silent = !link && !triggerEvent;\n subTextEl.silent = !sublink && !triggerEvent;\n if (link) {\n textEl.on('click', function () {\n windowOpen(link, '_' + titleModel.get('target'));\n });\n }\n if (sublink) {\n subTextEl.on('click', function () {\n windowOpen(sublink, '_' + titleModel.get('subtarget'));\n });\n }\n getECData(textEl).eventData = getECData(subTextEl).eventData = triggerEvent ? {\n componentType: 'title',\n componentIndex: titleModel.componentIndex\n } : null;\n group.add(textEl);\n subText && group.add(subTextEl);\n // If no subText, but add subTextEl, there will be an empty line.\n var groupRect = group.getBoundingRect();\n var layoutOption = titleModel.getBoxLayoutParams();\n layoutOption.width = groupRect.width;\n layoutOption.height = groupRect.height;\n var layoutRect = getLayoutRect(layoutOption, {\n width: api.getWidth(),\n height: api.getHeight()\n }, titleModel.get('padding'));\n // Adjust text align based on position\n if (!textAlign) {\n // Align left if title is on the left. center and right is same\n textAlign = titleModel.get('left') || titleModel.get('right');\n // @ts-ignore\n if (textAlign === 'middle') {\n textAlign = 'center';\n }\n // Adjust layout by text align\n if (textAlign === 'right') {\n layoutRect.x += layoutRect.width;\n } else if (textAlign === 'center') {\n layoutRect.x += layoutRect.width / 2;\n }\n }\n if (!textVerticalAlign) {\n textVerticalAlign = titleModel.get('top') || titleModel.get('bottom');\n // @ts-ignore\n if (textVerticalAlign === 'center') {\n textVerticalAlign = 'middle';\n }\n if (textVerticalAlign === 'bottom') {\n layoutRect.y += layoutRect.height;\n } else if (textVerticalAlign === 'middle') {\n layoutRect.y += layoutRect.height / 2;\n }\n textVerticalAlign = textVerticalAlign || 'top';\n }\n group.x = layoutRect.x;\n group.y = layoutRect.y;\n group.markRedraw();\n var alignStyle = {\n align: textAlign,\n verticalAlign: textVerticalAlign\n };\n textEl.setStyle(alignStyle);\n subTextEl.setStyle(alignStyle);\n // Render background\n // Get groupRect again because textAlign has been changed\n groupRect = group.getBoundingRect();\n var padding = layoutRect.margin;\n var style = titleModel.getItemStyle(['color', 'opacity']);\n style.fill = titleModel.get('backgroundColor');\n var rect = new graphic.Rect({\n shape: {\n x: groupRect.x - padding[3],\n y: groupRect.y - padding[0],\n width: groupRect.width + padding[1] + padding[3],\n height: groupRect.height + padding[0] + padding[2],\n r: titleModel.get('borderRadius')\n },\n style: style,\n subPixelOptimize: true,\n silent: true\n });\n group.add(rect);\n };\n TitleView.type = 'title';\n return TitleView;\n}(ComponentView);\nexport function install(registers) {\n registers.registerComponentModel(TitleModel);\n registers.registerComponentView(TitleView);\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport Model from '../../model/Model.js';\nimport { isNameSpecified } from '../../util/model.js';\nimport ComponentModel from '../../model/Component.js';\nvar getDefaultSelectorOptions = function (ecModel, type) {\n if (type === 'all') {\n return {\n type: 'all',\n title: ecModel.getLocaleModel().get(['legend', 'selector', 'all'])\n };\n } else if (type === 'inverse') {\n return {\n type: 'inverse',\n title: ecModel.getLocaleModel().get(['legend', 'selector', 'inverse'])\n };\n }\n};\nvar LegendModel = /** @class */function (_super) {\n __extends(LegendModel, _super);\n function LegendModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = LegendModel.type;\n _this.layoutMode = {\n type: 'box',\n // legend.width/height are maxWidth/maxHeight actually,\n // whereas real width/height is calculated by its content.\n // (Setting {left: 10, right: 10} does not make sense).\n // So consider the case:\n // `setOption({legend: {left: 10});`\n // then `setOption({legend: {right: 10});`\n // The previous `left` should be cleared by setting `ignoreSize`.\n ignoreSize: true\n };\n return _this;\n }\n LegendModel.prototype.init = function (option, parentModel, ecModel) {\n this.mergeDefaultAndTheme(option, ecModel);\n option.selected = option.selected || {};\n this._updateSelector(option);\n };\n LegendModel.prototype.mergeOption = function (option, ecModel) {\n _super.prototype.mergeOption.call(this, option, ecModel);\n this._updateSelector(option);\n };\n LegendModel.prototype._updateSelector = function (option) {\n var selector = option.selector;\n var ecModel = this.ecModel;\n if (selector === true) {\n selector = option.selector = ['all', 'inverse'];\n }\n if (zrUtil.isArray(selector)) {\n zrUtil.each(selector, function (item, index) {\n zrUtil.isString(item) && (item = {\n type: item\n });\n selector[index] = zrUtil.merge(item, getDefaultSelectorOptions(ecModel, item.type));\n });\n }\n };\n LegendModel.prototype.optionUpdated = function () {\n this._updateData(this.ecModel);\n var legendData = this._data;\n // If selectedMode is single, try to select one\n if (legendData[0] && this.get('selectedMode') === 'single') {\n var hasSelected = false;\n // If has any selected in option.selected\n for (var i = 0; i < legendData.length; i++) {\n var name_1 = legendData[i].get('name');\n if (this.isSelected(name_1)) {\n // Force to unselect others\n this.select(name_1);\n hasSelected = true;\n break;\n }\n }\n // Try select the first if selectedMode is single\n !hasSelected && this.select(legendData[0].get('name'));\n }\n };\n LegendModel.prototype._updateData = function (ecModel) {\n var potentialData = [];\n var availableNames = [];\n ecModel.eachRawSeries(function (seriesModel) {\n var seriesName = seriesModel.name;\n availableNames.push(seriesName);\n var isPotential;\n if (seriesModel.legendVisualProvider) {\n var provider = seriesModel.legendVisualProvider;\n var names = provider.getAllNames();\n if (!ecModel.isSeriesFiltered(seriesModel)) {\n availableNames = availableNames.concat(names);\n }\n if (names.length) {\n potentialData = potentialData.concat(names);\n } else {\n isPotential = true;\n }\n } else {\n isPotential = true;\n }\n if (isPotential && isNameSpecified(seriesModel)) {\n potentialData.push(seriesModel.name);\n }\n });\n /**\n * @type {Array.}\n * @private\n */\n this._availableNames = availableNames;\n // If legend.data is not specified in option, use availableNames as data,\n // which is convenient for user preparing option.\n var rawData = this.get('data') || potentialData;\n var legendNameMap = zrUtil.createHashMap();\n var legendData = zrUtil.map(rawData, function (dataItem) {\n // Can be string or number\n if (zrUtil.isString(dataItem) || zrUtil.isNumber(dataItem)) {\n dataItem = {\n name: dataItem\n };\n }\n if (legendNameMap.get(dataItem.name)) {\n // remove legend name duplicate\n return null;\n }\n legendNameMap.set(dataItem.name, true);\n return new Model(dataItem, this, this.ecModel);\n }, this);\n /**\n * @type {Array.}\n * @private\n */\n this._data = zrUtil.filter(legendData, function (item) {\n return !!item;\n });\n };\n LegendModel.prototype.getData = function () {\n return this._data;\n };\n LegendModel.prototype.select = function (name) {\n var selected = this.option.selected;\n var selectedMode = this.get('selectedMode');\n if (selectedMode === 'single') {\n var data = this._data;\n zrUtil.each(data, function (dataItem) {\n selected[dataItem.get('name')] = false;\n });\n }\n selected[name] = true;\n };\n LegendModel.prototype.unSelect = function (name) {\n if (this.get('selectedMode') !== 'single') {\n this.option.selected[name] = false;\n }\n };\n LegendModel.prototype.toggleSelected = function (name) {\n var selected = this.option.selected;\n // Default is true\n if (!selected.hasOwnProperty(name)) {\n selected[name] = true;\n }\n this[selected[name] ? 'unSelect' : 'select'](name);\n };\n LegendModel.prototype.allSelect = function () {\n var data = this._data;\n var selected = this.option.selected;\n zrUtil.each(data, function (dataItem) {\n selected[dataItem.get('name', true)] = true;\n });\n };\n LegendModel.prototype.inverseSelect = function () {\n var data = this._data;\n var selected = this.option.selected;\n zrUtil.each(data, function (dataItem) {\n var name = dataItem.get('name', true);\n // Initially, default value is true\n if (!selected.hasOwnProperty(name)) {\n selected[name] = true;\n }\n selected[name] = !selected[name];\n });\n };\n LegendModel.prototype.isSelected = function (name) {\n var selected = this.option.selected;\n return !(selected.hasOwnProperty(name) && !selected[name]) && zrUtil.indexOf(this._availableNames, name) >= 0;\n };\n LegendModel.prototype.getOrient = function () {\n return this.get('orient') === 'vertical' ? {\n index: 1,\n name: 'vertical'\n } : {\n index: 0,\n name: 'horizontal'\n };\n };\n LegendModel.type = 'legend.plain';\n LegendModel.dependencies = ['series'];\n LegendModel.defaultOption = {\n // zlevel: 0,\n z: 4,\n show: true,\n orient: 'horizontal',\n left: 'center',\n // right: 'center',\n top: 0,\n // bottom: null,\n align: 'auto',\n backgroundColor: 'rgba(0,0,0,0)',\n borderColor: '#ccc',\n borderRadius: 0,\n borderWidth: 0,\n padding: 5,\n itemGap: 10,\n itemWidth: 25,\n itemHeight: 14,\n symbolRotate: 'inherit',\n symbolKeepAspect: true,\n inactiveColor: '#ccc',\n inactiveBorderColor: '#ccc',\n inactiveBorderWidth: 'auto',\n itemStyle: {\n color: 'inherit',\n opacity: 'inherit',\n borderColor: 'inherit',\n borderWidth: 'auto',\n borderCap: 'inherit',\n borderJoin: 'inherit',\n borderDashOffset: 'inherit',\n borderMiterLimit: 'inherit'\n },\n lineStyle: {\n width: 'auto',\n color: 'inherit',\n inactiveColor: '#ccc',\n inactiveWidth: 2,\n opacity: 'inherit',\n type: 'inherit',\n cap: 'inherit',\n join: 'inherit',\n dashOffset: 'inherit',\n miterLimit: 'inherit'\n },\n textStyle: {\n color: '#333'\n },\n selectedMode: true,\n selector: false,\n selectorLabel: {\n show: true,\n borderRadius: 10,\n padding: [3, 5, 3, 5],\n fontSize: 12,\n fontFamily: 'sans-serif',\n color: '#666',\n borderWidth: 1,\n borderColor: '#666'\n },\n emphasis: {\n selectorLabel: {\n show: true,\n color: '#eee',\n backgroundColor: '#666'\n }\n },\n selectorPosition: 'auto',\n selectorItemGap: 7,\n selectorButtonGap: 10,\n tooltip: {\n show: false\n }\n };\n return LegendModel;\n}(ComponentModel);\nexport default LegendModel;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { parse, stringify } from 'zrender/lib/tool/color.js';\nimport * as graphic from '../../util/graphic.js';\nimport { enableHoverEmphasis } from '../../util/states.js';\nimport { setLabelStyle, createTextStyle } from '../../label/labelStyle.js';\nimport { makeBackground } from '../helper/listComponent.js';\nimport * as layoutUtil from '../../util/layout.js';\nimport ComponentView from '../../view/Component.js';\nimport { createSymbol } from '../../util/symbol.js';\nimport { createOrUpdatePatternFromDecal } from '../../util/decal.js';\nimport { getECData } from '../../util/innerStore.js';\nvar curry = zrUtil.curry;\nvar each = zrUtil.each;\nvar Group = graphic.Group;\nvar LegendView = /** @class */function (_super) {\n __extends(LegendView, _super);\n function LegendView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = LegendView.type;\n _this.newlineDisabled = false;\n return _this;\n }\n LegendView.prototype.init = function () {\n this.group.add(this._contentGroup = new Group());\n this.group.add(this._selectorGroup = new Group());\n this._isFirstRender = true;\n };\n /**\n * @protected\n */\n LegendView.prototype.getContentGroup = function () {\n return this._contentGroup;\n };\n /**\n * @protected\n */\n LegendView.prototype.getSelectorGroup = function () {\n return this._selectorGroup;\n };\n /**\n * @override\n */\n LegendView.prototype.render = function (legendModel, ecModel, api) {\n var isFirstRender = this._isFirstRender;\n this._isFirstRender = false;\n this.resetInner();\n if (!legendModel.get('show', true)) {\n return;\n }\n var itemAlign = legendModel.get('align');\n var orient = legendModel.get('orient');\n if (!itemAlign || itemAlign === 'auto') {\n itemAlign = legendModel.get('left') === 'right' && orient === 'vertical' ? 'right' : 'left';\n }\n // selector has been normalized to an array in model\n var selector = legendModel.get('selector', true);\n var selectorPosition = legendModel.get('selectorPosition', true);\n if (selector && (!selectorPosition || selectorPosition === 'auto')) {\n selectorPosition = orient === 'horizontal' ? 'end' : 'start';\n }\n this.renderInner(itemAlign, legendModel, ecModel, api, selector, orient, selectorPosition);\n // Perform layout.\n var positionInfo = legendModel.getBoxLayoutParams();\n var viewportSize = {\n width: api.getWidth(),\n height: api.getHeight()\n };\n var padding = legendModel.get('padding');\n var maxSize = layoutUtil.getLayoutRect(positionInfo, viewportSize, padding);\n var mainRect = this.layoutInner(legendModel, itemAlign, maxSize, isFirstRender, selector, selectorPosition);\n // Place mainGroup, based on the calculated `mainRect`.\n var layoutRect = layoutUtil.getLayoutRect(zrUtil.defaults({\n width: mainRect.width,\n height: mainRect.height\n }, positionInfo), viewportSize, padding);\n this.group.x = layoutRect.x - mainRect.x;\n this.group.y = layoutRect.y - mainRect.y;\n this.group.markRedraw();\n // Render background after group is layout.\n this.group.add(this._backgroundEl = makeBackground(mainRect, legendModel));\n };\n LegendView.prototype.resetInner = function () {\n this.getContentGroup().removeAll();\n this._backgroundEl && this.group.remove(this._backgroundEl);\n this.getSelectorGroup().removeAll();\n };\n LegendView.prototype.renderInner = function (itemAlign, legendModel, ecModel, api, selector, orient, selectorPosition) {\n var contentGroup = this.getContentGroup();\n var legendDrawnMap = zrUtil.createHashMap();\n var selectMode = legendModel.get('selectedMode');\n var excludeSeriesId = [];\n ecModel.eachRawSeries(function (seriesModel) {\n !seriesModel.get('legendHoverLink') && excludeSeriesId.push(seriesModel.id);\n });\n each(legendModel.getData(), function (legendItemModel, dataIndex) {\n var name = legendItemModel.get('name');\n // Use empty string or \\n as a newline string\n if (!this.newlineDisabled && (name === '' || name === '\\n')) {\n var g = new Group();\n // @ts-ignore\n g.newline = true;\n contentGroup.add(g);\n return;\n }\n // Representitive series.\n var seriesModel = ecModel.getSeriesByName(name)[0];\n if (legendDrawnMap.get(name)) {\n // Have been drawn\n return;\n }\n // Legend to control series.\n if (seriesModel) {\n var data = seriesModel.getData();\n var lineVisualStyle = data.getVisual('legendLineStyle') || {};\n var legendIcon = data.getVisual('legendIcon');\n /**\n * `data.getVisual('style')` may be the color from the register\n * in series. For example, for line series,\n */\n var style = data.getVisual('style');\n var itemGroup = this._createItem(seriesModel, name, dataIndex, legendItemModel, legendModel, itemAlign, lineVisualStyle, style, legendIcon, selectMode, api);\n itemGroup.on('click', curry(dispatchSelectAction, name, null, api, excludeSeriesId)).on('mouseover', curry(dispatchHighlightAction, seriesModel.name, null, api, excludeSeriesId)).on('mouseout', curry(dispatchDownplayAction, seriesModel.name, null, api, excludeSeriesId));\n if (ecModel.ssr) {\n itemGroup.eachChild(function (child) {\n var ecData = getECData(child);\n ecData.seriesIndex = seriesModel.seriesIndex;\n ecData.dataIndex = dataIndex;\n ecData.ssrType = 'legend';\n });\n }\n legendDrawnMap.set(name, true);\n } else {\n // Legend to control data. In pie and funnel.\n ecModel.eachRawSeries(function (seriesModel) {\n // In case multiple series has same data name\n if (legendDrawnMap.get(name)) {\n return;\n }\n if (seriesModel.legendVisualProvider) {\n var provider = seriesModel.legendVisualProvider;\n if (!provider.containName(name)) {\n return;\n }\n var idx = provider.indexOfName(name);\n var style = provider.getItemVisual(idx, 'style');\n var legendIcon = provider.getItemVisual(idx, 'legendIcon');\n var colorArr = parse(style.fill);\n // Color may be set to transparent in visualMap when data is out of range.\n // Do not show nothing.\n if (colorArr && colorArr[3] === 0) {\n colorArr[3] = 0.2;\n // TODO color is set to 0, 0, 0, 0. Should show correct RGBA\n style = zrUtil.extend(zrUtil.extend({}, style), {\n fill: stringify(colorArr, 'rgba')\n });\n }\n var itemGroup = this._createItem(seriesModel, name, dataIndex, legendItemModel, legendModel, itemAlign, {}, style, legendIcon, selectMode, api);\n // FIXME: consider different series has items with the same name.\n itemGroup.on('click', curry(dispatchSelectAction, null, name, api, excludeSeriesId))\n // Should not specify the series name, consider legend controls\n // more than one pie series.\n .on('mouseover', curry(dispatchHighlightAction, null, name, api, excludeSeriesId)).on('mouseout', curry(dispatchDownplayAction, null, name, api, excludeSeriesId));\n if (ecModel.ssr) {\n itemGroup.eachChild(function (child) {\n var ecData = getECData(child);\n ecData.seriesIndex = seriesModel.seriesIndex;\n ecData.dataIndex = dataIndex;\n ecData.ssrType = 'legend';\n });\n }\n legendDrawnMap.set(name, true);\n }\n }, this);\n }\n if (process.env.NODE_ENV !== 'production') {\n if (!legendDrawnMap.get(name)) {\n console.warn(name + ' series not exists. Legend data should be same with series name or data name.');\n }\n }\n }, this);\n if (selector) {\n this._createSelector(selector, legendModel, api, orient, selectorPosition);\n }\n };\n LegendView.prototype._createSelector = function (selector, legendModel, api, orient, selectorPosition) {\n var selectorGroup = this.getSelectorGroup();\n each(selector, function createSelectorButton(selectorItem) {\n var type = selectorItem.type;\n var labelText = new graphic.Text({\n style: {\n x: 0,\n y: 0,\n align: 'center',\n verticalAlign: 'middle'\n },\n onclick: function () {\n api.dispatchAction({\n type: type === 'all' ? 'legendAllSelect' : 'legendInverseSelect'\n });\n }\n });\n selectorGroup.add(labelText);\n var labelModel = legendModel.getModel('selectorLabel');\n var emphasisLabelModel = legendModel.getModel(['emphasis', 'selectorLabel']);\n setLabelStyle(labelText, {\n normal: labelModel,\n emphasis: emphasisLabelModel\n }, {\n defaultText: selectorItem.title\n });\n enableHoverEmphasis(labelText);\n });\n };\n LegendView.prototype._createItem = function (seriesModel, name, dataIndex, legendItemModel, legendModel, itemAlign, lineVisualStyle, itemVisualStyle, legendIcon, selectMode, api) {\n var drawType = seriesModel.visualDrawType;\n var itemWidth = legendModel.get('itemWidth');\n var itemHeight = legendModel.get('itemHeight');\n var isSelected = legendModel.isSelected(name);\n var iconRotate = legendItemModel.get('symbolRotate');\n var symbolKeepAspect = legendItemModel.get('symbolKeepAspect');\n var legendIconType = legendItemModel.get('icon');\n legendIcon = legendIconType || legendIcon || 'roundRect';\n var style = getLegendStyle(legendIcon, legendItemModel, lineVisualStyle, itemVisualStyle, drawType, isSelected, api);\n var itemGroup = new Group();\n var textStyleModel = legendItemModel.getModel('textStyle');\n if (zrUtil.isFunction(seriesModel.getLegendIcon) && (!legendIconType || legendIconType === 'inherit')) {\n // Series has specific way to define legend icon\n itemGroup.add(seriesModel.getLegendIcon({\n itemWidth: itemWidth,\n itemHeight: itemHeight,\n icon: legendIcon,\n iconRotate: iconRotate,\n itemStyle: style.itemStyle,\n lineStyle: style.lineStyle,\n symbolKeepAspect: symbolKeepAspect\n }));\n } else {\n // Use default legend icon policy for most series\n var rotate = legendIconType === 'inherit' && seriesModel.getData().getVisual('symbol') ? iconRotate === 'inherit' ? seriesModel.getData().getVisual('symbolRotate') : iconRotate : 0; // No rotation for no icon\n itemGroup.add(getDefaultLegendIcon({\n itemWidth: itemWidth,\n itemHeight: itemHeight,\n icon: legendIcon,\n iconRotate: rotate,\n itemStyle: style.itemStyle,\n lineStyle: style.lineStyle,\n symbolKeepAspect: symbolKeepAspect\n }));\n }\n var textX = itemAlign === 'left' ? itemWidth + 5 : -5;\n var textAlign = itemAlign;\n var formatter = legendModel.get('formatter');\n var content = name;\n if (zrUtil.isString(formatter) && formatter) {\n content = formatter.replace('{name}', name != null ? name : '');\n } else if (zrUtil.isFunction(formatter)) {\n content = formatter(name);\n }\n var textColor = isSelected ? textStyleModel.getTextColor() : legendItemModel.get('inactiveColor');\n itemGroup.add(new graphic.Text({\n style: createTextStyle(textStyleModel, {\n text: content,\n x: textX,\n y: itemHeight / 2,\n fill: textColor,\n align: textAlign,\n verticalAlign: 'middle'\n }, {\n inheritColor: textColor\n })\n }));\n // Add a invisible rect to increase the area of mouse hover\n var hitRect = new graphic.Rect({\n shape: itemGroup.getBoundingRect(),\n style: {\n // Cannot use 'invisible' because SVG SSR will miss the node\n fill: 'transparent'\n }\n });\n var tooltipModel = legendItemModel.getModel('tooltip');\n if (tooltipModel.get('show')) {\n graphic.setTooltipConfig({\n el: hitRect,\n componentModel: legendModel,\n itemName: name,\n itemTooltipOption: tooltipModel.option\n });\n }\n itemGroup.add(hitRect);\n itemGroup.eachChild(function (child) {\n child.silent = true;\n });\n hitRect.silent = !selectMode;\n this.getContentGroup().add(itemGroup);\n enableHoverEmphasis(itemGroup);\n // @ts-ignore\n itemGroup.__legendDataIndex = dataIndex;\n return itemGroup;\n };\n LegendView.prototype.layoutInner = function (legendModel, itemAlign, maxSize, isFirstRender, selector, selectorPosition) {\n var contentGroup = this.getContentGroup();\n var selectorGroup = this.getSelectorGroup();\n // Place items in contentGroup.\n layoutUtil.box(legendModel.get('orient'), contentGroup, legendModel.get('itemGap'), maxSize.width, maxSize.height);\n var contentRect = contentGroup.getBoundingRect();\n var contentPos = [-contentRect.x, -contentRect.y];\n selectorGroup.markRedraw();\n contentGroup.markRedraw();\n if (selector) {\n // Place buttons in selectorGroup\n layoutUtil.box(\n // Buttons in selectorGroup always layout horizontally\n 'horizontal', selectorGroup, legendModel.get('selectorItemGap', true));\n var selectorRect = selectorGroup.getBoundingRect();\n var selectorPos = [-selectorRect.x, -selectorRect.y];\n var selectorButtonGap = legendModel.get('selectorButtonGap', true);\n var orientIdx = legendModel.getOrient().index;\n var wh = orientIdx === 0 ? 'width' : 'height';\n var hw = orientIdx === 0 ? 'height' : 'width';\n var yx = orientIdx === 0 ? 'y' : 'x';\n if (selectorPosition === 'end') {\n selectorPos[orientIdx] += contentRect[wh] + selectorButtonGap;\n } else {\n contentPos[orientIdx] += selectorRect[wh] + selectorButtonGap;\n }\n // Always align selector to content as 'middle'\n selectorPos[1 - orientIdx] += contentRect[hw] / 2 - selectorRect[hw] / 2;\n selectorGroup.x = selectorPos[0];\n selectorGroup.y = selectorPos[1];\n contentGroup.x = contentPos[0];\n contentGroup.y = contentPos[1];\n var mainRect = {\n x: 0,\n y: 0\n };\n mainRect[wh] = contentRect[wh] + selectorButtonGap + selectorRect[wh];\n mainRect[hw] = Math.max(contentRect[hw], selectorRect[hw]);\n mainRect[yx] = Math.min(0, selectorRect[yx] + selectorPos[1 - orientIdx]);\n return mainRect;\n } else {\n contentGroup.x = contentPos[0];\n contentGroup.y = contentPos[1];\n return this.group.getBoundingRect();\n }\n };\n /**\n * @protected\n */\n LegendView.prototype.remove = function () {\n this.getContentGroup().removeAll();\n this._isFirstRender = true;\n };\n LegendView.type = 'legend.plain';\n return LegendView;\n}(ComponentView);\nfunction getLegendStyle(iconType, legendItemModel, lineVisualStyle, itemVisualStyle, drawType, isSelected, api) {\n /**\n * Use series style if is inherit;\n * elsewise, use legend style\n */\n function handleCommonProps(style, visualStyle) {\n // If lineStyle.width is 'auto', it is set to be 2 if series has border\n if (style.lineWidth === 'auto') {\n style.lineWidth = visualStyle.lineWidth > 0 ? 2 : 0;\n }\n each(style, function (propVal, propName) {\n style[propName] === 'inherit' && (style[propName] = visualStyle[propName]);\n });\n }\n // itemStyle\n var itemStyleModel = legendItemModel.getModel('itemStyle');\n var itemStyle = itemStyleModel.getItemStyle();\n var iconBrushType = iconType.lastIndexOf('empty', 0) === 0 ? 'fill' : 'stroke';\n var decalStyle = itemStyleModel.getShallow('decal');\n itemStyle.decal = !decalStyle || decalStyle === 'inherit' ? itemVisualStyle.decal : createOrUpdatePatternFromDecal(decalStyle, api);\n if (itemStyle.fill === 'inherit') {\n /**\n * Series with visualDrawType as 'stroke' should have\n * series stroke as legend fill\n */\n itemStyle.fill = itemVisualStyle[drawType];\n }\n if (itemStyle.stroke === 'inherit') {\n /**\n * icon type with \"emptyXXX\" should use fill color\n * in visual style\n */\n itemStyle.stroke = itemVisualStyle[iconBrushType];\n }\n if (itemStyle.opacity === 'inherit') {\n /**\n * Use lineStyle.opacity if drawType is stroke\n */\n itemStyle.opacity = (drawType === 'fill' ? itemVisualStyle : lineVisualStyle).opacity;\n }\n handleCommonProps(itemStyle, itemVisualStyle);\n // lineStyle\n var legendLineModel = legendItemModel.getModel('lineStyle');\n var lineStyle = legendLineModel.getLineStyle();\n handleCommonProps(lineStyle, lineVisualStyle);\n // Fix auto color to real color\n itemStyle.fill === 'auto' && (itemStyle.fill = itemVisualStyle.fill);\n itemStyle.stroke === 'auto' && (itemStyle.stroke = itemVisualStyle.fill);\n lineStyle.stroke === 'auto' && (lineStyle.stroke = itemVisualStyle.fill);\n if (!isSelected) {\n var borderWidth = legendItemModel.get('inactiveBorderWidth');\n /**\n * Since stroke is set to be inactiveBorderColor, it may occur that\n * there is no border in series but border in legend, so we need to\n * use border only when series has border if is set to be auto\n */\n var visualHasBorder = itemStyle[iconBrushType];\n itemStyle.lineWidth = borderWidth === 'auto' ? itemVisualStyle.lineWidth > 0 && visualHasBorder ? 2 : 0 : itemStyle.lineWidth;\n itemStyle.fill = legendItemModel.get('inactiveColor');\n itemStyle.stroke = legendItemModel.get('inactiveBorderColor');\n lineStyle.stroke = legendLineModel.get('inactiveColor');\n lineStyle.lineWidth = legendLineModel.get('inactiveWidth');\n }\n return {\n itemStyle: itemStyle,\n lineStyle: lineStyle\n };\n}\nfunction getDefaultLegendIcon(opt) {\n var symboType = opt.icon || 'roundRect';\n var icon = createSymbol(symboType, 0, 0, opt.itemWidth, opt.itemHeight, opt.itemStyle.fill, opt.symbolKeepAspect);\n icon.setStyle(opt.itemStyle);\n icon.rotation = (opt.iconRotate || 0) * Math.PI / 180;\n icon.setOrigin([opt.itemWidth / 2, opt.itemHeight / 2]);\n if (symboType.indexOf('empty') > -1) {\n icon.style.stroke = icon.style.fill;\n icon.style.fill = '#fff';\n icon.style.lineWidth = 2;\n }\n return icon;\n}\nfunction dispatchSelectAction(seriesName, dataName, api, excludeSeriesId) {\n // downplay before unselect\n dispatchDownplayAction(seriesName, dataName, api, excludeSeriesId);\n api.dispatchAction({\n type: 'legendToggleSelect',\n name: seriesName != null ? seriesName : dataName\n });\n // highlight after select\n // TODO highlight immediately may cause animation loss.\n dispatchHighlightAction(seriesName, dataName, api, excludeSeriesId);\n}\nfunction isUseHoverLayer(api) {\n var list = api.getZr().storage.getDisplayList();\n var emphasisState;\n var i = 0;\n var len = list.length;\n while (i < len && !(emphasisState = list[i].states.emphasis)) {\n i++;\n }\n return emphasisState && emphasisState.hoverLayer;\n}\nfunction dispatchHighlightAction(seriesName, dataName, api, excludeSeriesId) {\n // If element hover will move to a hoverLayer.\n if (!isUseHoverLayer(api)) {\n api.dispatchAction({\n type: 'highlight',\n seriesName: seriesName,\n name: dataName,\n excludeSeriesId: excludeSeriesId\n });\n }\n}\nfunction dispatchDownplayAction(seriesName, dataName, api, excludeSeriesId) {\n // If element hover will move to a hoverLayer.\n if (!isUseHoverLayer(api)) {\n api.dispatchAction({\n type: 'downplay',\n seriesName: seriesName,\n name: dataName,\n excludeSeriesId: excludeSeriesId\n });\n }\n}\nexport default LegendView;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nexport default function legendFilter(ecModel) {\n var legendModels = ecModel.findComponents({\n mainType: 'legend'\n });\n if (legendModels && legendModels.length) {\n ecModel.filterSeries(function (series) {\n // If in any legend component the status is not selected.\n // Because in legend series is assumed selected when it is not in the legend data.\n for (var i = 0; i < legendModels.length; i++) {\n if (!legendModels[i].isSelected(series.name)) {\n return false;\n }\n }\n return true;\n });\n }\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// @ts-nocheck\nimport { curry, each } from 'zrender/lib/core/util.js';\nfunction legendSelectActionHandler(methodName, payload, ecModel) {\n var selectedMap = {};\n var isToggleSelect = methodName === 'toggleSelected';\n var isSelected;\n // Update all legend components\n ecModel.eachComponent('legend', function (legendModel) {\n if (isToggleSelect && isSelected != null) {\n // Force other legend has same selected status\n // Or the first is toggled to true and other are toggled to false\n // In the case one legend has some item unSelected in option. And if other legend\n // doesn't has the item, they will assume it is selected.\n legendModel[isSelected ? 'select' : 'unSelect'](payload.name);\n } else if (methodName === 'allSelect' || methodName === 'inverseSelect') {\n legendModel[methodName]();\n } else {\n legendModel[methodName](payload.name);\n isSelected = legendModel.isSelected(payload.name);\n }\n var legendData = legendModel.getData();\n each(legendData, function (model) {\n var name = model.get('name');\n // Wrap element\n if (name === '\\n' || name === '') {\n return;\n }\n var isItemSelected = legendModel.isSelected(name);\n if (selectedMap.hasOwnProperty(name)) {\n // Unselected if any legend is unselected\n selectedMap[name] = selectedMap[name] && isItemSelected;\n } else {\n selectedMap[name] = isItemSelected;\n }\n });\n });\n // Return the event explicitly\n return methodName === 'allSelect' || methodName === 'inverseSelect' ? {\n selected: selectedMap\n } : {\n name: payload.name,\n selected: selectedMap\n };\n}\nexport function installLegendAction(registers) {\n /**\n * @event legendToggleSelect\n * @type {Object}\n * @property {string} type 'legendToggleSelect'\n * @property {string} [from]\n * @property {string} name Series name or data item name\n */\n registers.registerAction('legendToggleSelect', 'legendselectchanged', curry(legendSelectActionHandler, 'toggleSelected'));\n registers.registerAction('legendAllSelect', 'legendselectall', curry(legendSelectActionHandler, 'allSelect'));\n registers.registerAction('legendInverseSelect', 'legendinverseselect', curry(legendSelectActionHandler, 'inverseSelect'));\n /**\n * @event legendSelect\n * @type {Object}\n * @property {string} type 'legendSelect'\n * @property {string} name Series name or data item name\n */\n registers.registerAction('legendSelect', 'legendselected', curry(legendSelectActionHandler, 'select'));\n /**\n * @event legendUnSelect\n * @type {Object}\n * @property {string} type 'legendUnSelect'\n * @property {string} name Series name or data item name\n */\n registers.registerAction('legendUnSelect', 'legendunselected', curry(legendSelectActionHandler, 'unSelect'));\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport LegendModel from './LegendModel.js';\nimport LegendView from './LegendView.js';\nimport legendFilter from './legendFilter.js';\nimport { installLegendAction } from './legendAction.js';\nexport function install(registers) {\n registers.registerComponentModel(LegendModel);\n registers.registerComponentView(LegendView);\n registers.registerProcessor(registers.PRIORITY.PROCESSOR.SERIES_FILTER, legendFilter);\n registers.registerSubTypeDefaulter('legend', function () {\n return 'plain';\n });\n installLegendAction(registers);\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport LegendModel from './LegendModel.js';\nimport { mergeLayoutParam, getLayoutParams } from '../../util/layout.js';\nimport { inheritDefaultOption } from '../../util/component.js';\nvar ScrollableLegendModel = /** @class */function (_super) {\n __extends(ScrollableLegendModel, _super);\n function ScrollableLegendModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = ScrollableLegendModel.type;\n return _this;\n }\n /**\n * @param {number} scrollDataIndex\n */\n ScrollableLegendModel.prototype.setScrollDataIndex = function (scrollDataIndex) {\n this.option.scrollDataIndex = scrollDataIndex;\n };\n ScrollableLegendModel.prototype.init = function (option, parentModel, ecModel) {\n var inputPositionParams = getLayoutParams(option);\n _super.prototype.init.call(this, option, parentModel, ecModel);\n mergeAndNormalizeLayoutParams(this, option, inputPositionParams);\n };\n /**\n * @override\n */\n ScrollableLegendModel.prototype.mergeOption = function (option, ecModel) {\n _super.prototype.mergeOption.call(this, option, ecModel);\n mergeAndNormalizeLayoutParams(this, this.option, option);\n };\n ScrollableLegendModel.type = 'legend.scroll';\n ScrollableLegendModel.defaultOption = inheritDefaultOption(LegendModel.defaultOption, {\n scrollDataIndex: 0,\n pageButtonItemGap: 5,\n pageButtonGap: null,\n pageButtonPosition: 'end',\n pageFormatter: '{current}/{total}',\n pageIcons: {\n horizontal: ['M0,0L12,-10L12,10z', 'M0,0L-12,-10L-12,10z'],\n vertical: ['M0,0L20,0L10,-20z', 'M0,0L20,0L10,20z']\n },\n pageIconColor: '#2f4554',\n pageIconInactiveColor: '#aaa',\n pageIconSize: 15,\n pageTextStyle: {\n color: '#333'\n },\n animationDurationUpdate: 800\n });\n return ScrollableLegendModel;\n}(LegendModel);\n;\n// Do not `ignoreSize` to enable setting {left: 10, right: 10}.\nfunction mergeAndNormalizeLayoutParams(legendModel, target, raw) {\n var orient = legendModel.getOrient();\n var ignoreSize = [1, 1];\n ignoreSize[orient.index] = 0;\n mergeLayoutParam(target, raw, {\n type: 'box',\n ignoreSize: !!ignoreSize\n });\n}\nexport default ScrollableLegendModel;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\n/**\n * Separate legend and scrollable legend to reduce package size.\n */\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport * as layoutUtil from '../../util/layout.js';\nimport LegendView from './LegendView.js';\nvar Group = graphic.Group;\nvar WH = ['width', 'height'];\nvar XY = ['x', 'y'];\nvar ScrollableLegendView = /** @class */function (_super) {\n __extends(ScrollableLegendView, _super);\n function ScrollableLegendView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = ScrollableLegendView.type;\n _this.newlineDisabled = true;\n _this._currentIndex = 0;\n return _this;\n }\n ScrollableLegendView.prototype.init = function () {\n _super.prototype.init.call(this);\n this.group.add(this._containerGroup = new Group());\n this._containerGroup.add(this.getContentGroup());\n this.group.add(this._controllerGroup = new Group());\n };\n /**\n * @override\n */\n ScrollableLegendView.prototype.resetInner = function () {\n _super.prototype.resetInner.call(this);\n this._controllerGroup.removeAll();\n this._containerGroup.removeClipPath();\n this._containerGroup.__rectSize = null;\n };\n /**\n * @override\n */\n ScrollableLegendView.prototype.renderInner = function (itemAlign, legendModel, ecModel, api, selector, orient, selectorPosition) {\n var self = this;\n // Render content items.\n _super.prototype.renderInner.call(this, itemAlign, legendModel, ecModel, api, selector, orient, selectorPosition);\n var controllerGroup = this._controllerGroup;\n // FIXME: support be 'auto' adapt to size number text length,\n // e.g., '3/12345' should not overlap with the control arrow button.\n var pageIconSize = legendModel.get('pageIconSize', true);\n var pageIconSizeArr = zrUtil.isArray(pageIconSize) ? pageIconSize : [pageIconSize, pageIconSize];\n createPageButton('pagePrev', 0);\n var pageTextStyleModel = legendModel.getModel('pageTextStyle');\n controllerGroup.add(new graphic.Text({\n name: 'pageText',\n style: {\n // Placeholder to calculate a proper layout.\n text: 'xx/xx',\n fill: pageTextStyleModel.getTextColor(),\n font: pageTextStyleModel.getFont(),\n verticalAlign: 'middle',\n align: 'center'\n },\n silent: true\n }));\n createPageButton('pageNext', 1);\n function createPageButton(name, iconIdx) {\n var pageDataIndexName = name + 'DataIndex';\n var icon = graphic.createIcon(legendModel.get('pageIcons', true)[legendModel.getOrient().name][iconIdx], {\n // Buttons will be created in each render, so we do not need\n // to worry about avoiding using legendModel kept in scope.\n onclick: zrUtil.bind(self._pageGo, self, pageDataIndexName, legendModel, api)\n }, {\n x: -pageIconSizeArr[0] / 2,\n y: -pageIconSizeArr[1] / 2,\n width: pageIconSizeArr[0],\n height: pageIconSizeArr[1]\n });\n icon.name = name;\n controllerGroup.add(icon);\n }\n };\n /**\n * @override\n */\n ScrollableLegendView.prototype.layoutInner = function (legendModel, itemAlign, maxSize, isFirstRender, selector, selectorPosition) {\n var selectorGroup = this.getSelectorGroup();\n var orientIdx = legendModel.getOrient().index;\n var wh = WH[orientIdx];\n var xy = XY[orientIdx];\n var hw = WH[1 - orientIdx];\n var yx = XY[1 - orientIdx];\n selector && layoutUtil.box(\n // Buttons in selectorGroup always layout horizontally\n 'horizontal', selectorGroup, legendModel.get('selectorItemGap', true));\n var selectorButtonGap = legendModel.get('selectorButtonGap', true);\n var selectorRect = selectorGroup.getBoundingRect();\n var selectorPos = [-selectorRect.x, -selectorRect.y];\n var processMaxSize = zrUtil.clone(maxSize);\n selector && (processMaxSize[wh] = maxSize[wh] - selectorRect[wh] - selectorButtonGap);\n var mainRect = this._layoutContentAndController(legendModel, isFirstRender, processMaxSize, orientIdx, wh, hw, yx, xy);\n if (selector) {\n if (selectorPosition === 'end') {\n selectorPos[orientIdx] += mainRect[wh] + selectorButtonGap;\n } else {\n var offset = selectorRect[wh] + selectorButtonGap;\n selectorPos[orientIdx] -= offset;\n mainRect[xy] -= offset;\n }\n mainRect[wh] += selectorRect[wh] + selectorButtonGap;\n selectorPos[1 - orientIdx] += mainRect[yx] + mainRect[hw] / 2 - selectorRect[hw] / 2;\n mainRect[hw] = Math.max(mainRect[hw], selectorRect[hw]);\n mainRect[yx] = Math.min(mainRect[yx], selectorRect[yx] + selectorPos[1 - orientIdx]);\n selectorGroup.x = selectorPos[0];\n selectorGroup.y = selectorPos[1];\n selectorGroup.markRedraw();\n }\n return mainRect;\n };\n ScrollableLegendView.prototype._layoutContentAndController = function (legendModel, isFirstRender, maxSize, orientIdx, wh, hw, yx, xy) {\n var contentGroup = this.getContentGroup();\n var containerGroup = this._containerGroup;\n var controllerGroup = this._controllerGroup;\n // Place items in contentGroup.\n layoutUtil.box(legendModel.get('orient'), contentGroup, legendModel.get('itemGap'), !orientIdx ? null : maxSize.width, orientIdx ? null : maxSize.height);\n layoutUtil.box(\n // Buttons in controller are layout always horizontally.\n 'horizontal', controllerGroup, legendModel.get('pageButtonItemGap', true));\n var contentRect = contentGroup.getBoundingRect();\n var controllerRect = controllerGroup.getBoundingRect();\n var showController = this._showController = contentRect[wh] > maxSize[wh];\n // In case that the inner elements of contentGroup layout do not based on [0, 0]\n var contentPos = [-contentRect.x, -contentRect.y];\n // Remain contentPos when scroll animation perfroming.\n // If first rendering, `contentGroup.position` is [0, 0], which\n // does not make sense and may cause unexepcted animation if adopted.\n if (!isFirstRender) {\n contentPos[orientIdx] = contentGroup[xy];\n }\n // Layout container group based on 0.\n var containerPos = [0, 0];\n var controllerPos = [-controllerRect.x, -controllerRect.y];\n var pageButtonGap = zrUtil.retrieve2(legendModel.get('pageButtonGap', true), legendModel.get('itemGap', true));\n // Place containerGroup and controllerGroup and contentGroup.\n if (showController) {\n var pageButtonPosition = legendModel.get('pageButtonPosition', true);\n // controller is on the right / bottom.\n if (pageButtonPosition === 'end') {\n controllerPos[orientIdx] += maxSize[wh] - controllerRect[wh];\n }\n // controller is on the left / top.\n else {\n containerPos[orientIdx] += controllerRect[wh] + pageButtonGap;\n }\n }\n // Always align controller to content as 'middle'.\n controllerPos[1 - orientIdx] += contentRect[hw] / 2 - controllerRect[hw] / 2;\n contentGroup.setPosition(contentPos);\n containerGroup.setPosition(containerPos);\n controllerGroup.setPosition(controllerPos);\n // Calculate `mainRect` and set `clipPath`.\n // mainRect should not be calculated by `this.group.getBoundingRect()`\n // for sake of the overflow.\n var mainRect = {\n x: 0,\n y: 0\n };\n // Consider content may be overflow (should be clipped).\n mainRect[wh] = showController ? maxSize[wh] : contentRect[wh];\n mainRect[hw] = Math.max(contentRect[hw], controllerRect[hw]);\n // `containerRect[yx] + containerPos[1 - orientIdx]` is 0.\n mainRect[yx] = Math.min(0, controllerRect[yx] + controllerPos[1 - orientIdx]);\n containerGroup.__rectSize = maxSize[wh];\n if (showController) {\n var clipShape = {\n x: 0,\n y: 0\n };\n clipShape[wh] = Math.max(maxSize[wh] - controllerRect[wh] - pageButtonGap, 0);\n clipShape[hw] = mainRect[hw];\n containerGroup.setClipPath(new graphic.Rect({\n shape: clipShape\n }));\n // Consider content may be larger than container, container rect\n // can not be obtained from `containerGroup.getBoundingRect()`.\n containerGroup.__rectSize = clipShape[wh];\n } else {\n // Do not remove or ignore controller. Keep them set as placeholders.\n controllerGroup.eachChild(function (child) {\n child.attr({\n invisible: true,\n silent: true\n });\n });\n }\n // Content translate animation.\n var pageInfo = this._getPageInfo(legendModel);\n pageInfo.pageIndex != null && graphic.updateProps(contentGroup, {\n x: pageInfo.contentPosition[0],\n y: pageInfo.contentPosition[1]\n },\n // When switch from \"show controller\" to \"not show controller\", view should be\n // updated immediately without animation, otherwise causes weird effect.\n showController ? legendModel : null);\n this._updatePageInfoView(legendModel, pageInfo);\n return mainRect;\n };\n ScrollableLegendView.prototype._pageGo = function (to, legendModel, api) {\n var scrollDataIndex = this._getPageInfo(legendModel)[to];\n scrollDataIndex != null && api.dispatchAction({\n type: 'legendScroll',\n scrollDataIndex: scrollDataIndex,\n legendId: legendModel.id\n });\n };\n ScrollableLegendView.prototype._updatePageInfoView = function (legendModel, pageInfo) {\n var controllerGroup = this._controllerGroup;\n zrUtil.each(['pagePrev', 'pageNext'], function (name) {\n var key = name + 'DataIndex';\n var canJump = pageInfo[key] != null;\n var icon = controllerGroup.childOfName(name);\n if (icon) {\n icon.setStyle('fill', canJump ? legendModel.get('pageIconColor', true) : legendModel.get('pageIconInactiveColor', true));\n icon.cursor = canJump ? 'pointer' : 'default';\n }\n });\n var pageText = controllerGroup.childOfName('pageText');\n var pageFormatter = legendModel.get('pageFormatter');\n var pageIndex = pageInfo.pageIndex;\n var current = pageIndex != null ? pageIndex + 1 : 0;\n var total = pageInfo.pageCount;\n pageText && pageFormatter && pageText.setStyle('text', zrUtil.isString(pageFormatter) ? pageFormatter.replace('{current}', current == null ? '' : current + '').replace('{total}', total == null ? '' : total + '') : pageFormatter({\n current: current,\n total: total\n }));\n };\n /**\n * contentPosition: Array., null when data item not found.\n * pageIndex: number, null when data item not found.\n * pageCount: number, always be a number, can be 0.\n * pagePrevDataIndex: number, null when no previous page.\n * pageNextDataIndex: number, null when no next page.\n * }\n */\n ScrollableLegendView.prototype._getPageInfo = function (legendModel) {\n var scrollDataIndex = legendModel.get('scrollDataIndex', true);\n var contentGroup = this.getContentGroup();\n var containerRectSize = this._containerGroup.__rectSize;\n var orientIdx = legendModel.getOrient().index;\n var wh = WH[orientIdx];\n var xy = XY[orientIdx];\n var targetItemIndex = this._findTargetItemIndex(scrollDataIndex);\n var children = contentGroup.children();\n var targetItem = children[targetItemIndex];\n var itemCount = children.length;\n var pCount = !itemCount ? 0 : 1;\n var result = {\n contentPosition: [contentGroup.x, contentGroup.y],\n pageCount: pCount,\n pageIndex: pCount - 1,\n pagePrevDataIndex: null,\n pageNextDataIndex: null\n };\n if (!targetItem) {\n return result;\n }\n var targetItemInfo = getItemInfo(targetItem);\n result.contentPosition[orientIdx] = -targetItemInfo.s;\n // Strategy:\n // (1) Always align based on the left/top most item.\n // (2) It is user-friendly that the last item shown in the\n // current window is shown at the begining of next window.\n // Otherwise if half of the last item is cut by the window,\n // it will have no chance to display entirely.\n // (3) Consider that item size probably be different, we\n // have calculate pageIndex by size rather than item index,\n // and we can not get page index directly by division.\n // (4) The window is to narrow to contain more than\n // one item, we should make sure that the page can be fliped.\n for (var i = targetItemIndex + 1, winStartItemInfo = targetItemInfo, winEndItemInfo = targetItemInfo, currItemInfo = null; i <= itemCount; ++i) {\n currItemInfo = getItemInfo(children[i]);\n if (\n // Half of the last item is out of the window.\n !currItemInfo && winEndItemInfo.e > winStartItemInfo.s + containerRectSize\n // If the current item does not intersect with the window, the new page\n // can be started at the current item or the last item.\n || currItemInfo && !intersect(currItemInfo, winStartItemInfo.s)) {\n if (winEndItemInfo.i > winStartItemInfo.i) {\n winStartItemInfo = winEndItemInfo;\n } else {\n // e.g., when page size is smaller than item size.\n winStartItemInfo = currItemInfo;\n }\n if (winStartItemInfo) {\n if (result.pageNextDataIndex == null) {\n result.pageNextDataIndex = winStartItemInfo.i;\n }\n ++result.pageCount;\n }\n }\n winEndItemInfo = currItemInfo;\n }\n for (var i = targetItemIndex - 1, winStartItemInfo = targetItemInfo, winEndItemInfo = targetItemInfo, currItemInfo = null; i >= -1; --i) {\n currItemInfo = getItemInfo(children[i]);\n if (\n // If the the end item does not intersect with the window started\n // from the current item, a page can be settled.\n (!currItemInfo || !intersect(winEndItemInfo, currItemInfo.s)\n // e.g., when page size is smaller than item size.\n ) && winStartItemInfo.i < winEndItemInfo.i) {\n winEndItemInfo = winStartItemInfo;\n if (result.pagePrevDataIndex == null) {\n result.pagePrevDataIndex = winStartItemInfo.i;\n }\n ++result.pageCount;\n ++result.pageIndex;\n }\n winStartItemInfo = currItemInfo;\n }\n return result;\n function getItemInfo(el) {\n if (el) {\n var itemRect = el.getBoundingRect();\n var start = itemRect[xy] + el[xy];\n return {\n s: start,\n e: start + itemRect[wh],\n i: el.__legendDataIndex\n };\n }\n }\n function intersect(itemInfo, winStart) {\n return itemInfo.e >= winStart && itemInfo.s <= winStart + containerRectSize;\n }\n };\n ScrollableLegendView.prototype._findTargetItemIndex = function (targetDataIndex) {\n if (!this._showController) {\n return 0;\n }\n var index;\n var contentGroup = this.getContentGroup();\n var defaultIndex;\n contentGroup.eachChild(function (child, idx) {\n var legendDataIdx = child.__legendDataIndex;\n // FIXME\n // If the given targetDataIndex (from model) is illegal,\n // we use defaultIndex. But the index on the legend model and\n // action payload is still illegal. That case will not be\n // changed until some scenario requires.\n if (defaultIndex == null && legendDataIdx != null) {\n defaultIndex = idx;\n }\n if (legendDataIdx === targetDataIndex) {\n index = idx;\n }\n });\n return index != null ? index : defaultIndex;\n };\n ScrollableLegendView.type = 'legend.scroll';\n return ScrollableLegendView;\n}(LegendView);\nexport default ScrollableLegendView;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nexport default function installScrollableLegendAction(registers) {\n /**\n * @event legendScroll\n * @type {Object}\n * @property {string} type 'legendScroll'\n * @property {string} scrollDataIndex\n */\n registers.registerAction('legendScroll', 'legendscroll', function (payload, ecModel) {\n var scrollDataIndex = payload.scrollDataIndex;\n scrollDataIndex != null && ecModel.eachComponent({\n mainType: 'legend',\n subType: 'scroll',\n query: payload\n }, function (legendModel) {\n legendModel.setScrollDataIndex(scrollDataIndex);\n });\n });\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { use } from '../../extension.js';\nimport { install as installLegendPlain } from './installLegendPlain.js';\nimport ScrollableLegendModel from './ScrollableLegendModel.js';\nimport ScrollableLegendView from './ScrollableLegendView.js';\nimport installScrollableLegendAction from './scrollableLegendAction.js';\nexport function install(registers) {\n use(installLegendPlain);\n registers.registerComponentModel(ScrollableLegendModel);\n registers.registerComponentView(ScrollableLegendView);\n installScrollableLegendAction(registers);\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { use } from '../../extension.js';\nimport { install as installLegendPlain } from './installLegendPlain.js';\nimport { install as installLegendScroll } from './installLegendScroll.js';\nexport function install(registers) {\n use(installLegendPlain);\n use(installLegendScroll);\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { keys, isArray, map, isObject, isString, isRegExp, isArrayLike, hasOwn, isNumber } from 'zrender/lib/core/util.js';\nimport { throwError, makePrintable } from './log.js';\nimport { getRawValueParser, createFilterComparator } from '../data/helper/dataValueHelper.js';\n;\nvar RELATIONAL_EXPRESSION_OP_ALIAS_MAP = {\n value: 'eq',\n // PENDING: not good for literal semantic?\n '<': 'lt',\n '<=': 'lte',\n '>': 'gt',\n '>=': 'gte',\n '=': 'eq',\n '!=': 'ne',\n '<>': 'ne'\n // Might be misleading for sake of the difference between '==' and '===',\n // so don't support them.\n // '==': 'eq',\n // '===': 'seq',\n // '!==': 'sne'\n // PENDING: Whether support some common alias \"ge\", \"le\", \"neq\"?\n // ge: 'gte',\n // le: 'lte',\n // neq: 'ne',\n};\n// type RelationalExpressionOpEvaluate = (tarVal: unknown, condVal: unknown) => boolean;\nvar RegExpEvaluator = /** @class */function () {\n function RegExpEvaluator(rVal) {\n // Support condVal: RegExp | string\n var condValue = this._condVal = isString(rVal) ? new RegExp(rVal) : isRegExp(rVal) ? rVal : null;\n if (condValue == null) {\n var errMsg = '';\n if (process.env.NODE_ENV !== 'production') {\n errMsg = makePrintable('Illegal regexp', rVal, 'in');\n }\n throwError(errMsg);\n }\n }\n RegExpEvaluator.prototype.evaluate = function (lVal) {\n var type = typeof lVal;\n return isString(type) ? this._condVal.test(lVal) : isNumber(type) ? this._condVal.test(lVal + '') : false;\n };\n return RegExpEvaluator;\n}();\nvar ConstConditionInternal = /** @class */function () {\n function ConstConditionInternal() {}\n ConstConditionInternal.prototype.evaluate = function () {\n return this.value;\n };\n return ConstConditionInternal;\n}();\nvar AndConditionInternal = /** @class */function () {\n function AndConditionInternal() {}\n AndConditionInternal.prototype.evaluate = function () {\n var children = this.children;\n for (var i = 0; i < children.length; i++) {\n if (!children[i].evaluate()) {\n return false;\n }\n }\n return true;\n };\n return AndConditionInternal;\n}();\nvar OrConditionInternal = /** @class */function () {\n function OrConditionInternal() {}\n OrConditionInternal.prototype.evaluate = function () {\n var children = this.children;\n for (var i = 0; i < children.length; i++) {\n if (children[i].evaluate()) {\n return true;\n }\n }\n return false;\n };\n return OrConditionInternal;\n}();\nvar NotConditionInternal = /** @class */function () {\n function NotConditionInternal() {}\n NotConditionInternal.prototype.evaluate = function () {\n return !this.child.evaluate();\n };\n return NotConditionInternal;\n}();\nvar RelationalConditionInternal = /** @class */function () {\n function RelationalConditionInternal() {}\n RelationalConditionInternal.prototype.evaluate = function () {\n var needParse = !!this.valueParser;\n // Call getValue with no `this`.\n var getValue = this.getValue;\n var tarValRaw = getValue(this.valueGetterParam);\n var tarValParsed = needParse ? this.valueParser(tarValRaw) : null;\n // Relational cond follow \"and\" logic internally.\n for (var i = 0; i < this.subCondList.length; i++) {\n if (!this.subCondList[i].evaluate(needParse ? tarValParsed : tarValRaw)) {\n return false;\n }\n }\n return true;\n };\n return RelationalConditionInternal;\n}();\nfunction parseOption(exprOption, getters) {\n if (exprOption === true || exprOption === false) {\n var cond = new ConstConditionInternal();\n cond.value = exprOption;\n return cond;\n }\n var errMsg = '';\n if (!isObjectNotArray(exprOption)) {\n if (process.env.NODE_ENV !== 'production') {\n errMsg = makePrintable('Illegal config. Expect a plain object but actually', exprOption);\n }\n throwError(errMsg);\n }\n if (exprOption.and) {\n return parseAndOrOption('and', exprOption, getters);\n } else if (exprOption.or) {\n return parseAndOrOption('or', exprOption, getters);\n } else if (exprOption.not) {\n return parseNotOption(exprOption, getters);\n }\n return parseRelationalOption(exprOption, getters);\n}\nfunction parseAndOrOption(op, exprOption, getters) {\n var subOptionArr = exprOption[op];\n var errMsg = '';\n if (process.env.NODE_ENV !== 'production') {\n errMsg = makePrintable('\"and\"/\"or\" condition should only be `' + op + ': [...]` and must not be empty array.', 'Illegal condition:', exprOption);\n }\n if (!isArray(subOptionArr)) {\n throwError(errMsg);\n }\n if (!subOptionArr.length) {\n throwError(errMsg);\n }\n var cond = op === 'and' ? new AndConditionInternal() : new OrConditionInternal();\n cond.children = map(subOptionArr, function (subOption) {\n return parseOption(subOption, getters);\n });\n if (!cond.children.length) {\n throwError(errMsg);\n }\n return cond;\n}\nfunction parseNotOption(exprOption, getters) {\n var subOption = exprOption.not;\n var errMsg = '';\n if (process.env.NODE_ENV !== 'production') {\n errMsg = makePrintable('\"not\" condition should only be `not: {}`.', 'Illegal condition:', exprOption);\n }\n if (!isObjectNotArray(subOption)) {\n throwError(errMsg);\n }\n var cond = new NotConditionInternal();\n cond.child = parseOption(subOption, getters);\n if (!cond.child) {\n throwError(errMsg);\n }\n return cond;\n}\nfunction parseRelationalOption(exprOption, getters) {\n var errMsg = '';\n var valueGetterParam = getters.prepareGetValue(exprOption);\n var subCondList = [];\n var exprKeys = keys(exprOption);\n var parserName = exprOption.parser;\n var valueParser = parserName ? getRawValueParser(parserName) : null;\n for (var i = 0; i < exprKeys.length; i++) {\n var keyRaw = exprKeys[i];\n if (keyRaw === 'parser' || getters.valueGetterAttrMap.get(keyRaw)) {\n continue;\n }\n var op = hasOwn(RELATIONAL_EXPRESSION_OP_ALIAS_MAP, keyRaw) ? RELATIONAL_EXPRESSION_OP_ALIAS_MAP[keyRaw] : keyRaw;\n var condValueRaw = exprOption[keyRaw];\n var condValueParsed = valueParser ? valueParser(condValueRaw) : condValueRaw;\n var evaluator = createFilterComparator(op, condValueParsed) || op === 'reg' && new RegExpEvaluator(condValueParsed);\n if (!evaluator) {\n if (process.env.NODE_ENV !== 'production') {\n errMsg = makePrintable('Illegal relational operation: \"' + keyRaw + '\" in condition:', exprOption);\n }\n throwError(errMsg);\n }\n subCondList.push(evaluator);\n }\n if (!subCondList.length) {\n if (process.env.NODE_ENV !== 'production') {\n errMsg = makePrintable('Relational condition must have at least one operator.', 'Illegal condition:', exprOption);\n }\n // No relational operator always disabled in case of dangers result.\n throwError(errMsg);\n }\n var cond = new RelationalConditionInternal();\n cond.valueGetterParam = valueGetterParam;\n cond.valueParser = valueParser;\n cond.getValue = getters.getValue;\n cond.subCondList = subCondList;\n return cond;\n}\nfunction isObjectNotArray(val) {\n return isObject(val) && !isArrayLike(val);\n}\nvar ConditionalExpressionParsed = /** @class */function () {\n function ConditionalExpressionParsed(exprOption, getters) {\n this._cond = parseOption(exprOption, getters);\n }\n ConditionalExpressionParsed.prototype.evaluate = function () {\n return this._cond.evaluate();\n };\n return ConditionalExpressionParsed;\n}();\n;\nexport function parseConditionalExpression(exprOption, getters) {\n return new ConditionalExpressionParsed(exprOption, getters);\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { parseConditionalExpression } from '../../util/conditionalExpression.js';\nimport { hasOwn, createHashMap } from 'zrender/lib/core/util.js';\nimport { makePrintable, throwError } from '../../util/log.js';\nexport var filterTransform = {\n type: 'echarts:filter',\n // PENDING: enhance to filter by index rather than create new data\n transform: function (params) {\n // [Caveat] Fail-Fast:\n // Do not return the whole dataset unless user config indicates it explicitly.\n // For example, if no condition is specified by mistake, returning an empty result\n // is better than returning the entire raw source for the user to find the mistake.\n var upstream = params.upstream;\n var rawItem;\n var condition = parseConditionalExpression(params.config, {\n valueGetterAttrMap: createHashMap({\n dimension: true\n }),\n prepareGetValue: function (exprOption) {\n var errMsg = '';\n var dimLoose = exprOption.dimension;\n if (!hasOwn(exprOption, 'dimension')) {\n if (process.env.NODE_ENV !== 'production') {\n errMsg = makePrintable('Relation condition must has prop \"dimension\" specified.', 'Illegal condition:', exprOption);\n }\n throwError(errMsg);\n }\n var dimInfo = upstream.getDimensionInfo(dimLoose);\n if (!dimInfo) {\n if (process.env.NODE_ENV !== 'production') {\n errMsg = makePrintable('Can not find dimension info via: ' + dimLoose + '.\\n', 'Existing dimensions: ', upstream.cloneAllDimensionInfo(), '.\\n', 'Illegal condition:', exprOption, '.\\n');\n }\n throwError(errMsg);\n }\n return {\n dimIdx: dimInfo.index\n };\n },\n getValue: function (param) {\n return upstream.retrieveValueFromItem(rawItem, param.dimIdx);\n }\n });\n var resultData = [];\n for (var i = 0, len = upstream.count(); i < len; i++) {\n rawItem = upstream.getRawDataItem(i);\n if (condition.evaluate()) {\n resultData.push(rawItem);\n }\n }\n return {\n data: resultData\n };\n }\n};","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { SOURCE_FORMAT_ARRAY_ROWS, SOURCE_FORMAT_OBJECT_ROWS } from '../../util/types.js';\nimport { makePrintable, throwError } from '../../util/log.js';\nimport { each } from 'zrender/lib/core/util.js';\nimport { normalizeToArray } from '../../util/model.js';\nimport { getRawValueParser, SortOrderComparator } from '../../data/helper/dataValueHelper.js';\nvar sampleLog = '';\nif (process.env.NODE_ENV !== 'production') {\n sampleLog = ['Valid config is like:', '{ dimension: \"age\", order: \"asc\" }', 'or [{ dimension: \"age\", order: \"asc\"], { dimension: \"date\", order: \"desc\" }]'].join(' ');\n}\nexport var sortTransform = {\n type: 'echarts:sort',\n transform: function (params) {\n var upstream = params.upstream;\n var config = params.config;\n var errMsg = '';\n // Normalize\n // const orderExprList: OrderExpression[] = isArray(config[0])\n // ? config as OrderExpression[]\n // : [config as OrderExpression];\n var orderExprList = normalizeToArray(config);\n if (!orderExprList.length) {\n if (process.env.NODE_ENV !== 'production') {\n errMsg = 'Empty `config` in sort transform.';\n }\n throwError(errMsg);\n }\n var orderDefList = [];\n each(orderExprList, function (orderExpr) {\n var dimLoose = orderExpr.dimension;\n var order = orderExpr.order;\n var parserName = orderExpr.parser;\n var incomparable = orderExpr.incomparable;\n if (dimLoose == null) {\n if (process.env.NODE_ENV !== 'production') {\n errMsg = 'Sort transform config must has \"dimension\" specified.' + sampleLog;\n }\n throwError(errMsg);\n }\n if (order !== 'asc' && order !== 'desc') {\n if (process.env.NODE_ENV !== 'production') {\n errMsg = 'Sort transform config must has \"order\" specified.' + sampleLog;\n }\n throwError(errMsg);\n }\n if (incomparable && incomparable !== 'min' && incomparable !== 'max') {\n var errMsg_1 = '';\n if (process.env.NODE_ENV !== 'production') {\n errMsg_1 = 'incomparable must be \"min\" or \"max\" rather than \"' + incomparable + '\".';\n }\n throwError(errMsg_1);\n }\n if (order !== 'asc' && order !== 'desc') {\n var errMsg_2 = '';\n if (process.env.NODE_ENV !== 'production') {\n errMsg_2 = 'order must be \"asc\" or \"desc\" rather than \"' + order + '\".';\n }\n throwError(errMsg_2);\n }\n var dimInfo = upstream.getDimensionInfo(dimLoose);\n if (!dimInfo) {\n if (process.env.NODE_ENV !== 'production') {\n errMsg = makePrintable('Can not find dimension info via: ' + dimLoose + '.\\n', 'Existing dimensions: ', upstream.cloneAllDimensionInfo(), '.\\n', 'Illegal config:', orderExpr, '.\\n');\n }\n throwError(errMsg);\n }\n var parser = parserName ? getRawValueParser(parserName) : null;\n if (parserName && !parser) {\n if (process.env.NODE_ENV !== 'production') {\n errMsg = makePrintable('Invalid parser name ' + parserName + '.\\n', 'Illegal config:', orderExpr, '.\\n');\n }\n throwError(errMsg);\n }\n orderDefList.push({\n dimIdx: dimInfo.index,\n parser: parser,\n comparator: new SortOrderComparator(order, incomparable)\n });\n });\n // TODO: support it?\n var sourceFormat = upstream.sourceFormat;\n if (sourceFormat !== SOURCE_FORMAT_ARRAY_ROWS && sourceFormat !== SOURCE_FORMAT_OBJECT_ROWS) {\n if (process.env.NODE_ENV !== 'production') {\n errMsg = 'sourceFormat \"' + sourceFormat + '\" is not supported yet';\n }\n throwError(errMsg);\n }\n // Other upstream format are all array.\n var resultData = [];\n for (var i = 0, len = upstream.count(); i < len; i++) {\n resultData.push(upstream.getRawDataItem(i));\n }\n resultData.sort(function (item0, item1) {\n for (var i = 0; i < orderDefList.length; i++) {\n var orderDef = orderDefList[i];\n var val0 = upstream.retrieveValueFromItem(item0, orderDef.dimIdx);\n var val1 = upstream.retrieveValueFromItem(item1, orderDef.dimIdx);\n if (orderDef.parser) {\n val0 = orderDef.parser(val0);\n val1 = orderDef.parser(val1);\n }\n var result = orderDef.comparator.evaluate(val0, val1);\n if (result !== 0) {\n return result;\n }\n }\n return 0;\n });\n return {\n data: resultData\n };\n }\n};","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { filterTransform } from './filterTransform.js';\nimport { sortTransform } from './sortTransform.js';\nexport function install(registers) {\n registers.registerTransform(filterTransform);\n registers.registerTransform(sortTransform);\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\n/**\n * This module is imported by echarts directly.\n *\n * Notice:\n * Always keep this file exists for backward compatibility.\n * Because before 4.1.0, dataset is an optional component,\n * some users may import this module manually.\n */\nimport ComponentModel from '../../model/Component.js';\nimport ComponentView from '../../view/Component.js';\nimport { SERIES_LAYOUT_BY_COLUMN } from '../../util/types.js';\nimport { disableTransformOptionMerge, SourceManager } from '../../data/helper/sourceManager.js';\nvar DatasetModel = /** @class */function (_super) {\n __extends(DatasetModel, _super);\n function DatasetModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'dataset';\n return _this;\n }\n DatasetModel.prototype.init = function (option, parentModel, ecModel) {\n _super.prototype.init.call(this, option, parentModel, ecModel);\n this._sourceManager = new SourceManager(this);\n disableTransformOptionMerge(this);\n };\n DatasetModel.prototype.mergeOption = function (newOption, ecModel) {\n _super.prototype.mergeOption.call(this, newOption, ecModel);\n disableTransformOptionMerge(this);\n };\n DatasetModel.prototype.optionUpdated = function () {\n this._sourceManager.dirty();\n };\n DatasetModel.prototype.getSourceManager = function () {\n return this._sourceManager;\n };\n DatasetModel.type = 'dataset';\n DatasetModel.defaultOption = {\n seriesLayoutBy: SERIES_LAYOUT_BY_COLUMN\n };\n return DatasetModel;\n}(ComponentModel);\nexport { DatasetModel };\nvar DatasetView = /** @class */function (_super) {\n __extends(DatasetView, _super);\n function DatasetView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'dataset';\n return _this;\n }\n DatasetView.type = 'dataset';\n return DatasetView;\n}(ComponentView);\nexport function install(registers) {\n registers.registerComponentModel(DatasetModel);\n registers.registerComponentView(DatasetView);\n}","import * as sentry from \"@sentry/angular\";\n\nimport { DatePipe, HashLocationStrategy, LocationStrategy, registerLocaleData } from \"@angular/common\";\nimport { provideHttpClient, withInterceptors } from \"@angular/common/http\";\nimport localeCa from \"@angular/common/locales/ca\";\nimport localeDe from \"@angular/common/locales/de\";\nimport { default as localeEn, default as localeOc } from \"@angular/common/locales/en\";\nimport localeEs from \"@angular/common/locales/es\";\nimport localeFr from \"@angular/common/locales/fr\";\nimport localeIt from \"@angular/common/locales/it\";\nimport { ErrorHandler, importProvidersFrom } from \"@angular/core\";\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\nimport { BrowserModule, bootstrapApplication } from \"@angular/platform-browser\";\nimport { provideAnimations } from \"@angular/platform-browser/animations\";\nimport { provideRouter } from \"@angular/router\";\nimport { TranslateModule, TranslateService } from \"@ngx-translate/core\";\nimport { AlertModule } from \"ngx-bootstrap/alert\";\nimport { CollapseModule } from \"ngx-bootstrap/collapse\";\nimport { BsDropdownModule } from \"ngx-bootstrap/dropdown\";\nimport { ModalModule } from \"ngx-bootstrap/modal\";\nimport { TabsModule } from \"ngx-bootstrap/tabs\";\nimport { provideEchartsCore } from \"ngx-echarts\";\nimport { AppComponent } from \"./app/app.component\";\nimport { DangerSourcesService } from \"./app/danger-sources/danger-sources.service\";\nimport { AuthGuard } from \"./app/guards/auth.guard\";\nimport { GetDustParamService, GetFilenamesService, ParamService, QfaService } from \"./app/modelling/qfa\";\nimport { GeocodingService } from \"./app/observations/geocoding.service\";\nimport { ObservationFilterService } from \"./app/observations/observation-filter.service\";\nimport { ObservationMarkerObserverService } from \"./app/observations/observation-marker-observer.service\";\nimport { ObservationMarkerWeatherStationService } from \"./app/observations/observation-marker-weather-station.service\";\nimport { ObservationMarkerWebcamService } from \"./app/observations/observation-marker-webcam.service\";\nimport { ObservationMarkerService } from \"./app/observations/observation-marker.service\";\nimport { AlbinaObservationsService } from \"./app/observations/observations.service\";\nimport { AuthenticationService } from \"./app/providers/authentication-service/authentication.service\";\nimport { httpHeaders } from \"./app/providers/authentication-service/http-headers\";\nimport { BlogService } from \"./app/providers/blog-service/blog.service\";\nimport { BulletinsService } from \"./app/providers/bulletins-service/bulletins.service\";\nimport { ConfigurationService } from \"./app/providers/configuration-service/configuration.service\";\nimport { ConstantsService } from \"./app/providers/constants-service/constants.service\";\nimport { CopyService } from \"./app/providers/copy-service/copy.service\";\nimport { LocalStorageService } from \"./app/providers/local-storage-service/local-storage.service\";\nimport { BaseMapService } from \"./app/providers/map-service/base-map.service\";\nimport { CoordinateDataService } from \"./app/providers/map-service/coordinate-data.service\";\nimport { ElevationService } from \"./app/providers/map-service/elevation.service\";\nimport { MapService } from \"./app/providers/map-service/map.service\";\nimport { MediaFileService } from \"./app/providers/media-file-service/media-file.service\";\nimport { RegionsService } from \"./app/providers/regions-service/regions.service\";\nimport { StatisticsService } from \"./app/providers/statistics-service/statistics.service\";\nimport { UndoRedoService } from \"./app/providers/undo-redo-service/undo-redo.service\";\nimport { UserService } from \"./app/providers/user-service/user.service\";\nimport { WsBulletinService } from \"./app/providers/ws-bulletin-service/ws-bulletin.service\";\nimport { WsRegionService } from \"./app/providers/ws-region-service/ws-region.service\";\nimport { WsUpdateService } from \"./app/providers/ws-update-service/ws-update.service\";\nimport routes from \"./app/routes\";\nimport { environment } from \"./environments/environment\";\nimport * as echarts from \"echarts/core\";\nimport { CanvasRenderer } from \"echarts/renderers\";\nimport { BarChart, LineChart, ScatterChart } from \"echarts/charts\";\nimport {\n DatasetComponent,\n GridComponent,\n LegendComponent,\n PolarComponent,\n SingleAxisComponent,\n TitleComponent,\n TooltipComponent,\n TransformComponent,\n} from \"echarts/components\";\n\necharts.use([\n BarChart,\n CanvasRenderer,\n DatasetComponent,\n GridComponent,\n LegendComponent,\n LineChart,\n PolarComponent,\n ScatterChart,\n SingleAxisComponent,\n TitleComponent,\n TooltipComponent,\n TransformComponent,\n]);\n\nregisterLocaleData(localeDe, \"de\");\nregisterLocaleData(localeIt, \"it\");\nregisterLocaleData(localeEn, \"en\");\nregisterLocaleData(localeFr, \"fr\");\nregisterLocaleData(localeEs, \"es\");\nregisterLocaleData(localeCa, \"ca\");\nregisterLocaleData(localeOc, \"oc\");\n\nif (environment.sentryDSN) {\n sentry.init({ dsn: environment.sentryDSN });\n}\n\nbootstrapApplication(AppComponent, {\n providers: [\n provideRouter(routes),\n importProvidersFrom(\n BrowserModule,\n BsDropdownModule.forRoot(),\n CollapseModule.forRoot(),\n TabsModule.forRoot(),\n AlertModule.forRoot(),\n FormsModule,\n ReactiveFormsModule,\n ModalModule.forRoot(),\n TranslateModule.forRoot(),\n ),\n {\n provide: LocationStrategy,\n useClass: HashLocationStrategy,\n },\n {\n provide: ErrorHandler,\n useValue: sentry.createErrorHandler({\n logErrors: true,\n showDialog: true,\n }),\n },\n AlbinaObservationsService,\n AuthenticationService,\n AuthGuard,\n BaseMapService,\n BlogService,\n BulletinsService,\n DangerSourcesService,\n StatisticsService,\n RegionsService,\n WsRegionService,\n WsUpdateService,\n WsBulletinService,\n LocalStorageService,\n ConfigurationService,\n ConstantsService,\n CoordinateDataService,\n CopyService,\n DatePipe,\n ElevationService,\n GeocodingService,\n GetDustParamService,\n GetFilenamesService,\n LocalStorageService,\n MapService,\n MediaFileService,\n ObservationFilterService,\n ObservationMarkerService,\n ObservationMarkerObserverService,\n ObservationMarkerWeatherStationService,\n ObservationMarkerWebcamService,\n ParamService,\n provideEchartsCore({ echarts }),\n QfaService,\n RegionsService,\n StatisticsService,\n TranslateService,\n UndoRedoService,\n UserService,\n WsBulletinService,\n WsRegionService,\n WsUpdateService,\n provideHttpClient(withInterceptors([httpHeaders])),\n provideAnimations(),\n ],\n});\n"],"mappings":"+rDAKA,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AAS,eACT,eAAkB,kBAClB,mBAAsB,sBACtB,gBAAmB,uBACnB,OAAU,CACR,OAAU,aACZ,EACA,MAAS,CACP,UAAa,aACb,SAAY,YACd,EACA,aAAgB,CACd,YAAe,WACf,eAAkB,wBACpB,EACA,cAAiB,CACf,YAAe,QACf,eAAkB,wBACpB,EAEA,OAAU,CACR,OAAU,aACV,IAAO,oBACP,SAAY,cACZ,MAAS,WACT,OAAU,WACV,MAAS,YACT,OAAU,CACR,QAAW,eACb,EACA,UAAa,CACX,QAAW,SACb,EACA,UAAa,CACX,QAAW,aACb,EACA,gBAAmB,CACjB,QAAW,uBACb,EACA,qBAAwB,CACtB,QAAW,WACb,EACA,iBAAoB,CAClB,QAAW,mBACb,EACA,cAAiB,CACf,QAAW,oBACb,EACA,KAAQ,CACN,QAAW,KACb,CACF,CACF,EACA,KAAQ,CACN,MAAS,OACT,SAAY,CACV,MAAS,SACT,GAAM,KACN,GAAM,KACN,GAAM,IACR,EACA,IAAO,CACL,QAAW,iDACX,QAAW,wEACX,MAAS,2EACX,EACA,MAAS,CACP,QAAW,gBACX,QAAW,sDACX,MAAS,yDACX,EACA,SAAY,CACV,QAAW,2CACX,QAAW,0CACX,MAAS,6CACX,EACA,KAAQ,CACN,QAAW,0CACX,QAAW,sCACX,MAAS,yCACX,CACF,CACF,EACA,SAAY,CACV,MAAS,kBACT,eAAkB,CAChB,MAAS,yBACT,YAAe,CACb,MAAS,qBACT,YAAe,oBACjB,EACA,aAAgB,CACd,MAAS,mBACT,YAAe,kBACjB,EACA,aAAgB,CACd,MAAS,6BACT,YAAe,kBACjB,EACA,OAAU,yBACV,gBAAmB,uBACnB,oBAAuB,kCACvB,kBAAqB,yCACrB,MAAS,CACP,YAAe,CACb,SAAY,6CACd,EACA,YAAe,CACb,SAAY,4CACZ,SAAY,kCACd,CACF,CACF,EACA,QAAW,CACT,MAAS,cACT,MAAS,CACP,UAAa,gBACb,SAAY,cACd,CACF,CACF,EACA,WAAc,CACZ,MAAS,m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OAAU,SACV,MAAS,QACT,OAAU,CACR,QAAW,YACb,EACA,UAAa,CACX,QAAW,YACb,EACA,UAAa,CACX,QAAW,eACb,EACA,gBAAmB,CACjB,QAAW,iBACb,EACA,qBAAwB,CACtB,QAAW,SACb,EACA,iBAAoB,CAClB,QAAW,gBACb,EACA,cAAiB,CACf,QAAW,gBACb,EACA,KAAQ,CACN,QAAW,aACb,CACF,CACF,EACA,KAAQ,CACN,MAAS,OACT,SAAY,CACV,MAAS,UACT,GAAM,KACN,GAAM,KACN,GAAM,IACR,EACA,IAAO,CACL,QAAW,gEACX,QAAW,qFACX,MAAS,6FACX,EACA,MAAS,CACP,QAAW,oBACX,QAAW,2CACX,MAAS,mDACX,EACA,SAAY,CACV,QAAW,iCACX,QAAW,yDACX,MAAS,iEACX,EACA,KAAQ,CACN,QAAW,+BACX,QAAW,qDACX,MAAS,6DACX,CACF,CACF,EACA,SAAY,CACV,MAAS,gBACT,eAAkB,CAChB,MAAS,qBACT,YAAe,CACb,MAAS,uBACT,YAAe,sBACjB,EACA,aAAgB,CACd,MAAS,iBACT,YAAe,gBACjB,EACA,aAAgB,CACd,MAAS,+BACT,YAAe,gBACjB,EACA,OAAU,qBACV,gBAAmB,mCACnB,oBAAuB,2CACvB,kBAAqB,8BACrB,MAAS,CACP,YAAe,CACb,SAAY,yCACd,EACA,YAAe,CACb,SAAY,mCACZ,SAAY,wCACd,CACF,CACF,EACA,QAAW,CACT,MAAS,UACT,MAAS,CACP,UAAa,iBACb,SAAY,eACd,CACF,CACF,EACA,WAAc,CACZ,MAAS,YACT,OAAU,CACR,OAAU,eACZ,EACA,MAAS,CACP,UAAa,aACb,SAAY,YACZ,WAAc,WAChB,CACF,EAEA,aAAgB,CACd,SAAY,oBACZ,IAAO,SACP,SAAY,cACZ,aAAgB,YAChB,KAAQ,UACR,SAAY,cACd,EACA,iBAAoB,CAClB,QAAW,YACX,SAAY,WACZ,SAAY,cACZ,UAAa,cACb,qBAAwB,YACxB,uBAA0B,YA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ACR,eAAkB,kBAClB,OAAU,aACZ,EACA,MAAS,CACP,KAAQ,OACR,MAAS,QACT,aAAgB,eAChB,QAAW,UACX,MAAS,OACX,EACA,sBAAyB,CACvB,QAAW,kCACX,OAAU,MACV,OAAU,IACZ,EACA,WAAc,CACZ,QAAW,eACX,MAAS,2BACX,EACA,WAAc,CACZ,QAAW,eACX,MAAS,2BACX,EACA,WAAc,CACZ,QAAW,eACX,MAAS,2BACX,CACF,EACA,WAAc,CACZ,MAAS,CACP,MAAS,QACT,KAAQ,OACR,MAAS,QACT,aAAgB,eAChB,SAAY,WACZ,UAAa,kBACb,MAAS,QACT,QAAW,SACb,EACA,MAAS,CACP,KAAQ,CACN,SAAY,qBACd,EACA,MAAS,CACP,SAAY,gCACZ,QAAW,0BACb,EACA,SAAY,CACV,SAAY,0BACZ,OAAU,2CACV,SAAY,wBACd,CACF,EACA,OAAU,CACR,OAAU,cACV,OAAU,cACV,OAAU,QACZ,CACF,EACA,aAAgB,CACd,MAAS,QACT,IAAO,MACP,QAAW,UACX,QAAW,UACX,MAAS,eACT,eAAkB,kBAClB,mBAAsB,sBACtB,gBAAmB,uBACnB,OAAU,CACR,OAAU,UACZ,EACA,MAAS,CACP,UAAa,SACb,SAAY,UACd,EACA,aAAgB,CACd,YAAe,SACf,eAAkB,wBACpB,EACA,cAAiB,CACf,YAAe,UACf,eAAkB,wBACpB,EAEA,OAAU,CACR,OAAU,SACV,IAAO,wBACP,SAAY,WACZ,MAAS,QACT,OAAU,SACV,MAAS,QACT,OAAU,CACR,QAAW,QACb,EACA,UAAa,CACX,QAAW,WACb,EACA,UAAa,CACX,QAAW,WACb,EACA,gBAAmB,CACjB,QAAW,kBACb,EACA,qBAAwB,CACtB,QAAW,WACb,EACA,iBAAoB,CAClB,QAAW,mBACb,EACA,cAAiB,CACf,QAAW,gBACb,EACA,aAAgB,CACd,QAAW,eACb,EACA,KAAQ,CACN,QAAW,KACb,CACF,CACF,EACA,KAAQ,CACN,MAAS,OACT,SAA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X,MAAS,6BACX,EACA,WAAc,CACZ,QAAW,sBACX,MAAS,oCACX,CACF,EACA,WAAc,CACZ,MAAS,CACP,MAAS,QACT,KAAQ,SACR,MAAS,QACT,aAAgB,kBAChB,SAAY,WACZ,UAAa,mBACb,MAAS,QACT,QAAW,UACb,EACA,MAAS,CACP,KAAQ,CACN,SAAY,6BACd,EACA,MAAS,CACP,SAAY,iEACZ,QAAW,yDACb,EACA,SAAY,CACV,SAAY,mCACZ,OAAU,oDACV,SAAY,iCACd,CACF,EACA,OAAU,CACR,OAAU,gBACV,OAAU,qBACV,OAAU,UACZ,CACF,EACA,aAAgB,CACd,MAAS,QACT,IAAO,OACP,QAAW,UACX,QAAW,UACX,MAAS,gBACT,eAAkB,kBAClB,mBAAsB,sBACtB,gBAAmB,uBACnB,OAAU,CACR,OAAU,WACZ,EACA,MAAS,CACP,UAAa,UACb,SAAY,YACd,EACA,aAAgB,CACd,YAAe,YACf,eAAkB,wBACpB,EACA,cAAiB,CACf,YAAe,UACf,eAAkB,wBACpB,EAEA,OAAU,CACR,OAAU,QACV,IAAO,wBACP,SAAY,cACZ,MAAS,WACT,OAAU,WACV,MAAS,cACT,OAAU,CACR,QAAW,gBACb,EACA,UAAa,CACX,QAAW,SACb,EACA,UAAa,CACX,QAAW,aACb,EACA,gBAAmB,CACjB,QAAW,wBACb,EACA,qBAAwB,CACtB,QAAW,WACb,EACA,iBAAoB,CAClB,QAAW,oBACb,EACA,cAAiB,CACf,QAAW,sBACb,EACA,KAAQ,CACN,QAAW,QACb,CACF,CACF,EACA,KAAQ,CACN,MAAS,OACT,SAAY,CACV,MAAS,SACT,GAAM,KACN,GAAM,KACN,GAAM,IACR,EACA,IAAO,CACL,QAAW,kDACX,QAAW,gFACX,MAAS,4EACX,EACA,MAAS,CACP,QAAW,iCACX,QAAW,wDACX,MAAS,6DACX,EACA,SAAY,CACV,QAAW,2CACX,QAAW,+CACX,MAAS,8CACX,EACA,KAAQ,CACN,QAAW,4CACX,QAAW,2C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ACN,SAAY,wBACd,EACA,MAAS,CACP,SAAY,mCACZ,QAAW,uBACb,EACA,SAAY,CACV,SAAY,kCACZ,OAAU,yDACV,SAAY,0CACd,CACF,EACA,OAAU,CACR,OAAU,uBACV,OAAU,iCACV,OAAU,SACZ,CACF,EACA,aAAgB,CACd,MAAS,UACT,IAAO,QACP,QAAW,UACX,QAAW,UACX,MAAS,eACT,eAAkB,0BAClB,mBAAsB,wBACtB,gBAAmB,oCACnB,OAAU,CACR,OAAU,mBACZ,EACA,MAAS,CACP,UAAa,aACb,SAAY,aACd,EACA,aAAgB,CACd,YAAe,4BACf,eAAkB,wCACpB,EACA,cAAiB,CACf,YAAe,UACf,eAAkB,qCACpB,EAEA,OAAU,CACR,OAAU,YACV,IAAO,qBACP,SAAY,aACZ,MAAS,cACT,OAAU,WACV,MAAS,mBACT,OAAU,CACR,QAAW,YACb,EACA,UAAa,CACX,QAAW,UACb,EACA,UAAa,CACX,QAAW,cACb,EACA,gBAAmB,CACjB,QAAW,oBACb,EACA,qBAAwB,CACtB,QAAW,WACb,EACA,iBAAoB,CAClB,QAAW,gCACb,EACA,cAAiB,CACf,QAAW,sBACb,EACA,KAAQ,CACN,QAAW,MACb,CACF,CACF,EACA,KAAQ,CACN,MAAS,OACT,SAAY,CACV,MAAS,SACT,GAAM,KACN,GAAM,KACN,GAAM,IACR,EACA,IAAO,CACL,QAAW,yDACX,QAAW,mEACX,MAAS,wEACX,EACA,MAAS,CACP,QAAW,gBACX,QAAW,2BACX,MAAS,iCACX,EACA,SAAY,CACV,QAAW,gCACX,QAAW,uCACX,MAAS,6CACX,EACA,KAAQ,CACN,QAAW,6BACX,QAAW,wCACX,MAAS,8CACX,CACF,CACF,EACA,SAAY,CACV,MAAS,gBACT,eAAkB,CAChB,MAAS,2BACT,YAAe,CACb,MAAS,sBACT,YAAe,qBACjB,EACA,aAAgB,CACd,MAAS,uBACT,YAAe,sBACjB,EACA,aAAgB,CACd,MAAS,uCACT,YAAe,sBACjB,EACA,O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AW,WACX,QAAW,SACX,MAAS,eACT,eAAkB,qBAClB,mBAAsB,uBACtB,gBAAmB,uCACnB,OAAU,CACR,OAAU,SACZ,EACA,MAAS,CACP,UAAa,UACb,SAAY,aACd,EACA,aAAgB,CACd,YAAe,kBACf,eAAkB,qCACpB,EACA,cAAiB,CACf,YAAe,eACf,eAAkB,6BACpB,EAEA,OAAU,CACR,OAAU,YACV,IAAO,uBACP,SAAY,aACZ,MAAS,gBACT,OAAU,SACV,MAAS,QACT,OAAU,CACR,QAAW,aACb,EACA,UAAa,CACX,QAAW,OACb,EACA,UAAa,CACX,QAAW,cACb,EACA,gBAAmB,CACjB,QAAW,sBACb,EACA,qBAAwB,CACtB,QAAW,YACb,EACA,iBAAoB,CAClB,QAAW,qBACb,EACA,cAAiB,CACf,QAAW,iBACb,EACA,KAAQ,CACN,QAAW,QACb,CACF,CACF,EACA,KAAQ,CACN,MAAS,OACT,SAAY,CACV,MAAS,SACT,GAAM,KACN,GAAM,KACN,GAAM,IACR,EACA,IAAO,CACL,QAAW,+BACX,QAAW,yDACX,MAAS,oEACX,EACA,MAAS,CACP,QAAW,cACX,QAAW,wCACX,MAAS,mDACX,EACA,SAAY,CACV,QAAW,oCACX,QAAW,0CACX,MAAS,iEACX,EACA,KAAQ,CACN,QAAW,+BACX,QAAW,sCACX,MAAS,2DACX,CACF,CACF,EACA,SAAY,CACV,MAAS,eACT,eAAkB,CAChB,MAAS,kBACT,YAAe,CACb,MAAS,mBACT,YAAe,kBACjB,EACA,aAAgB,CACd,MAAS,iBACT,YAAe,gBACjB,EACA,aAAgB,CACd,MAAS,4BACT,YAAe,gBACjB,EACA,OAAU,kBACV,gBAAmB,kCACnB,oBAAuB,gDACvB,kBAAqB,gCACrB,MAAS,CACP,YAAe,CACb,SAAY,2BACd,EACA,YAAe,CACb,SAAY,0BACZ,SAAY,+BACd,CACF,CACF,EACA,QAAW,CACT,MAAS,SACT,MAAS,CACP,UAAa,eACb,SAAY,aACd,CACF,CACF,EACA,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R,OAAU,YACV,IAAO,uBACP,SAAY,cACZ,MAAS,WACT,OAAU,WACV,MAAS,YACT,OAAU,CACR,QAAW,aACb,EACA,UAAa,CACX,QAAW,SACb,EACA,UAAa,CACX,QAAW,aACb,EACA,gBAAmB,CACjB,QAAW,qBACb,EACA,qBAAwB,CACtB,QAAW,WACb,EACA,iBAAoB,CAClB,QAAW,uBACb,EACA,cAAiB,CACf,QAAW,kBACb,EACA,KAAQ,CACN,QAAW,KACb,CACF,CACF,EACA,KAAQ,CACN,MAAS,UACT,SAAY,CACV,MAAS,SACT,GAAM,KACN,GAAM,KACN,GAAM,IACR,EACA,IAAO,CACL,QAAW,iDACX,QAAW,8EACX,MAAS,6EACX,EACA,MAAS,CACP,QAAW,gCACX,QAAW,6DACX,MAAS,4DACX,EACA,SAAY,CACV,QAAW,+BACX,QAAW,8CACX,MAAS,8CACX,EACA,KAAQ,CACN,QAAW,gCACX,QAAW,0CACX,MAAS,0CACX,CACF,CACF,EACA,SAAY,CACV,MAAS,gBACT,eAAkB,CAChB,MAAS,sBACT,YAAe,CACb,MAAS,qBACT,YAAe,oBACjB,EACA,aAAgB,CACd,MAAS,mBACT,YAAe,kBACjB,EACA,aAAgB,CACd,MAAS,6BACT,YAAe,kBACjB,EACA,OAAU,sBACV,gBAAmB,wCACnB,oBAAuB,wCACvB,kBAAqB,0CACrB,MAAS,CACP,YAAe,CACb,SAAY,+CACd,EACA,YAAe,CACb,SAAY,yCACZ,SAAY,qCACd,CACF,CACF,EACA,QAAW,CACT,MAAS,gBACT,MAAS,CACP,UAAa,gBACb,SAAY,cACd,CACF,CACF,EACA,WAAc,CACZ,MAAS,mBACT,OAAU,CACR,OAAU,WACZ,EACA,MAAS,CACP,UAAa,aACb,SAAY,WACZ,WAAc,WAChB,CACF,EAEA,aAAgB,CACd,SAAY,uBACZ,IAAO,WACP,SAAY,UACZ,aAAgB,SAChB,KAAQ,UACR,SAAY,cACd,EACA,iBAAoB,CAClB,QAAW,kBACX,SAAY,kB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ACAC,GACAC,GACAC,GACAC,EAAkB,CACnB,EAEDC,GAAmBC,GAAU,IAAI,EACjCD,GAAmBE,GAAU,IAAI,EACjCF,GAAmBG,GAAU,IAAI,EACjCH,GAAmBI,GAAU,IAAI,EACjCJ,GAAmBK,GAAU,IAAI,EACjCL,GAAmBM,GAAU,IAAI,EACjCN,GAAmBO,GAAU,IAAI,EAE7BC,GAAYC,WACPC,GAAK,CAAEC,IAAKH,GAAYC,SAAS,CAAE,EAG5CG,GAAqBC,GAAc,CACjCC,UAAW,CACTC,GAAcC,EAAM,EACpBC,GACEC,GACAC,GAAiBC,QAAO,EACxBC,GAAeD,QAAO,EACtBE,GAAWF,QAAO,EAClBG,GAAYH,QAAO,EACnBI,GACAC,GACAC,GAAYN,QAAO,EACnBO,GAAgBP,QAAO,CAAE,EAE3B,CACEQ,QAASC,GACTC,SAAUC,IAEZ,CACEH,QAASI,GACTC,SAAiBC,GAAmB,CAClCC,UAAW,GACXC,WAAY,GACb,GAEHC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAT,GACAU,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GAAmB,CAAEC,QAAAA,EAAO,CAAE,EAC9BC,GACAxB,GACAD,GACA0B,GACAC,GACAC,GACAxB,GACAF,GACAC,GACA0B,GAAkBC,GAAiB,CAACC,EAAW,CAAC,CAAC,EACjDC,GAAiB,CAAE,EAEtB","names":["DEBUG_BUILD","GLOBAL_OBJ","DEBUG_BUILD","SDK_VERSION","getMainCarrier","getSentryCarrier","GLOBAL_OBJ","carrier","__SENTRY__","SDK_VERSION","getGlobalSingleton","name","creator","obj","PREFIX","CONSOLE_LEVELS","originalConsoleMethods","consoleSandbox","callback","GLOBAL_OBJ","console","wrappedFuncs","wrappedLevels","level","originalConsoleMethod","makeLogger","enabled","logger","DEBUG_BUILD","name","args","getGlobalSingleton","UNKNOWN_FUNCTION","WEBPACK_ERROR_REGEXP","STRIP_FRAME_REGEXP","createStackParser","parsers","sortedParsers","a","b","p","stack","skipFirstLines","framesToPop","frames","lines","i","line","cleanedLine","parser","frame","stripSentryFramesAndReverse","stackParserFromStackParserOptions","stackParser","localStack","getLastStackFrame","__spreadProps","__spreadValues","arr","defaultFunctionName","getFunctionName","fn","getFramesFromEvent","event","exception","value","handlers","instrumented","addHandler","type","handler","maybeInstrument","type","instrumentFn","instrumented","e","DEBUG_BUILD","logger","triggerHandlers","data","typeHandlers","handlers","handler","getFunctionName","_oldOnErrorHandler","addGlobalErrorInstrumentationHandler","handler","type","addHandler","maybeInstrument","instrumentError","GLOBAL_OBJ","msg","url","line","column","error","triggerHandlers","_oldOnUnhandledRejectionHandler","addGlobalUnhandledRejectionInstrumentationHandler","handler","type","addHandler","maybeInstrument","instrumentUnhandledRejection","GLOBAL_OBJ","e","triggerHandlers","objectToString","isError","wat","isInstanceOf","isBuiltin","className","isErrorEvent","isDOMError","isDOMException","isString","isParameterizedString","isPrimitive","isPlainObject","isEvent","isElement","isRegExp","isThenable","isSyntheticEvent","base","isVueViewModel","WINDOW","GLOBAL_OBJ","DEFAULT_MAX_STRING_LENGTH","htmlTreeAsString","elem","options","currentElem","MAX_TRAVERSE_HEIGHT","out","height","len","separator","sepLength","nextStr","keyAttrs","maxStringLength","_htmlElementAsString","el","keyAttrPairs","keyAttr","keyAttrPair","className","isString","classes","c","allowedAttrs","k","attr","getLocationHref","getComponentName","truncate","str","max","safeJoin","input","delimiter","output","value","isVueViewModel","isMatchingPattern","pattern","requireExactStringMatch","isString","isRegExp","stringMatchesSomePattern","testString","patterns","fill","source","name","replacementFactory","original","wrapped","markFunctionWrapped","DEBUG_BUILD","logger","addNonEnumerableProperty","obj","value","proto","getOriginalFunction","func","convertToPlainObject","isError","__spreadValues","getOwnProperties","isEvent","newObj","serializeEventTarget","isInstanceOf","target","isElement","htmlTreeAsString","extractedProps","property","extractExceptionKeysForMessage","exception","maxLength","keys","firstKey","truncate","includedKeys","serialized","dropUndefinedKeys","inputValue","_dropUndefinedKeys","memoizationMap","isPojo","memoVal","returnValue","key","item","input","isPlainObject","ONE_SECOND_IN_MS","dateTimestampInSeconds","createUnixTimestampInSecondsFunc","performance","GLOBAL_OBJ","approxStartingTimeOrigin","timeOrigin","timestampInSeconds","getCrypto","gbl","GLOBAL_OBJ","uuid4","crypto","getRandomByte","typedArray","c","getFirstException","event","getEventDescription","message","eventId","firstException","addExceptionTypeValue","value","type","exception","values","addExceptionMechanism","newMechanism","defaultMechanism","currentMechanism","__spreadValues","mergedData","checkOrSetAlreadyCaught","exception","isAlreadyCaptured","addNonEnumerableProperty","States","RESOLVED","REJECTED","resolvedSyncPromise","value","SyncPromise","resolve","rejectedSyncPromise","reason","_","reject","_SyncPromise","executor","onfulfilled","onrejected","result","e","val","onfinally","isRejected","cachedHandlers","handler","setResult","state","isThenable","makeSession","context","startingTime","timestampInSeconds","session","uuid4","sessionToJSON","updateSession","duration","closeSession","status","dropUndefinedKeys","generateTraceId","uuid4","generateSpanId","merge","initialObj","mergeObj","levels","output","__spreadValues","key","SCOPE_SPAN_FIELD","_setSpanForScope","scope","span","addNonEnumerableProperty","_getSpanForScope","DEFAULT_MAX_BREADCRUMBS","Scope","_Scope","generateTraceId","newScope","__spreadValues","_setSpanForScope","_getSpanForScope","client","lastEventId","callback","user","updateSession","tags","key","value","__spreadProps","extras","extra","fingerprint","level","name","context","session","captureContext","scopeToMerge","scopeInstance","isPlainObject","contexts","propagationContext","breadcrumb","maxBreadcrumbs","maxCrumbs","mergedBreadcrumb","dateTimestampInSeconds","attachment","newData","merge","exception","hint","eventId","uuid4","logger","syntheticException","message","event","getDefaultCurrentScope","getGlobalSingleton","Scope","getDefaultIsolationScope","AsyncContextStack","scope","isolationScope","assignedScope","Scope","assignedIsolationScope","callback","maybePromiseResult","e","isThenable","res","getAsyncContextStack","registry","getMainCarrier","sentry","getSentryCarrier","getDefaultCurrentScope","getDefaultIsolationScope","withScope","withSetScope","stack","withIsolationScope","getStackAsyncContextStrategy","_isolationScope","getAsyncContextStrategy","carrier","sentry","getSentryCarrier","getStackAsyncContextStrategy","getCurrentScope","carrier","getMainCarrier","getAsyncContextStrategy","getIsolationScope","getGlobalScope","getGlobalSingleton","Scope","withScope","rest","acs","scope","callback","getClient","getCurrentScope","getTraceContextFromScope","scope","propagationContext","traceId","parentSpanId","propagationSpanId","dropUndefinedKeys","generateSpanId","SEMANTIC_ATTRIBUTE_SENTRY_SOURCE","SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE","SEMANTIC_ATTRIBUTE_SENTRY_OP","SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN","SEMANTIC_ATTRIBUTE_PROFILE_ID","SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME","SCOPE_ON_START_SPAN_FIELD","ISOLATION_SCOPE_ON_START_SPAN_FIELD","getCapturedScopesOnSpan","span","SCOPE_ON_START_SPAN_FIELD","ISOLATION_SCOPE_ON_START_SPAN_FIELD","parseSampleRate","sampleRate","rate","SENTRY_BAGGAGE_KEY_PREFIX","SENTRY_BAGGAGE_KEY_PREFIX_REGEX","baggageHeaderToDynamicSamplingContext","baggageHeader","baggageObject","parseBaggageHeader","dynamicSamplingContext","acc","key","value","SENTRY_BAGGAGE_KEY_PREFIX_REGEX","nonPrefixedKey","SENTRY_BAGGAGE_KEY_PREFIX","parseBaggageHeader","baggageHeader","isString","acc","curr","currBaggageObject","baggageHeaderToObject","key","value","baggageEntry","keyOrValue","TRACE_FLAG_SAMPLED","hasShownSpanDropWarning","spanToTraceContext","span","spanId","trace_id","isRemote","parent_span_id","spanToJSON","scope","getCapturedScopesOnSpan","span_id","generateSpanId","dropUndefinedKeys","convertSpanLinksForEnvelope","links","_a","_b","_c","_d","spanId","traceId","traceFlags","restContext","__objRest","attributes","__spreadValues","TRACE_FLAG_SAMPLED","spanTimeInputToSeconds","input","ensureTimestampInSeconds","timestampInSeconds","timestamp","spanToJSON","span","spanIsSentrySpan","span_id","trace_id","spanIsOpenTelemetrySdkTraceBaseSpan","startTime","name","endTime","parentSpanId","status","dropUndefinedKeys","getStatusMessage","SEMANTIC_ATTRIBUTE_SENTRY_OP","SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN","castSpan","spanIsSampled","ROOT_SPAN_FIELD","getRootSpan","span","ROOT_SPAN_FIELD","showSpanDropWarning","hasShownSpanDropWarning","consoleSandbox","hasSpansEnabled","maybeOptions","options","getClient","DEFAULT_ENVIRONMENT","FROZEN_DSC_FIELD","getDynamicSamplingContextFromClient","trace_id","client","options","public_key","dsc","dropUndefinedKeys","DEFAULT_ENVIRONMENT","getDynamicSamplingContextFromScope","scope","propagationContext","getDynamicSamplingContextFromSpan","span","getClient","rootSpan","getRootSpan","rootSpanJson","spanToJSON","rootSpanAttributes","traceState","rootSpanSampleRate","SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE","applyLocalSampleRateToDsc","frozenDsc","FROZEN_DSC_FIELD","traceStateDsc","dscOnTraceState","baggageHeaderToDynamicSamplingContext","source","SEMANTIC_ATTRIBUTE_SENTRY_SOURCE","name","hasSpansEnabled","spanIsSampled","getCapturedScopesOnSpan","DSN_REGEX","isValidProtocol","protocol","dsnToString","dsn","withPassword","host","path","pass","port","projectId","publicKey","dsnFromString","str","match","consoleSandbox","lastPath","split","projectMatch","dsnFromComponents","components","validateDsn","DEBUG_BUILD","component","logger","makeDsn","from","normalize","input","depth","maxProperties","visit","err","normalizeToSize","object","maxSize","normalized","jsonSize","key","value","memo","memoBuilder","memoize","unmemoize","stringified","stringifyValue","remainingDepth","valueWithToJSON","jsonValue","numAdded","visitable","convertToPlainObject","visitKey","visitValue","isVueViewModel","isSyntheticEvent","getFunctionName","objName","getConstructorName","prototype","utf8Length","memoBuilder","inner","memoize","obj","unmemoize","createEnvelope","headers","items","addItemToEnvelope","envelope","newItem","forEachEnvelopeItem","callback","envelopeItems","envelopeItem","envelopeItemType","encodeUTF8","input","carrier","getSentryCarrier","GLOBAL_OBJ","serializeEnvelope","envelope","envHeaders","items","parts","append","next","encodeUTF8","item","itemHeaders","payload","stringifiedPayload","normalize","concatBuffers","buffers","totalLength","acc","buf","merged","offset","buffer","createAttachmentEnvelopeItem","attachment","buffer","encodeUTF8","dropUndefinedKeys","ITEM_TYPE_TO_DATA_CATEGORY_MAP","envelopeItemTypeToDataCategory","type","getSdkMetadataForEnvelopeHeader","metadataOrEvent","name","version","createEventEnvelopeHeaders","event","sdkInfo","tunnel","dsn","dynamicSamplingContext","__spreadValues","dsnToString","enhanceEventWithSdkInfo","event","sdkInfo","createSessionEnvelope","session","dsn","metadata","tunnel","getSdkMetadataForEnvelopeHeader","envelopeHeaders","__spreadValues","dsnToString","envelopeItem","createEnvelope","createEventEnvelope","eventType","createEventEnvelopeHeaders","notifyEventProcessors","processors","event","hint","index","SyncPromise","resolve","reject","processor","result","__spreadValues","DEBUG_BUILD","logger","isThenable","final","parsedStackResults","lastKeysCount","cachedFilenameDebugIds","getFilenameToDebugIdMap","stackParser","debugIdMap","GLOBAL_OBJ","debugIdKeys","acc","stackKey","result","parsedStack","i","filename","debugId","applyScopeDataToEvent","event","data","fingerprint","span","breadcrumbs","sdkProcessingMetadata","applyDataToEvent","applySpanToEvent","applyFingerprintToEvent","applyBreadcrumbsToEvent","applySdkMetadataToEvent","mergeScopeData","mergeData","extra","tags","user","contexts","level","eventProcessors","attachments","propagationContext","transactionName","mergeAndOverwriteScopeData","merge","__spreadValues","prop","mergeVal","cleanedExtra","dropUndefinedKeys","cleanedTags","cleanedUser","cleanedContexts","mergedBreadcrumbs","spanToTraceContext","getDynamicSamplingContextFromSpan","rootSpan","getRootSpan","spanToJSON","prepareEvent","options","event","hint","scope","client","isolationScope","normalizeDepth","normalizeMaxBreadth","prepared","__spreadProps","__spreadValues","uuid4","dateTimestampInSeconds","integrations","i","applyClientOptions","applyIntegrationsMetadata","applyDebugIds","finalScope","getFinalScope","addExceptionMechanism","clientEventProcessors","data","getGlobalScope","isolationData","mergeScopeData","finalScopeData","attachments","applyScopeDataToEvent","eventProcessors","notifyEventProcessors","evt","applyDebugMeta","normalizeEvent","environment","release","dist","maxValueLength","DEFAULT_ENVIRONMENT","truncate","exception","request","stackParser","filenameDebugIdMap","getFilenameToDebugIdMap","frame","images","filename","debug_id","integrationNames","depth","maxBreadth","normalized","b","normalize","span","captureContext","Scope","parseEventHintOrCaptureContext","hintIsScopeOrFunction","hintIsScopeContext","captureContextKeys","key","captureException","exception","hint","getCurrentScope","parseEventHintOrCaptureContext","captureEvent","event","hint","getCurrentScope","setContext","name","context","getIsolationScope","lastEventId","getIsolationScope","startSession","context","isolationScope","getIsolationScope","currentScope","getCurrentScope","userAgent","GLOBAL_OBJ","session","makeSession","__spreadValues","currentSession","updateSession","endSession","closeSession","_sendSessionUpdate","client","getClient","captureSession","end","SENTRY_API_VERSION","getBaseApiEndpoint","dsn","protocol","port","_getIngestEndpoint","_encodedAuth","sdkInfo","params","getEnvelopeEndpointWithUrlEncodedAuth","tunnel","getReportDialogEndpoint","dsnLike","dialogOptions","makeDsn","endpoint","encodedOptions","dsnToString","key","user","installedIntegrations","filterDuplicates","integrations","integrationsByName","currentInstance","name","existingInstance","getIntegrationsToSetup","options","defaultIntegrations","userIntegrations","integration","resolvedUserIntegrations","setupIntegrations","client","integrationIndex","setupIntegration","afterSetupIntegrations","DEBUG_BUILD","logger","callback","event","hint","processor","createClientReportEnvelope","discarded_events","dsn","timestamp","clientReportItem","dateTimestampInSeconds","createEnvelope","SentryError","message","logLevel","getPossibleEventMessages","event","possibleMessages","lastException","convertTransactionEventToSpanJson","event","trace_id","parent_span_id","span_id","status","origin","data","op","dropUndefinedKeys","SEMANTIC_ATTRIBUTE_PROFILE_ID","SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME","convertSpanJsonToTransactionEvent","span","__spreadValues","ALREADY_SEEN_ERROR","MISSING_RELEASE_FOR_SESSION_ERROR","Client","options","makeDsn","DEBUG_BUILD","logger","url","getEnvelopeEndpointWithUrlEncodedAuth","__spreadProps","__spreadValues","exception","hint","scope","eventId","uuid4","checkOrSetAlreadyCaught","hintWithEventId","event","message","level","currentScope","eventMessage","isParameterizedString","promisedEvent","isPrimitive","sdkProcessingMetadata","capturedSpanScope","capturedSpanIsolationScope","session","updateSession","timeout","transport","clientFinished","transportFlushed","resolvedSyncPromise","result","eventProcessor","name","integrationName","integration","isAlreadyInstalled","setupIntegration","afterSetupIntegrations","env","createEventEnvelope","attachment","addItemToEnvelope","createAttachmentEnvelopeItem","promise","sendResponse","clientReleaseOption","clientEnvironmentOption","DEFAULT_ENVIRONMENT","sessionAttrs","createSessionEnvelope","reason","category","count","key","hook","callback","hooks","cbIndex","rest","callbacks","envelope","integrations","setupIntegrations","crashed","errored","exceptions","ex","sessionNonTerminal","SyncPromise","resolve","ticked","tick","interval","isolationScope","prepareEvent","evt","getTraceContextFromScope","dynamicSamplingContext","getDynamicSamplingContextFromScope","getCurrentScope","getIsolationScope","isErrorEvent","getPossibleEventMessages","finalEvent","SentryError","sampleRate","isTransaction","isTransactionEvent","isError","eventType","beforeSendLabel","parsedSampleRate","parseSampleRate","rejectedSyncPromise","dataCategory","prepared","processBeforeSend","_validateBeforeSendResult","processedEvent","spanCount","spanCountBefore","spanCountAfter","droppedSpanCount","transactionInfo","source","value","outcomes","quantity","createClientReportEnvelope","dsnToString","_validateBeforeSendResult","beforeSendResult","beforeSendLabel","invalidValueError","isThenable","event","isPlainObject","SentryError","e","processBeforeSend","client","options","hint","beforeSend","beforeSendTransaction","beforeSendSpan","processedEvent","isErrorEvent","isTransactionEvent","processedRootSpanJson","convertTransactionEventToSpanJson","merge","convertSpanJsonToTransactionEvent","showSpanDropWarning","processedSpans","span","processedSpan","spanCountBefore","__spreadProps","__spreadValues","initAndBind","clientClass","options","DEBUG_BUILD","logger","consoleSandbox","getCurrentScope","client","setCurrentClient","makePromiseBuffer","limit","buffer","isReady","remove","task","add","taskProducer","rejectedSyncPromise","SentryError","drain","timeout","SyncPromise","resolve","reject","counter","capturedSetTimeout","item","resolvedSyncPromise","parseRetryAfterHeader","header","now","headerDelay","headerDate","disabledUntil","limits","dataCategory","isRateLimited","updateRateLimits","statusCode","headers","updatedRateLimits","__spreadValues","rateLimitHeader","retryAfterHeader","limit","retryAfter","categories","namespaces","delay","category","DEFAULT_TRANSPORT_BUFFER_SIZE","createTransport","options","makeRequest","buffer","makePromiseBuffer","rateLimits","flush","timeout","send","envelope","filteredEnvelopeItems","forEachEnvelopeItem","item","type","dataCategory","envelopeItemTypeToDataCategory","isRateLimited","resolvedSyncPromise","filteredEnvelope","createEnvelope","recordEnvelopeLoss","reason","requestTask","serializeEnvelope","response","DEBUG_BUILD","logger","updateRateLimits","error","result","SentryError","addAutoIpAddressToUser","objWithMaybeUser","__spreadProps","__spreadValues","addAutoIpAddressToSession","session","applySdkMetadata","options","name","names","source","metadata","SDK_VERSION","DEFAULT_BREADCRUMBS","addBreadcrumb","breadcrumb","hint","client","getClient","isolationScope","getIsolationScope","beforeBreadcrumb","maxBreadcrumbs","timestamp","dateTimestampInSeconds","mergedBreadcrumb","__spreadValues","finalBreadcrumb","consoleSandbox","originalFunctionToString","INTEGRATION_NAME","SETUP_CLIENTS","_functionToStringIntegration","args","originalFunction","getOriginalFunction","context","getClient","client","functionToStringIntegration","DEFAULT_IGNORE_ERRORS","INTEGRATION_NAME","_eventFiltersIntegration","options","event","_hint","client","clientOptions","mergedOptions","_mergeOptions","_shouldDropEvent","eventFiltersIntegration","inboundFiltersIntegration","__spreadProps","__spreadValues","internalOptions","_isSentryError","DEBUG_BUILD","logger","getEventDescription","_isIgnoredError","_isUselessError","_isIgnoredTransaction","_isDeniedUrl","_getEventFilterUrl","_isAllowedUrl","ignoreErrors","getPossibleEventMessages","message","stringMatchesSomePattern","ignoreTransactions","name","denyUrls","url","allowUrls","_getLastValidUrl","frames","i","frame","value","applyAggregateErrorsToEvent","exceptionFromErrorImplementation","parser","maxValueLimit","key","limit","event","hint","isInstanceOf","originalException","truncateAggregateExceptions","aggregateExceptionsFromError","error","prevExceptions","exception","exceptionId","newExceptions","applyExceptionGroupFieldsForParentException","newException","newExceptionId","applyExceptionGroupFieldsForChildException","childError","i","__spreadProps","__spreadValues","source","parentId","exceptions","maxValueLength","truncate","addConsoleInstrumentationHandler","handler","type","addHandler","maybeInstrument","instrumentConsole","GLOBAL_OBJ","CONSOLE_LEVELS","level","fill","originalConsoleMethod","originalConsoleMethods","args","triggerHandlers","severityLevelFromString","level","INTEGRATION_NAME","_dedupeIntegration","previousEvent","currentEvent","_shouldDropEvent","DEBUG_BUILD","logger","dedupeIntegration","_isSameMessageEvent","_isSameExceptionEvent","currentMessage","previousMessage","_isSameFingerprint","_isSameStacktrace","previousException","_getExceptionFromEvent","currentException","currentFrames","getFramesFromEvent","previousFrames","i","frameA","frameB","currentFingerprint","previousFingerprint","event","parseUrl","url","match","query","fragment","getBreadcrumbLogLevelFromHttpStatusCode","statusCode","WINDOW","GLOBAL_OBJ","supportsHistory","WINDOW","supportsFetch","isNativeFunction","func","supportsNativeFetch","result","doc","sandbox","err","DEBUG_BUILD","logger","addFetchInstrumentationHandler","handler","skipNativeFetchCheck","type","addHandler","maybeInstrument","instrumentFetch","instrumentFetch","onFetchResolved","skipNativeFetchCheck","supportsNativeFetch","fill","GLOBAL_OBJ","originalFetch","args","virtualError","method","url","parseFetchArgs","handlerData","timestampInSeconds","triggerHandlers","__spreadValues","response","__async","__spreadProps","error","isError","addNonEnumerableProperty","hasProp","obj","prop","getUrlFromResource","resource","parseFetchArgs","fetchArgs","url","options","arg","getSDKSource","WINDOW","GLOBAL_OBJ","ignoreOnError","shouldIgnoreOnError","ignoreNextOnError","wrap","fn","options","isFunction","wrapper","getOriginalFunction","sentryWrapped","args","wrappedArguments","arg","ex","withScope","scope","event","addExceptionTypeValue","addExceptionMechanism","__spreadProps","__spreadValues","captureException","property","markFunctionWrapped","addNonEnumerableProperty","exceptionFromError","stackParser","ex","frames","parseStackFrames","exception","extractType","extractMessage","eventFromPlainObject","syntheticException","isUnhandledRejection","normalizeDepth","getClient","errorFromProp","getErrorPropertyFromObject","extra","normalizeToSize","event","isEvent","getNonErrorObjectExceptionValue","eventFromError","stacktrace","skipLines","getSkipFirstStackStringLines","framesToPop","getPopFirstTopFrames","reactMinifiedRegexp","isWebAssemblyException","name","message","eventFromException","hint","attachStacktrace","eventFromUnknownInput","addExceptionMechanism","resolvedSyncPromise","eventFromMessage","level","eventFromString","isErrorEvent","isDOMError","isDOMException","domException","addExceptionTypeValue","__spreadProps","__spreadValues","isError","isPlainObject","isParameterizedString","__sentry_template_string__","__sentry_template_values__","keys","extractExceptionKeysForMessage","captureType","getObjectClassName","obj","prototype","prop","value","BrowserClient","Client","options","opts","__spreadValues","sdkSource","WINDOW","getSDKSource","applySdkMetadata","addAutoIpAddressToUser","addAutoIpAddressToSession","exception","hint","eventFromException","message","level","eventFromMessage","event","currentScope","isolationScope","DEBUG_BUILD","WINDOW","GLOBAL_OBJ","DEBOUNCE_DURATION","debounceTimerID","lastCapturedEventType","lastCapturedEventTargetId","addClickKeypressInstrumentationHandler","handler","type","addHandler","maybeInstrument","instrumentDOM","WINDOW","triggerDOMHandler","triggerHandlers","globalDOMEventHandler","makeDOMEventHandler","target","proto","fill","originalAddEventListener","listener","options","handlers","handlerForType","originalRemoveEventListener","isSimilarToLastCapturedEvent","event","shouldSkipDOMEvent","eventType","globalListener","getEventTarget","addNonEnumerableProperty","uuid4","name","lastHref","addHistoryInstrumentationHandler","handler","type","addHandler","maybeInstrument","instrumentHistory","WINDOW","to","from","triggerHandlers","supportsHistory","historyReplacementFunction","originalHistoryFunction","args","url","fill","cachedImplementations","getNativeImplementation","name","cached","impl","WINDOW","isNativeFunction","document","sandbox","contentWindow","e","DEBUG_BUILD","logger","clearCachedImplementation","SENTRY_XHR_DATA_KEY","addXhrInstrumentationHandler","handler","type","addHandler","maybeInstrument","instrumentXHR","WINDOW","xhrproto","originalOpen","xhrOpenThisArg","xhrOpenArgArray","virtualError","startTimestamp","timestampInSeconds","method","isString","url","parseUrl","onreadystatechangeHandler","xhrInfo","handlerData","triggerHandlers","originalOnreadystatechange","onreadystatechangeThisArg","onreadystatechangeArgArray","originalSetRequestHeader","setRequestHeaderThisArg","setRequestHeaderArgArray","header","value","originalSend","sendThisArg","sendArgArray","sentryXhrData","makeFetchTransport","options","nativeFetch","getNativeImplementation","pendingBodySize","pendingCount","makeRequest","request","requestSize","requestOptions","__spreadValues","clearCachedImplementation","rejectedSyncPromise","response","e","createTransport","CHROME_PRIORITY","GECKO_PRIORITY","createFrame","filename","func","lineno","colno","frame","UNKNOWN_FUNCTION","chromeRegexNoFnName","chromeRegex","chromeEvalRegex","chromeStackParserFn","line","noFnParts","col","parts","subMatch","extractSafariExtensionDetails","chromeStackLineParser","CHROME_PRIORITY","geckoREgex","geckoEvalRegex","gecko","geckoStackLineParser","defaultStackLineParsers","chromeStackLineParser","geckoStackLineParser","defaultStackParser","createStackParser","extractSafariExtensionDetails","func","filename","isSafariExtension","isSafariWebExtension","UNKNOWN_FUNCTION","DEBUG_BUILD","MAX_ALLOWED_STRING_LENGTH","INTEGRATION_NAME","_breadcrumbsIntegration","options","_options","__spreadValues","client","addConsoleInstrumentationHandler","_getConsoleBreadcrumbHandler","addClickKeypressInstrumentationHandler","_getDomBreadcrumbHandler","addXhrInstrumentationHandler","_getXhrBreadcrumbHandler","addFetchInstrumentationHandler","_getFetchBreadcrumbHandler","addHistoryInstrumentationHandler","_getHistoryBreadcrumbHandler","_getSentryBreadcrumbHandler","breadcrumbsIntegration","event","getClient","addBreadcrumb","getEventDescription","dom","handlerData","target","componentName","keyAttrs","maxStringLength","DEBUG_BUILD","logger","element","_isEvent","htmlTreeAsString","getComponentName","breadcrumb","severityLevelFromString","safeJoin","startTimestamp","endTimestamp","sentryXhrData","SENTRY_XHR_DATA_KEY","method","url","status_code","body","data","hint","getBreadcrumbLogLevelFromHttpStatusCode","response","__spreadProps","from","to","parsedLoc","parseUrl","WINDOW","parsedFrom","parsedTo","DEFAULT_EVENT_TARGET","INTEGRATION_NAME","_browserApiErrorsIntegration","options","_options","__spreadValues","fill","WINDOW","_wrapTimeFunction","_wrapRAF","_wrapXHR","eventTargetOption","_wrapEventTarget","browserApiErrorsIntegration","original","args","originalCallback","wrap","getFunctionName","callback","originalSend","xhr","prop","wrapOptions","originalFunction","getOriginalFunction","target","proto","eventName","fn","isEventListenerObject","originalRemoveEventListener","originalEventHandler","obj","browserSessionIntegration","WINDOW","DEBUG_BUILD","logger","startSession","captureSession","addHistoryInstrumentationHandler","from","to","INTEGRATION_NAME","_globalHandlersIntegration","options","_options","__spreadValues","client","_installGlobalOnErrorHandler","globalHandlerLog","_installGlobalOnUnhandledRejectionHandler","globalHandlersIntegration","addGlobalErrorInstrumentationHandler","data","stackParser","attachStacktrace","getOptions","getClient","shouldIgnoreOnError","msg","url","line","column","error","event","_enhanceEventWithInitialFrame","eventFromUnknownInput","captureEvent","addGlobalUnhandledRejectionInstrumentationHandler","_getUnhandledRejectionError","isPrimitive","_eventFromRejectionWithPrimitive","reason","e","ev","ev0","ev0s","ev0sf","colno","lineno","filename","isString","getLocationHref","UNKNOWN_FUNCTION","type","DEBUG_BUILD","logger","httpContextIntegration","event","WINDOW","url","getLocationHref","referrer","userAgent","headers","__spreadValues","request","__spreadProps","DEFAULT_KEY","DEFAULT_LIMIT","INTEGRATION_NAME","_linkedErrorsIntegration","options","limit","key","event","hint","client","applyAggregateErrorsToEvent","exceptionFromError","linkedErrorsIntegration","getDefaultIntegrations","_options","inboundFiltersIntegration","functionToStringIntegration","browserApiErrorsIntegration","breadcrumbsIntegration","globalHandlersIntegration","linkedErrorsIntegration","dedupeIntegration","httpContextIntegration","browserSessionIntegration","applyDefaultOptions","optionsArg","defaultOptions","WINDOW","__spreadValues","dropTopLevelUndefinedKeys","obj","mutatetedObj","k","key","shouldShowBrowserExtensionError","windowWithMaybeExtension","extensionKey","runtimeId","href","getLocationHref","extensionProtocols","isDedicatedExtensionPage","protocol","isNWjs","init","browserOptions","options","DEBUG_BUILD","consoleSandbox","supportsFetch","logger","clientOptions","__spreadProps","stackParserFromStackParserOptions","defaultStackParser","getIntegrationsToSetup","makeFetchTransport","initAndBind","BrowserClient","showReportDialog","scope","getCurrentScope","dsn","eventId","lastEventId","script","getReportDialogEndpoint","onClose","reportDialogClosedMessageHandler","event","injectionPoint","IS_DEBUG_BUILD","getDefaultIntegrations","_options","inboundFiltersIntegration","functionToStringIntegration","breadcrumbsIntegration","globalHandlersIntegration","linkedErrorsIntegration","dedupeIntegration","httpContextIntegration","browserSessionIntegration","init","options","opts","__spreadValues","applySdkMetadata","checkAndSetAngularVersion","angularVersion","VERSION","logger","setContext","isNgZoneEnabled","runOutsideAngular","callback","tryToUnwrapZonejsError","error","extractHttpModuleError","isErrorOrErrorLikeObject","value","candidate","isString","SentryErrorHandler","extractedError","eventId","captureException","consoleSandbox","client","getClient","event","showReportDialog","__spreadProps","defaultExtractor","errorCandidate","HttpErrorResponse","__ngFactoryType__","ɵɵinject","ɵɵdefineInjectable","createErrorHandler","config","plural","val","n","i","v","ca_default","plural","val","n","i","v","de_default","plural","val","n","i","v","en_default","plural","val","n","i","v","e","es_default","plural","val","n","i","v","e","fr_default","plural","val","n","i","v","e","it_default","invalidTimingValue","exp","RuntimeError","negativeStepValue","negativeDelayValue","invalidStyleParams","varName","invalidParamValue","invalidNodeType","nodeType","invalidCssUnitValue","userProvidedProperty","value","invalidTrigger","invalidDefinition","invalidState","metadataName","missingSubs","invalidStyleValue","invalidParallelAnimation","prop","firstStart","firstEnd","secondStart","secondEnd","RuntimeError","invalidKeyframes","invalidOffset","keyframeOffsetsOutOfOrder","keyframesMissingOffsets","invalidStagger","invalidQuery","selector","invalidExpression","expr","invalidTransitionAlias","alias","triggerBuildFailed","name","errors","RuntimeError","animationFailed","registerFailed","missingOrDestroyedAnimation","createAnimationFailed","missingPlayer","id","missingTrigger","phase","missingEvent","unsupportedTriggerEvent","unregisteredTrigger","triggerTransitionsFailed","transitionFailed","name","errors","RuntimeError","optimizeGroupPlayer","players","NoopAnimationPlayer","AnimationGroupPlayer","normalizeKeyframes$1","normalizer","keyframes","preStyles","postStyles","errors","normalizedKeyframes","previousOffset","previousKeyframe","kf","offset","isSameOffset","normalizedKeyframe","val","prop","normalizedProp","normalizedValue","ɵPRE_STYLE","AUTO_STYLE","animationFailed","listenOnPlayer","player","eventName","event","callback","copyAnimationEvent","e","phaseName","totalTime","disabled","makeAnimationEvent","data","element","triggerName","fromState","toState","getOrSetDefaultValue","map","key","defaultValue","value","parseTimelineCommand","command","separatorPos","id","action","documentElement","getParentElement","parent","containsVendorPrefix","_CACHED_BODY","_IS_WEBKIT","validateStyleProperty","getBodyNode","result","getBodyNode","containsElement","elm1","elm2","getParentElement","invokeQuery","element","selector","multi","elem","NoopAnimationDriver","prop","validateStyleProperty","elm1","elm2","containsElement","element","getParentElement","selector","multi","invokeQuery","defaultValue","keyframes","duration","delay","easing","previousPlayers","scrubberAccessRequested","NoopAnimationPlayer","__ngFactoryType__","ɵɵdefineInjectable","AnimationDriver","AnimationStyleNormalizer","ONE_SECOND","SUBSTITUTION_EXPR_START","SUBSTITUTION_EXPR_END","ENTER_CLASSNAME","LEAVE_CLASSNAME","NG_TRIGGER_CLASSNAME","NG_TRIGGER_SELECTOR","NG_ANIMATING_CLASSNAME","NG_ANIMATING_SELECTOR","resolveTimingValue","value","matches","_convertTimeValueToMS","unit","resolveTiming","timings","errors","allowNegativeValues","parseTimeExpression","exp","regex","duration","delay","easing","invalidTimingValue","delayMatch","easingVal","containsErrors","startIndex","negativeStepValue","negativeDelayValue","normalizeKeyframes","keyframes","kf","setStyles","element","styles","formerStyles","val","prop","camelProp","dashCaseToCamelCase","eraseStyles","_","normalizeAnimationEntry","steps","sequence","validateStyleParams","value","options","errors","params","matches","extractStyleParams","varName","invalidStyleParams","PARAM_REGEX","SUBSTITUTION_EXPR_START","SUBSTITUTION_EXPR_END","match","interpolateParams","original","str","localVal","invalidParamValue","DASH_CASE_REGEXP","input","m","allowPreviousPlayerStylesMerge","duration","delay","balancePreviousStylesIntoKeyframes","element","keyframes","previousStyles","startingKeyframe","missingStyleProps","val","prop","i","kf","computeStyle","visitDslNode","visitor","node","context","AnimationMetadataType","invalidNodeType","DIMENSIONAL_PROP_SET","WebAnimationsStyleNormalizer","AnimationStyleNormalizer","propertyName","errors","dashCaseToCamelCase","userProvidedProperty","normalizedProperty","value","unit","strVal","valAndSuffixMatch","invalidCssUnitValue","ANY_STATE","parseTransitionExpr","transitionValue","errors","expressions","str","parseInnerTransitionStr","eventStr","result","parseAnimationAlias","match","invalidExpression","fromState","separator","toState","makeLambdaFromStates","isFullAnyStateExpr","alias","invalidTransitionAlias","TRUE_BOOLEAN_VALUES","FALSE_BOOLEAN_VALUES","lhs","rhs","LHS_MATCH_BOOLEAN","RHS_MATCH_BOOLEAN","lhsMatch","rhsMatch","SELF_TOKEN","SELF_TOKEN_REGEX","buildAnimationAst","driver","metadata","warnings","AnimationAstBuilderVisitor","ROOT_SELECTOR","_driver","context","AnimationAstBuilderContext","visitDslNode","normalizeAnimationEntry","queryCount","depCount","states","transitions","invalidTrigger","def","AnimationMetadataType","stateDef","name","n","transition","invalidDefinition","styleAst","astParams","missingSubs","params","style","value","extractStyleParams","sub","invalidState","animation","matchers","normalizeAnimationOptions","s","currentTime","furthestTime","steps","step","innerAst","timingAst","constructTimingAst","styleMetadata","isEmpty","newStyleData","_styleAst","ast","styles","metadataStyles","styleTuple","AUTO_STYLE","invalidStyleValue","containsDynamicStyles","collectedEasing","styleData","SUBSTITUTION_EXPR_START","timings","endTime","startTime","tuple","prop","collectedStyles","collectedEntry","updateCollectedStyle","invalidParallelAnimation","validateStyleParams","invalidKeyframes","MAX_KEYFRAME_OFFSET","totalKeyframesWithOffsets","offsets","offsetsOutOfOrder","keyframesOutOfRange","previousOffset","keyframes","offsetVal","consumeOffset","offset","invalidOffset","keyframeOffsetsOutOfOrder","length","generatedOffset","keyframesMissingOffsets","limit","currentAnimateTimings","animateDuration","kf","i","durationUpToThisFrame","parentSelector","options","selector","includeSelf","normalizeSelector","getOrSetDefaultValue","invalidStagger","resolveTiming","hasAmpersand","token","NG_TRIGGER_SELECTOR","NG_ANIMATING_SELECTOR","normalizeParams","obj","__spreadValues","duration","makeTimingAst","strValue","v","delay","easing","createTimelineInstruction","element","preStyleProps","postStyleProps","subTimeline","ElementInstructionMap","instructions","existingInstructions","ONE_FRAME_IN_MILLISECONDS","ENTER_TOKEN","ENTER_TOKEN_REGEX","LEAVE_TOKEN","LEAVE_TOKEN_REGEX","buildAnimationTimelines","rootElement","enterClassName","leaveClassName","startingStyles","finalStyles","subInstructions","AnimationTimelineBuilderVisitor","AnimationTimelineContext","resolveTimingValue","timelines","timeline","lastRootTimeline","elementInstructions","innerContext","animationsRefsOptions","animationRefOptions","animationDelay","animationDelayValue","interpolateParams","instruction","instructionTimings","subContextCount","ctx","DEFAULT_NOOP_PREVIOUS_NODE","innerTimelines","timingValue","innerTimeline","elms","sameElementTimeline","parentContext","tl","maxTime","startingTime","_AnimationTimelineContext","_enterClassName","_leaveClassName","initialTimeline","TimelineBuilder","skipIfExists","newOptions","optionsToUpdate","newParams","paramsToUpdate","oldParams","newTime","target","updatedTimings","builder","SubTimelineBuilder","time","originalSelector","optional","results","multi","elements","invalidQuery","_TimelineBuilder","_elementTimelineStylesLookup","hasPreStyleStep","input","flattenStyles","val","properties","details1","details0","finalKeyframes","keyframe","finalKeyframe","ɵPRE_STYLE","preProps","postProps","kf0","kf1","_stretchStartingKeyframe","newKeyframes","totalTime","startingGap","newFirstKeyframe","oldFirstKeyframe","roundOffset","oldOffset","timeAtKeyframe","decimalPoints","mult","allStyles","allProperties","createTransitionInstruction","triggerName","isRemovalTransition","fromStyles","toStyles","queriedElements","EMPTY_OBJECT","AnimationTransitionFactory","_triggerName","_stateStyles","currentState","nextState","oneOrMoreTransitionsMatch","stateName","styler","currentOptions","nextOptions","skipAstBuild","transitionAnimationParams","currentAnimationParams","currentStateStyles","nextAnimationParams","nextStateStyles","preStyleMap","postStyleMap","isRemoval","animationOptions","applyParamDefaults","elm","oneOrMoreTransitionsMatch","matchFns","currentState","nextState","element","params","fn","applyParamDefaults","userParams","defaults","result","__spreadValues","key","value","AnimationStateStyles","styles","defaultParams","normalizer","errors","finalStyles","combinedParams","val","prop","interpolateParams","normalizedProp","buildTrigger","name","ast","AnimationTrigger","_normalizer","balanceProperties","AnimationTransitionFactory","createFallbackTransition","f","triggerName","states","matchers","fromState","toState","animation","AnimationMetadataType","transition","stateMap","key1","key2","EMPTY_INSTRUCTION_MAP","ElementInstructionMap","TimelineAnimationEngine","bodyNode","_driver","id","metadata","warnings","buildAnimationAst","registerFailed","i","preStyles","postStyles","keyframes","normalizeKeyframes$1","options","instructions","autoStylesMap","buildAnimationTimelines","ENTER_CLASSNAME","LEAVE_CLASSNAME","inst","getOrSetDefaultValue","missingOrDestroyedAnimation","createAnimationFailed","_","AUTO_STYLE","players","player","optimizeGroupPlayer","index","missingPlayer","eventName","callback","baseEvent","makeAnimationEvent","listenOnPlayer","command","args","QUEUED_CLASSNAME","QUEUED_SELECTOR","DISABLED_CLASSNAME","DISABLED_SELECTOR","STAR_CLASSNAME","STAR_SELECTOR","EMPTY_PLAYER_ARRAY","NULL_REMOVAL_STATE","NULL_REMOVED_QUERIED_STATE","REMOVAL_FLAG","StateValue","input","namespaceId","isObj","normalizeTriggerValue","_a","__objRest","newParams","oldParams","VOID_VALUE","DEFAULT_STATE_VALUE","AnimationTransitionNamespace","hostElement","_engine","addClass","phase","missingTrigger","missingEvent","isTriggerEventValid","unsupportedTriggerEvent","listeners","data","triggersWithStates","NG_TRIGGER_CLASSNAME","trigger","unregisteredTrigger","defaultToFallback","TransitionAnimationPlayer","objEquals","fromStyles","toStyles","eraseStyles","setStyles","playersOnElement","isFallbackTransition","removeClass","entry","elementPlayers","rootElement","context","elements","NG_TRIGGER_SELECTOR","elm","namespaces","ns","destroyAfterComplete","triggerStates","previousTriggersValues","state","elementStates","visitedTriggers","listener","engine","containsPotentialParentTransition","currentPlayers","parent","removalFlag","microtaskId","a","b","d0","d1","p","TransitionAnimationEngine","driver","namespaceList","namespacesByHostElement","found","ancestor","ancestorNs","stateValue","isElementNode","insertBefore","details","hostNS","hasAnimation","subTimelines","enterClassName","leaveClassName","skipBuildAst","containerElement","NG_ANIMATING_SELECTOR","resolve","node","cleanupFns","quietFns","triggerTransitionsFailed","skippedPlayers","skippedPlayersMap","queuedInstructions","queriedElements","allPreStyleElements","allPostStyleElements","disabledElementsSet","nodesThatAreDisabled","allTriggerElements","enterNodeMap","buildRootMap","enterNodeMapIds","nodes","root","className","allLeaveNodes","mergedLeaveNodes","leaveNodesWithoutAnimations","leaveNodeMapIds","leaveNodeMap","allPlayers","erroneousTransitions","previousValue","nodeIsOrphaned","instruction","timelines","tl","tuple","stringMap","setVal","transitionFailed","allPreviousPlayersMap","animationElementMap","prevPlayer","replaceNodes","replacePostStylesAsPre","postStylesMap","cloakAndComputeStyles","preStylesMap","ɵPRE_STYLE","post","pre","rootPlayers","subPlayers","NO_PARENT_ANIMATION_ELEMENT_DETECTED","parentWithAnimation","parentsToAdd","detectedParent","innerPlayer","parentPlayers","playersForElement","queriedPlayerResults","queriedInnerElements","j","queriedPlayers","activePlayers","removeNodesAfterAnimationDone","isQueriedElement","toStateValue","queriedElementPlayers","isRemovalAnimation","targetNameSpaceId","targetTriggerName","timelineInstruction","realPlayer","allQueriedPlayers","allConsumedElements","allSubElements","allNewPlayers","NoopAnimationPlayer","previousPlayers","flattenGroupPlayers","pp","wrappedPlayer","deleteOrUnsetInMap","NG_ANIMATING_CLASSNAME","callbacks","totalTime","phaseName","map","currentValues","cloakElement","oldValue","valuesMap","elementPropsMap","defaultStyle","cloakVals","failedElements","props","roots","rootMap","NULL_NODE","nodeSet","localRootMap","getRoot","finalPlayers","_flattenGroupPlayersRecur","AnimationGroupPlayer","k1","k2","postEntry","preEntry","AnimationEngine","doc","componentId","cacheKey","triggerBuildFailed","disable","property","action","parseTimelineCommand","eventPhase","cb","packageNonAnimatableStyles","startStyles","endStyles","filterNonAnimatableStyles","SpecialCasedStyles","_element","_startStyles","_endStyles","initialStyles","isNonAnimatableStyle","WebAnimationsPlayer","_specialStyles","onFinish","kfs","frame","computeStyle","methods","WebAnimationsDriver","elm1","elm2","containsElement","getParentElement","selector","multi","invokeQuery","defaultValue","duration","delay","easing","fill","playerOptions","previousStyles","previousWebAnimationPlayers","allowPreviousPlayerStylesMerge","_keyframes","normalizeKeyframes","balancePreviousStylesIntoKeyframes","specialStyles","ANIMATION_PREFIX","DISABLE_ANIMATIONS_FLAG","BaseAnimationRenderer","namespaceId","delegate","engine","_onDestroy","node","name","namespace","value","parent","newChild","refChild","isMove","oldChild","isHostElement","selectorOrNode","preserveContent","el","style","flags","target","eventName","callback","options","element","AnimationRenderer","factory","onDestroy","resolveElementFromTarget","phase","parseTriggerCallbackName","event","countId","triggerName","dotIndex","trigger","AnimationRendererFactory","_zone","hostElement","type","EMPTY_NAMESPACE_ID","cache","renderer","onRendererDestroy","componentId","registerTrigger","count","fn","data","animationCallbacksBuffer","tuple","InjectableAnimationEngine","AnimationEngine","doc","driver","normalizer","__ngFactoryType__","ɵɵinject","DOCUMENT","AnimationDriver","AnimationStyleNormalizer","ɵɵdefineInjectable","instantiateDefaultStyleNormalizer","WebAnimationsStyleNormalizer","instantiateRendererFactory","renderer","engine","zone","AnimationRendererFactory","SHARED_ANIMATION_PROVIDERS","RendererFactory2","DomRendererFactory2","NgZone","BROWSER_NOOP_ANIMATIONS_PROVIDERS","NoopAnimationDriver","ANIMATION_MODULE_TYPE","BROWSER_ANIMATIONS_PROVIDERS","WebAnimationsDriver","provideAnimations","performanceMarkFeature","BROWSER_ANIMATIONS_PROVIDERS","ca_default","de_default","en_default","es_default","fr_default","it_default","oc_default","AppComponent","constructor","translateService","inject","TranslateService","localStorageService","LocalStorageService","addLangs","setTranslation","de","it","en","fr","es","ca","oc","setDefaultLang","lang","getLanguage","navigator","language","split","setLanguage","document","getElementById","setAttribute","environment","faviconPath","selectors","decls","vars","template","rf","ctx","ɵɵelement","RouterOutlet","encapsulation","httpHeaders","req","next","authenticationService","inject","AuthenticationService","constantsService","ConstantsService","setHeaders","headers","has","method","body","FormData","isUserLoggedIn","url","startsWith","getServerUrl","currentAuthor","accessToken","window","location","origin","includes","release","clone","WsRegionService","connect","url","subject","create","console","debug","ws","WebSocket","observable","Observable","obs","onmessage","next","bind","onerror","error","onclose","complete","close","observer","data","readyState","OPEN","send","JSON","stringify","Subject","disconnect","unsubscribe","factory","ɵfac","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵadvance","ɵɵproperty","ɵɵpureFunction0","_c1","ɵɵtextInterpolate1","ɵɵpipeBind1","_c2","_c3","_c4","_c5","_c6","_c7","ɵɵelement","ɵɵpropertyInterpolate","ctx_r1","localStorageService","trainingTimestamp","ɵɵlistener","lang_r4","ɵɵrestoreView","_r3","$implicit","ɵɵnextContext","ɵɵresetView","setLanguage","ɵɵtemplate","FullLayoutComponent_nav_0_ul_23_li_5_i_4_Template","i_r5","undefined","ɵɵpureFunction1","_c8","_c9","translateService","currentLang","FullLayoutComponent_nav_0_ul_23_li_5_Template","ɵɵtextInterpolate","langs","authenticationService","getUserImageSanitized","getCurrentAuthor","image","ɵɵsanitizeUrl","region_r8","_r7","changeRegion","FullLayoutComponent_nav_0_ul_28_li_5_i_4_Template","i_r9","regionsService","getRegionName","id","getActiveRegionId","_c12","_c13","FullLayoutComponent_nav_0_ul_28_li_5_Template","FullLayoutComponent_nav_0_ul_28_a_16_Template","FullLayoutComponent_nav_0_ul_28_a_23_Template","_r6","logout","getCurrentAuthorRegions","_c10","isCurrentUserInRole","constantsService","roleForecaster","_c11","roleAdmin","_r1","toggleSidebar","FullLayoutComponent_nav_0_li_8_Template","FullLayoutComponent_nav_0_li_9_Template","FullLayoutComponent_nav_0_li_10_Template","FullLayoutComponent_nav_0_li_11_Template","FullLayoutComponent_nav_0_li_12_Template","FullLayoutComponent_nav_0_li_13_Template","FullLayoutComponent_nav_0_li_14_Template","focusMap","FullLayoutComponent_nav_0_li_19_Template","FullLayoutComponent_nav_0_ul_23_Template","FullLayoutComponent_nav_0_img_26_Template","FullLayoutComponent_nav_0_ul_28_Template","ɵɵstyleMap","getStyle","environment","logoPath","isUserLoggedIn","tmp_5_0","getActiveRegion","enableDangerSources","tmp_6_0","enableObservations","tmp_7_0","enableModelling","tmp_8_0","tmp_9_0","tmp_10_0","enableWeatherbox","isTrainingEnabled","getUsername","_r10","changeRegionModalConfirm","changeRegionModalDecline","FullLayoutComponent","constructor","inject","TranslateService","AuthenticationService","bulletinsService","BulletinsService","RegionsService","ConstantsService","router","Router","LocalStorageService","modalService","BsModalService","sanitizer","DomSanitizer","isSidebarOpen","changeRegionTemplate","viewChild","config","animated","keyboard","class","isNavbarShown","url","startsWith","style","headerBgColor","bypassSecurityTrustStyle","region","getIsEditable","tmpRegion","openChangeRegionModal","change","template","changeRegionModalRef","show","hide","mapElement","document","getElementById","focus","setActiveRegion","loadStatus","navigate","selectors","viewQuery","rf","ctx","FullLayoutComponent_nav_0_Template","FullLayoutComponent_li_4_Template","FullLayoutComponent_li_5_Template","FullLayoutComponent_li_6_Template","FullLayoutComponent_li_7_Template","FullLayoutComponent_li_8_Template","FullLayoutComponent_li_9_Template","FullLayoutComponent_li_10_Template","FullLayoutComponent_ng_template_14_Template","ɵɵtemplateRefExtractor","ɵɵclassProp","tmp_4_0","NgIf","RouterLinkActive","RouterLink","BsDropdownModule","BsDropdownMenuDirective","BsDropdownToggleDirective","BsDropdownDirective","NgFor","RouterOutlet","TranslateModule","TranslatePipe","NgxMousetrapDirective","encapsulation","SimpleLayoutComponent","selectors","decls","vars","template","rf","ctx","ɵɵelement","RouterOutlet","encapsulation","routes_default","path","redirectTo","pathMatch","component","FullLayoutComponent","canActivate","AuthGuard","runGuardsAndResolvers","loadChildren","SimpleLayoutComponent","data","title","children","core_exports","__export","Axis_default","Chart_default","Component_default","SeriesData_default","Model_default","PRIORITY","Series_default","color_exports","connect","dataTool","dependencies","disConnect","disconnect","dispose","env_default","extendChartView","extendComponentModel","extendComponentView","extendSeriesModel","format_exports","getCoordinateSystemDimensions","getInstanceByDom","getInstanceById","getMap","graphic_exports","helper_exports","init","brushSingle","matrix_exports","number_exports","parseGeoJSON","registerAction","registerCoordinateSystem","registerLayout","registerLoading","registerLocale","registerMap","registerPostInit","registerPostUpdate","registerPreprocessor","registerProcessor","registerTheme","registerTransform","registerUpdateLifecycle","registerVisual","setCanvasCreator","setPlatformAPI","throttle","time_exports","use","util_exports","vector_exports","version","zrender_exports","extendStatics","d","b","p","__extends","__","zrender_exports","__export","dispose","disposeAll","getElementSSRData","getInstance","init","registerPainter","registerSSRDataGetter","version","Browser","Env","env","detect","ua","browser","firefox","ie","edge","weChat","style","env_default","util_exports","__export","HashMap","RADIAN_TO_DEGREE","assert","bind","clone","concatArray","createCanvas","createHashMap","createObject","curry","defaults","disableUserSelect","each","eqNaN","extend","filter","find","guid","hasOwn","indexOf","inherits","isArray","isArrayLike","isBuiltInObject","isDom","isFunction","isGradientObject","isImagePatternObject","isNumber","isObject","isPrimitive","isRegExp","isString","isStringSafe","isTypedArray","keys","logError","map","merge","mergeAll","mixin","noop","normalizeCssArray","reduce","retrieve","retrieve2","retrieve3","setAsPrimitive","slice","trim","DEFAULT_FONT_SIZE","DEFAULT_FONT_FAMILY","DEFAULT_FONT","OFFSET","SCALE","defaultWidthMapStr","getTextWidthMap","mapStr","map","i","char","size","DEFAULT_TEXT_WIDTH_MAP","platformApi","_ctx","_cachedFont","text","font","canvas","res","fontSize","width","preCalcWidth","src","onload","onerror","image","setPlatformAPI","newPlatformApis","key","BUILTIN_OBJECT","reduce","obj","val","TYPED_ARRAY","objToString","arrayProto","nativeForEach","nativeFilter","nativeSlice","nativeMap","ctorFunction","protoFunction","protoKey","idStart","guid","logError","args","_i","clone","source","result","typeStr","isPrimitive","len","Ctor","isDom","key","merge","target","overwrite","isObject","targetProp","sourceProp","isArray","isBuiltInObject","mergeAll","targetAndSources","extend","defaults","overlay","keysArr","keys","i","createCanvas","platformApi","indexOf","array","value","inherits","clazz","baseClazz","clazzPrototype","F","prop","mixin","override","keyList","isArrayLike","data","each","arr","cb","context","map","slice","memo","filter","find","bindPolyfill","func","bind","isFunction","curry","isArray","value","objToString","isFunction","isString","isStringSafe","isNumber","isObject","type","isBuiltInObject","BUILTIN_OBJECT","isTypedArray","TYPED_ARRAY","isDom","isGradientObject","isImagePatternObject","isRegExp","eqNaN","retrieve","args","_i","i","len","retrieve2","value0","value1","retrieve3","value2","slice","arr","nativeSlice","normalizeCssArray","val","assert","condition","message","trim","str","primitiveKey","setAsPrimitive","obj","isPrimitive","MapPolyfill","key","existed","keys","callback","data","isNativeMapSupported","maybeNativeMap","HashMap","isArr","thisMap","visit","each","cb","context","createHashMap","obj","HashMap","concatArray","a","b","newArray","offset","createObject","proto","properties","StyleCtor","extend","disableUserSelect","dom","domStyle","hasOwn","own","prop","noop","RADIAN_TO_DEGREE","extendStatics","d","b","p","__extends","__","vector_exports","__export","add","applyTransform","clone","copy","create","dist","distSquare","distance","distanceSquare","div","dot","len","lenSquare","length","lengthSquare","lerp","max","min","mul","negate","normalize","scale","scaleAndAdd","set","sub","x","y","out","v","a","b","v1","v2","s","d","t","m","Param","target","e","Draggable","handler","draggingTarget","x","y","dx","dy","dropTarget","lastDropTarget","Draggable_default","Eventful","eventProcessors","event","query","handler","context","_h","eventProcessor","i","wrap","lastIndex","lastWrap","eventName","eventType","newList","l","args","_i","argLen","len","hItem","type","ctx","Eventful_default","LN2","determinant","rows","rank","rowStart","rowMask","colMask","detCache","cacheKey","fullRank","colStart","subRowMask","subRowStart","sum","j","colLocalIdx","colTag","buildTransformer","src","dest","mA","det","vh","i","out","srcPointX","srcPointY","pk","EVENT_SAVED_PROP","_calcOut","transformLocalCoord","out","elFrom","elTarget","inX","inY","transformCoordWithViewport","el","inverse","env_default","isCanvasEl","saved","markers","prepareCoordMarkers","transformer","preparePointerTransformer","propLR","propTB","i","marker","stl","idxLR","idxTB","transformerName","oldSrcCoords","srcCoords","destCoords","oldCoordTheSame","rect","ii","x","y","buildTransformer","replaceReg","replaceMap","encodeHTML","source","str","c","MOUSE_EVENT_REG","_calcOut","firefoxNotSupportOffsetXY","env_default","clientToLocal","el","out","calculate","calculateZrXY","ex","ey","isCanvasEl","box","transformCoordWithViewport","getNativeEvent","e","normalizeEvent","eventType","isTouch","touch","wheelDelta","getWheelDeltaMayPolyfill","button","rawWheelDelta","deltaX","deltaY","delta","sign","addEventListener","name","handler","opt","removeEventListener","stop","GestureMgr","event","target","root","touches","trackItem","i","len","touch","pos","clientToLocal","eventName","recognizers","gestureInfo","dist","pointPair","dx","dy","center","recognizers","tracks","event","trackLen","pinchEnd","pinchPre","pinchScale","pinchCenter","matrix_exports","__export","clone","copy","create","identity","invert","mul","rotate","scale","translate","out","m","m1","m2","out0","out1","out2","out3","out4","out5","a","v","rad","pivot","aa","ac","atx","ab","ad","aty","st","ct","vx","vy","det","b","Point","x","y","other","scalar","len","dx","dy","m","out","input","p","p2","p0","p1","t","onet","Point_default","mathMin","mathMax","lt","Point_default","rb","lb","rt","minTv","maxTv","BoundingRect","x","y","width","height","other","m","b","a","sx","sy","create","translate","scale","mtv","ax0","ax1","ay0","ay1","bx0","bx1","by0","by1","overlap","dMin","dMax","d0","d1","d2","d3","dx","dy","rect","target","source","tx","ty","maxX","maxY","BoundingRect_default","SILENT","makeEventPacket","eveType","targetInfo","event","stopEvent","stop","EmptyProxy","_super","__extends","_this","Eventful_default","HoveredResult","x","y","handlerNames","tmpRect","BoundingRect_default","Handler","storage","painter","proxy","painterRoot","pointerSize","Draggable_default","each","name","isOutside","isOutsideBoundary","lastHovered","lastHoveredTarget","hovered","hoveredTarget","eventControl","eventName","eventArgs","handler","cursorStyle","el","eventKey","eventPacket","layer","exclude","list","out","setHoverTarget","candidates","targetSizeHalf","pointerRect","i","rStep","thetaStep","PI2","r","theta","x1","y1","stage","GestureMgr","gestureMgr","gestureInfo","type","res","dist","isHover","displayable","isSilent","ignoreClip","clipPath","hostEl","hoverCheckResult","handlerInstance","Handler_default","DEFAULT_MIN_MERGE","DEFAULT_MIN_GALLOPING","minRunLength","n","r","makeAscendingRun","array","lo","hi","compare","runHi","reverseRun","t","binaryInsertionSort","start","pivot","left","right","mid","gallopLeft","value","length","hint","lastOffset","maxOffset","offset","tmp","m","gallopRight","TimSort","minGallop","runStart","runLength","stackSize","pushRun","_runStart","_runLength","mergeRuns","mergeAt","forceMergeRuns","i","start1","length1","start2","length2","k","mergeLow","mergeHigh","cursor1","cursor2","dest","_minGallop","count1","count2","exit","customCursor","customDest","sort","remaining","ts","minRun","force","REDRAW_BIT","STYLE_CHANGED_BIT","SHAPE_CHANGED_BIT","invalidZErrorLogged","logInvalidZError","shapeCompareFunc","a","b","Storage","cb","context","update","includeIgnore","displayList","roots","i","len","sort","el","clipPaths","userSetClipPath","currentClipPath","parentClipPath","children","child","REDRAW_BIT","disp","decalEl","textGuide","textEl","l","idx","indexOf","Storage_default","requestAnimationFrame","env_default","func","requestAnimationFrame_default","easingFuncs","k","s","a","p","easing_default","mathPow","mathSqrt","EPSILON","EPSILON_NUMERIC","THREE_SQRT","ONE_THIRD","_v0","create","_v1","_v2","isAroundZero","val","isNotAroundZero","cubicAt","p0","p1","p2","p3","t","onet","cubicDerivativeAt","cubicRootAt","roots","a","b","c","d","A","B","C","n","t1","disc","K","t2","discSqrt","Y1","Y2","T","theta","ASqrt","tmp","t3","cubicExtrema","extrema","cubicSubdivide","out","p01","p12","p23","p012","p123","p0123","cubicProjectPoint","x0","y0","x1","y1","x2","y2","x3","y3","x","y","interval","prev","next","d1","d2","_t","distSquare","i","cubicLength","iteration","px","py","step","dx","dy","quadraticAt","quadraticDerivativeAt","quadraticRootAt","quadraticExtremum","divider","quadraticSubdivide","quadraticProjectPoint","quadraticLength","regexp","createCubicEasingFunc","cubicEasingStr","cubic","points","a_1","trim","b_1","c_1","d_1","roots_1","p","cubicRootAt","cubicAt","Clip","opts","noop","globalTime","deltaTime","life","elapsedTime","percent","easingFunc","schedule","remainder","easing","isFunction","easing_default","createCubicEasingFunc","Clip_default","color_exports","__export","fastLerp","fastMapToColor","lerp","lift","liftColor","lum","mapToColor","modifyAlpha","modifyHSL","parse","random","stringify","toHex","Entry","val","LinkedList","val","entry","Entry","prev","next","LRU","maxSize","LinkedList","key","value","list","map","removed","len","entry","leastUsedEntry","Entry","LRU_default","kCSSColorTable","clampCssByte","i","clampCssAngle","clampCssFloat","f","parseCssInt","val","str","parseCssFloat","cssHueToRgb","m1","m2","h","lerpNumber","a","b","p","setRgba","out","r","g","copyRgba","colorCache","LRU_default","lastRemovedArr","putToCache","colorStr","rgbaArr","parse","cached","strLen","iv","op","ep","fname","params","alpha","hsla2rgba","hsla","rgba","s","l","rgba2hsla","R","G","B","vMin","vMax","delta","L","H","S","deltaR","deltaG","deltaB","lift","color","level","colorArr","stringify","toHex","fastLerp","normalizedValue","colors","value","leftIndex","rightIndex","leftColor","rightColor","dv","fastMapToColor","lerp","fullOutput","mapToColor","modifyHSL","modifyAlpha","arrColor","type","lum","backgroundLum","arr","random","liftedColorCache","liftColor","isString","liftedColor","isGradientObject","ret","extend","map","stop","isLinearGradient","val","isRadialGradient","encodeBase64","env_default","isFunction","str","arraySlice","interpolateNumber","p0","p1","percent","interpolate1DArray","out","len","i","interpolate2DArray","len2","j","add1DArray","sign","add2DArray","fillColorStops","val0","val1","len0","len1","shorterArr","shorterLen","last","fillArray","arrDim","arr0","arr1","arr0Len","arr1Len","isPreviousLarger","cloneValue","value","isArrayLike","ret","rgba2String","rgba","guessArrayDim","VALUE_TYPE_NUMBER","VALUE_TYPE_1D_ARRAY","VALUE_TYPE_2D_ARRAY","VALUE_TYPE_COLOR","VALUE_TYPE_LINEAR_GRADIENT","VALUE_TYPE_RADIAL_GRADIENT","VALUE_TYPE_UNKOWN","isGradientValueType","valType","isArrayValueType","tmpRgba","Track","propName","time","rawValue","easing","keyframes","discrete","arrayDim","isNumber","eqNaN","isString","colorArray","parse","isGradientObject","parsedGradient","extend","map","colorStop","isLinearGradient","isRadialGradient","kf","isFunction","easing_default","createCubicEasingFunc","maxTime","additiveTrack","kfs","a","b","kfsLen","lastKf","isDiscrete","isArr","isGradient","lastValue","startValue","target","isAdditive","valueKey","kfsNum","isValueColor","frameIdx","lastFrame","mathMin","frame","nextFrame","start","interval","w","targetArr","val","nextVal_1","isLinearGradient_1","idx","nextColorStop","additiveValue","Animator","loop","allowDiscreteAnimation","additiveTo","logError","props","keys","propNames","tracks","track","initialValue","addtiveTrackKfs","lastFinalKf","duration","doneList","animation","abortedList","tracksKeys","trackName","additiveAnimators","self","clip","Clip_default","stillHasAdditiveAnimator","onframeList","forwardToLast","cb","_this","key","allAborted","trackKeys","firstOrLast","finalProps","Animator_default","getTime","Animation","_super","__extends","opts","_this","clip","animator","prev","next","notTriggerFrameAndStageUpdate","time","delta","nextClip","finished","self","step","requestAnimationFrame_default","target","options","Animator_default","Eventful_default","Animation_default","TOUCH_CLICK_DELAY","globalEventSupported","env_default","localNativeListenerNames","mouseHandlerNames","touchHandlerNames","pointerEventNameMap","pointerHandlerNames","map","name","nm","globalNativeListenerNames","wheelEventSupported","isPointerFromTouch","event","pointerType","setTouchTimer","scope","markTouch","normalizeGlobalEvent","instance","normalizeEvent","FakeGlobalEvent","isLocalEl","el","elTmp","isLocal","noop","localDOMHandlers","downPoint","element","each","globalDOMHandlers","pointerCaptureReleasing","mountLocalDOMEventListeners","domHandlers","nativeEventName","mountSingleDOMEventListener","getNativeEvent","mountGlobalDOMEventListeners","mount","nativeEventListener","listener","opt","addEventListener","unmountDOMEventListeners","mounted","removeEventListener","DOMHandlerScope","domTarget","HandlerDomProxy","_super","__extends","dom","painterRoot","_this","cursorStyle","isPointerCapturing","globalHandlerScope","Eventful_default","HandlerProxy_default","dpr","env_default","devicePixelRatio","dpr","DARK_MODE_THRESHOLD","DARK_LABEL_COLOR","LIGHT_LABEL_COLOR","LIGHTER_LABEL_COLOR","mIdentity","identity","EPSILON","isNotAroundZero","val","scaleTmp","tmpTransform","originTransform","create","abs","Transformable","m","arr","parentTransform","needLocalTransform","mul","copy","globalScaleRatio","relX","relY","sx","sy","invert","transformNode","ancestors","rotation","shearX","parent","ox","oy","out","x","y","v2","invTransform","applyTransform","transform","source","copyTransform","target","ax","ay","skewX","skewY","dx","dy","rotate","proto","TRANSFORMABLE_PROPS","i","propName","Transformable_default","textWidthCache","getWidth","text","font","DEFAULT_FONT","cacheOfFont","LRU_default","width","platformApi","innerGetBoundingRect","textAlign","textBaseline","height","getLineHeight","x","adjustTextX","y","adjustTextY","rect","BoundingRect_default","getBoundingRect","textLines","len","uniondRect","i","verticalAlign","parsePercent","value","maxValue","calculateTextPosition","out","opts","rect","textPosition","distance","height","width","halfHeight","x","y","textAlign","textVerticalAlign","PRESERVED_NORMAL_STATE","PRIMARY_STATES_KEYS","TRANSFORMABLE_PROPS","DEFAULT_ANIMATABLE_MAP","reduce","obj","key","tmpTextPosCalcRes","tmpBoundingRect","BoundingRect_default","Element","props","guid","dx","dy","e","m","forceUpdate","textEl","textConfig","isLocal","innerTransformable","textAlign","textVerticalAlign","textStyleChanged","innerOrigin","layoutRect","calculateTextPosition","textOrigin","relOriginX","relOriginY","parsePercent","textOffset","isInside","innerTextDefaultStyle","textFill","textStroke","autoStroke","REDRAW_BIT","LIGHT_LABEL_COLOR","DARK_LABEL_COLOR","backgroundColor","colorArr","parse","alpha","isDark","i","stringify","cb","context","value","extend","keyOrObj","isObject","keysArr","keys","toState","normalState","animator","fromStateTransition","targetName","target","primaryKeys","name","states","noAnimation","stateName","keepCurrentStates","forceUseHoverLayer","toNormalState","hasStates","currentStates","animationCfg","indexOf","state","logError","useHoverLayer","textContent","textGuide","stateObjects","len","notChange","stateObj","lastStateObj","mergedState","isSilent","ancestor","idx","oldState","newState","forceAdd","newStateExists","enable","mergedTextConfig","transition","needsRestoreToNormal","transitionTarget","hasTransition","propNeedsTransition","componentEl","zr","clipPath","previousTextContent","Transformable_default","cfg","guideLine","inHover","animators","loop","allowDiscreteAnimation","Animator_default","el","scope","forwardToLast","leftAnimators","animationProps","animateTo","elProto","logs","logDeprecatedError","xKey","yKey","createLegacyProperty","privateKey","pos","enhanceArray","self","val","mixin","Eventful_default","animatable","reverse","animateToShallow","finishCount","doneHappened","cfgDone","cfgAborted","doneCb","abortedCb","percent","copyArrShallow","source","is2DArray","isArrayLike","copyValue","isTypedArray","sourceArr","targetArr","len0","len1","isValueSame","val1","val2","is1DArraySame","arr0","arr1","topKey","animateObj","targetKeys","duration","delay","additive","setToFinal","animateAll","existsAnimators","animationKeys","k","innerKey","targetVal","isGradientObject","keyLen","allAborted","filter","revertedSource","reversedTarget","sourceClone","cloneValue","Element_default","Group","_super","__extends","opts","_this","idx","name","children","i","child","nextSibling","oldChild","newChild","indexOf","index","old","zr","cb","context","stopped","includeChildren","tmpRect","BoundingRect_default","tmpMat","rect","childRect","transform","Element_default","Group_default","painterCtors","instances","delInstance","id","isDarkMode","backgroundColor","lum","DARK_MODE_THRESHOLD","colorStops","totalLum","len","i","ZRender","dom","opts","_this","storage","Storage_default","rendererType","keys","painter","ssrMode","handlerProxy","env_default","HandlerProxy_default","useCoarsePointer","usePointerSize","defaultPointerSize","pointerSize","retrieve2","Handler_default","Animation_default","el","zLevel","config","darkMode","fromInside","triggerRendered","start","getTime","end","stillFramesCount","cursorStyle","x","y","eventName","eventHandler","context","event","roots","Group_default","init","zr","guid","dispose","disposeAll","key","getInstance","registerPainter","name","Ctor","ssrDataGetter","getElementSSRData","registerSSRDataGetter","getter","version","RADIAN_EPSILON","ROUND_SUPPORTED_PRECISION_MAX","_trim","str","linearMap","val","domain","range","clamp","d0","d1","r0","r1","subDomain","subRange","parsePercent","percent","all","isString","round","x","precision","returnStr","asc","arr","a","b","getPrecision","i","getPrecisionSafe","eIndex","exp","significandPartLen","dotIndex","decimalPartLen","getPixelPrecision","dataExtent","pixelExtent","log","LN10","dataQuantity","sizeQuantity","getPercentWithPrecision","valueList","idx","seats","getPercentSeats","sum","reduce","acc","digits","votesPerQuota","map","targetSeats","votes","currentSum","remainder","max","maxId","len","seat","addSafe","val0","val1","maxPrecision","MAX_SAFE_INTEGER","remRadian","radian","pi2","isRadianAroundZero","TIME_REG","parseDate","value","match","hour","quantity","quantityExponent","nice","exponent","exp10","f","nf","quantile","ascArr","p","H","h","v","e","reformIntervals","list","littleThan","curr","currClose","interval","close_1","lg","numericToNumber","valFloat","isNumeric","getRandomIdBase","getGreatestCommonDividor","getLeastCommonMultiple","throwError","msg","interpolateNumber","p0","p1","percent","DUMMY_COMPONENT_NAME_PREFIX","INTERNAL_COMPONENT_ID_PREFIX","normalizeToArray","value","defaultEmphasis","opt","key","subOpts","len","subOptName","TEXT_STYLE_OPTIONS","getDataItemValue","dataItem","isObject","isArray","isDataItemOption","mappingToExists","existings","newCmptOptions","mode","isNormalMergeMode","isReplaceMergeMode","isReplaceAllMode","existingIdIdxMap","createHashMap","each","cmptOption","index","result","prepareResult","mappingById","mappingByName","mappingByIndex","mappingInReplaceAllMode","makeIdAndName","existing","isComponentIdInternal","optionId","makeComparableKey","existingIdx","resultItem","assert","i","keyExistAndEqual","brandNew","nextIdx","mapResult","idMap","item","keyInfo","idNum","attr","obj1","obj2","key1","convertOptionIdName","key2","val","idOrName","defaultValue","isString","isNumber","isStringSafe","isNameSpecified","componentModel","name","DUMMY_COMPONENT_NAME_PREFIX","isComponentIdInternal","cmptOption","makeComparableKey","INTERNAL_COMPONENT_ID_PREFIX","setComponentTypeToKeyInfo","mappingResult","mainType","componentModelCtor","each","item","newOption","isObject","determineSubType","newCmptOption","existComponent","subType","queryDataIndex","data","payload","isArray","map","value","makeInner","key","innerUniqueIndex","hostObj","getRandomIdBase","parseFinder","ecModel","finderInput","opt","_a","preParseFinder","mainTypeSpecified","queryOptionMap","others","result","defaultMainType","queryOption","mainType","queryResult","queryReferringComponents","finder","isString","obj","createHashMap","each","parsedKey","queryType","indexOf","SINGLE_REFERRING","queryReferringComponents","ecModel","mainType","userOption","opt","SINGLE_REFERRING","indexOption","idOption","nameOption","result","firstCmpt","assert","setAttribute","dom","key","value","getAttribute","getTooltipRenderMode","renderModeOption","env_default","interpolateRawValues","data","precision","sourceValue","targetValue","percent","isAutoPrecision","isNumber","value","interpolateNumber","round","getPrecision","isString","interpolated","leftArr","rightArr","length_1","i","info","leftVal","rightVal","TYPE_DELIMITER","IS_CONTAINER","IS_EXTENDED_CLASS","parseClassType","componentType","ret","typeArr","checkClassType","assert","isExtendedClass","clz","enableClassExtend","rootClz","mandatoryMethods","proto","superClass","ExtendedClass","isESClass","_super","__extends","class_1","inherits","extend","superCall","superApply","fn","isFunction","mountExtend","SubClz","SupperClz","classBase","enableClassCheck","target","classAttr","obj","context","methodName","args","_i","enableClassManagement","storage","componentFullType","componentTypeInfo","container","makeContainer","mainType","subType","throwWhenNotFound","result","each","o","type","types","makeStyleMapper","properties","ignoreParent","i","model","excludes","includes","style","propName","indexOf","val","AREA_STYLE_KEY_MAP","getAreaStyle","makeStyleMapper","AreaStyleMixin","excludes","includes","globalImageCache","LRU_default","findExistImage","newImageOrSrc","cachedImgObj","createOrUpdateImage","image","hostEl","onload","cbPayload","pendingWrap","isImageReady","platformApi","imageOnLoad","i","cb","STYLE_REG","truncateText","text","containerWidth","font","ellipsis","options","textLines","prepareTruncateOptions","i","len","truncateSingleLine","preparedOpts","extend","retrieve2","minChar","getWidth","ascCharWidth","contentWidth","ellipsisWidth","textLine","lineWidth","j","subLength","estimateLength","cnCharWidth","width","charCode","parsePlainText","style","overflow","padding","truncate","calculatedLineHeight","getLineHeight","lineHeight","bgColorDrawn","truncateLineOverflow","lines","wrapText","contentHeight","height","lineCount","outerHeight","outerWidth","RichTextToken","RichTextLine","tokens","RichTextContentBlock","parseRichText","text","style","contentBlock","RichTextContentBlock","topWidth","topHeight","overflow","wrapInfo","lastIndex","STYLE_REG","result","matchedIndex","pushTokens","pendingList","calculatedHeight","calculatedWidth","stlPadding","truncate","truncateLine","finishLine","line","lineWidth","lineHeight","outer","i","j","token","tokenStyle","textPadding","paddingH","font","getLineHeight","tokenHeight","retrieve2","retrieve3","styleTokenWidth","tokenWidthNotSpecified","getWidth","textBackgroundColor","bgImg","findExistImage","isImageReady","remainTruncWidth","truncateText","percentWidth","block","str","styleName","isEmptyStr","lines","newLine","strLines","linesWidths","tokenPadding","tokenPaddingH","outerWidth_1","parsePercent","res","wrapText","RichTextToken","tokens","RichTextLine","tokensLen","isAlphabeticLetter","ch","code","breakCharMap","reduce","obj","isWordBreakChar","isBreakAll","lastAccumWidth","currentWord","currentWordWidth","accumWidth","chWidth","inWord","STYLE_MAGIC_KEY","DEFAULT_COMMON_STYLE","DEFAULT_COMMON_ANIMATION_PROPS","PRIMARY_STATES_KEYS","PRIMARY_STATES_KEYS_IN_HOVER_LAYER","Displayable","_super","__extends","props","keysArr","keys","i","key","viewWidth","viewHeight","considerClipPath","considerAncestors","m","isDisplayableCulled","parent_1","x","y","cb","context","coord","rect","transform","elRect","style","shadowSize","shadowOffsetX","shadowOffsetY","BoundingRect_default","tolerance","paintRect","loop","targetKey","value","keyOrObj","extend","notRedraw","STYLE_CHANGED_BIT","obj","createObject","toState","normalState","stateName","state","keepCurrentStates","transition","animationCfg","needsRestoreToNormal","targetStyle","sourceStyle","changedKeys","targetKeys","statesKeys","states","mergedState","mergedStyle","dispProto","REDRAW_BIT","Element_default","tmpRect","viewRect","el","width","height","Displayable_default","mathMin","mathMax","mathSin","mathCos","PI2","start","create","end","extremity","fromLine","x0","y0","x1","y1","min","max","mathMin","mathMax","xDim","yDim","fromCubic","x2","y2","x3","y3","cubicExtrema","cubicAt","n","i","x","y","fromQuadratic","quadraticExtremum","quadraticAt","tx","ty","fromArc","rx","ry","startAngle","endAngle","anticlockwise","vec2Min","vec2Max","diff","PI2","start","mathCos","mathSin","end","tmp","angle","extremity","CMD","tmpOutX","tmpOutY","min","max","min2","max2","mathMin","mathMax","mathCos","mathSin","mathAbs","PI","PI2","hasTypedArray","tmpAngles","modPI2","radian","n","normalizeArcAngles","angles","anticlockwise","newStartAngle","delta","newEndAngle","PathProxy","notSaveData","sx","sy","segmentIgnoreThreshold","devicePixelRatio","dpr","ctx","x","y","dx","dy","exceedUnit","d2","x1","y1","x2","y2","x3","y3","cx","cy","r","startAngle","endAngle","radius","w","h","x0","y0","data","len","path","appendSize","offset","i","appendPathData","k","cmd","a","b","c","d","e","f","g","newData","xi","yi","isFirst","fromLine","fromCubic","fromQuadratic","rx","ry","fromArc","width","height","BoundingRect_default","ux","uy","pathSegLen","pathTotalLen","segCount","l","cubicLength","quadraticLength","percent","drawPart","accumLength","displayedLength","pendingPtDist","pendingPtX","pendingPtY","lo","t","cubicSubdivide","quadraticSubdivide","psi","isEllipse","breakBuild","d_1","newProxy","proto","PathProxy_default","containStroke","x0","y0","x1","y1","lineWidth","x","y","_l","_a","_b","tmp","_s","containStroke","x0","y0","x1","y1","x2","y2","x3","y3","lineWidth","x","y","_l","d","cubicProjectPoint","containStroke","x0","y0","x1","y1","x2","y2","lineWidth","x","y","_l","d","quadraticProjectPoint","PI2","normalizeRadian","angle","PI2","containStroke","cx","cy","r","startAngle","endAngle","anticlockwise","lineWidth","x","y","_l","d","tmp","normalizeRadian","angle","windingLine","x0","y0","x1","y1","x","y","t","dir","x_","CMD","PathProxy_default","PI2","EPSILON","isAroundEqual","a","b","roots","extrema","swapExtrema","tmp","windingCubic","x0","y0","x1","y1","x2","y2","x3","y3","x","y","nRoots","cubicRootAt","w","nExtrema","y0_","y1_","i","t","unit","x_","cubicAt","cubicExtrema","windingQuadratic","quadraticRootAt","quadraticExtremum","y_","quadraticAt","windingArc","cx","cy","r","startAngle","endAngle","anticlockwise","dTheta","dir","tmp_1","angle","containPath","path","lineWidth","isStroke","data","len","xi","yi","cmd","isFirst","windingLine","containStroke","rx","ry","theta","_x","width","height","contain","pathProxy","DEFAULT_PATH_STYLE","defaults","DEFAULT_COMMON_STYLE","DEFAULT_PATH_ANIMATION_PROPS","DEFAULT_COMMON_ANIMATION_PROPS","pathCopyParams","TRANSFORMABLE_PROPS","Path","_super","__extends","opts","_this","style","decalEl","ctx","decalElStyle","key","i","REDRAW_BIT","props","keysArr","keys","defaultStyle","value","extend","pathFill","isString","fillLum","lum","DARK_LABEL_COLOR","LIGHTER_LABEL_COLOR","LIGHT_LABEL_COLOR","textFill","zr","isDarkMode","isDarkLabel","DARK_MODE_THRESHOLD","shapeCfg","inBatch","SHAPE_CHANGED_BIT","PathProxy_default","stroke","fill","rect","needsUpdateRect","firstInvoke","path","rectStroke","lineScale","w","strokeContainThreshold","x","y","localPos","pathProxy","lineWidth","containStroke","contain","loop","targetKey","keyOrObj","shape","obj","createObject","toState","normalState","stateName","state","keepCurrentStates","transition","animationCfg","needsRestoreToNormal","targetShape","targetShapePrimaryProps","shapeKeys","states","mergedState","mergedShape","defaultProps","Sub","clone","pathProto","STYLE_CHANGED_BIT","Displayable_default","Path_default","DEFAULT_TSPAN_STYLE","defaults","DEFAULT_FONT","DEFAULT_PATH_STYLE","TSpan","_super","__extends","style","stroke","fill","obj","createObject","rect","text","getBoundingRect","w","tspanProto","Displayable_default","TSpan_default","DEFAULT_IMAGE_STYLE","defaults","DEFAULT_COMMON_STYLE","DEFAULT_IMAGE_ANIMATION_PROPS","DEFAULT_COMMON_ANIMATION_PROPS","isImageLike","source","ZRImage","_super","__extends","obj","createObject","dim","style","size","imageSource","otherDim","otherDimSize","BoundingRect_default","Displayable_default","Image_default","buildPath","ctx","shape","x","y","width","height","r","r1","r2","r3","r4","total","round","subPixelOptimizeLine","outputShape","inputShape","style","x1","x2","y1","y2","lineWidth","subPixelOptimize","subPixelOptimizeRect","originX","originY","originWidth","originHeight","position","positiveOrNegative","doubledPosition","RectShape","subPixelOptimizeOutputShape","Rect","_super","__extends","opts","RectShape","ctx","shape","x","y","width","height","optimizedShape","subPixelOptimizeRect","buildPath","Path_default","Rect_default","DEFAULT_RICH_TEXT_COLOR","DEFAULT_STROKE_LINE_WIDTH","DEFAULT_TEXT_ANIMATION_PROPS","defaults","DEFAULT_COMMON_ANIMATION_PROPS","ZRText","_super","__extends","opts","_this","i","child","innerTransformable","m","normalizeTextStyle","zr","tmpRect","BoundingRect_default","children","tmpMat","rect","childRect","transform","defaultTextStyle","textContent","targetStyle","sourceStyle","sourceRich","targetRich","extend","richNames","keys","richName","Ctor","style","textFont","DEFAULT_FONT","textPadding","text","getStyleText","contentBlock","parsePlainText","needDrawBg","needDrawBackground","bgColorDrawn","outerHeight","outerWidth","contentWidth","textLines","lineHeight","defaultStyle","baseX","baseY","textAlign","verticalAlign","textX","textY","adjustTextY","boxX","adjustTextX","boxY","getTextXForPadding","defaultLineWidth","useDefaultFill","textFill","getFill","textStroke","getStroke","hasShadow","fixedBoundingRect","calculatedLineHeight","el","TSpan_default","subElStyle","setSeparateFont","parseRichText","xLeft","lineTop","xRight","line","tokens","tokenCount","remainedWidth","leftIndex","lineXLeft","lineXRight","rightIndex","token","x","parentBgColorDrawn","tokenStyle","y","retrieve3","retrieve2","textWidth","textHeight","topStyle","width","height","textBackgroundColor","textBorderWidth","textBorderColor","isImageBg","isPlainOrGradientBg","textBorderRadius","self","rectEl","imgEl","Rect_default","rectShape","rectStyle","Image_default","imgStyle","commonStyle","font","hasSeparateFont","parseFontSize","trim","Displayable_default","VALID_TEXT_ALIGN","VALID_TEXT_VERTICAL_ALIGN","FONT_PARTS","fontSize","DEFAULT_FONT_SIZE","fontProp","val","normalizeStyle","each","normalizeCssArray","stroke","lineWidth","fill","Text_default","getECData","makeInner","setCommonECData","seriesIndex","dataType","dataIdx","el","ecData","child","childECData","_highlightNextDigit","_highlightKeyMap","getSavedStates","makeInner","getComponentStates","HOVER_STATE_NORMAL","HOVER_STATE_BLUR","HOVER_STATE_EMPHASIS","SPECIAL_STATES","DISPLAY_STATES","Z2_EMPHASIS_LIFT","Z2_SELECT_LIFT","HIGHLIGHT_ACTION_TYPE","DOWNPLAY_ACTION_TYPE","SELECT_ACTION_TYPE","UNSELECT_ACTION_TYPE","TOGGLE_SELECT_ACTION_TYPE","hasFillOrStroke","fillOrStroke","doChangeHoverState","el","stateName","hoverStateEnum","singleEnterEmphasis","singleLeaveEmphasis","singleEnterBlur","singleLeaveBlur","singleEnterSelect","singleLeaveSelect","updateElementState","updater","commonParam","traverseUpdateState","child","setStatesFlag","getFromStateStyle","el","props","toStateName","defaultValue","style","fromState","i","propName","val","animator","createEmphasisDefaultState","stateName","targetStates","state","hasSelect","indexOf","cloned","Path_default","store","getSavedStates","fromFill","fromStroke","hasFillOrStroke","emphasisStyle","extend","liftColor","z2EmphasisLift","Z2_EMPHASIS_LIFT","createSelectDefaultState","z2SelectLift","Z2_SELECT_LIFT","createBlurDefaultState","hasBlur","currentOpacity","blurStyle","elementStateProxy","setDefaultStateProxy","textContent","textGuide","enterEmphasisWhenMouseOver","shouldSilent","traverseUpdateState","singleEnterEmphasis","leaveEmphasisWhenMouseOut","singleLeaveEmphasis","enterEmphasis","highlightDigit","leaveEmphasis","enterBlur","singleEnterBlur","leaveBlur","singleLeaveBlur","enterSelect","singleEnterSelect","leaveSelect","singleLeaveSelect","allLeaveBlur","api","model","leaveBlurredSeries","allComponentViews","componentType","componentModel","componentStates","getComponentStates","isSeries","view","child","each","blurSeries","targetSeriesIndex","focus","blurScope","ecModel","leaveBlurOfIndices","data","dataIndices","itemEl","targetSeriesModel","targetCoordSys","blurredSeries","seriesModel","sameSeries","coordSys","sameCoordSys","isArrayLike","isObject","dataTypes","keys","d","blurComponent","componentMainType","componentIndex","blurSeriesFromHighlightPayload","payload","seriesIndex","dataIndex","queryDataIndex","isArray","count","current","ecData","getECData","focus_1","findComponentHighDownDispatchers","name","ret","dispatchers","focusSelf","handleGlobalMouseOverForHighDown","dispatcher","_a","handleGlobalMouseOutForHighDown","toggleSelectionFromPayload","isSelectChangePayload","dataType","TOGGLE_SELECT_ACTION_TYPE","SELECT_ACTION_TYPE","updateSeriesElementSelection","allData","type","idx","getAllSelectedIndices","item","enableHoverEmphasis","setAsHighDownDispatcher","enableHoverFocus","disableHoverEmphasis","toggleHoverEmphasis","isDisabled","OTHER_STATES","defaultStyleGetterMap","setStatesStylesFromModel","itemModel","styleType","getter","asDispatcher","disable","extendedEl","isHighDownDispatcher","getHighlightDigit","highlightKey","highlightDigit","_highlightKeyMap","_highlightNextDigit","isSelectChangePayload","payload","payloadType","SELECT_ACTION_TYPE","UNSELECT_ACTION_TYPE","TOGGLE_SELECT_ACTION_TYPE","isHighDownPayload","HIGHLIGHT_ACTION_TYPE","DOWNPLAY_ACTION_TYPE","savePathStates","el","store","getSavedStates","selectState","graphic_exports","__export","Arc_default","BezierCurve_default","BoundingRect_default","Circle_default","CompoundPath_default","Ellipse_default","Group_default","Image_default","IncrementalDisplayable_default","Line_default","LinearGradient_default","OrientedBoundingRect_default","Path_default","Point_default","Polygon_default","Polyline_default","RadialGradient_default","Rect_default","Ring_default","Sector_default","Text_default","applyTransform","clipPointsByRect","clipRectByRect","createIcon","extendPath","extendShape","getShapeClass","getTransform","groupTransition","initProps","isElementRemoved","lineLineIntersect","linePolygonIntersect","makeImage","makePath","mergePath","registerShape","removeElement","removeElementWithFadeOut","resizePath","setTooltipConfig","subPixelOptimize","subPixelOptimizeLine","subPixelOptimizeRect","transformDirection","traverseElements","updateProps","CMD","PathProxy_default","points","mathSqrt","mathAtan2","transformPath","path","m","data","len","cmd","nPoint","i","j","k","p","M","C","L","R","A","Q","x","y","sx","sy","angle","applyTransform","p_1","mathSqrt","mathSin","mathCos","PI","vMag","v","vRatio","u","vAngle","processArc","x1","y1","x2","y2","fa","fs","rx","ry","psiDeg","cmd","path","psi","xp","yp","lambda","f","cxp","cyp","cx","cy","theta","dTheta","n","commandReg","numberReg","createPathProxyFromString","data","PathProxy_default","cpx","cpy","subpathX","subpathY","prevCmd","CMD","cmdList","l","cmdText","cmdStr","p","pLen","i","off","ctlPtx","ctlPty","len","pathData","SVGPath","_super","__extends","m","Path_default","isPathProxy","createPathOptions","str","opts","pathProxy","innerOpts","extend","ctx","transformPath","createFromString","extendFromString","defaultOpts","Sub","_this","mergePath","pathEls","pathList","pathEl","pathBundle","CircleShape","Circle","_super","__extends","opts","CircleShape","ctx","shape","Path_default","Circle_default","EllipseShape","Ellipse","_super","__extends","opts","EllipseShape","ctx","shape","k","x","y","a","b","ox","oy","Path_default","Ellipse_default","PI","PI2","mathSin","mathCos","mathACos","mathATan2","mathAbs","mathSqrt","mathMax","mathMin","e","intersect","x0","y0","x1","y1","x2","y2","x3","y3","dx10","dy10","dx32","dy32","t","computeCornerTangents","radius","cr","clockwise","x01","y01","lo","ox","oy","x11","y11","x10","y10","x00","y00","dx","dy","d2","r","s","d","cx0","cy0","cx1","cy1","dx0","dy0","dx1","dy1","normalizeCornerRadius","arr","isArray","len","buildPath","ctx","shape","_a","innerRadius","hasRadius","hasInnerRadius","tmp","startAngle","endAngle","cx","cy","arc","mod","icrStart","icrEnd","ocrStart","ocrEnd","ocrs","ocre","icrs","icre","ocrMax","icrMax","limitedOcrMax","limitedIcrMax","xre","yre","xirs","yirs","xrs","yrs","xire","yire","hasArc","cornerRadius","halfRd","it_1","a","b","crStart","crEnd","ct0","ct1","SectorShape","Sector","_super","__extends","opts","SectorShape","ctx","shape","buildPath","Path_default","Sector_default","RingShape","Ring","_super","__extends","opts","RingShape","ctx","shape","x","y","PI2","Path_default","Ring_default","smoothBezier","points","smooth","isLoop","constraint","cps","v","v1","v2","prevPoint","nextPoint","min","max","i","len","point","clone","sub","scale","d0","distance","d1","sum","cp0","add","cp1","buildPath","ctx","shape","closePath","smooth","points","controlPoints","smoothBezier","len","i","cp1","cp2","p","l","PolygonShape","Polygon","_super","__extends","opts","PolygonShape","ctx","shape","buildPath","Path_default","Polygon_default","PolylineShape","Polyline","_super","__extends","opts","PolylineShape","ctx","shape","buildPath","Path_default","Polyline_default","subPixelOptimizeOutputShape","LineShape","Line","_super","__extends","opts","LineShape","ctx","shape","x1","y1","x2","y2","optimizedShape","subPixelOptimizeLine","subPixelOptimizeOutputShape","percent","p","Path_default","Line_default","out","BezierCurveShape","someVectorAt","shape","t","isTangent","cpx2","cpy2","cubicDerivativeAt","cubicAt","quadraticDerivativeAt","quadraticAt","BezierCurve","_super","__extends","opts","BezierCurveShape","ctx","x1","y1","x2","y2","cpx1","cpy1","percent","quadraticSubdivide","out","cubicSubdivide","p","normalize","Path_default","BezierCurve_default","ArcShape","Arc","_super","__extends","opts","ArcShape","ctx","shape","x","y","r","startAngle","endAngle","clockwise","unitX","unitY","Path_default","Arc_default","CompoundPath","_super","__extends","_this","paths","dirtyPath","i","scale","ctx","shape","Path_default","CompoundPath_default","Gradient","colorStops","offset","color","Gradient_default","LinearGradient","_super","__extends","x","y","x2","y2","colorStops","globalCoord","_this","Gradient_default","LinearGradient_default","RadialGradient","_super","__extends","x","y","r","colorStops","globalCoord","_this","Gradient_default","RadialGradient_default","extent","extent2","minTv","Point_default","maxTv","OrientedBoundingRect","rect","transform","corners","axes","x","y","x2","y2","i","other","mtv","overlapped","noMtv","self","inverse","axis","dist0","dist1","dim","out","origin","proj","min","max","proj_1","OrientedBoundingRect_default","m","IncrementalDisplayable","_super","__extends","_this","cb","context","displayable","notPersistent","displayables","i","rect","BoundingRect_default","childRect","x","y","localPos","Displayable_default","IncrementalDisplayable_default","transitionStore","makeInner","getAnimationConfig","animationType","animatableModel","dataIndex","extraOpts","extraDelayParams","animationPayload","updatePayload","animationEnabled","isUpdate","duration","easing","delay","retrieve2","isFunction","config","animateOrSetProps","el","props","cb","during","isFrom","removeOpt","isObject","isRemove","animationConfig","animationDelay","animationEasing","animateConfig","updateProps","initProps","el","props","animatableModel","dataIndex","cb","during","animateOrSetProps","isElementRemoved","i","animator","removeElement","fadeOutDisplayable","done","removeElementWithFadeOut","doRemove","disp","saveOldStyle","transitionStore","mathMax","mathMin","_customShapeMap","extendShape","opts","Path_default","extendPathFromString","extendFromString","extendPath","pathData","registerShape","name","ShapeClass","getShapeClass","makePath","rect","layout","path","createFromString","centerGraphic","resizePath","makeImage","imageUrl","zrImg","Image_default","img","boundingRect","aspect","width","height","cx","cy","mergePath","pathRect","m","subPixelOptimizeLine","shape","lineWidth","subPixelOptimizeRect","param","subPixelOptimize","getTransform","target","ancestor","mat","identity","mul","applyTransform","transform","invert","isArrayLike","Transformable_default","transformDirection","direction","hBase","vBase","vertex","isNotGroup","el","isPath","groupTransition","g1","g2","animatableModel","getElMap","g","elMap","getAnimatableProps","obj","extend","elMap1","oldEl","newProp","updateProps","getECData","clipPointsByRect","points","map","point","x","y","clipRectByRect","targetRect","x2","y2","createIcon","iconStr","opt","innerOpts","style","defaults","linePolygonIntersect","a1x","a1y","a2x","a2y","i","p2","p","lineLineIntersect","b1x","b1y","b2x","b2y","mx","my","nx","ny","nmCrossProduct","crossProduct2d","nearZero","b1a1x","b1a1y","q","x1","y1","val","setTooltipConfig","itemTooltipOption","componentModel","itemName","itemTooltipOptionObj","isString","mainType","componentIndex","formatterParams","formatterParamsExtra","each","keys","key","hasOwn","ecData","traverseElement","cb","stopped","traverseElements","els","isArray","Circle_default","Ellipse_default","Sector_default","Ring_default","Polygon_default","Polyline_default","Rect_default","Line_default","BezierCurve_default","Arc_default","EMPTY_OBJ","setLabelText","label","labelTexts","i","SPECIAL_STATES","stateName","text","state","oldStates","getLabelText","opt","stateModels","interpolatedValue","labelFetcher","labelDataIndex","labelDimIndex","normalModel","baseText","isFunction","statesText","stateModel","retrieve2","setLabelStyle","targetEl","labelStatesModels","stateSpecified","isSetOnText","Text_default","needsCreateText","DISPLAY_STATES","textContent","labelStatesTexts","showNormal","normalStyle","createTextStyle","createTextConfig","stateObj","stateShow","targetElEmphasisState","labelInner","getLabelStatesModels","itemModel","labelName","statesModels","SPECIAL_STATES","stateName","createTextStyle","textStyleModel","specifiedTextStyle","opt","isNotNormal","isAttached","textStyle","setTextStyleCommon","extend","createTextConfig","textConfig","labelPosition","labelRotate","labelDistance","retrieve2","labelOffset","EMPTY_OBJ","ecModel","globalTextStyle","richItemNames","getRichItemNames","richResult","name_1","richTextStyle","setTokenTextStyle","overflow","margin","richItemNameMap","rich","richKeys","keys","i","richKey","TEXT_PROPS_WITH_GLOBAL","TEXT_PROPS_SELF","TEXT_PROPS_BOX","isBlock","inRich","inheritColor","fillColor","strokeColor","opacity","textBorderWidth","textBorderType","textBorderDashOffset","key","val","baseline","borderType","getFont","gTextStyleModel","trim","labelInner","makeInner","setLabelValueAnimation","label","labelStatesModels","value","getDefaultText","obj","normalLabelModel","PATH_COLOR","textStyleParams","tmpText","Text_default","TextStyleMixin","isEmphasis","ecModel","getFont","text","style","textStyle_default","LINE_STYLE_KEY_MAP","getLineStyle","makeStyleMapper","LineStyleMixin","excludes","ITEM_STYLE_KEY_MAP","getItemStyle","makeStyleMapper","ItemStyleMixin","excludes","includes","Model","option","parentModel","ecModel","rest","_i","merge","path","ignoreParent","key","val","hasPath","pathFinal","obj","Ctor","clone","env_default","pathArr","i","enableClassExtend","enableClassCheck","mixin","LineStyleMixin","ItemStyleMixin","AreaStyleMixin","textStyle_default","Model_default","base","getUID","type","enableSubTypeDefaulter","target","subTypeDefaulters","componentType","defaulter","componentTypeInfo","parseClassType","option","componentTypeMain","enableTopologicalTravel","entity","dependencyGetter","targetNameList","fullNameList","callback","context","result","makeDepndencyGraph","graph","noEntryList","targetNameSet","each","name","currComponentType","currVertex","isInTargetNameSet","removeEdgeAndAdd","removeEdge","errMsg","succComponentType","thisItem","createDependencyGraphItem","originalDeps","availableDeps","getAvailableDependencies","dependentName","indexOf","thatItem","dep","inheritDefaultOption","superOption","subOption","merge","langEN_default","langZH_default","LOCALE_ZH","LOCALE_EN","DEFAULT_LOCALE","localeStorage","localeModels","SYSTEM_LANG","env_default","langStr","registerLocale","locale","localeObj","Model_default","createLocaleObject","isString","clone","merge","getLocaleModel","lang","getDefaultLocaleModel","langEN_default","langZH_default","ONE_SECOND","ONE_MINUTE","ONE_HOUR","ONE_DAY","ONE_YEAR","defaultLeveledFormatter","fullDayFormatter","fullLeveledFormatter","primaryTimeUnits","timeUnits","pad","str","len","getPrimaryTimeUnit","timeUnit","isPrimaryTimeUnit","getDefaultFormatPrecisionOfInterval","format","time","template","isUTC","lang","date","parseDate","y","fullYearGetterName","M","monthGetterName","q","d","dateGetterName","e","H","hoursGetterName","h","m","minutesGetterName","s","secondsGetterName","S","millisecondsGetterName","a","A","localeModel","Model_default","getLocaleModel","SYSTEM_LANG","getDefaultLocaleModel","timeModel","month","monthAbbr","dayOfWeek","dayOfWeekAbbr","leveledFormat","tick","idx","formatter","isString","isFunction","defaults","extend","i","mergedFormatter","unit","getUnitFromValue","targetId","isArray","levelId","value","isSecond","isMinute","isHour","isDay","isMonth","isYear","getUnitValue","isNumber","fullYearSetterName","monthSetterName","dateSetterName","hoursSetterName","minutesSetterName","secondsSetterName","millisecondsSetterName","getTextRect","text","font","align","verticalAlign","padding","rich","truncate","lineHeight","textEl","Text_default","addCommas","x","isNumeric","isString","parts","toCamelCase","str","upperCaseFirst","match","group1","normalizeCssArray","makeValueReadable","value","valueType","useUTC","USER_READABLE_DEFUALT_TIME_PATTERN","stringToUserReadable","str","trim","isNumberUserReadable","num","isTypeTime","isValueDate","date","parseDate","format","isStringSafe","isNumber","numericResult","numericToNumber","addCommas","TPL_VAR_ALIAS","wrapVar","varName","seriesIdx","formatTpl","tpl","paramsList","encode","isArray","seriesLen","$vars","i","alias","k","val","encodeHTML","getTooltipMarker","inOpt","extraCssText","opt","isString","color","type","renderMode","encodeHTML","markerId","formatTime","tpl","value","isUTC","date","parseDate","getUTC","y","M","d","h","m","s","S","pad","capitalFirst","str","convertToColorString","defaultColor","isObject","windowOpen","link","target","blank","each","LOCATION_PARAMS","HV_NAMES","boxLayout","orient","group","gap","maxWidth","maxHeight","x","y","currentLineMaxSize","child","idx","rect","nextChild","nextChildRect","nextX","nextY","moveX","moveY","box","vbox","curry","hbox","getLayoutRect","positionInfo","containerRect","margin","normalizeCssArray","containerWidth","containerHeight","left","parsePercent","top","right","bottom","width","height","verticalMargin","horizontalMargin","aspect","rect","BoundingRect_default","fetchLayoutMode","ins","layoutMode","isObject","mergeLayoutParam","targetOption","newOption","opt","ignoreSize","isArray","hResult","merge","HV_NAMES","vResult","copy","names","hvIdx","newParams","newValueCount","merged","mergedValueCount","enoughParamNumber","each","name","hasProp","hasValue","i","name_1","obj","target","source","getLayoutParams","copyLayoutParams","LOCATION_PARAMS","inner","makeInner","ComponentModel","_super","__extends","option","parentModel","ecModel","_this","getUID","layoutMode","fetchLayoutMode","inputPositionParams","getLayoutParams","themeModel","merge","mergeLayoutParam","newCptOption","isInit","ctor","isExtendedClass","fields","optList","clz","opt","defaultOption","i","mainType","indexKey","idKey","queryReferringComponents","boxLayoutModel","zlevel","proto","Model_default","mountExtend","enableClassManagement","enableSubTypeDefaulter","enableTopologicalTravel","getDependencies","componentType","deps","each","map","type","parseClassType","indexOf","Component_default","platform","decalColor","globalDefault_default","VISUAL_DIMENSIONS","createHashMap","SOURCE_FORMAT_ORIGINAL","SOURCE_FORMAT_ARRAY_ROWS","SOURCE_FORMAT_OBJECT_ROWS","SOURCE_FORMAT_KEYED_COLUMNS","SOURCE_FORMAT_TYPED_ARRAY","SOURCE_FORMAT_UNKNOWN","SERIES_LAYOUT_BY_COLUMN","SERIES_LAYOUT_BY_ROW","BE_ORDINAL","innerGlobalModel","makeInner","resetSourceDefaulter","ecModel","createHashMap","makeSeriesEncodeForAxisCoordSys","coordDimensions","seriesModel","source","encode","datasetModel","querySeriesUpstreamDatasetModel","encodeItemName","encodeSeriesName","datasetMap","key","baseCategoryDimIndex","categoryWayValueDimStart","each","coordDimInfoLoose","coordDimIdx","coordDimInfo","isObject","getDataDimCountOnCoordDim","datasetRecord","coordDimName","count","start","pushDim","dimIdxArr","idxFrom","idxCount","i","dimsDef","querySeriesUpstreamDatasetModel","seriesModel","thisData","queryReferringComponents","SINGLE_REFERRING","queryDatasetUpstreamDatasetModels","datasetModel","guessOrdinal","source","dimIndex","doGuessOrdinal","data","sourceFormat","seriesLayoutBy","dimensionsDefine","startIndex","result","maxLoop","isTypedArray","BE_ORDINAL","dimName","dimType","dimDefItem","isObject","isString","SOURCE_FORMAT_ARRAY_ROWS","dataArrayRows","SERIES_LAYOUT_BY_ROW","sample","i","detectValue","row","SOURCE_FORMAT_OBJECT_ROWS","dataObjectRows","item","SOURCE_FORMAT_KEYED_COLUMNS","dataKeyedColumns","SOURCE_FORMAT_ORIGINAL","dataOriginal","val","getDataItemValue","isArray","beStr","internalOptionCreatorMap","createHashMap","concatInternalOptions","ecModel","mainType","newCmptOptionList","internalOptionCreator","internalOptionCreatorMap","internalOptions","i","innerColor","makeInner","innerDecal","PaletteMixin","name","scope","requestNum","defaultPalette","normalizeToArray","layeredPalette","getFromPalette","clearPalette","getNearestPalette","palettes","requestColorNum","paletteNum","getFromPalette","that","inner","defaultPalette","layeredPalette","name","scope","requestNum","scopeFields","paletteIdx","paletteNameMap","palette","pickedPaletteItem","clearPalette","reCreateSeriesIndices","assertSeriesInitialized","initBase","OPTION_INNER_KEY","OPTION_INNER_VALUE","GlobalModel","_super","__extends","option","parentModel","ecModel","theme","locale","optionManager","Model_default","opts","optionPreprocessorFuncs","innerOpt","normalizeSetOptionInput","type","opt","optionChanged","baseOption","initBase","timelineOption","mediaOptions","each","mediaOption","newOption","componentsMap","componentsCount","newCmptTypes","newCmptTypeMap","createHashMap","replaceMergeMainTypeMap","resetSourceDefaulter","componentOption","mainType","Component_default","clone","merge","val","mainTypeInReplaceMerge","visitComponent","newCmptOptionList","concatInternalOptions","normalizeToArray","oldCmptList","mergeMode","mappingResult","mappingToExists","setComponentTypeToKeyInfo","optionsByMainType","cmptsByMainType","cmptsCountByMainType","tooltipExists","tooltipWarningLogged","resultItem","index","componentModel","newCmptOption","isSeriesType","ComponentModelClass","subType","seriesImportName","extraOpt","extend","reCreateSeriesIndices","optInMainType","realLen","metNonInner","i","isComponentIdInternal","OPTION_INNER_KEY","payload","idx","list","cmpt","condition","id","name","cmpts","result","queryByIdOrName","filter","filterBySubType","query","queryCond","getQueryCond","doFilter","q","indexAttr","idAttr","nameAttr","res","cb","context","isFunction","ctxForAll_1","cbForAll_1","componentType","isString","isObject","nameStr","convertOptionIdName","oneSeries","seriesIndex","assertSeriesInitialized","rawSeriesIndex","series","seriesModel","newSeriesIndices","seriesRawIdx","componentTypes","components","component","isNotTargetSeries","seriesIndices","OPTION_INNER_VALUE","airaOption","mergeTheme","globalDefault_default","name_1","notMergeColorLayer","themeItem","attr","idOrName","isArray","keyMap_1","idOrNameItem","idName","idName_1","mixin","PaletteMixin","Global_default","availableMethods","ExtensionAPI","ecInstance","each","methodName","bind","ExtensionAPI_default","coordinateSystemCreators","CoordinateSystemManager","ecModel","api","coordinateSystems","each","creator","type","list","coordSys","CoordinateSystem_default","QUERY_REG","OptionManager","api","rawOption","optionPreprocessorFuncs","opt","each","normalizeToArray","series","isTypedArray","setAsPrimitive","dataset","clone","optionBackup","newParsedOption","parseRawOption","isRecreate","ecModel","option","timelineOptions","timelineModel","ecWidth","ecHeight","mediaList","mediaDefault","indices","result","i","len","applyMediaQuery","indicesEquals","map","index","isNew","baseOption","declaredBaseOption","timelineOnRoot","timelineOptionsOnRoot","mediaOnRoot","hasMedia","hasTimeline","isArray","singleMedia","doPreprocess","media","preProcess","query","realMap","applicable","value","attr","matched","operator","realAttr","compare","real","expect","indices1","indices2","OptionManager_default","each","isObject","POSSIBLE_STYLES","compatEC2ItemStyle","opt","itemStyleOpt","i","len","styleName","normalItemStyleOpt","emphasisItemStyleOpt","merge","convertNormalEmphasis","optType","useExtend","normalOpt","emphasisOpt","defaults","removeEC3NormalStatus","compatTextStyle","propName","labelOptSingle","textStyle","TEXT_STYLE_OPTIONS","textPropName","compatEC3CommonStyles","processSeries","seriesOpt","markPoint","markLine","markArea","data","edgeData","isTypedArray","mpData","mlData","isArray","toArr","o","toObj","globalCompatStyle","option","isTheme","axes","axisName","axisOpt","parallelOpt","parallelAxisDefault","calendarOpt","radarOpt","geoOpt","regionObj","timelineOpt","item","toolboxOpt","featureOpt","get","opt","path","pathArr","obj","i","set","val","overwrite","key","compatLayoutProperties","option","each","LAYOUT_PROPERTIES","prop","COMPATITABLE_COMPONENTS","BAR_ITEM_STYLE_MAP","compatBarItemStyle","itemStyle","oldName","newName","compatPieLabel","compatSunburstState","compatGraphFocus","traverseTree","data","cb","globalBackwardCompat","isTheme","globalCompatStyle","normalizeToArray","seriesOpt","isObject","seriesType","isTypedArray","pointerColor","highlightPolicy","defaults","componentName","options","isArray","dataStack","ecModel","stackInfoMap","createHashMap","seriesModel","stack","stackInfoList","data","stackInfo","calculateStack","each","targetStackInfo","idxInStack","resultVal","resultNaN","dims","targetData","isStackedByIndex","stackStrategy","v0","v1","dataIndex","sum","byValue","stackedDataRawIndex","stackedOver","j","val","addSafe","SourceImpl","fields","SOURCE_FORMAT_KEYED_COLUMNS","SOURCE_FORMAT_UNKNOWN","SERIES_LAYOUT_BY_COLUMN","dimensionsDefine","dim","guessOrdinal","BE_ORDINAL","isSourceInstance","val","createSource","sourceData","thisMetaRawOption","sourceFormat","detectSourceFormat","seriesLayoutBy","determined","determineSourceDimensions","source","clone","createSourceFromSeriesDataOption","data","isTypedArray","SOURCE_FORMAT_TYPED_ARRAY","SOURCE_FORMAT_ORIGINAL","cloneSourceShallow","isArray","SOURCE_FORMAT_ARRAY_ROWS","i","len","item","isObject","SOURCE_FORMAT_OBJECT_ROWS","key","hasOwn","isArrayLike","sourceHeader","dimensionsDetectedCount","startIndex","normalizeDimensionsOption","dataArrayRows","arrayRowsTravelFirst","isString","isNumber","index","SERIES_LAYOUT_BY_ROW","objectRowsCollectDimensions","each","colArr","value0","getDataItemValue","firstIndex","obj","keys","nameMap","createHashMap","map","rawItem","exist","cb","maxLoop","shouldRetrieveDataByName","_a","_b","_c","providerMethods","mountMethods","DefaultDataProvider","sourceParam","dimSize","source","isSourceInstance","createSourceFromSeriesDataOption","data","SOURCE_FORMAT_TYPED_ARRAY","idx","out","newData","proto","provider","sourceFormat","seriesLayoutBy","startIndex","dimsDef","methods","getMethodMapKey","extend","getItemForTypedArray","countForTypedArray","fillStorageForTypedArray","rawItemGetter","getRawSourceItemGetter","bind","rawCounter","getRawSourceDataCounter","offset","i","start","end","storage","extent","dim","dimExtent","min","max","count","arr","val","SOURCE_FORMAT_ARRAY_ROWS","SERIES_LAYOUT_BY_COLUMN","appendDataSimply","SERIES_LAYOUT_BY_ROW","SOURCE_FORMAT_OBJECT_ROWS","SOURCE_FORMAT_KEYED_COLUMNS","each","newCol","key","oldCol","SOURCE_FORMAT_ORIGINAL","getItemSimply","rawData","startIndex","dimsDef","idx","rawSourceItemGetterMap","_a","SOURCE_FORMAT_ARRAY_ROWS","SERIES_LAYOUT_BY_COLUMN","SERIES_LAYOUT_BY_ROW","out","item","data","i","row","SOURCE_FORMAT_OBJECT_ROWS","SOURCE_FORMAT_KEYED_COLUMNS","dimName","col","SOURCE_FORMAT_ORIGINAL","getRawSourceItemGetter","sourceFormat","seriesLayoutBy","method","getMethodMapKey","countSimply","rawSourceDataCounterMap","_b","getRawSourceDataCounter","getRawValueSimply","dataItem","dimIndex","property","rawSourceValueGetterMap","_c","value","getDataItemValue","SOURCE_FORMAT_TYPED_ARRAY","getRawSourceValueGetter","retrieveRawValue","dataIndex","dim","store","result","DIMENSION_LABEL_REG","DataFormatMixin","dataIndex","dataType","data","rawValue","rawDataIndex","name","itemOpt","style","color","borderColor","mainType","isSeries","userOutput","status","labelDimIndex","formatter","extendParams","params","isArray","itemModel","isFunction","isString","str","formatTpl","origin","dimStr","len","dimLoose","val","retrieveRawValue","dimIndex","idx","multipleSeries","normalizeTooltipFormatResult","result","markupText","markupFragment","isObject","createTask","define","Task","performArgs","upTask","skip","context","planResult","lastModBy","normalizeModBy","lastModDataCount","modBy","modDataCount","val","forceFirstProgress","step","start","end","progress","isArray","i","outputDueEnd","iterator","downstream","downTask","iterator","end","current","modBy","modDataCount","winCount","it","s","e","sStep","sCount","modNext","sequentialNext","dataIndex","result","parseDataValue","value","opt","dimType","isNumber","parseDate","valueParserMap","createHashMap","val","isString","trim","getRawValueParser","type","ORDER_COMPARISON_OP_MAP","lval","rval","FilterOrderComparator","op","errMsg","throwError","numericToNumber","SortOrderComparator","order","incomparable","isDesc","lvalFloat","rvalFloat","lvalNotNumeric","rvalNotNumeric","lvalIsStr","rvalIsStr","FilterEqualityComparator","isEq","rval","numericToNumber","lval","eqResult","lvalTypeof","createFilterComparator","op","hasOwn","ORDER_COMPARISON_OP_MAP","FilterOrderComparator","ExternalSource","dataIndex","dim","dimIndex","dataItem","rawVal","dimInfo","parseDataValue","createExternalSource","internalSource","externalTransform","extSource","ExternalSource","data","sourceFormat","sourceHeaderCount","errMsg","SERIES_LAYOUT_BY_COLUMN","throwError","dimensions","dimsByName","dimsDef","each","dimDef","idx","name","dimDefExt","errMsg_1","hasOwn","i","rawItemGetter","getRawSourceItemGetter","dataIndex","bind","getRawData","cloneRawData","rawCounter","getRawSourceDataCounter","rawValueGetter","getRawSourceValueGetter","dimIndex","rawItem","retrieveValueFromItem","dataItem","getDimensionInfo","cloneAllDimensionInfo","upstream","isSupportedSourceFormat","SOURCE_FORMAT_ARRAY_ROWS","result","len","SOURCE_FORMAT_OBJECT_ROWS","extend","dim","isNumber","clone","externalTransformMap","createHashMap","registerExternalTransform","type","typeParsed","isBuiltIn","applyDataTransform","rawTransOption","sourceList","infoForPrint","pipedTransOption","normalizeToArray","pipeLen","transOption","applySingleDataTransform","upSourceList","pipeIndex","isObject","transType","extUpSourceList","map","upSource","resultList","printStrArr","resultIndex","detectSourceFormat","resultMetaRawOption","firstUpSource","startIndex","createSource","UNDEFINED","CtorUint32Array","CtorUint16Array","CtorInt32Array","CtorFloat64Array","dataCtors","defaultDimValueGetters","getIndicesCtor","rawCount","getInitialExtent","cloneChunk","originalChunk","Ctor","prepareStore","store","dimIdx","dimType","end","append","DataCtor","oldStore","oldLen","newStore","j","DataStore","createHashMap","provider","inputDimensions","dimValueGetter","source","defaultGetter","willRetrieveDataByName","shouldRetrieveDataByName","map","dim","dimName","type","calcDimNameToIdx","dimensions","calcDimIdx","ordinalMeta","chunk","rawExtents","offset","len","dimRawExtent","i","val","dimInfo","dimIndex","item","data","start","values","minFillLen","chunks","dimLen","rawExtent","emptyDataItem","idx","sourceIdx","dimNames","dataItem","dimStorage","dimStore","dimArr","rawIdx","dimData","sum","value","dimDataArray","sortedDimDataArray","b","rawIndex","indices","rawDataIndex","left","right","mid","maxDistance","nearestIndices","minDist","minDiff","nearestIndicesLen","dataIndex","diff","dist","newIndices","thisCount","dims","cb","count","dimSize","dim0","keep","k","range","keys","originalCount","min","max","storeArr","quickFinished","dimStorage2","min2","max2","val2","dimk","target","targetChunks","tmpRetValue","dataCount","retValue","rawExtentOnDim","valueDimension","rate","targetStorage","sampledIndex","frameSize","currentRawIndex","maxArea","area","nextRawIndex","nextFrameStart","nextFrameEnd","avgX","avgY","y","frameStart","frameEnd","pointAX","pointAY","firstNaNIndex","countNaN","dimension","sampleValue","sampleIndex","frameValues","dataIdx","sampleFrameIdx","initialExtent","currEnd","useRaw","dimExtent","clonedDims","ignoreIndices","clonedDimsMap","reduce","obj","clone","getDimValueSimply","property","parseDataValue","DataStore_default","SourceManager","sourceHost","sourceList","upstreamSignList","upSourceMgrList","hasUpstream","resultSourceList","isSeries","seriesModel","data","sourceFormat","upSource","upSourceMgr","isTypedArray","SOURCE_FORMAT_TYPED_ARRAY","SOURCE_FORMAT_ORIGINAL","newMetaRawOption","upMetaRawOption","seriesLayoutBy","retrieve2","sourceHeader","dimensions","needsCreateSource","createSource","datasetModel","result","sourceData","upMgrList","transformOption","fromTransformResult","errMsg","doThrow","upSourceList","each","upMgr","applyDataTransform","cloneSourceShallow","i","upSrcMgr","sourceIndex","source","seriesDimRequest","schema","storeDims","seriesSource","sourceReadKey","storeList","cachedStoreMap","cachedStore","DataStore_default","DefaultDataProvider","querySeriesUpstreamDatasetModel","map","queryDatasetUpstreamDatasetModels","model","disableTransformOptionMerge","datasetModel","transformOption","setAsPrimitive","isSeries","sourceHost","doThrow","errMsg","TOOLTIP_LINE_HEIGHT_CSS","getTooltipTextStyle","textStyle","renderMode","nameFontColor","nameFontSize","nameFontWeight","valueFontColor","valueFontSize","valueFontWeight","encodeHTML","HTML_GAPS","RICH_TEXT_GAPS","createTooltipMarkup","type","option","isSectionFragment","frag","getBuilder","buildSection","buildNameValue","getBlockGapLevel","gapLevel_1","subBlockLen","hasInnerGap_1","each","subBlock","subGapLevel","ctx","fragment","topMarginForOuterGap","toolTipTextStyle","noHeader","gaps","getGap","subMarkupTextList","subBlocks","assert","isArray","orderMode","orderMap","hasOwn","comparator_1","SortOrderComparator","a","b","idx","valueFormatter","subMarkupText","extend","wrapBlockHTML","displayableHeader","makeValueReadable","nameStyle","wrapInlineNameRichText","noName","noValue","noMarker","name","useUTC","value","map","val","valueTypeOption","markerStr","readableName","readableValueList","valueAlignRight","valueCloseToMarker","_a","valueStyle","wrapInlineValueRichText","wrapInlineNameHTML","wrapInlineValueHTML","buildTooltipMarkup","markupStyleCreator","builder","gapLevel","encodedContent","topGap","clearfix","marginCSS","leftHasMarker","style","marginCss","valueList","alignRight","paddingStr","alignCSS","values","styles","paddingLeft","retrieveVisualColorForTooltipMarker","series","dataIndex","color","convertToColorString","getPaddingFromTooltipModel","model","padding","TooltipMarkupStyleCreator","getRandomIdBase","markerType","colorStr","markerId","marker","getTooltipMarker","isString","text","finalStl","stl","styleName","defaultSeriesFormatTooltip","opt","series","dataIndex","multipleSeries","data","tooltipDims","tooltipDimLen","value","isValueArr","isArray","markerColor","retrieveVisualColorForTooltipMarker","inlineValue","inlineValueType","subBlocks","sortParam","formatArrResult","formatTooltipArrayValue","dimInfo","retrieveRawValue","seriesNameSpecified","isNameSpecified","seriesName","itemName","inlineName","createTooltipMarkup","trim","colorStr","isValueMultipleLine","reduce","val","idx","dimItem","inlineValues","inlineValueTypes","blocks","each","dim","setEachItem","inner","makeInner","getSelectionKey","data","dataIndex","SERIES_UNIVERSAL_TRANSITION_PROP","SeriesModel","_super","__extends","_this","option","parentModel","ecModel","createTask","dataTaskCount","dataTaskReset","sourceManager","SourceManager","wrapData","autoSeriesName","layoutMode","fetchLayoutMode","inputPositionParams","getLayoutParams","themeSubType","Component_default","merge","defaultEmphasis","mergeLayoutParam","newSeriesOption","isTypedArray","props","i","params","dataType","task","getCurrentTask","mainData","context","encode","createHashMap","colorBy","coordSys","multipleSeries","defaultSeriesFormatTooltip","env_default","animationEnabled","name","scope","requestColorNum","color","PaletteMixin","coordDim","innerDataIndices","selectedMap","selectedMode","nameOrId","tmpArr","selectedDataIndicesMap","nameOrIds","keys","dataIndices","universalTransitionOpt","_a","_b","len","isObject","lastDataIndex","idx","rawItem","clz","proto","mixin","DataFormatMixin","mountExtend","seriesModel","isNameSpecified","getSeriesAutoName","dataDims","nameArr","each","dataDim","dimInfo","dataTaskProgress","param","concatArray","methodName","curry","onDataChange","newList","scheduler","pipeline","agentStubMap","Series_default","ComponentView","Group_default","getUID","ecModel","api","model","payload","seriesModels","isBlur","cb","group","enableClassExtend","enableClassManagement","Component_default","createRenderPlanner","inner","makeInner","seriesModel","fields","pipelineContext","originalLarge","originalProgressive","large","progressive","inner","makeInner","renderPlanner","createRenderPlanner","ChartView","Group_default","getUID","createTask","renderTaskPlan","renderTaskReset","ecModel","api","seriesModel","payload","data","toggleHighlight","cb","traverseElements","methodName","proto","elSetState","el","state","highlightDigit","isHighDownDispatcher","enterEmphasis","leaveEmphasis","dataIndex","queryDataIndex","getHighlightDigit","each","normalizeToArray","dataIdx","enableClassExtend","enableClassManagement","context","progressiveRender","view","updateMethod","progressMethodMap","params","Chart_default","ORIGIN_METHOD","RATE","THROTTLE_TYPE","throttle","fn","delay","debounce","currCall","lastCall","lastExec","timer","diff","scope","args","debounceNextCall","exec","cb","cbArgs","_i","thisDelay","thisDebounce","debounceDelay","createOrUpdate","obj","fnAttr","rate","throttleType","originFn","lastThrottleType","lastRate","clear","inner","makeInner","defaultStyleMappers","makeStyleMapper","ITEM_STYLE_KEY_MAP","LINE_STYLE_KEY_MAP","defaultColorKey","getStyleMapper","seriesModel","stylePath","styleMapper","getDefaultColorKey","colorKey","seriesStyleTask","ecModel","data","styleModel","getStyle","globalStyle","decalOption","color","colorCallback","isFunction","hasAutoColor","colorPalette","idx","dataParams","itemStyle","extend","sharedModel","Model_default","dataStyleTask","rawItem","style","existsStyle","dataColorPaletteTask","paletteScopeGroupByType","createHashMap","colorBy","key","colorScope","dataAll","idxMap","rawIdx","fromPalette","name_1","dataCount","PI","defaultLoading","api","opts","defaults","group","Group_default","mask","Rect_default","textContent","Text_default","labelRect","arc","Arc_default","textWidth","r","cx","cy","Scheduler","ecInstance","api","dataProcessorHandlers","visualHandlers","createHashMap","ecModel","payload","taskRecord","overallTask","task","isBlock","pipeline","pCtx","incremental","step","modDataCount","modBy","pipelineId","seriesModel","view","data","dataLen","progressiveRender","large","scheduler","pipelineMap","progressive","stageTaskMap","each","handler","record","errMsg","assert","model","renderTask","context","opt","stageHandlers","unfinished","stageHandler","idx","stageHandlerRecord","seriesTaskMap","overallNeedDirty_1","agentStubMap","stub","needSetDirty","performArgs_1","performArgs","oldSeriesTaskMap","newSeriesTaskMap","seriesType","getTargetSeries","create","createTask","seriesTaskPlan","seriesTaskReset","seriesTaskCount","overallTaskReset","oldAgentStubMap","newAgentStubMap","overallProgress","shouldOverallTaskDirty","createStub","stubReset","stubOnDirty","visualType","isFunction","detectSeriseType","getUID","stubProgress","resetDefines","normalizeToArray","map","v","makeSeriesTaskProgress","singleSeriesTaskProgress","resetDefineIdx","params","resetDefine","i","legacyFunc","ecModelMock","apiMock","mockMethods","Global_default","ExtensionAPI_default","type","cond","target","Clz","name_1","noop","Scheduler_default","colorAll","light_default","contrastColor","backgroundColor","axisCommon","colorPalette","theme","dark_default","ECEventProcessor","query","cptQuery","dataQuery","otherQuery","isString","condCptType","parseClassType","suffixes_1","dataKeys_1","each","val","key","reserved","i","propSuffix","suffixPos","mainType","eventType","eventInfo","targetEl","packedEvent","model","view","check","host","prop","propOnHost","SYMBOL_PROPS_WITH_CB","SYMBOL_PROPS","seriesSymbolTask","seriesModel","ecModel","data","symbolOptions","symbolOptionsCb","hasCallback","i","symbolPropName","val","isFunction","extend","symbolPropsCb","keys","dataEach","idx","rawValue","params","dataSymbolTask","itemModel","getItemVisualFromData","data","dataIndex","key","style","getVisualFromData","handleSeriesLegacySelectEvents","type","eventPostfix","ecIns","ecModel","payload","legacyEventName","seriesModel","seriesIndex","selectedMap","selected","i","data","dataIndex","queryDataIndex","isArray","isString","extend","handleLegacySelectEvents","messageCenter","api","params","findEventDispatcher","target","det","returnFirstMatch","found","wmUniqueIndex","supportDefineProperty","WeakMap","key","value","target","WeakMap_default","Triangle","Path_default","path","shape","cx","cy","width","height","Diamond","Pin","x","y","w","h","r","dy","angle","dx","tanX","tanY","cpLen","cpLen2","Arrow","ctx","symbolCtors","Line_default","Rect_default","Circle_default","symbolShapeMakers","size","symbolBuildProxies","each","Ctor","name","SymbolClz","out","config","rect","res","calculateTextPosition","inBundle","symbolType","proxySymbol","symbolPathSetColor","color","innerColor","symbolStyle","createSymbol","keepAspect","isEmpty","symbolPath","makeImage","BoundingRect_default","makePath","normalizeSymbolSize","symbolSize","isArray","normalizeSymbolOffset","symbolOffset","parsePercent","retrieve2","isSafeNum","num","createLinearGradient","ctx","obj","rect","x","x2","y","y2","canvasGradient","createRadialGradient","width","height","min","r","getCanvasGradient","colorStops","i","isClipPathChanged","clipPaths","prevClipPaths","parseInt10","val","getSize","root","whIdx","opts","wh","cwh","plt","prb","stl","normalizeLineDash","lineType","lineWidth","isNumber","isArray","getLineDash","el","style","lineDash","lineDashOffset","lineScale_1","map","rawVal","pathProxyForDraw","PathProxy_default","styleHasStroke","style","stroke","isValidStrokeFillStyle","strokeOrFill","styleHasFill","fill","doFillPath","ctx","originalGlobalAlpha","doStrokePath","createCanvasPattern","pattern","el","image","createOrUpdateImage","isImageReady","canvasPattern","matrix","RADIAN_TO_DEGREE","brushPath","inBatch","_a","hasStroke","hasFill","strokePercent","strokePart","firstDraw","path","dirtyFlag","hasFillGradient","hasStrokeGradient","hasFillPattern","hasStrokePattern","fillGradient","strokeGradient","fillPattern","strokePattern","rect","getCanvasGradient","scale","lineDash","lineDashOffset","getLineDash","needsRebuild","SHAPE_CHANGED_BIT","brushImage","x","y","width","height","aspect","sx","sy","sWidth","sHeight","brushText","text","DEFAULT_FONT","SHADOW_NUMBER_PROPS","STROKE_PROPS","bindCommonProps","prevStyle","forceSetAll","scope","styleChanged","flushPathDrawn","opacity","DEFAULT_COMMON_STYLE","i","propName","bindPathAndTextCommonStyle","prevEl","getStyle","lineWidth","newLineWidth","prop","bindImageStyle","setContextTransform","m","dpr","updateClipStatus","clipPaths","allClipped","clipPath","isTransformChanged","m0","m1","DRAW_TYPE_PATH","DRAW_TYPE_IMAGE","DRAW_TYPE_TEXT","DRAW_TYPE_INCREMENTAL","canPathBatch","inHover","brushSingle","brush","isLast","REDRAW_BIT","prevElClipPaths","forceSetTransform","forceSetStyle","isClipPathChanged","canBatchPath","Path_default","TSpan_default","Image_default","brushIncremental","displayables","temporalDisplayables","innerScope","len","displayable","i_1","len_1","decalMap","WeakMap_default","decalCache","LRU_default","decalKeys","createOrUpdatePatternFromDecal","decalObject","api","dpr","zr","isSVG","oldPattern","decalOpt","defaults","pattern","setPatternnSource","keys","isValidKey","i","value","isArray","isString","isNumber","cacheKey","cache","dashArrayX","normalizeDashArrayX","dashArrayY","normalizeDashArrayY","symbolArray","normalizeSymbolArray","lineBlockLengthsX","getLineBlockLengthX","lineBlockLengthY","getLineBlockLengthY","canvas","platformApi","svgRoot","pSize","getPatternSize","ctx","brushDecal","width","xlen","getLeastCommonMultiple","symbolRepeats","height","warn","ySum","y","yId","yIdTotal","xId0","symbolYId","x","xId1","xId1Total","xSum","size","left","top_1","symbolXId","brushSymbol","symbolType","scale","symbol","createSymbol","symbolVNode","brushSingle","isAllString","result","dash","dashValue","isAllNumber","map","n","dashValue_1","line","blockLength","decalVisual","ecModel","api","seriesModel","data","idx","decal","itemStyle","createOrUpdatePatternFromDecal","style","lifecycle","Eventful_default","lifecycle_default","implsStore","registerImpl","name","impl","getImpl","version","dependencies","TEST_FRAME_REMAIN_TIME","PRIORITY_PROCESSOR_SERIES_FILTER","PRIORITY_PROCESSOR_DATASTACK","PRIORITY_PROCESSOR_FILTER","PRIORITY_PROCESSOR_DEFAULT","PRIORITY_PROCESSOR_STATISTIC","PRIORITY_VISUAL_LAYOUT","PRIORITY_VISUAL_PROGRESSIVE_LAYOUT","PRIORITY_VISUAL_GLOBAL","PRIORITY_VISUAL_CHART","PRIORITY_VISUAL_COMPONENT","PRIORITY_VISUAL_CHART_DATA_CUSTOM","PRIORITY_VISUAL_POST_CHART_LAYOUT","PRIORITY_VISUAL_BRUSH","PRIORITY_VISUAL_ARIA","PRIORITY_VISUAL_DECAL","PRIORITY","IN_MAIN_PROCESS_KEY","PENDING_UPDATE","STATUS_NEEDS_UPDATE_KEY","ACTION_REG","CONNECT_STATUS_KEY","CONNECT_STATUS_PENDING","CONNECT_STATUS_UPDATING","CONNECT_STATUS_UPDATED","createRegisterEventWithLowercaseECharts","method","args","_i","toLowercaseNameAndCallEventful","createRegisterEventWithLowercaseMessageCenter","host","Eventful_default","MessageCenter","_super","__extends","messageCenterProto","prepare","prepareView","updateDirectly","updateMethods","doConvertPixel","updateStreamModes","doDispatchAction","flushPendingActions","triggerUpdatedEvent","bindRenderedEvent","bindMouseEvent","render","renderComponents","renderSeries","createExtensionAPI","enableConnect","markStatusToUpdate","applyChangedStates","ECharts","dom","theme","opts","_this","ECEventProcessor","isString","themeStorage","defaultRenderer","defaultCoarsePointer","defaultUseDirtyRect","root","registerSSRDataGetter","el","ecData","getECData","dataIndex","hashMap","createHashMap","zr","init","retrieve2","throttle","bind","clone","globalBackwardCompat","createLocaleObject","SYSTEM_LANG","CoordinateSystem_default","api","prioritySortFunc","a","b","sort","visualFuncs","dataProcessorFuncs","Scheduler_default","setAsPrimitive","scheduler","silent","e","remainTime","ecModel","startTime","option","notMerge","lazyUpdate","replaceMerge","transitionOpt","isObject","optionManager","OptionManager_default","Global_default","optionPreprocessorFuncs","updateParams","env_default","painter","list","each","excludeComponents","excludesComponentViews","self","componentType","component","view","url","isSvg","groupId","mathMin","mathMax","MAX_NUMBER","connectedGroups","left_1","top_1","right_1","bottom_1","canvasList_1","dpr_1","instances","chart","id","canvas","boundingRect","width","height","targetCanvas","platformApi","zr_1","content_1","item","x","y","Rect_default","img","Image_default","finder","value","result","findResult","parseFinder","models","key","model","coordSys","visualType","parsedFinder","seriesModel","data","dataIndexInside","getItemVisualFromData","getVisualFromData","componentModel","MOUSE_EVENT_NAMES","eveName","handler","params","isGlobalOut","findEventDispatcher","parent","dataModel","extend","componentIndex","eventActionMap","actionType","eventType","event","handleLegacySelectEvents","setAttribute","DOM_ATTRIBUTE_KEY","needPrepare","name","cfg","loadingEffects","eventObj","payload","opt","actions","flush","lifecycle_default","seriesIndex","ecIns","isComponent","viewList","viewMap","i","doPrepare","requireNewView","viewId","classType","parseClassType","Clazz","Component_default","Chart_default","mainType","subType","callView","query","condition","excludeSeriesId","excludeSeriesIdMap","normalizeToArray","modelId","convertOptionIdName","isExcluded","isHighDownPayload","Series_default","HIGHLIGHT_ACTION_TYPE","blurSeriesFromHighlightPayload","_a","findComponentHighDownDispatchers","focusSelf","dispatchers","blurComponent","dispatcher","enterEmphasis","leaveEmphasis","isSelectChangePayload","toggleSelectionFromPayload","updateSeriesElementSelection","coordSysMgr","clearColorPalette","backgroundColor","darkMode","componentDirtyList","componentView","seriesDirtyMap","chartView","methodName","coordSysList","chartsMap","payloadType","escapeConnect","actionWrap","actionInfo","cptTypeTmp","updateMethod","cptType","payloads","batched","map","defaults","eventObjBatch","isSelectChange","isHighDown","allLeaveBlur","batchItem","preParseFinder","queryOptionMap","mainTypeSpecified","componentMainType","messageCenter","newObj","getAllSelectedIndices","pendingActions","isHighDownDispatcher","handleGlobalMouseOverForHighDown","handleGlobalMouseOutForHighDown","target","allocateZlevels","componentZLevels","seriesZLevels","hasSeparateZLevel","zlevel","z","zlevelKey","zLevels","lastSeriesZLevel_1","lastSeriesKey_1","dirtyList","clearStates","updateZ","updateStates","dirtyMap","unfinished","renderTask","updateBlend","updateHoverLayerStatus","isElementRemoved","applyElementStates","newStates","oldStates","stateName","HOVER_STATE_EMPHASIS","HOVER_STATE_BLUR","storage","elCount","blendMode","doUpdateZ","maxZ2","label","labelLine","isGroup","children","textGuideLineConfig","textContent","textGuide","stateAnimationModel","enableAnimation","duration","stateTransition","Path_default","savePathStates","prevStates","class_1","modelInfo","highlightDigit","enterBlur","leaveBlur","enterSelect","leaveSelect","ExtensionAPI_default","updateConnectedChartsStatus","charts","status","otherChart","action_1","otherCharts_1","echartsProto","eventName","cb","ctx","wrapped","args2","actions","eventActionMap","dataProcessorFuncs","optionPreprocessorFuncs","visualFuncs","themeStorage","loadingEffects","instances","connectedGroups","idBase","groupIdBase","DOM_ATTRIBUTE_KEY","init","dom","theme","opts","isClient","existInstance","getInstanceByDom","chart","ECharts","setAttribute","enableConnect","lifecycle_default","connect","groupId","isArray","charts","each","disconnect","disConnect","dispose","isString","getAttribute","getInstanceById","key","registerTheme","name","registerPreprocessor","preprocessorFunc","indexOf","registerProcessor","priority","processor","normalizeRegister","PRIORITY_PROCESSOR_DEFAULT","registerPostInit","postInitFunc","registerUpdateLifecycle","registerPostUpdate","postUpdateFunc","cb","registerAction","actionInfo","eventName","action","isFunction","actionType","isObject","assert","ACTION_REG","registerCoordinateSystem","type","coordSysCreator","CoordinateSystem_default","getCoordinateSystemDimensions","registerLayout","layoutTask","PRIORITY_VISUAL_LAYOUT","registerVisual","visualTask","PRIORITY_VISUAL_CHART","registeredTasks","normalizeRegister","targetList","priority","fn","defaultPriority","visualType","isFunction","isObject","indexOf","stageHandler","Scheduler_default","registerLoading","name","loadingFx","loadingEffects","setCanvasCreator","creator","setPlatformAPI","registerMap","mapName","geoJson","specialAreas","getImpl","getMap","registerTransform","registerExternalTransform","registerVisual","PRIORITY_VISUAL_GLOBAL","seriesStyleTask","PRIORITY_VISUAL_CHART_DATA_CUSTOM","dataStyleTask","dataColorPaletteTask","seriesSymbolTask","dataSymbolTask","PRIORITY_VISUAL_DECAL","decalVisual","registerPreprocessor","globalBackwardCompat","registerProcessor","PRIORITY_PROCESSOR_DATASTACK","dataStack","defaultLoading","registerAction","HIGHLIGHT_ACTION_TYPE","noop","DOWNPLAY_ACTION_TYPE","SELECT_ACTION_TYPE","UNSELECT_ACTION_TYPE","TOGGLE_SELECT_ACTION_TYPE","registerTheme","light_default","dark_default","dataTool","dataIndexMapValueLength","valNumOrArrLengthMoreThan2","defaultKeyGetter","item","DataDiffer","oldArr","newArr","oldKeyGetter","newKeyGetter","context","diffMode","func","newDataIndexMap","oldDataKeyArr","newDataKeyArr","i","oldKey","newIdxMapVal","newIdxMapValLen","newIdx","oldDataIndexMap","oldIdxMapVal","oldIdxMapValLen","i_1","newKey","idxMapValLen","j","arr","map","keyArr","keyGetterName","cbModeMultiple","key","idxMapVal","DataDiffer_default","DimensionUserOuput","encode","dimRequest","summarizeDimensions","data","schema","summary","notExtraCoordDimMap","createHashMap","defaultedLabel","defaultedTooltip","userOutputEncode","each","dimName","dimItem","coordDim","coordDimIndex","getOrCreateEncodeArr","mayLabelDimType","VISUAL_DIMENSIONS","v","otherDim","encodeArr","dimIndex","dataDimsOnCoord","encodeFirstDimNotExtra","dimArr","map","encodeLabel","encodeTooltip","dim","getDimensionTypeByAxis","axisType","dimType","SeriesDimensionDefine","opt","extend","SeriesDimensionDefine_default","inner","makeInner","dimTypeShort","SeriesDataSchema","opt","dimensionOmitted","ensureSourceDimNameMap","dimName","retrieve2","dimIndex","dimensionsDefine","dimCount","willRetrieveDataByName","shouldRetrieveDataByName","makeHashStrict","shouldOmitUnusedDimensions","dimHash","dims","fullDimIdx","seriesDimIdx","property","type","ordinalMeta","seriesDimDef","sourceDimDef","source","hash","result","name_1","dimDef","isSeriesDataSchema","schema","SeriesDataSchema","createDimNameMap","dimsDef","dataDimNameMap","createHashMap","i","dimDefItemRaw","userDimName","isObject","ensureSourceDimNameMap","source","innerSource","inner","shouldOmitUnusedDimensions","dimCount","isObject","map","CtorInt32Array","ID_PREFIX","INDEX_NOT_FOUND","TRANSFERABLE_PROPERTIES","CLONE_PROPERTIES","prepareInvertedIndex","getId","getIdNameFromStore","normalizeDimensions","transferProperties","cloneListForMapAndSample","makeIdFromName","SeriesData","dimensionsInput","hostModel","dimensions","assignStoreDimIdx","isSeriesDataSchema","dimensionInfos","dimensionNames","invertedIndicesMap","needsHasOwn","emptyObj","i","dimInfoInput","dimensionInfo","isString","SeriesDimensionDefine_default","dimensionName","otherDims","dimIdxToName_1","createHashMap","each","dimName","dim","dimIdx","sourceDimDef","dimInfo","isNumber","coordDim","idx","dimensionsSummary","dims","data","nameList","dimValueGetter","_this","store","DataStore_default","provider","isSourceInstance","isArrayLike","DefaultDataProvider","summarizeDimensions","range","values","names","_a","start","end","shouldMakeIdFromName","sourceIdx","SOURCE_FORMAT_TYPED_ARRAY","idList","sourceFormat","isFormatOriginal","SOURCE_FORMAT_ORIGINAL","sharedDataItem","dataItem","isDataItemOption","itemName","convertOptionIdName","itemId","extent","key","value","extend","rawIndex","name","ordinal","ordinalMeta","rawIdx","isArray","dataDimIndicesOnCoord","len","invertedIndices","maxDistance","cb","ctx","isFunction","fCtx","dimIndices","bind","innerRange","keys","result","ctxCompat","list","dimension","rate","sampleValue","sampleIndex","valueDimension","Model_default","otherList","thisList","DataDiffer_default","visual","kvObj","val","itemVisual","itemVisuals","layout","merge","el","seriesIndex","setCommonECData","context","methodName","injectFunction","originalMethod","res","slice","id","original","target","source","propName","clone","nameDimIdx","idDimIdx","nameRepeatCount","nmCnt","SeriesData_default","helper_exports","__export","createDimensions","createList","createScale","createSymbol","createTextStyle","dataStack","enableHoverEmphasis","getECData","getLayoutRect","mixinAxisModelCommonMethods","createDimensions","source","opt","prepareSeriesDataSchema","isSourceInstance","createSourceFromSeriesDataOption","sysDims","dimsDef","coordDimNameMap","createHashMap","resultList","dimCount","getDimCount","omitUnusedDimensions","shouldOmitUnusedDimensions","isUsingSourceDimensionsDef","dataDimNameMap","ensureSourceDimNameMap","createDimNameMap","encodeDef","encodeDefMap","indicesMap","CtorInt32Array","i","getResultItem","dimIdx","idx","dimDefItemRaw","dimDefItem","isObject","resultItem","SeriesDimensionDefine_default","userDimName","newIdx","dataDimsRaw","coordDim","dataDims","normalizeToArray","isString","validDataDims","each","resultDimIdxOrName","resultDimIdx","applyDim","availDimIdx","sysDimItemRaw","sysDimItemDimsDef","sysDimItemOtherDims","sysDimItem","ordinalMeta","extend","coordDimIndex","defaults","sysDimItemDimsDefItem","VISUAL_DIMENSIONS","generateCoord","generateCoordCount","fromZero","extra","ifNoNameFillWithCoordName","item0","item1","genCoordDimName","guessOrdinal","BE_ORDINAL","removeDuplication","SeriesDataSchema","result","duplicationMap","dim","dimOriginalName","count","optDimCount","name","map","CoordSysInfo","coordSysName","createHashMap","getCoordSysInfoBySeries","seriesModel","result","fetch","fetchers","axisMap","categoryAxisMap","xAxisModel","SINGLE_REFERRING","yAxisModel","isCategory","singleAxisModel","polarModel","radiusAxisModel","angleAxisModel","ecModel","parallelModel","coordSysDims","each","axisIndex","index","axisModel","axisDim","enableDataStack","seriesModel","dimensionsInput","opt","byIndex","stackedCoordDimension","dimensionDefineList","schema","store","isLegacyDimensionsInput","mayStack","stackedByDimInfo","stackedDimInfo","stackResultDimension","stackedOverDimension","each","dimensionInfo","index","isString","stackedDimCoordDim_1","stackedDimType","stackedDimCoordIndex_1","stackedOverDimensionDefine","stackResultDimensionDefine","isSeriesDataSchema","isDimensionStacked","data","stackedDim","getStackedDimension","targetDim","getCoordSysDimDefs","seriesModel","coordSysInfo","coordSysName","registeredCoordSys","CoordinateSystem_default","coordSysDimDefs","map","dim","dimInfo","axisModel","axisType","getDimensionTypeByAxis","injectOrdinalMeta","dimInfoList","createInvertedIndices","firstCategoryDimIndex","hasNameEncode","each","dimIndex","coordDim","categoryAxisModel","createSeriesData","sourceRaw","opt","sourceManager","source","isOriginalSource","createSourceFromSeriesDataOption","SOURCE_FORMAT_ORIGINAL","getCoordSysInfoBySeries","useEncodeDefaulter","encodeDefaulter","isFunction","curry","makeSeriesEncodeForAxisCoordSys","createDimensionOptions","schema","prepareSeriesDataSchema","store","stackCalculationInfo","enableDataStack","data","SeriesData_default","dimValueGetter","isNeedCompleteOrdinalData","itemOpt","dimName","dataIndex","sampleItem","firstDataNotNull","isArray","getDataItemValue","arr","i","createSeriesData_default","Scale","setting","name","other","extent","data","dim","start","end","thisExtent","value","isBlank","enableClassManagement","Scale_default","uidBase","OrdinalMeta","opt","axisModel","option","data","categories","map","getName","category","index","needCollect","isString","createHashMap","obj","isObject","OrdinalMeta_default","isIntervalOrLogScale","scale","intervalScaleNiceTicks","extent","splitNumber","minInterval","maxInterval","result","span","interval","nice","precision","getIntervalPrecision","niceTickExtent","round","fixExtent","increaseInterval","exp10","quantityExponent","f","getPrecision","clamp","idx","contain","val","normalize","OrdinalScale","_super","__extends","setting","_this","ordinalMeta","OrdinalMeta_default","isArray","map","item","isObject","val","isString","rank","contain","normalize","scale","ticks","extent","splitNumber","info","infoOrdinalNumbers","ordinalsByTick","ticksByOrdinal","tickNum","allCategoryLen","len","ordinalNumber","unusedOrdinal","ordinal","ticksByOrdinalNumber","tickNumber","ordinalNumbersByTick","tick","cateogry","data","dim","value","Scale_default","Ordinal_default","roundNumber","round","IntervalScale","_super","__extends","_this","val","contain","normalize","scale","start","end","thisExtent","other","extent","interval","getIntervalPrecision","expandToNicedExtent","niceTickExtent","intervalPrecision","ticks","safeLimit","tick","lastNiceTick","splitNumber","minorTicks","i","nextTick","prevTick","count","minorTicksGroup","minorInterval","minorTick","data","opt","precision","getPrecision","dataNum","addCommas","minInterval","maxInterval","span","result","intervalScaleNiceTicks","expandSize","min","max","Scale_default","Interval_default","supportFloat32Array","Float32ArrayCtor","createFloat32Array","arg","isArray","STACK_PREFIX","getSeriesStackId","seriesModel","getAxisKey","axis","prepareLayoutBarSeries","seriesType","ecModel","seriesModels","seriesModel","isOnCartesian","getValueAxesMinGaps","barSeries","axisValues","each","cartesian","baseAxis","data","key","dimIdx","store","i","cnt","value","axisMinGaps","valuesInAxis","a","b","min","j","delta","makeColumnLayout","seriesInfoList","axisExtent","bandWidth","minGap","extentSpan","scale","scaleSpan","barWidth","parsePercent","barMaxWidth","barMinWidth","isInLargeMode","barGap","barCategoryGap","getAxisKey","getSeriesStackId","doCalBarWidthAndOffset","columnsMap","seriesInfo","idx","axisKey","columnsOnAxis","stacks","stackId","result","coordSysName","categoryGapPercent","columnCount","keys","categoryGap","barGapPercent","remainedWidth","autoWidthCount","autoWidth","column","maxWidth","minWidth","finalWidth","widthSum","lastColumn","offset","retrieveColumnLayout","barWidthAndOffset","axis","layout","seriesType","ecModel","seriesModels","prepareLayoutBarSeries","barWidthAndOffset","makeColumnLayout","each","seriesModel","data","cartesian","baseAxis","stackId","getSeriesStackId","columnLayoutInfo","getAxisKey","columnOffset","columnWidth","createProgressiveLayout","createRenderPlanner","isOnCartesian","valueAxis","valueDimIdx","baseDimIdx","drawBackground","valueDim","stackResultDim","stacked","isDimensionStacked","isValueAxisH","valueAxisStart","getValueAxisStart","isLarge","isInLargeMode","barMinHeight","stackedDimIdx","params","count","largePoints","createFloat32Array","largeBackgroundPoints","largeDataIndices","coordLayout","bgSize","dataIndex","store","idxOffset","value","baseValue","baseCoord","stackStartValue","x","y","width","height","coord","startCoord","startValue","bisect","a","x","lo","hi","mid","TimeScale","_super","__extends","settings","_this","tick","useUTC","format","fullLeveledFormatter","getDefaultFormatPrecisionOfInterval","getPrimaryTimeUnit","idx","labelFormatter","isUTC","lang","leveledFormat","interval","extent","ticks","innerTicks","getIntervalTicks","opt","ONE_DAY","d","approxTickNum","minInterval","maxInterval","span","scaleIntervalsLen","scaleIntervals","val","isNumber","parseDate","contain","normalize","scale","Interval_default","ONE_SECOND","ONE_MINUTE","ONE_HOUR","ONE_YEAR","isUnitValueSame","unit","valueA","valueB","dateA","dateB","isSame","getUnitValue","isSameYear","isSameMonth","isSameDay","isSameHour","isSameMinute","isSameSecond","isSameMilliSecond","getDateInterval","approxInterval","daysInMonth","getMonthInterval","APPROX_ONE_MONTH","getHourInterval","getMinutesAndSecondsInterval","isMinutes","getMillisecondsInterval","nice","getFirstTimestampOfUnit","date","unitName","outDate","monthSetterName","dateSetterName","hoursSetterName","minutesSetterName","secondsSetterName","millisecondsSetterName","bottomUnitName","safeLimit","unitNames","timeUnits","iter","addTicksInSpan","minTimestamp","maxTimestamp","getMethodName","setMethodName","isDate","out","dateTime","addLevelTicks","lastLevelTicks","levelTicks","newAddedTicks","isFirstLevel","i","startTick","endTick","getterName","setterName","fullYearGetterName","fullYearSetterName","monthGetterName","dateGetterName","hoursGetterName","minutesGetterName","secondsGetterName","millisecondsGetterName","levelsTicks","currentLevelTicks","tickCount","lastLevelTickCount","primaryTimeUnit","isPrimaryTimeUnit","nextPrimaryTimeUnit","b","levelTicksRemoveDuplicated","i_1","tickValue","targetTickNum","levelsTicksInExtent","filter","map","maxLevel","k","result","Scale_default","Time_default","scaleProto","Scale_default","intervalScaleProto","Interval_default","roundingErrorFix","round","mathFloor","mathCeil","mathPow","mathLog","LogScale","_super","__extends","_this","expandToNicedExtent","originalScale","extent","originalExtent","ticks","map","tick","val","powVal","fixRoundingError","start","end","base","data","dim","approxTickNum","span","interval","quantity","err","niceExtent","opt","contain","normalize","scale","proto","originalVal","getPrecision","Log_default","ScaleRawExtentInfo","scale","model","originalExtent","dataExtent","isOrdinal","axisMinValue","modelMinRaw","isFunction","parseAxisModelMinMax","modelMaxRaw","boundaryGap","boundaryGapArr","isArray","parsePercent","dataMin","dataMax","axisDataLen","boundaryGapInner","span","min","max","minFixed","maxFixed","isBlank","eqNaN","determinedMin","determinedMax","minMaxName","val","DATA_MIN_MAX_ATTR","attr","DETERMINED_MIN_MAX_ATTR","DETERMINED_MIN_MAX_ATTR","DATA_MIN_MAX_ATTR","ensureScaleRawExtentInfo","scale","model","originalExtent","rawExtentInfo","ScaleRawExtentInfo","parseAxisModelMinMax","minMax","eqNaN","getScaleExtent","scale","model","scaleType","rawExtentResult","ensureScaleRawExtentInfo","min","max","ecModel","barSeriesModels","prepareLayoutBarSeries","isBaseAxisAndHasBarSeries_1","each","seriesModel","barWidthAndOffset","makeColumnLayout","adjustedScale","adjustScaleForOverflow","axisExtent","axisLength","barsOnCurrentAxis","retrieveColumnLayout","minOverflow","item","maxOverflow","totalOverFlow","oldRange","oldRangePercentOfNew","overflowBuffer","niceScaleExtent","inModel","extentInfo","extent","splitNumber","Log_default","interval","isIntervalOrTime","createScaleByModel","axisType","Ordinal_default","Time_default","Scale_default","Interval_default","ifAxisCrossZero","axis","dataExtent","makeLabelFormatter","labelFormatter","categoryTickStart","tpl","tick","idx","isString","label","text","isFunction","cb","getAxisRawValue","estimateLabelUnionRect","axisModel","realNumberScaleTicks","tickCount","categoryScaleExtent","axisLabelModel","rect","step","i","unrotatedSingleRect","singleRect","rotateTextRect","textRect","rotate","rotateRadians","beforeWidth","beforeHeight","afterWidth","afterHeight","rotatedRect","BoundingRect_default","getOptionCategoryInterval","shouldShowAllLabels","getDataDimensionsOnAxis","data","axisDim","dataDimMap","dataDim","getStackedDimension","keys","AxisModelCommonMixin","option","createList","seriesModel","createSeriesData_default","dataStack","isDimensionStacked","enableDataStack","getStackedDimension","createScale","dataExtent","option","axisModel","Model_default","scale","createScaleByModel","niceScaleExtent","mixinAxisModelCommonMethods","Model","mixin","AxisModelCommonMixin","createTextStyle","textStyleModel","opts","extensions","extensionRegisters","registerPreprocessor","registerProcessor","registerPostInit","registerPostUpdate","registerUpdateLifecycle","registerAction","registerCoordinateSystem","registerLayout","registerVisual","registerTransform","registerLoading","registerMap","registerImpl","PRIORITY","Component_default","Series_default","Chart_default","ComponentModelClass","ComponentViewClass","SeriesModelClass","ChartViewClass","componentType","defaulter","painterType","PainterCtor","registerPainter","use","ext","isArray","each","singleExt","indexOf","isFunction","EPSILON","isAroundEqual","a","b","contain","points","x","y","w","p","i","p2","windingLine","p0","TMP_TRANSFORM","transformPoints","points","transform","p","applyTransform","updateBBoxFromPoints","min","max","projection","i","centroid","signedArea","cx","cy","len","x0","y0","x1","y1","a","Region","name","center","GeoJSONPolygonGeometry","exterior","interiors","GeoJSONLineStringGeometry","points","GeoJSONRegion","_super","__extends","name","geometries","cp","_this","largestGeo","largestGeoSize","i","geo","exterior","size","centroid","rect","projection","min","max","each","updateBBoxFromPoints","points","BoundingRect_default","coord","loopGeo","len","interiors","contain","k","x","y","width","height","aspect","target","transform","transformPoints","interior","newRegion","Region","GeoSVGRegion","_super","__extends","name","elOnlyForCalculate","_this","el","rect","center","mat","identity","TMP_TRANSFORM","target","mul","invert","applyTransform","Region","decode","json","jsonCompressed","encodeScale","features","each","feature","geometry","encodeOffsets","coordinates","decodeRing","decodeRings","rings","idx","c","coordinate","result","prevX","prevY","i","x","y","parseGeoJSON","geoJson","nameProperty","map","filter","featureObj","properties","geo","geometries","GeoJSONPolygonGeometry","item","GeoJSONLineStringGeometry","region","GeoJSONRegion","number_exports","__export","MAX_SAFE_INTEGER","asc","getPercentWithPrecision","getPixelPrecision","getPrecision","getPrecisionSafe","isNumeric","isRadianAroundZero","linearMap","nice","numericToNumber","parseDate","quantile","quantity","quantityExponent","reformIntervals","remRadian","round","time_exports","__export","format","parseDate","graphic_exports","__export","Arc_default","BezierCurve_default","BoundingRect_default","Circle_default","CompoundPath_default","Ellipse_default","Group_default","Image_default","IncrementalDisplayable_default","Line_default","LinearGradient_default","Polygon_default","Polyline_default","RadialGradient_default","Rect_default","Ring_default","Sector_default","Text_default","clipPointsByRect","clipRectByRect","createIcon","extendPath","extendShape","getShapeClass","getTransform","initProps","makeImage","makePath","mergePath","registerShape","resizePath","updateProps","format_exports","__export","addCommas","capitalFirst","encodeHTML","formatTime","formatTpl","getTextRect","getTooltipMarker","normalizeCssArray","toCamelCase","truncateText","util_exports","__export","bind","clone","curry","defaults","each","extend","filter","indexOf","inherits","isArray","isFunction","isObject","isString","map","merge","reduce","inner","makeInner","tickValuesToNumbers","axis","values","nums","map","val","createAxisLabels","custom","labelFormatter_1","makeLabelFormatter","numval","tick","makeCategoryLabels","makeRealNumberLabels","createAxisTicks","tickModel","makeCategoryTicks","labelModel","result","makeCategoryLabelsActually","labelsCache","getListCache","optionLabelInterval","getOptionCategoryInterval","listCacheGet","labels","numericLabelInterval","isFunction","makeLabelsByCustomizedCategoryInterval","makeAutoCategoryInterval","makeLabelsByNumericCategoryInterval","listCacheSet","ticksCache","optionTickInterval","ticks","tickCategoryInterval","labelsResult","labelItem","labelFormatter","idx","prop","cache","key","i","value","calculateCategoryInterval","params","fetchAutoCategoryIntervalCalculationParams","rotation","ordinalScale","ordinalExtent","tickCount","step","tickValue","unitSpan","unitW","unitH","maxW","maxH","width","height","rect","getBoundingRect","dw","dh","interval","axisExtent","lastAutoInterval","lastTickCount","categoryInterval","onlyTick","startTick","showAllLabel","shouldShowAllLabels","includeMinLabel","includeMaxLabel","addItem","tickObj","each","rawLabel","NORMALIZED_EXTENT","Axis","dim","scale","extent","coord","min","max","data","dataExtent","getPixelPrecision","start","end","clamp","fixExtentWithBands","linearMap","t","point","opt","tickModel","result","createAxisTicks","ticks","ticksCoords","map","tickVal","alignWithLabel","fixOnBandTicksCoords","minorTickModel","splitNumber","minorTicks","minorTicksCoords","minorTicksGroup","minorTick","createAxisLabels","axisExtent","len","size","calculateCategoryInterval","nTick","margin","axis","ticksLen","last","diffSize","crossLen","shift_1","each","ticksItem","inverse","littleThan","a","b","round","Axis_default","extendComponentModel","proto","Model","Component_default","extendComponentView","View","extendSeriesModel","Series_default","extendChartView","Chart_default","prepareLayoutList","input","list","i","rawItem","label","transform","localRect","isAxisAligned","minMargin","globalRect","obb","OrientedBoundingRect_default","hideOverlap","labelList","displayedLabels","a","b","globalRect","BoundingRect_default","hideEl","el","emphasisState","i","labelItem","isAxisAligned","localRect","transform","label","labelLine","obb","overlapped","j","existsTextCfg","OrientedBoundingRect_default","createDom","id","painter","dpr","newDom","platformApi","width","height","newDomStyle","Layer","_super","__extends","_this","dom","devicePixelRatio","isObject","domStyle","disableUserSelect","displayList","prevList","viewWidth","viewHeight","mergedRepaintRects","maxRepaintRectCount","full","pendingRect","BoundingRect_default","addRectToMergePool","rect","boundingRect","isMerged","minDeltaArea","bestRectToMergeIdx","i","mergedRect","pendingRect_1","aArea","bArea","pendingArea","deltaArea","el","shouldPaint","prevRect","REDRAW_BIT","curRect","hasIntersections","j","domBack","clearAll","clearColor","repaintRects","ctx","haveMotionBLur","lastFrameAlpha","self","doClear","x","y","clearColorGradientOrPattern","isGradientObject","shouldCache","getCanvasGradient","isImagePatternObject","createCanvasPattern","each","Eventful_default","Layer_default","HOVER_LAYER_ZLEVEL","CANVAS_ZLEVEL","EL_AFTER_INCREMENTAL_INC","INCREMENTAL_INC","isLayerValid","layer","createRoot","width","height","domRoot","CanvasPainter","root","storage","opts","id","singleCanvas","extend","devicePixelRatio","rootStyle","disableUserSelect","zlevelList","layers","rootCanvas","mainLayer","Layer_default","getSize","viewportRoot","paintAll","list","prevList","i","z","clearColor","len","hoverLayer","scope","ctx","el","brush","brushSingle","redrawId","_a","finished","needsRefreshHover","self_1","requestAnimationFrame_default","_this","layerList","useDirtyRect","zi","zlevel","_loop_1","k","repaintRects","this_1","start","useTimer","startTime","firstEl","repaint","repaintRect","dTime","dpr","r","rect","env_default","each","currentLayer","isLast","paintRect","virtual","merge","layersMap","prevLayer","prevDom","cb","context","updatePrevLayer","idx","i_1","incrementalLayerCount","prevZlevel","logError","REDRAW_BIT","backgroundColor","config","layerConfig","_zlevel","indexOf","imageLayer","width_1","height_1","displayList","Painter_default","install","registers","Painter_default","LineSeriesModel","_super","__extends","_this","option","coordSys","createSeriesData_default","opt","group","Group_default","line","createSymbol","visualType","visualRotate","symbolType","size","symbol","symbolRotate","Series_default","LineSeries_default","getDefaultLabel","data","dataIndex","labelDims","len","rawVal","retrieveRawValue","vals","i","getDefaultInterpolatedLabel","interpolatedValue","isArray","dimIndex","Symbol","_super","__extends","data","idx","seriesScope","opts","_this","symbolType","symbolSize","keepAspect","symbolPath","createSymbol","driftSymbol","toLastFrame","enterEmphasis","leaveEmphasis","zlevel","z","draggable","hasCursorOption","seriesModel","isInit","disableAnimation","target","updateProps","saveOldStyle","initProps","emphasisItemStyle","blurItemStyle","selectItemStyle","focus","blurScope","emphasisDisabled","labelStatesModels","hoverScale","cursorStyle","itemModel","emphasisModel","getLabelStatesModels","symbolRotate","symbolOffset","normalizeSymbolOffset","symbolStyle","visualColor","Image_default","pathStyle","extend","liftZ","z2Origin","useNameLabel","setLabelStyle","getLabelDefaultText","getDefaultLabel","emphasisState","scaleRatio","toggleHoverEmphasis","scale","cb","opt","dataIndex","getECData","animationOpt","textContent","removeElement","normalizeSymbolSize","Group_default","dx","dy","Symbol_default","symbolNeedsDraw","data","point","idx","opt","normalizeUpdateOpt","isObject","makeSeriesScope","seriesModel","emphasisModel","getLabelStatesModels","SymbolDraw","SymbolCtor","Group_default","Symbol_default","group","oldData","disableAnimation","seriesScope","symbolUpdateOpt","getSymbolPoint","newIdx","symbolEl","oldIdx","newSymbolType","oldSymbolType","target","updateProps","el","_this","taskParams","updateIncrementalAndHover","cb","traverseElements","enableAnimation","SymbolDraw_default","prepareDataCoordInfo","coordSys","data","valueOrigin","baseAxis","valueAxis","valueStart","getValueStart","baseAxisDim","valueAxisDim","valueDim","baseDim","baseDataOffset","dims","map","coordDim","stacked","stackResultDim","isDimensionStacked","extent","isNumber","getStackedOnPoint","dataCoordInfo","idx","value","stackedData","diffData","oldData","newData","diffResult","idx","newIdx","oldIdx","lineAnimationDiff","oldStackedOnPoints","newStackedOnPoints","oldCoordSys","newCoordSys","oldValueOrigin","newValueOrigin","diff","currPoints","nextPoints","currStackedPoints","nextStackedPoints","status","sortedIndices","rawIndices","newDataOldCoordInfo","prepareDataCoordInfo","oldPoints","newPoints","i","diffItem","pointAdded","oldIdx2","newIdx2","currentX","currentY","nextX","nextY","newDataDimsForPoint","oldPt","stackedOnPoint","getStackedOnPoint","a","b","len","sortedCurrPoints","createFloat32Array","sortedNextPoints","sortedCurrStackedPoints","sortedNextStackedPoints","sortedStatus","i2","idx2","mathMin","mathMax","isPointNull","x","y","drawSegment","ctx","points","start","segLen","allLen","dir","smooth","smoothMonotone","connectNulls","prevX","prevY","cpx0","cpy0","cpx1","cpy1","idx","k","dx","dy","nextIdx","nextX","nextY","tmpK","ratioNextSeg","vx","vy","nextCpx0","nextCpy0","dx0","dx1","dy0","dy1","lenPrevSeg","lenNextSeg","dir_1","dir_2","ECPolylineShape","ECPolyline","_super","__extends","opts","_this","shape","i","len","xOrY","dim","path","data","CMD","PathProxy_default","x0","y0","isDimX","roots","cmd","x2","y2","x3","y3","t","val","nRoot","cubicRootAt","i_1","t_1","cubicAt","Path_default","ECPolygonShape","_super","__extends","ECPolylineShape","ECPolygon","opts","_this","ctx","shape","points","stackedOnPoints","i","len","smoothMonotone","isPointNull","k","drawSegment","Path_default","createGridClipPath","cartesian","hasAnimation","seriesModel","done","during","rect","x","y","width","height","lineWidth","clipPath","Rect_default","baseAxis","isHorizontal","isAxisInversed","duringCb","isFunction","percent","initProps","createPolarClipPath","polar","sectorArea","r0","round","r","Sector_default","isRadial","createClipPath","coordSys","isCoordinateSystemType","coordSys","type","isPointsSame","points1","points2","i","bboxFromPoints","points","minX","minY","maxX","maxY","x","y","getBoundingDiff","_a","min1","max1","_b","min2","max2","getSmooth","smooth","isNumber","getStackedOnPoints","coordSys","data","dataCoordInfo","len","createFloat32Array","idx","pt","getStackedOnPoint","turnPointsIntoStep","stepTurnAt","connectNulls","baseAxis","baseIndex","stepPoints","stepPt","nextPt","filteredPoints","middle","stepPt2","clipColorStops","colorStops","maxSize","newColorStops","prevOutOfRangeColorStop","prevInRangeColorStop","lerpStop","stop0","stop1","clippedCoord","coord0","p","color","lerp","stop_1","coord","getVisualGradient","api","visualMetaList","coordDim","visualMeta","dimInfo","axis","map","stop","stopLen","outerColors","colorStopsInRange","inRangeStopLen","tinyExtent","minCoord","maxCoord","coordSpan","each","gradient","LinearGradient_default","getIsIgnoreFunc","seriesModel","showAllSymbol","isAuto","categoryAxis","canShowAllSymbolForCategory","categoryDataDim","labelMap","labelItem","ordinalNumber","dataIndex","axisExtent","availSize","dataLen","step","Symbol_default","isPointNull","getLastIndexNotNull","getPointAtIndex","getIndexRange","xOrY","dim","dimIdx","b","prevIndex","nextIndex","anyStateShowEndLabel","SPECIAL_STATES","createLineClipPath","lineView","hasAnimation","isCoordinateSystemType","endLabelModel_1","valueAnimation_1","data_1","labelAnimationRecord_1","during","percent","clipRect","isHorizontal","clipPath","createGridClipPath","endLabel","rectShape","expandSize","createPolarClipPath","getEndLabelStateSpecified","endLabelModel","isBaseInversed","align","verticalAlign","LineView","_super","__extends","lineGroup","Group_default","symbolDraw","SymbolDraw_default","ecModel","_this","group","lineStyleModel","areaStyleModel","isCoordSysPolar","prevCoordSys","polyline","polygon","isAreaChart","valueOrigin","prepareDataCoordInfo","stackedOnPoints","showSymbol","isIgnoreFunc","oldData","el","clipShapeForSymbol","visualColor","convertToColorString","oldClipPath","newClipPath","initProps","emphasisModel","focus","blurScope","emphasisDisabled","defaults","setStatesStylesFromModel","emphasisLineStyle","getECData","toggleHoverEmphasis","smoothMonotone","stackedOnSeries","stackedOnSmooth","changePolyState","toState","payload","queryDataIndex","symbol","zlevel","z","symbolLabel","Chart_default","setStatesFlag","ECPolyline","ECPolygon","clipShape","isHorizontalOrRadial","isAxisInverse","seriesDuration","isFunction","seriesDelay","seriesDelayValue","point","start","end","current","polarClip","gridClip","ratio","delay","symbolPath","text","inheritColor","data_2","Text_default","setLabelStyle","getLabelStatesModels","opt","interpolatedValue","getDefaultInterpolatedLabel","getDefaultLabel","animationRecord","valueAnimation","precision","distance","distanceX","distanceY","dataIndexRange","indices","diff","value","startValue","endValue","interpolateRawValues","inner","labelInner","lineAnimationDiff","stackedOnCurrent","next","stackedOnNext","target","updateProps","updatedDataInfo","diffStatus","cmd","offset","LineView_default","pointsLayout","seriesType","forceStoreInTypedArray","createRenderPlanner","seriesModel","data","coordSys","pipelineContext","useTypedArray","dims","map","dim","dimLen","stackResultDim","isDimensionStacked","store","dimIdx0","dimIdx1","params","segCount","points","createFloat32Array","tmpIn","tmpOut","i","offset","point","x","samplers","frame","sum","count","i","max","min","turningPointAbsoluteValue","turningPointOriginalValue","originalValue","absoluteValue","indexSampler","dataSample","seriesType","seriesModel","ecModel","api","data","sampling","coordSys","baseAxis","valueAxis","extent","dpr","size","rate","sampler","isString","isFunction","install","registers","LineView_default","LineSeries_default","pointsLayout","seriesModel","data","lineStyle","dataSample","BaseBarSeriesModel","_super","__extends","_this","option","ecModel","createSeriesData_default","value","dims","startingAtTick","coordSys","clampData_1","pt_1","each","axis","idx","tickCoords","alignTicksWithLabel","targetTickId","isEnd","leftCoord","coord","stepTickValue","i","tickCoord","tickValue","data","offset","size","offsetIndex","Series_default","BaseBarSeries_default","BarSeriesModel","_super","__extends","_this","createSeriesData_default","progressiveThreshold","largeThreshold","dataIndex","data","selectors","inheritDefaultOption","BaseBarSeries_default","BarSeries_default","SausageShape","SausagePath","_super","__extends","opts","_this","ctx","shape","cx","cy","r0","r","dr","rCenter","startAngle","endAngle","clockwise","PI2","lessThanCircle","unitStartX","unitStartY","unitEndX","unitEndY","Path_default","sausage_default","createSectorCalculateTextPosition","positionMapping","opts","isRoundCap","out","boundingRect","textPosition","calculateTextPosition","mappedSectorPosition","distance","sector","cx","cy","r","r0","middleR","startAngle","endAngle","middleAngle","extraDist","mathCos","mathSin","x","y","textAlign","textVerticalAlign","adjustAngleDistanceX","adjustAngleDistanceY","setSectorTextRotation","rotateType","isNumber","isArray","shape","anchorAngle","rotate","angle","isEnd","getSectorCornerRadius","model","shape","zeroIfNull","cornerRadius","isArray","dr","map","cr","parsePercent","mathMax","mathMin","getClipArea","coord","data","coordSysClipArea","isCoordinateSystemType","baseAxis","expandWidth","BarView","_super","__extends","_this","seriesModel","ecModel","api","payload","coordinateSystemType","params","cb","traverseElements","isLargeDraw","group","oldData","isHorizontalOrRadial","animationModel","realtimeSortCfg","shouldRealtimeSort","needsClip","roundCap","drawBackground","backgroundModel","barBorderRadius","bgEls","oldBgEls","isInitSort","isChangeOrder","createBackground","dataIndex","bgLayout","getLayout","bgEl","createBackgroundEl","itemModel","layout","isValidLayout","isClipped","clip","el","elementCreator","updateStyle","updateRealtimeAnimation","initProps","newIndex","oldIndex","shape","createBackgroundShape","updateProps","saveOldStyle","textEl","labelInnerStore","labelInner","removeElementWithFadeOut","bgGroup","Group_default","i","createLarge","clipPath","createClipPath","orderMapping_1","idx","orderMapping","info","ordinalNumber","dataIdx","mappedValue","a","b","map","item","scale","ordinalDataDim","lastValue","tickNum","len","rawIdx","value","orderInfo","extent","tickMax","sortInfo","sortResult","model","getECData","Chart_default","coordSysBoundingRect","signWidth","signHeight","coordSysX2","coordSysY2","x","x2","y","y2","xClipped","yClipped","signR","tmp","r","r0","clipped","isHorizontal","axisModel","isUpdate","rect","Rect_default","extend","rectShape","animateProperty","isRadial","ShapeClass","sausage_default","Sector_default","sector","positionMap","createPolarPositionMapping","createSectorCalculateTextPosition","sectorShape","animateTarget","coordSys","realtimeSortOption","seriesAnimationModel","seriesTarget","axisTarget","axisAnimationModel","checkPropertiesNotValid","obj","props","rectPropties","polarPropties","fixedLineWidth","getLineWidth","signX","signY","isZeroOnPolar","arcOrAngle","position","isPolar","style","cornerRadius","getSectorCornerRadius","borderRadius","cursorStyle","labelPositionOutside","labelStatesModels","getLabelStatesModels","setLabelStyle","getDefaultLabel","label","setSectorTextRotation","setLabelValueAnimation","getDefaultInterpolatedLabel","emphasisModel","toggleHoverEmphasis","setStatesStylesFromModel","each","state","rawLayout","borderColor","lineWidth","width","height","LagePathShape","LargePath","opts","ctx","points","baseDimIdx","valueDimIdx","startPoint","size","barWidth","Path_default","progressiveEls","incremental","largeDataIndices","bgPoints","largePathUpdateDataIndex","throttle","event","largePath","largePathFindDataIndex","ii","coordLayout","ElementClz","BarView_default","install","registers","BarView_default","BarSeries_default","curry","layout","createProgressiveLayout","dataSample","payload","ecModel","componentType","componentModel","ScatterSeriesModel","_super","__extends","_this","option","ecModel","createSeriesData_default","progressive","progressiveThreshold","dataIndex","data","selectors","Series_default","ScatterSeries_default","BOOST_SIZE_THRESHOLD","LargeSymbolPathShape","LargeSymbolPath","_super","__extends","opts","_this","path","shape","points","size","symbolProxy","symbolProxyShape","ctx","canBoost","softClipShape","i","x","y","w","h","idx","x0","y0","localPos","rect","dataIdx","minX","minY","maxX","maxY","BoundingRect_default","Path_default","LargeSymbolDraw","Group_default","data","opt","symbolEl","child","len","byteOffset","taskParams","lastAdded","oldPoints","oldLen","newPoints","cb","hostModel","createSymbol","extrudeShadow","globalStyle","visualColor","ecData","getECData","e","dataIndex","LargeSymbolDraw_default","ScatterView","_super","__extends","_this","seriesModel","ecModel","api","data","symbolDraw","taskParams","res","pointsLayout","cb","coordSys","pipelineContext","isLargeDraw","LargeSymbolDraw_default","SymbolDraw_default","Chart_default","ScatterView_default","GridModel","_super","__extends","Component_default","GridModel_default","CartesianAxisModel","_super","__extends","SINGLE_REFERRING","Component_default","mixin","CartesianAxisModel","AxisModelCommonMixin","defaultOption","categoryAxis","merge","valueAxis","timeAxis","logAxis","defaults","axisDefault_default","AXIS_TYPES","axisModelCreator","registers","axisName","BaseAxisModelClass","extraDefaultOption","each","AXIS_TYPES","v","axisType","defaultOption","merge","axisDefault_default","AxisModel","_super","__extends","_this","option","ecModel","layoutMode","fetchLayoutMode","inputPositionParams","getLayoutParams","themeModel","getAxisType","mergeLayoutParam","thisOption","OrdinalMeta_default","rawData","Cartesian","name","dim","map","scaleType","filter","axis","Cartesian_default","cartesian2DDimensions","canCalculateAffineTransform","scale","Cartesian2D","_super","__extends","_this","xAxisScale","yAxisScale","xScaleExtent","yScaleExtent","start","end","xScaleSpan","yScaleSpan","scaleX","scaleY","translateX","translateY","m","invert","point","axisX","axisY","data","data1","data2","zoneDiag1","zoneDiag2","area","zone","BoundingRect_default","clamp","out","xVal","yVal","applyTransform","xAxis","yAxis","xScale","yScale","xAxisExtent","yAxisExtent","x","y","axis","tolerance","xExtent","yExtent","width","height","Cartesian_default","Cartesian2D_default","Axis2D","_super","__extends","dim","scale","coordExtent","axisType","position","_this","asc","ret","point","clamp","info","Axis_default","Axis2D_default","layout","gridModel","axisModel","opt","grid","axis","otherAxisOnZeroOf","rawAxisPosition","axisPosition","axisDim","rect","rectBound","idx","axisOffset","posBound","onZeroCoord","dirMap","retrieve","labelRotate","isCartesian2DSeries","seriesModel","findAxisModels","axisModelMap","each","v","key","axisType","SINGLE_REFERRING","mathLog","alignScaleTicks","scale","axisModel","alignToScale","intervalScaleProto","Interval_default","alignToTicks","alignToNicedTicks","alignToSplitNumber","alignToInterval","scaleExtent","getScaleExtent","rawExtent","isMinFixed","isMaxFixed","logBase","extent","interval","min","max","increaseInterval","nicedSplitNumber","range","round","t0","t1","ticks","Grid","gridModel","ecModel","api","cartesian2DDimensions","axesMap","updateAxisTicks","axes","alignTo","axesIndices","keys","len","axisNeedsAlign","i","idx","axis","model","scale","isIntervalOrLogScale","niceScaleExtent","each","alignScaleTicks","onZeroRecords","xAxis","fixAxisOnZero","yAxis","ignoreContainLabel","boxLayoutParams","isContainLabel","gridRect","getLayoutRect","axesList","adjustAxes","labelUnionRect","estimateLabelUnionRect","dim","margin","coord","isHorizontal","extent","updateAxisTransform","axisIndex","axesMapOnDim","xAxisIndex","yAxisIndex","key","isObject","coordList","finder","value","target","seriesModel","xAxisModel","SINGLE_REFERRING","yAxisModel","coordsList","cartesian","indexOf","grid","point","_this","axisPositionUsed","axesCount","createAxisCreator","Cartesian2D_default","dimName","axisModel","isAxisUsedInTheGrid","axisPosition","Axis2D_default","createScaleByModel","isCategory","categorySortInfo","isCartesian2DSeries","axesModelMap","findAxisModels","data","unionExtent","getDataDimensionsOnAxis","baseAxes","otherAxes","baseAxis","otherAxis","grids","otherAxisDim","otherAxisOnZeroOf","onZero","onZeroAxisIndex","canOnZeroToAxis","getOnZeroRecordKey","ifAxisCrossZero","coordBase","axisExtent","axisExtentSum","Grid_default","PI","AxisBuilder","axisModel","opt","Group_default","defaults","transformGroup","name","builders","axisRotation","textRotation","direction","rotationDiff","remRadian","textAlign","textVerticalAlign","isRadianAroundZero","eventData","tooltipOpt","group","shown","extent","matrix","pt1","pt2","inverse","applyTransform","lineStyle","extend","line","Line_default","subPixelOptimizeLine","arrows","arrowSize","isString","isNumber","arrowOffset","normalizeSymbolOffset","symbolWidth_1","symbolHeight_1","each","point","index","symbol","createSymbol","r","pt","ticksEls","buildAxisMajorTicks","labelEls","buildAxisLabel","fixMinMaxLabelShow","buildAxisMinorTicks","labelList","prepareLayoutList","map","label","hideOverlap","retrieve","nameLocation","nameDirection","textStyleModel","gap","gapSignal","pos","isNameLocationCenter","labelLayout","nameRotation","axisNameAvailableWidth","endTextLayout","textFont","truncateOpt","ellipsis","maxWidth","textEl","Text_default","createTextStyle","setTooltipConfig","getECData","rotation","textPosition","textRotate","onLeft","tickEls","shouldShowAllLabels","showMinLabel","showMaxLabel","firstLabel","nextLabel","lastLabel","prevLabel","firstTick","nextTick","lastTick","prevTick","ignoreEl","isTwoLabelOverlapped","el","current","next","firstRect","nextRect","mRotationBack","identity","rotate","mul","createTicks","ticksCoords","tickTransform","tickEndCoord","tickLineStyle","anidPrefix","i","tickCoord","tickEl","axis","tickModel","lineStyleModel","tickDirection","minorTickModel","minorTicksCoords","minorTickLineStyle","minorTicksEls","k","show","labelModel","labelMargin","labels","labelRotation","rawCategoryData","silent","triggerEvent","labelItem","tickValue","formattedLabel","rawLabel","itemLabelModel","rawCategoryItem","isObject","Model_default","textColor","align","alignMin","retrieve2","alignMax","verticalAlign","verticalAlignMin","verticalAlignMax","isFunction","AxisBuilder_default","collect","ecModel","api","result","collectAxesInfo","collectSeriesInfo","globalTooltipModel","globalAxisPointerModel","linksOption","linkGroups","each","coordSys","coordSysKey","makeKey","axesInfoInCoordSys","coordSysModel","baseTooltipModel","curry","saveTooltipAxisInfo","triggerAxis","cross","tooltipAxes","fromTooltip","triggerTooltip","axis","axisPointerModel","axisPointerShow","isHandleTrigger","makeAxisPointerModel","snap","triggerEmphasis","axisKey","involveSeries","axisInfo","groupIndex","getLinkGroupIndex","linkGroup","tooltipAxisPointerModel","fields","volatileOption","field","clone","labelOption","tooltipAxisPointerLabelShow","crossStyle","defaults","Model_default","seriesModel","seriesTooltipTrigger","seriesTooltipShow","axisModel","dim","i","linkOption","checkPropInLink","linkPropValue","axisPropValue","isArray","indexOf","fixValue","getAxisInfo","scale","option","status","value","useHandle","extent","coordSysAxesInfo","getAxisPointerModel","model","axisPointerClazz","AxisView","_super","__extends","_this","axisModel","ecModel","api","payload","fixValue","axisPointer","forceRender","Clazz","axisPointerModel","getAxisPointerModel","type","clazz","Component_default","AxisView_default","inner","makeInner","rectCoordAxisBuildSplitArea","axisView","axisGroup","axisModel","gridModel","axis","splitAreaModel","areaStyleModel","areaColors","gridRect","ticksCoords","areaColorsLen","lastSplitAreaColors","newSplitAreaColors","createHashMap","colorIndex","i","cIndex","prev","areaStyle","isArray","tickCoord","x","y","width","height","tickValue","Rect_default","defaults","rectCoordAxisHandleRemove","axisBuilderAttrs","selfBuilderAttrs","CartesianAxisView","_super","__extends","_this","axisModel","ecModel","api","payload","oldAxisGroup","Group_default","gridModel","layout","axisBuilder","AxisBuilder_default","extend","elementType","cartesians","i","isIntervalOrLogScale","each","name","axisElementBuilders","isInitialSortFromBarRacing","groupTransition","rectCoordAxisHandleRemove","AxisView_default","axisView","axisGroup","axis","splitLineModel","lineStyleModel","lineColors","isArray","gridRect","isHorizontal","lineCount","ticksCoords","p1","p2","lineStyle","tickCoord","colorIndex","tickValue","line","Line_default","defaults","subPixelOptimizeLine","minorSplitLineModel","minorTicksCoords","k","rectCoordAxisBuildSplitArea","CartesianXAxisView","CartesianYAxisView","_super","__extends","_this","CartesianXAxisView","CartesianAxisView","GridView","_super","__extends","_this","gridModel","ecModel","Rect_default","defaults","Component_default","extraOption","install","registers","GridModel_default","Grid_default","axisModelCreator","CartesianAxisModel","CartesianXAxisView","CartesianYAxisView","option","install","registers","use","ScatterSeries_default","ScatterView_default","pointsLayout","inner","makeInner","clone","bind","BaseAxisPointer","axisModel","axisPointerModel","api","forceRender","value","status","group","handle","elOption","graphicKey","moveAnimation","Group_default","doUpdateProps","curry","updateProps","updateMandatoryProps","animation","axis","isCategoryAxis","useSnap","animationThreshold","seriesDataCount","getAxisInfo","axisExtent","pointerOption","pointerEl","graphic_exports","labelEl","Text_default","updateLabelShowHide","zr","handleModel","isInit","createIcon","e","stop","handleSize","isArray","createOrUpdate","getHandleTransProps","dx","dy","trans","payloadInfo","clear","xy","wh","xDimIndex","animationModel","el","props","propsEqual","lastProps","newProps","isObject","equals_1","each","item","key","silent","z","zlevel","BaseAxisPointer_default","buildElStyle","axisPointerModel","axisPointerType","styleModel","style","buildLabelElOption","elOption","axisModel","api","labelPos","value","text","getValueLabel","labelModel","paddings","normalizeCssArray","font","textRect","getBoundingRect","position","width","height","align","verticalAlign","confineInContainer","bgColor","createTextStyle","viewWidth","viewHeight","axis","ecModel","seriesDataIndices","opt","formatter","params_1","getAxisRawValue","each","idxItem","series","dataIndex","dataParams","isString","isFunction","getTransformedPosition","layoutInfo","transform","create","rotate","translate","applyTransform","buildCartesianSingleLabelElOption","textLayout","AxisBuilder_default","makeLineShape","p1","p2","xDimIndex","makeRectShape","xy","wh","makeSectorShape","cx","cy","r0","r","startAngle","endAngle","CartesianAxisPointer","_super","__extends","elOption","value","axisModel","axisPointerModel","api","axis","grid","axisPointerType","otherExtent","getCartesian","pixelValue","elStyle","buildElStyle","pointerOption","pointerShapeBuilder","layoutInfo","layout","buildCartesianSingleLabelElOption","pos","getTransformedPosition","transform","delta","axisExtent","dimIndex","currPosition","cursorOtherValue","cursorPoint","tooltipOptions","BaseAxisPointer_default","opt","targetShape","makeLineShape","getAxisDimIndex","bandWidth","span","makeRectShape","CartesianAxisPointer_default","AxisPointerModel","_super","__extends","_this","Component_default","AxisPointerModel_default","inner","makeInner","each","register","key","api","handler","env_default","zr","initGlobalListeners","record","useHandler","curry","doEnter","onLeave","eventType","cb","e","dis","makeDispatchAction","dispatchTooltipFinally","pendings","showLen","hideLen","actuallyPayload","dispatchAction","currTrigger","payload","pendingList","unregister","AxisPointerView","_super","__extends","_this","globalAxisPointerModel","ecModel","api","globalTooltipModel","triggerOn","register","currTrigger","e","dispatchAction","unregister","Component_default","AxisPointerView_default","findPointFromSeries","finder","ecModel","point","seriesIndex","seriesModel","data","dataIndex","queryDataIndex","isArray","el","coordSys","baseAxis","valueAxis","valueAxisDim","baseAxisDim","baseDataOffset","baseDim","stackedData","map","dim","rect","inner","makeInner","axisTrigger","payload","ecModel","api","currTrigger","point","finder","dispatchAction","bind","coordSysAxesInfo","illegalPoint","findPointFromSeries","isIllegalPoint","inputAxesInfo","axesInfo","shouldHide","outputPayload","showValueMap","dataByCoordSys","updaters","curry","showPointer","showTooltip","each","coordSys","coordSysKey","coordSysContainsPoint","axisInfo","key","axis","inputAxisInfo","findInputAxisInfo","val","processOnAxis","linkTriggers","tarAxisInfo","tarKey","linkGroup","srcAxisInfo","srcKey","srcValItem","makeMapperParam","updateModelActually","dispatchTooltipActually","dispatchHighDownActually","newValue","noSnap","outputFinder","payloadInfo","buildPayloadsBySeries","payloadBatch","snapToValue","extend","value","dim","minDist","minDiff","series","idx","dataDim","seriesNestestValue","dataIndices","result","diff","dist","dataIndex","axisModel","axisPointerModel","coordSysModel","makeKey","coordSysItem","outputAxesInfo","option","valItem","sampleItem","zr","highDownKey","lastHighlights","newHighlights","batchItem","toHighlight","toDownplay","i","item","install","registers","AxisView_default","CartesianAxisPointer_default","AxisPointerModel_default","AxisPointerView_default","option","link","isArray","ecModel","api","collect","axisTrigger","install","registers","use","PolarAxisPointer","_super","__extends","elOption","value","axisModel","axisPointerModel","api","axis","polar","otherAxis","otherExtent","coordValue","axisPointerType","elStyle","buildElStyle","pointerOption","pointerShapeBuilder","labelMargin","labelPos","getLabelPosition","buildLabelElOption","BaseAxisPointer_default","coord","axisAngle","radiusExtent","position","align","verticalAlign","transform","create","rotate","translate","applyTransform","labelRotation","labelLayout","AxisBuilder_default","r","cx","cy","makeLineShape","bandWidth","radian","makeSectorShape","PolarAxisPointer_default","PolarModel","_super","__extends","_this","axisType","foundAxisModel","ecModel","axisModel","Component_default","PolarModel_default","PolarAxisModel","_super","__extends","SINGLE_REFERRING","Component_default","mixin","AxisModelCommonMixin","AngleAxisModel","_super","__extends","_this","PolarAxisModel","RadiusAxisModel","_super","__extends","_this","PolarAxisModel","RadiusAxis","_super","__extends","scale","radiusExtent","point","clamp","Axis_default","RadiusAxis_default","inner","makeInner","AngleAxis","_super","__extends","scale","angleExtent","point","clamp","axis","labelModel","ordinalScale","ordinalExtent","tickCount","tickValue","unitSpan","unitH","rect","getBoundingRect","maxH","dh","interval","cache","lastAutoInterval","lastTickCount","Axis_default","AngleAxis_default","polarDimensions","Polar","name","RadiusAxis_default","AngleAxis_default","point","coord","data","dim","key","scaleType","axes","angleAxis","radiusAxis","axis","baseAxis","clamp","dx","dy","extent","minAngle","maxAngle","radius","radian","dir","x","y","radiusExtent","angleExtent","RADIAN","d2","r","r0","ecModel","finder","value","coordSys","getCoordSys","pixel","seriesModel","polarModel","Polar_default","resizePolar","polar","polarModel","api","center","width","height","parsePercent","radiusAxis","size","radius","isArray","parsedRadius","updatePolarScale","ecModel","angleAxis","seriesModel","data_1","each","getDataDimensionsOnAxis","dim","niceScaleExtent","extent","diff","isAngleAxisModel","axisModel","setAxis","axis","_a","createScaleByModel","startAngle","endAngle","polarCreator","polarDimensions","polarList","idx","Polar_default","radiusAxisModel","angleAxisModel","SINGLE_REFERRING","polarCreator_default","elementList","getAxisLineShape","polar","rExtent","angle","start","end","getRadiusIdx","radiusAxis","fixAngleOverlap","list","firstItem","lastItem","AngleAxisView","_super","__extends","_this","angleAxisModel","ecModel","angleAxis","radiusExtent","ticksAngles","minorTickAngles","labels","map","labelItem","clone","scale","tickValue","each","name","angelAxisElementsBuilders","AxisView_default","group","lineStyleModel","RADIAN","angleExtent","rId","r0Id","shape","shapeType","graphic_exports","Ring_default","tickModel","tickLen","radius","lines","tickAngleItem","Line_default","mergePath","defaults","tickAngles","minorTickModel","i","k","rawCategoryData","commonLabelModel","labelMargin","triggerEvent","idx","labelModel","r","p","cx","cy","labelTextAlign","labelTextVerticalAlign","rawCategoryItem","isObject","Model_default","textEl","Text_default","AxisBuilder_default","createTextStyle","eventData","getECData","splitLineModel","lineColors","lineCount","splitLines","colorIndex","minorSplitLineModel","splitAreaModel","areaStyleModel","areaColors","splitAreas","prevAngle","r0","r1","clockwise","len","coord","Sector_default","AngleAxisView_default","axisBuilderAttrs","selfBuilderAttrs","RadiusAxisView","_super","__extends","_this","radiusAxisModel","ecModel","oldAxisGroup","newAxisGroup","Group_default","radiusAxis","polar","angleAxis","ticksCoords","minorTicksCoords","axisAngle","radiusExtent","layout","layoutAxis","axisBuilder","AxisBuilder_default","each","groupTransition","name","axisElementBuilders","AxisView_default","group","splitLineModel","lineStyleModel","lineColors","lineCount","RADIAN","angleExtent","shapeType","splitLines","i","colorIndex","graphic_exports","mergePath","defaults","minorSplitLineModel","lines","k","Circle_default","splitAreaModel","areaStyleModel","areaColors","splitAreas","prevRadius","Sector_default","RadiusAxisView_default","getSeriesStackId","seriesModel","getAxisKey","polar","axis","barLayoutPolar","seriesType","ecModel","api","lastStackCoords","barWidthAndOffset","calRadialBar","filter","data","baseAxis","axisKey","stackId","columnLayoutInfo","columnOffset","columnWidth","valueAxis","cx","cy","barMinHeight","barMinAngle","valueDim","baseDim","stacked","isDimensionStacked","clampLayout","valueAxisModel","startValue","valueAxisStart","idx","len","value","baseValue","sign","baseCoord","r0","r","startAngle","endAngle","radiusSpan","angle","angleSpan","radius","barSeries","columnsMap","each","axisExtent","bandWidth","columnsOnAxis","stacks","barWidth","parsePercent","barMaxWidth","barGap","barCategoryGap","result","coordSysName","categoryGap","barGapPercent","remainedWidth","autoWidthCount","autoWidth","column","stack","maxWidth","widthSum","lastColumn","offset","barPolar_default","angleAxisExtraOption","radiusAxisExtraOption","PolarView","_super","__extends","_this","Component_default","install","registers","use","AxisView_default","PolarAxisPointer_default","polarCreator_default","PolarModel_default","axisModelCreator","AngleAxisModel","RadiusAxisModel","AngleAxisView_default","RadiusAxisView_default","curry","barPolar_default","layout","axisModel","opt","single","axis","axisPosition","orient","rect","rectBound","positionMap","r","directionMap","retrieve","labelRotation","axisBuilderAttrs","selfBuilderAttrs","SingleAxisView","_super","__extends","_this","axisModel","ecModel","api","payload","group","oldAxisGroup","Group_default","layout","axisBuilder","AxisBuilder_default","each","name","axisElementBuilders","groupTransition","rectCoordAxisHandleRemove","AxisView_default","axisView","axisGroup","axis","splitLineModel","lineStyleModel","lineColors","lineWidth","gridRect","isHorizontal","splitLines","lineCount","ticksCoords","p1","p2","i","tickCoord","line","Line_default","subPixelOptimizeLine","colorIndex","lineStyle","mergePath","defaults","rectCoordAxisBuildSplitArea","SingleAxisView_default","SingleAxisModel","_super","__extends","_this","Component_default","mixin","AxisModelCommonMixin","AxisModel_default","SingleAxis","_super","__extends","dim","scale","coordExtent","axisType","position","_this","point","clamp","Axis_default","SingleAxis_default","singleDimensions","Single","axisModel","ecModel","api","dim","axis","SingleAxis_default","createScaleByModel","isCategory","seriesModel","data_1","each","niceScaleExtent","getLayoutRect","rect","isHorizontal","extent","idx","coordBase","axisExtent","extentSum","coord","point","orient","val","pt","finder","value","coordSys","getCoordSys","pixel","singleModel","Single_default","create","ecModel","api","singles","axisModel","idx","single","Single_default","seriesModel","singleAxisModel","SINGLE_REFERRING","singleCreator","singleDimensions","singleCreator_default","XY","WH","SingleAxisPointer","_super","__extends","elOption","value","axisModel","axisPointerModel","api","axis","coordSys","otherExtent","getGlobalExtent","getPointDimIndex","pixelValue","axisPointerType","elStyle","buildElStyle","pointerOption","pointerShapeBuilder","layoutInfo","layout","buildCartesianSingleLabelElOption","position","getTransformedPosition","transform","delta","dimIndex","axisExtent","currPosition","cursorOtherValue","cursorPoint","BaseAxisPointer_default","targetShape","makeLineShape","bandWidth","span","makeRectShape","rect","SingleAxisPointer_default","SingleView","_super","__extends","_this","Component_default","install","registers","use","AxisView_default","SingleAxisPointer_default","SingleAxisView_default","AxisModel_default","axisModelCreator","singleCreator_default","makeBackground","rect","componentModel","padding","normalizeCssArray","style","Rect_default","TooltipModel","_super","__extends","_this","Component_default","TooltipModel_default","shouldTooltipConfine","tooltipModel","confineOption","testStyle","styleProps","env_default","style","i","len","TRANSFORM_VENDOR","TRANSITION_VENDOR","toCSSVendorPrefix","styleVendor","styleProp","toCamelCase","idx","getComputedStyle","el","stl","CSS_TRANSITION_VENDOR","toCSSVendorPrefix","TRANSITION_VENDOR","CSS_TRANSFORM_VENDOR","TRANSFORM_VENDOR","gCssText","env_default","mirrorPos","pos","assembleArrow","tooltipModel","borderColor","arrowPosition","isString","backgroundColor","borderWidth","convertToColorString","arrowPos","arrowSize","positionStyle","transformStyle","rotateDeg","indexOf","rotateRadian","arrowWH","rotatedWH","arrowOffset","borderStyle","styleCss","assembleTransition","duration","onlyFade","transitionCurve","transitionOption","transitionText","assembleTransform","x","y","toString","x0","y0","is3d","translate","assembleFont","textStyleModel","cssText","fontSize","color","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","each","name","val","assembleCssText","enableTransition","transitionDuration","padding","getPaddingFromTooltipModel","boxShadow","borderName","camelCase","toCamelCase","normalizeCssArray","makeStyleCoord","out","zr","container","zrX","zrY","zrPainter","zrViewportRoot","transformLocalCoord","viewportRootOffset","TooltipHTMLContent","api","opt","el","appendTo","isDom","isFunction","self","e","handler","normalizeEvent","position","getComputedStyle","domStyle","alwaysShowContent","nearPointColor","style","styleCoord","content","markers","arrow","shouldTooltipConfine","isArray","i","arrowEl","enterable","style_1","transforms","transform","ratioX","ratioY","_this","time","bind","parentNode","TooltipHTMLContent_default","TooltipRichContent","api","makeStyleCoord","tooltipModel","alwaysShowContent","content","markupStyleCreator","borderColor","arrowPosition","_this","isObject","throwError","textStyleModel","Text_default","getPaddingFromTooltipModel","each","propName","self","enterable","el","bounding","shadowOuterSize","calcShadowOuterSize","x","y","styleCoord","style","borderWidth","mathMaxWith0","ratioX","ratioY","time","bind","val","shadowBlur","shadowOffsetX","shadowOffsetY","out","zr","zrX","zrY","TooltipRichContent_default","proxyRect","Rect_default","TooltipView","_super","__extends","_this","ecModel","api","env_default","tooltipModel","renderMode","getTooltipRenderMode","TooltipRichContent_default","TooltipHTMLContent_default","tooltipContent","createOrUpdate","clear","triggerOn","register","bind","currTrigger","e","dispatchAction","self_1","payload","makeDispatchAction","dataByCoordSys","cmptRef","findComponentReference","rect","el","getECData","pointInfo","findPointFromSeries","cx","cy","seriesIndex","dataIndex","coordSysAxesInfo","seriesModel","data","tooltipCascadedModel","buildTooltipModel","ecData","seriesDispatcher_1","cmptDispatcher_1","findEventDispatcher","target","cb","delay","globalTooltipModel","point","singleTooltipModel","cbParamsList","articleMarkup","createTooltipMarkup","markupTextArrLegacy","markupStyleCreator","TooltipMarkupStyleCreator","each","itemCoordSys","axisItem","axisModel","axisValue","axisValueLabel","getValueLabel","axisSectionMarkup","trim","idxItem","series","cbParams","getAxisRawValue","convertToColorString","seriesTooltipResult","normalizeTooltipFormatResult","frag","valueFormatter","extend","positionExpr","orderMode","builtMarkupText","buildTooltipMarkup","blockBreak","allMarkupText","dispatcher","dataModel","dataType","positionDefault","tooltipTrigger","params","markupText","asyncTicket","isHTMLRenderMode","tooltipConfig","tooltipOpt","encodeHTMLContent","isString","content","clone","encodeHTML","tooltipModelCascade","cmpt","subTooltipModel","defaultHtml","formatterParams","x","y","formatter","html","nearPoint","nearPointColor","useUTC","params0","isArray","isTimeAxis","format","formatTpl","isFunction","callback","cbTicket","tooltipDataParams","trigger","borderColor","viewWidth","viewHeight","contentSize","align","vAlign","parsePercent","isObject","boxLayoutPosition","layoutRect","getLayoutRect","pos","calcTooltipPosition","refixTooltipPosition","isCenterAlign","shouldTooltipConfine","confineTooltipPosition","lastCoordSys","lastCbParamsList","contentNotChanged","lastItemCoordSys","indexCoordSys","lastDataByAxis","thisItemCoordSys","thisDataByAxis","lastItem","indexAxis","thisItem","lastIndices","newIndices","lastIdxItem","j","newIdxItem","seriesIdx","lastCbParams","unregister","Component_default","modelCascade","defaultTooltipOption","resultModel","Model_default","i","gapH","gapV","size","width","height","position","borderWidth","domWidth","domHeight","offset","rectWidth","rectHeight","queryOptionMap","preParseFinder","componentMainType","queryResult","queryReferringComponents","model","view","subEl","TooltipView_default","install","registers","use","TooltipModel_default","TooltipView_default","noop","TitleModel","_super","__extends","_this","Component_default","TitleView","titleModel","ecModel","api","group","textStyleModel","subtextStyleModel","textAlign","textVerticalAlign","retrieve2","textEl","Text_default","createTextStyle","textRect","subText","subTextEl","link","sublink","triggerEvent","windowOpen","getECData","groupRect","layoutOption","layoutRect","getLayoutRect","alignStyle","padding","style","rect","Rect_default","install","registers","getDefaultSelectorOptions","ecModel","type","LegendModel","_super","__extends","_this","option","parentModel","selector","isArray","each","item","index","isString","merge","legendData","hasSelected","i","name_1","potentialData","availableNames","seriesModel","seriesName","isPotential","provider","names","isNameSpecified","rawData","legendNameMap","createHashMap","map","dataItem","isNumber","Model_default","filter","name","selected","selectedMode","data","indexOf","Component_default","LegendModel_default","curry","each","Group","Group_default","LegendView","_super","__extends","_this","legendModel","ecModel","api","isFirstRender","itemAlign","orient","selector","selectorPosition","positionInfo","viewportSize","padding","maxSize","getLayoutRect","mainRect","layoutRect","defaults","makeBackground","contentGroup","legendDrawnMap","createHashMap","selectMode","excludeSeriesId","seriesModel","legendItemModel","dataIndex","name","g","data","lineVisualStyle","legendIcon","style","itemGroup","dispatchSelectAction","dispatchHighlightAction","dispatchDownplayAction","child","ecData","getECData","provider","idx","colorArr","parse","extend","stringify","selectorGroup","selectorItem","type","labelText","Text_default","labelModel","emphasisLabelModel","setLabelStyle","enableHoverEmphasis","itemVisualStyle","drawType","itemWidth","itemHeight","isSelected","iconRotate","symbolKeepAspect","legendIconType","getLegendStyle","textStyleModel","isFunction","rotate","getDefaultLegendIcon","textX","textAlign","formatter","content","isString","textColor","createTextStyle","hitRect","Rect_default","tooltipModel","setTooltipConfig","box","contentRect","contentPos","selectorRect","selectorPos","selectorButtonGap","orientIdx","wh","hw","yx","Component_default","iconType","handleCommonProps","visualStyle","propVal","propName","itemStyleModel","itemStyle","iconBrushType","decalStyle","createOrUpdatePatternFromDecal","legendLineModel","lineStyle","borderWidth","visualHasBorder","opt","symboType","icon","createSymbol","seriesName","dataName","isUseHoverLayer","list","emphasisState","len","LegendView_default","legendFilter","ecModel","legendModels","series","legendSelectActionHandler","methodName","payload","ecModel","selectedMap","isToggleSelect","isSelected","legendModel","legendData","each","model","name","isItemSelected","installLegendAction","registers","curry","install","registers","LegendModel_default","LegendView_default","legendFilter","installLegendAction","ScrollableLegendModel","_super","__extends","_this","scrollDataIndex","option","parentModel","ecModel","inputPositionParams","getLayoutParams","mergeAndNormalizeLayoutParams","inheritDefaultOption","LegendModel_default","legendModel","target","raw","orient","ignoreSize","mergeLayoutParam","ScrollableLegendModel_default","Group","Group_default","WH","XY","ScrollableLegendView","_super","__extends","_this","itemAlign","legendModel","ecModel","api","selector","orient","selectorPosition","self","controllerGroup","pageIconSize","pageIconSizeArr","isArray","createPageButton","pageTextStyleModel","Text_default","name","iconIdx","pageDataIndexName","icon","createIcon","bind","maxSize","isFirstRender","selectorGroup","orientIdx","wh","xy","hw","yx","box","selectorButtonGap","selectorRect","selectorPos","processMaxSize","clone","mainRect","offset","contentGroup","containerGroup","contentRect","controllerRect","showController","contentPos","containerPos","controllerPos","pageButtonGap","retrieve2","pageButtonPosition","clipShape","Rect_default","child","pageInfo","updateProps","to","scrollDataIndex","each","key","canJump","pageText","pageFormatter","pageIndex","current","total","isString","containerRectSize","targetItemIndex","children","targetItem","itemCount","pCount","result","targetItemInfo","getItemInfo","i","winStartItemInfo","winEndItemInfo","currItemInfo","intersect","el","itemRect","start","itemInfo","winStart","targetDataIndex","index","defaultIndex","idx","legendDataIdx","LegendView_default","ScrollableLegendView_default","installScrollableLegendAction","registers","payload","ecModel","scrollDataIndex","legendModel","install","registers","use","ScrollableLegendModel_default","ScrollableLegendView_default","installScrollableLegendAction","install","registers","use","RELATIONAL_EXPRESSION_OP_ALIAS_MAP","RegExpEvaluator","rVal","condValue","isString","isRegExp","errMsg","throwError","lVal","type","isNumber","ConstConditionInternal","AndConditionInternal","children","i","OrConditionInternal","NotConditionInternal","RelationalConditionInternal","needParse","getValue","tarValRaw","tarValParsed","parseOption","exprOption","getters","cond","isObjectNotArray","parseAndOrOption","parseNotOption","parseRelationalOption","op","subOptionArr","isArray","map","subOption","valueGetterParam","subCondList","exprKeys","keys","parserName","valueParser","getRawValueParser","keyRaw","hasOwn","condValueRaw","condValueParsed","evaluator","createFilterComparator","val","isObject","isArrayLike","ConditionalExpressionParsed","parseConditionalExpression","filterTransform","params","upstream","rawItem","condition","parseConditionalExpression","createHashMap","exprOption","errMsg","dimLoose","hasOwn","throwError","dimInfo","param","resultData","i","len","sortTransform","params","upstream","config","errMsg","orderExprList","normalizeToArray","throwError","orderDefList","each","orderExpr","dimLoose","order","parserName","incomparable","errMsg_1","errMsg_2","dimInfo","parser","getRawValueParser","SortOrderComparator","sourceFormat","SOURCE_FORMAT_ARRAY_ROWS","SOURCE_FORMAT_OBJECT_ROWS","resultData","i","len","item0","item1","orderDef","val0","val1","result","install","registers","filterTransform","sortTransform","DatasetModel","_super","__extends","_this","option","parentModel","ecModel","SourceManager","disableTransformOptionMerge","newOption","SERIES_LAYOUT_BY_COLUMN","Component_default","DatasetView","_super","__extends","_this","Component_default","install","registers","DatasetModel","use","BarChart","CanvasRenderer","DatasetComponent","GridComponent","LegendComponent","LineChart","PolarComponent","ScatterChart","SingleAxisComponent","TitleComponent","TooltipComponent","TransformComponent","registerLocaleData","localeDe","localeIt","localeEn","localeFr","localeEs","localeCa","localeOc","environment","sentryDSN","init","dsn","bootstrapApplication","AppComponent","providers","provideRouter","routes","importProvidersFrom","BrowserModule","BsDropdownModule","forRoot","CollapseModule","TabsModule","AlertModule","FormsModule","ReactiveFormsModule","ModalModule","TranslateModule","provide","LocationStrategy","useClass","HashLocationStrategy","ErrorHandler","useValue","createErrorHandler","logErrors","showDialog","AlbinaObservationsService","AuthenticationService","AuthGuard","BaseMapService","BlogService","BulletinsService","DangerSourcesService","StatisticsService","RegionsService","WsRegionService","WsUpdateService","WsBulletinService","LocalStorageService","ConfigurationService","ConstantsService","CoordinateDataService","CopyService","DatePipe","ElevationService","GeocodingService","GetDustParamService","GetFilenamesService","MapService","MediaFileService","ObservationFilterService","ObservationMarkerService","ObservationMarkerObserverService","ObservationMarkerWeatherStationService","ObservationMarkerWebcamService","ParamService","provideEchartsCore","echarts","QfaService","TranslateService","UndoRedoService","UserService","provideHttpClient","withInterceptors","httpHeaders","provideAnimations"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387]}